jmri.jmrit.beantable
Class LogixTableAction

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

public class LogixTableAction
extends AbstractTableAction

Swing action to create and register a Logix Table.

Also contains the windows to create, edit, and delete a Logix. Also contains the window to define and edit a Conditional.

Most of the text used in this GUI is in LogixTableBundle.properties, accessed via rbx, and the remainder of the text is in BeanTableBundle.properties, accessed via rb. Methods and Members for 'state variables' and 'actions' removed to become their own objects - 'ConditionalVariable' and 'ConditionalAction' in jmri package. Two more types of logic for a Conditional to use in its antecedent have been added to the original 'AND'ing all statevariables - 'OR' (i.e. all OR's) and 'MIXED' (i.e. general boolean statement with any mixture of boolean operations). The 'OR's an 'AND's types are unambiguous and do not require parentheses. The 'Mixed' type uses a TextField for the user to insert parenthees. Jan 22, 2009 - Pete Cressman Conditionals now have two policies to trigger execution of their action lists. 1. the previous policy - Trigger on change of state only 2. the new default - Trigger on any enabled state calculation Jan 15, 2011 - Pete Cressman

Author:
Dave Duchamp Copyright (C) 2007, Pete Cressman Copyright (C) 2009, 2010, 2011, Matthew Harris copyright (c) 2009
See Also:
Serialized Form

Nested Class Summary
 class LogixTableAction.ActionTableModel
          Table model for Actions in Edit Conditional window
 class LogixTableAction.ConditionalTableModel
          Table model for Conditionals in Edit Logix window
 class LogixTableAction.VariableTableModel
          Table model for State Variables in Edit Conditional window
 
Field Summary
 
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
LogixTableAction()
           
LogixTableAction(String s)
          Create an action with a specific title.
 
Method Summary
protected  void addPressed(ActionEvent e)
          Responds to the Add button in Logix table Creates and/or initializes the Add Logix window
protected  void createModel()
          Create the JTable DataModel, along with the changes (overrides of BeanTableDataModel) for the specific case of a Logix table.
static String formatTime(int hour, int minute)
          Formats time to hh:mm given integer hour and minute
 String getClassDescription()
           
protected  String getClassName()
           
protected  String helpTarget()
          Specify the JavaHelp target for this specific panel
 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
 
Methods inherited from class jmri.jmrit.beantable.AbstractTableAction
actionPerformed, addToFrame, addToPanel, dispose, getPanel, getTableDataModel, makeJTable, print, setFrame, setManager
 
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
 

Constructor Detail

LogixTableAction

public LogixTableAction(String s)
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:
s -

LogixTableAction

public LogixTableAction()
Method Detail

createModel

protected void createModel()
Create the JTable DataModel, along with the changes (overrides of BeanTableDataModel) for the specific case of a Logix table. Note: Table Models for the Conditional table in the Edit Logix window, and the State Variable table in the Edit Conditional window are at the end of this module.

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

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

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)
Responds to the Add button in Logix table Creates and/or initializes the Add Logix window

Specified by:
addPressed in class AbstractTableAction

setMessagePreferencesDetails

public void setMessagePreferencesDetails()
Overrides:
setMessagePreferencesDetails in class AbstractTableAction

formatTime

public static String formatTime(int hour,
                                int minute)
Formats time to hh:mm given integer hour and minute


getClassDescription

public String getClassDescription()
Overrides:
getClassDescription in class AbstractTableAction

getClassName

protected String getClassName()
Specified by:
getClassName 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