jmri.jmrit.beantable
Class TurnoutTableAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by jmri.jmrit.beantable.AbstractTableAction
          extended by jmri.jmrit.beantable.TurnoutTableAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public class TurnoutTableAction
extends AbstractTableAction

Swing action to create and register a TurnoutTable GUI.

Author:
Bob Jacobsen Copyright (C) 2003, 2004, 2007
See Also:
Serialized Form

Nested Class Summary
protected  class TurnoutTableAction.TurnoutOperationEditor
           
 
Field Summary
protected  TurnoutManager turnManager
           
 
Fields inherited from class jmri.jmrit.beantable.AbstractTableAction
f, m, rb, rbean
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
TurnoutTableAction()
           
TurnoutTableAction(String actionName)
          Create an action with a specific title.
 
Method Summary
protected  void addPressed(ActionEvent e)
           
 void addToFrame(BeanTableFrame f)
          Add the check box and Operations menu item
 void addToPanel(AbstractTableTabAction f)
          If the subClass is being included in a greater tabbed frame, then this method is used to add the details to the tabbed frame
protected  void createModel()
          Create the JTable DataModel, along with the changes for the specific case of Turnouts
protected  JButton editButton()
          Create a JButton to edit a turnout operation.
protected  void editTurnoutOperation(Turnout t, JComboBox box)
          pop up a TurnoutOperationConfig for the turnout
 String getClassDescription()
           
protected  String getClassName()
           
protected  String helpTarget()
          Specify the JavaHelp target for this specific panel
protected  JComboBox makeAutomationBox(Turnout t)
          Create a JComboBox containing all the options for turnout automation parameters for this turnout
protected  void setDefaultSpeeds(JFrame _who)
           
 void setManager(Manager man)
          If the subClass is being included in a greater tabbed frame, then this is used to specify which manager the subclass should be using.
 void setMenuBar(BeanTableFrame f)
          Allow subclasses to add alter the frames Menubar without have to actually subclass the BeanTableDataFrame
 void setMessagePreferencesDetails()
           
protected  void setTitle()
          Include the correct title
static void updateAutomationBox(Turnout t, JComboBox cb)
          Add the content and make the appropriate selection to a combox box for a turnout's automation choices
 
Methods inherited from class jmri.jmrit.beantable.AbstractTableAction
actionPerformed, dispose, getPanel, getTableDataModel, makeJTable, print, setFrame
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

turnManager

protected TurnoutManager turnManager
Constructor Detail

TurnoutTableAction

public TurnoutTableAction(String actionName)
Create an action with a specific title.

Note that the argument is the Action title, not the title of the resulting frame. Perhaps this should be changed?

Parameters:
actionName -

TurnoutTableAction

public TurnoutTableAction()
Method Detail

setManager

public void setManager(Manager man)
Description copied from class: AbstractTableAction
If the subClass is being included in a greater tabbed frame, then this is used to specify which manager the subclass should be using.

Overrides:
setManager in class AbstractTableAction

createModel

protected void createModel()
Create the JTable DataModel, along with the changes for the specific case of Turnouts

Specified by:
createModel in class AbstractTableAction

setTitle

protected void setTitle()
Description copied from class: AbstractTableAction
Include the correct title

Specified by:
setTitle in class AbstractTableAction

helpTarget

protected String helpTarget()
Description copied from class: AbstractTableAction
Specify the JavaHelp target for this specific panel

Overrides:
helpTarget in class AbstractTableAction

addPressed

protected void addPressed(ActionEvent e)
Specified by:
addPressed in class AbstractTableAction

makeAutomationBox

protected JComboBox makeAutomationBox(Turnout t)
Create a JComboBox containing all the options for turnout automation parameters for this turnout

Parameters:
t - the turnout
Returns:
the JComboBox

editButton

protected JButton editButton()
Create a JButton to edit a turnout operation.

Returns:
the JButton

updateAutomationBox

public static void updateAutomationBox(Turnout t,
                                       JComboBox cb)
Add the content and make the appropriate selection to a combox box for a turnout's automation choices

Parameters:
t - turnout
cb - the JComboBox

editTurnoutOperation

protected void editTurnoutOperation(Turnout t,
                                    JComboBox box)
pop up a TurnoutOperationConfig for the turnout

Parameters:
t - turnout
box - JComboBox that triggered the edit

setDefaultSpeeds

protected void setDefaultSpeeds(JFrame _who)

addToFrame

public void addToFrame(BeanTableFrame f)
Add the check box and Operations menu item

Overrides:
addToFrame in class AbstractTableAction

addToPanel

public void addToPanel(AbstractTableTabAction f)
Description copied from class: AbstractTableAction
If the subClass is being included in a greater tabbed frame, then this method is used to add the details to the tabbed frame

Overrides:
addToPanel in class AbstractTableAction

setMenuBar

public void setMenuBar(BeanTableFrame f)
Description copied from class: AbstractTableAction
Allow subclasses to add alter the frames Menubar without have to actually subclass the BeanTableDataFrame

Overrides:
setMenuBar in class AbstractTableAction

getClassName

protected String getClassName()
Specified by:
getClassName in class AbstractTableAction

setMessagePreferencesDetails

public void setMessagePreferencesDetails()
Overrides:
setMessagePreferencesDetails in class AbstractTableAction

getClassDescription

public String getClassDescription()
Overrides:
getClassDescription in class AbstractTableAction


Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads