Package jmri.jmrit.logix
Class WarrantTableAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- jmri.jmrit.logix.WarrantTableAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action
public class WarrantTableAction extends javax.swing.AbstractAction
A WarrantAction contains the operating permissions and directives needed for a train to proceed from an Origin to a Destination. WarrantTableAction provides the menu for panels to List, Edit and Create Warrants. It launches the appropriate frame for each action.
This file is part of JMRI.JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)java.lang.StringcheckPathPortals(OBlock b)Validation of paths within a block.protected voidcloseNXFrame()protected booleancloseWarrantFrame()protected voideditWarrantFrame(Warrant w)booleanerrorCheck()static WarrantTableActiongetDefault()protected WarrantFramegetOpenFrame()protected javax.swing.JMenuItemmakeLogMenu()protected voidmakeNXFrame()protected voidmakeWarrantFrame(Warrant startW, Warrant endW)javax.swing.JMenumakeWarrantMenu(boolean edit)voidmouseClickedOnBlock(OBlock block)booleanshowPathPortalErrors(javax.swing.JTextArea textArea)protected voidupdateWarrantMenu()protected voidwritetoLog(java.lang.String text)-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Method Detail
-
getDefault
public static WarrantTableAction getDefault()
-
actionPerformed
@InvokeOnGuiThread public void actionPerformed(java.awt.event.ActionEvent e)
-
makeWarrantMenu
public javax.swing.JMenu makeWarrantMenu(boolean edit)
- Parameters:
edit- true if portal errors should be shown in window created from menu item- Returns:
- a menu containing warrant actions
-
updateWarrantMenu
@InvokeOnGuiThread protected void updateWarrantMenu()
-
makeLogMenu
protected javax.swing.JMenuItem makeLogMenu()
-
writetoLog
protected void writetoLog(java.lang.String text)
-
closeNXFrame
@InvokeOnGuiThread protected void closeNXFrame()
-
makeNXFrame
@InvokeOnGuiThread protected void makeNXFrame()
-
closeWarrantFrame
@InvokeOnGuiThread protected boolean closeWarrantFrame()
-
makeWarrantFrame
protected void makeWarrantFrame(Warrant startW, Warrant endW)
-
editWarrantFrame
protected void editWarrantFrame(Warrant w)
-
mouseClickedOnBlock
public void mouseClickedOnBlock(OBlock block)
-
getOpenFrame
protected WarrantFrame getOpenFrame()
-
errorCheck
public boolean errorCheck()
-
checkPathPortals
@Nonnull public java.lang.String checkPathPortals(OBlock b)
Validation of paths within a block. Gathers messages in a text area that can be displayed after all are written.- Parameters:
b- the block to validate- Returns:
- error/warning message, if any
-
showPathPortalErrors
public boolean showPathPortalErrors(javax.swing.JTextArea textArea)
-
-