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 void
actionPerformed(java.awt.event.ActionEvent e)
java.lang.String
checkPathPortals(OBlock b)
Validation of paths within a block.protected void
closeNXFrame()
protected boolean
closeWarrantFrame()
protected void
editWarrantFrame(Warrant w)
boolean
errorCheck()
static WarrantTableAction
getDefault()
protected WarrantFrame
getOpenFrame()
protected javax.swing.JMenuItem
makeLogMenu()
protected void
makeNXFrame()
protected void
makeWarrantFrame(Warrant startW, Warrant endW)
javax.swing.JMenu
makeWarrantMenu(boolean edit)
void
mouseClickedOnBlock(OBlock block)
boolean
showPathPortalErrors(javax.swing.JTextArea textArea)
protected void
updateWarrantMenu()
protected void
writetoLog(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)
-
-