jmri.jmrit.beantable
Class LogixTableAction

Show UML class diagram
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

See Also:
Serialized Form

Nested Class Summary
 class LogixTableAction.ActionTableModel
          Table model for Actions in Edit Conditional window
(package private)  class LogixTableAction.ActionTypeListener
           
 class LogixTableAction.ConditionalTableModel
          Table model for Conditionals in Edit Logix window
(package private)  class LogixTableAction.RefDialog
           
 class LogixTableAction.VariableTableModel
          Table model for State Variables in Edit Conditional window
 
Field Summary
(package private)  JComboBox _actionBox
           
(package private)  JComboBox _actionItemTypeBox
           
(package private)  JTextField _actionNameField
           
(package private)  JComboBox _actionOptionBox
           
(package private)  JPanel _actionPanel
           
(package private)  JButton _actionSetButton
           
(package private)  JComboBox _actionTypeBox
           
(package private)  LogixTableAction.ActionTypeListener _actionTypeListener
           
(package private)  JPanel _actionTypePanel
           
(package private)  JTextField _addUserName
           
(package private)  JCheckBox _autoSystemName
           
(package private)  ConditionalManager _conditionalManager
           
(package private)  Conditional _curConditional
           
(package private)  Logix _curLogix
           
(package private)  JmriJFrame _editActionFrame
          Conponents of Edit Action Windows
(package private)  JmriJFrame _editVariableFrame
          Conponents of Edit Variable Windows
(package private)  boolean _inReorderMode
           
(package private)  LogixManager _logixManager
           
(package private)  String _logixSysName
           
(package private)  JTextField _longActionString
           
(package private)  JPanel _namePanel
           
(package private)  int _nextInOrder
           
(package private)  JPanel _optionPanel
           
(package private)  PickFrame _pickTables
           
(package private)  JPanel _setPanel
           
(package private)  JTextField _shortActionString
           
(package private)  JPanel _shortTextPanel
           
(package private)  boolean _showReminder
           
(package private)  boolean _suppressIndirectRef
           
(package private)  boolean _suppressReminder
           
(package private)  JLabel _sysNameLabel
           
(package private)  JTextField _systemName
           
(package private)  JPanel _textPanel
           
(package private)  JLabel _userNameLabel
           
(package private)  JComboBox _variableCompareOpBox
           
(package private)  JPanel _variableComparePanel
           
(package private)  JComboBox _variableCompareTypeBox
           
(package private)  JTextField _variableData1Field
           
(package private)  JPanel _variableData1Panel
           
(package private)  JTextField _variableData2Field
           
(package private)  JPanel _variableData2Panel
           
(package private)  JTextField _variableNameField
           
(package private)  JPanel _variableNamePanel
           
(package private)  JComboBox _variableSignalBox
           
(package private)  JPanel _variableSignalPanel
           
(package private)  JComboBox _variableStateBox
           
(package private)  JPanel _variableStatePanel
           
(package private)  JComboBox _variableTypeBox
           
(package private)  ActionListener actionSignalHeadNameListener
           
(package private)  ActionListener actionSignalMastNameListener
           
(package private)  JmriJFrame addLogixFrame
           
(package private)  int conditionalRowNumber
           
(package private)  LogixTableAction.ConditionalTableModel conditionalTableModel
           
(package private)  JTextField conditionalUserName
           
(package private)  JButton create
           
(package private)  JFileChooser defaultFileChooser
           
(package private)  JmriJFrame editConditionalFrame
           
(package private)  JmriJFrame editLogixFrame
           
(package private)  JTextField editUserName
           
(package private)  boolean inCopyMode
           
(package private)  boolean inEditConditionalMode
           
(package private)  boolean inEditMode
           
(package private) static org.slf4j.Logger log
           
(package private)  int numConditionals
           
(package private)  UserPreferencesManager prefMgr
           
(package private) static ResourceBundle rbx
           
(package private)  JFileChooser scriptFileChooser
           
(package private)  JFileChooser sndFileChooser
           
(package private)  JLabel status
           
(package private) static int STRUT
           
(package private)  String systemNameAuto
           
(package private)  ActionListener variableSignalHeadNameListener
           
(package private)  ActionListener variableSignalMastNameListener
           
(package private)  ActionListener variableSignalTestStateListener
           
 
Fields inherited from class jmri.jmrit.beantable.AbstractTableAction
f, includeAddButton, 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
(package private)  void actionItemChanged(int type)
          Responds to a change in an Action Type Box of Edit Action Window Set components visible for the selected type
(package private)  void addActionPressed(ActionEvent e)
           
protected  void addPressed(ActionEvent e)
          Responds to the Add button in Logix table Creates and/or initializes the Add Logix window
(package private)  void addVariablePressed(ActionEvent e)
          Responds to the Add State Variable Button in the Edit Conditional window
(package private)  boolean alreadyEditingActionOrVariable()
          Methods for Edit Variable Window
(package private)  void appendToAntecedent(ConditionalVariable variable)
           
(package private)  void autoSystemName()
           
(package private)  void calculatePressed(ActionEvent e)
          Responds to the Calculate Button in the Edit Logix window
(package private)  void cancelAddPressed(ActionEvent e)
          Responds to the Cancel button in Add Logix window Note: Also get there if the user closes the Add Logix window
(package private)  void cancelConditionalPressed(ActionEvent e)
          Responds to the Cancel button in the Edit Conditional frame Does the cleanup from deleteConditionalPressed, updateConditionalPressed and editConditionalFrame window closer.
(package private)  void cancelEditActionPressed()
           
(package private)  void cancelEditVariablePressed()
           
(package private)  boolean checkConditionalSystemName(String sName)
           
(package private)  boolean checkConditionalUserName(String uName, Logix logix)
           
(package private)  boolean checkEditConditional()
          Checks if edit of a conditional is in progress Returns true after sending message if this is the case
(package private)  boolean checkFlags(String sName)
           
(package private)  boolean checkLogixSysName()
           
(package private)  boolean checkLogixUserName(String uName)
           
(package private)  void checkVariablePressed(ActionEvent e)
          Responds to the Check State Variable Button in the Edit Conditional window
(package private)  void cleanUpAction()
           
(package private)  void cleanUpVariable()
           
(package private)  void copyConditionalToLogix(String cSysName, Logix srcLogix, Logix targetLogix)
           
(package private)  void copyLogixPressed(ActionEvent e)
           
(package private)  void copyPressed(String sName)
           
protected  void createModel()
          Create the JTable DataModel, along with the changes (overrides of BeanTableDataModel) for the specific case of a Logix table.
(package private)  void createPressed(ActionEvent e)
          Responds to the Create Logix button in Add Logix window
(package private)  void deleteActionPressed()
           
(package private)  void deleteActionPressed(int row)
           
(package private)  void deleteConditionalPressed(String sName)
          Responds to the Delete Conditional Button in the Edit Conditional window
(package private)  void deletePressed(ActionEvent e)
          Responds to the Delete button in the Edit Logix window
(package private)  void deletePressed(String sName)
          Responds to the Delete combo selection Logix window
(package private)  void deleteVariablePressed()
           
(package private)  void deleteVariablePressed(int row)
          Responds to the Delete Button in the State Variable Table of the Edit Conditional window
(package private)  void displayBadIntegerReference(int actionType)
           
(package private)  void donePressed(ActionEvent e)
          Responds to the Done button in the Edit Logix window Note: also get here if the Edit Logix window is dismissed, or if the Add button is pressed in the Logic Table with an active Edit Logix window.
(package private)  void editConditionalPressed(int rx)
          Responds to Edit Button in the Conditional table of the Edit Logix Window
(package private)  void editPressed(String sName)
          Responds to the Edit button pressed in Logix table
(package private)  void enableAll(boolean enable)
           
(package private)  void findEmptyPressed(ActionEvent e)
           
(package private)  void findOrphansPressed(ActionEvent e)
           
(package private)  void finishDone()
           
static String formatTime(int hour, int minute)
          Formats time to hh:mm given integer hour and minute
(package private)  int getActionTypeFromBox(int itemType, int actionTypeSelection)
           
 String getClassDescription()
           
protected  String getClassName()
           
(package private)  Light getLight(String name)
          get Light instance.
(package private)  void helpPressed(ActionEvent e)
           
protected  String helpTarget()
          Specify the JavaHelp target for this specific panel
(package private)  void initializeActionVariables()
           
(package private)  void initializeStateVariables()
          set display to show current state variable (curVariable) parameters
(package private)  void loadJComboBoxWithMastAspects(JComboBox box, String mastName)
           
(package private)  void loadJComboBoxWithSignalAspects(JComboBox box, String signalName)
           
(package private)  boolean logicTypeChanged(ActionEvent e)
           
(package private)  JPanel makeAddLogixFrame(String titleId, String messageId)
          shared method for window to create or copy Logix Returns the button panel
(package private)  void makeAntecedent()
          build the antecedent statement
(package private)  JPanel makeButtonPanel(ActionListener updateListener, ActionListener cancelListener, ActionListener deleteListener)
          Utility for making Variable and Action editing Windows
(package private)  void makeEditActionWindow(int row)
          Creates and/or initializes the Edit Action window Note: you can get here via the New Action button (addActionPressed) or via an Edit button in the Action table of the EditConditional window.
(package private)  void makeEditConditionalWindow()
          Creates and/or initializes the Edit Conditional window Note: you can get here via the New Conditional button (newConditionalPressed) or via an Edit button in the Conditional table of the Edit Logix window.
(package private)  void makeEditLogixWindow()
          creates and/or initializes the Edit Logix window
(package private)  JPanel makeEditPanel(JComponent comp, String label, String hint)
          Utility for making Variable and Action editing Windows
(package private)  void makeEditVariableWindow(int row)
          Creates and/or initializes the Edit a Variable window Note: you can get here via the New Variable button (addVariablePressed) or via an Edit button in the Variable table of the EditConditional window.
(package private)  JPanel makeTopPanel(JFrame frame, String title, int width, int height)
          Utility for making Variable and Action editing Windows
(package private)  void messageDuplicateConditionalUserName(String svName)
          Sends a duplicate Conditional user name message for Edit Logix window
(package private)  void messageInvalidActionItemName(String name, String itemType)
           
(package private)  void messageInvalidSignalHeadAppearance(String name, String appearance)
          Error Dialogs
(package private)  void newConditionalPressed(ActionEvent e)
          Responds to the New Conditional Button in Edit Logix Window
(package private)  void OpenPickListTable()
           
(package private)  int parseTime(String s)
           
(package private)  void reorderActionPressed(ActionEvent e)
          Responds to the Reorder Button in the Edit Conditional window
(package private)  void reorderPressed(ActionEvent e)
          Responds to the Reorder Button in the Edit Logix window
(package private)  void setFileLocation(ActionEvent e)
          Responds to the Set button in the Edit Action window action section.
 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
(package private)  void showSaveReminder()
          Display reminder to save
(package private)  void swapActions(int row)
          Responds to the First/Next (Delete) Button in the Edit Conditional window
(package private)  void swapConditional(int row)
          Responds to the First/Next (Delete) Button in the Edit Logix window
(package private)  void updateActionPressed()
          Responses for Edit Action and Edit Variable Buttons
(package private)  void updateConditionalPressed(ActionEvent e)
          Responds to the Update Conditional Button in the Edit Conditional window
(package private)  void updateVariablePressed()
           
(package private)  boolean validateAction()
          Validates Action data from Edit Action Window, and transfers it to current action object as appropriate Returns true if all data checks out OK, otherwise false.
(package private)  boolean validateAntecedent()
          Check the antecedent and logic type
(package private)  String validateAudioReference(String name)
           
(package private)  String validateConditionalReference(String name)
          Checks Conditional reference of text.
(package private)  String validateEntryExitReference(String name)
           
(package private)  boolean validateInteger(int actionType, int time)
          Checks text represents an integer suitable for timing throws NumberFormatException
(package private)  boolean validateIntegerReference(int actionType, String intReference)
          Checks if String is an integer or references an integer
(package private)  String validateLightReference(String name)
          Checks Light reference of text.
(package private)  String validateLogixReference(String name)
          Checks Logix reference of text.
(package private)  String validateMemoryReference(String name)
          Checks Memory reference of text.
(package private)  String validateOBlockReference(String name)
           
(package private)  String validateRouteReference(String name)
          Checks Route reference of text.
(package private)  String validateSensorReference(String name)
          Checks Sensor reference of text.
(package private)  String validateSignalHeadReference(String name)
          Checks SignalHead reference of text.
(package private)  String validateSignalMastReference(String name)
          Checks SignalMast reference of text.
(package private)  String validateTurnoutReference(String name)
          Checks Turnout reference of text.
(package private)  boolean validateVariable()
          Validates Variable data from Edit Variable Window, and transfers it to current action object as appropriate Returns true if all data checks out OK, otherwise false.
(package private)  String validateWarrantReference(String name)
           
(package private)  void variableNegationChanged(int row, String oper)
          Responds to the Negation column in the Edit Conditional window
(package private)  void variableOperatorChanged(int row, String oper)
          Responds to the Operator column in the Edit Conditional window
 
Methods inherited from class jmri.jmrit.beantable.AbstractTableAction
actionPerformed, addToFrame, addToPanel, dispose, getPanel, getTableDataModel, includeAddButton, 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
 

Field Detail

rbx

static final ResourceBundle rbx

_conditionalManager

ConditionalManager _conditionalManager

_logixManager

LogixManager _logixManager

_showReminder

boolean _showReminder

_suppressReminder

boolean _suppressReminder

_suppressIndirectRef

boolean _suppressIndirectRef

_pickTables

PickFrame _pickTables

_curLogix

Logix _curLogix

numConditionals

int numConditionals

conditionalRowNumber

int conditionalRowNumber

_curConditional

Conditional _curConditional

addLogixFrame

JmriJFrame addLogixFrame

_systemName

JTextField _systemName

_addUserName

JTextField _addUserName

_autoSystemName

JCheckBox _autoSystemName

_sysNameLabel

JLabel _sysNameLabel

_userNameLabel

JLabel _userNameLabel

prefMgr

UserPreferencesManager prefMgr

systemNameAuto

String systemNameAuto

create

JButton create

editLogixFrame

JmriJFrame editLogixFrame

inEditMode

boolean inEditMode

inCopyMode

boolean inCopyMode

_inReorderMode

boolean _inReorderMode

_nextInOrder

int _nextInOrder

editUserName

JTextField editUserName

conditionalTableModel

LogixTableAction.ConditionalTableModel conditionalTableModel

status

JLabel status

inEditConditionalMode

boolean inEditConditionalMode

editConditionalFrame

JmriJFrame editConditionalFrame

conditionalUserName

JTextField conditionalUserName

_editVariableFrame

JmriJFrame _editVariableFrame
Conponents of Edit Variable Windows


_variableTypeBox

JComboBox _variableTypeBox

_variableNameField

JTextField _variableNameField

_variableStateBox

JComboBox _variableStateBox

_variableCompareOpBox

JComboBox _variableCompareOpBox

_variableSignalBox

JComboBox _variableSignalBox

_variableCompareTypeBox

JComboBox _variableCompareTypeBox

_variableData1Field

JTextField _variableData1Field

_variableData2Field

JTextField _variableData2Field

_variableNamePanel

JPanel _variableNamePanel

_variableStatePanel

JPanel _variableStatePanel

_variableComparePanel

JPanel _variableComparePanel

_variableSignalPanel

JPanel _variableSignalPanel

_variableData1Panel

JPanel _variableData1Panel

_variableData2Panel

JPanel _variableData2Panel

_editActionFrame

JmriJFrame _editActionFrame
Conponents of Edit Action Windows


_actionItemTypeBox

JComboBox _actionItemTypeBox

_actionTypeBox

JComboBox _actionTypeBox

_actionBox

JComboBox _actionBox

_actionNameField

JTextField _actionNameField

_longActionString

JTextField _longActionString

_shortActionString

JTextField _shortActionString

_actionOptionBox

JComboBox _actionOptionBox

_actionPanel

JPanel _actionPanel

_actionTypePanel

JPanel _actionTypePanel

_namePanel

JPanel _namePanel

_shortTextPanel

JPanel _shortTextPanel

_optionPanel

JPanel _optionPanel

_actionSetButton

JButton _actionSetButton

_setPanel

JPanel _setPanel

_textPanel

JPanel _textPanel

_actionTypeListener

LogixTableAction.ActionTypeListener _actionTypeListener

STRUT

static final int STRUT
See Also:
Constant Field Values

_logixSysName

String _logixSysName

sndFileChooser

JFileChooser sndFileChooser

scriptFileChooser

JFileChooser scriptFileChooser

defaultFileChooser

JFileChooser defaultFileChooser

variableSignalTestStateListener

transient ActionListener variableSignalTestStateListener

variableSignalHeadNameListener

transient ActionListener variableSignalHeadNameListener

actionSignalHeadNameListener

transient ActionListener actionSignalHeadNameListener

variableSignalMastNameListener

transient ActionListener variableSignalMastNameListener

actionSignalMastNameListener

transient ActionListener actionSignalMastNameListener

log

static final org.slf4j.Logger log
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

OpenPickListTable

void OpenPickListTable()

findEmptyPressed

void findEmptyPressed(ActionEvent e)

findOrphansPressed

void findOrphansPressed(ActionEvent e)

enableAll

void enableAll(boolean enable)

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

makeAddLogixFrame

JPanel makeAddLogixFrame(String titleId,
                         String messageId)
shared method for window to create or copy Logix Returns the button panel


autoSystemName

void autoSystemName()

cancelAddPressed

void cancelAddPressed(ActionEvent e)
Responds to the Cancel button in Add Logix window Note: Also get there if the user closes the Add Logix window


copyPressed

void copyPressed(String sName)

copyLogixPressed

void copyLogixPressed(ActionEvent e)

copyConditionalToLogix

void copyConditionalToLogix(String cSysName,
                            Logix srcLogix,
                            Logix targetLogix)

checkLogixUserName

boolean checkLogixUserName(String uName)

checkLogixSysName

boolean checkLogixSysName()

checkFlags

boolean checkFlags(String sName)

createPressed

void createPressed(ActionEvent e)
Responds to the Create Logix button in Add Logix window


editPressed

void editPressed(String sName)
Responds to the Edit button pressed in Logix table


makeEditLogixWindow

void makeEditLogixWindow()
creates and/or initializes the Edit Logix window


showSaveReminder

void showSaveReminder()
Display reminder to save


reorderPressed

void reorderPressed(ActionEvent e)
Responds to the Reorder Button in the Edit Logix window


swapConditional

void swapConditional(int row)
Responds to the First/Next (Delete) Button in the Edit Logix window


calculatePressed

void calculatePressed(ActionEvent e)
Responds to the Calculate Button in the Edit Logix window


donePressed

void donePressed(ActionEvent e)
Responds to the Done button in the Edit Logix window Note: also get here if the Edit Logix window is dismissed, or if the Add button is pressed in the Logic Table with an active Edit Logix window.


finishDone

void finishDone()

setMessagePreferencesDetails

public void setMessagePreferencesDetails()
Overrides:
setMessagePreferencesDetails in class AbstractTableAction

deletePressed

void deletePressed(String sName)
Responds to the Delete combo selection Logix window


deletePressed

void deletePressed(ActionEvent e)
Responds to the Delete button in the Edit Logix window


newConditionalPressed

void newConditionalPressed(ActionEvent e)
Responds to the New Conditional Button in Edit Logix Window


editConditionalPressed

void editConditionalPressed(int rx)
Responds to Edit Button in the Conditional table of the Edit Logix Window


checkEditConditional

boolean checkEditConditional()
Checks if edit of a conditional is in progress Returns true after sending message if this is the case


checkConditionalUserName

boolean checkConditionalUserName(String uName,
                                 Logix logix)

checkConditionalSystemName

boolean checkConditionalSystemName(String sName)

makeEditConditionalWindow

void makeEditConditionalWindow()
Creates and/or initializes the Edit Conditional window Note: you can get here via the New Conditional button (newConditionalPressed) or via an Edit button in the Conditional table of the Edit Logix window.


addVariablePressed

void addVariablePressed(ActionEvent e)
Responds to the Add State Variable Button in the Edit Conditional window


checkVariablePressed

void checkVariablePressed(ActionEvent e)
Responds to the Check State Variable Button in the Edit Conditional window


variableNegationChanged

void variableNegationChanged(int row,
                             String oper)
Responds to the Negation column in the Edit Conditional window


variableOperatorChanged

void variableOperatorChanged(int row,
                             String oper)
Responds to the Operator column in the Edit Conditional window


addActionPressed

void addActionPressed(ActionEvent e)

reorderActionPressed

void reorderActionPressed(ActionEvent e)
Responds to the Reorder Button in the Edit Conditional window


swapActions

void swapActions(int row)
Responds to the First/Next (Delete) Button in the Edit Conditional window


updateConditionalPressed

void updateConditionalPressed(ActionEvent e)
Responds to the Update Conditional Button in the Edit Conditional window


cancelConditionalPressed

void cancelConditionalPressed(ActionEvent e)
Responds to the Cancel button in the Edit Conditional frame Does the cleanup from deleteConditionalPressed, updateConditionalPressed and editConditionalFrame window closer.


deleteConditionalPressed

void deleteConditionalPressed(String sName)
Responds to the Delete Conditional Button in the Edit Conditional window


logicTypeChanged

boolean logicTypeChanged(ActionEvent e)

helpPressed

void helpPressed(ActionEvent e)

makeAntecedent

void makeAntecedent()
build the antecedent statement


appendToAntecedent

void appendToAntecedent(ConditionalVariable variable)

validateAntecedent

boolean validateAntecedent()
Check the antecedent and logic type


alreadyEditingActionOrVariable

boolean alreadyEditingActionOrVariable()
Methods for Edit Variable Window


makeEditVariableWindow

void makeEditVariableWindow(int row)
Creates and/or initializes the Edit a Variable window Note: you can get here via the New Variable button (addVariablePressed) or via an Edit button in the Variable table of the EditConditional window.


makeEditActionWindow

void makeEditActionWindow(int row)
Creates and/or initializes the Edit Action window Note: you can get here via the New Action button (addActionPressed) or via an Edit button in the Action table of the EditConditional window.


makeTopPanel

JPanel makeTopPanel(JFrame frame,
                    String title,
                    int width,
                    int height)
Utility for making Variable and Action editing Windows


makeEditPanel

JPanel makeEditPanel(JComponent comp,
                     String label,
                     String hint)
Utility for making Variable and Action editing Windows


makeButtonPanel

JPanel makeButtonPanel(ActionListener updateListener,
                       ActionListener cancelListener,
                       ActionListener deleteListener)
Utility for making Variable and Action editing Windows


updateActionPressed

void updateActionPressed()
Responses for Edit Action and Edit Variable Buttons


updateVariablePressed

void updateVariablePressed()

cancelEditActionPressed

void cancelEditActionPressed()

cleanUpAction

void cleanUpAction()

cancelEditVariablePressed

void cancelEditVariablePressed()

cleanUpVariable

void cleanUpVariable()

deleteActionPressed

void deleteActionPressed()

deleteActionPressed

void deleteActionPressed(int row)

deleteVariablePressed

void deleteVariablePressed()

deleteVariablePressed

void deleteVariablePressed(int row)
Responds to the Delete Button in the State Variable Table of the Edit Conditional window


initializeStateVariables

void initializeStateVariables()
set display to show current state variable (curVariable) parameters


initializeActionVariables

void initializeActionVariables()

setFileLocation

void setFileLocation(ActionEvent e)
Responds to the Set button in the Edit Action window action section.


actionItemChanged

void actionItemChanged(int type)
Responds to a change in an Action Type Box of Edit Action Window Set components visible for the selected type


loadJComboBoxWithSignalAspects

void loadJComboBoxWithSignalAspects(JComboBox box,
                                    String signalName)

loadJComboBoxWithMastAspects

void loadJComboBoxWithMastAspects(JComboBox box,
                                  String mastName)

validateVariable

boolean validateVariable()
Validates Variable data from Edit Variable Window, and transfers it to current action object as appropriate

Returns true if all data checks out OK, otherwise false.

Messages are sent to the user for any errors found. This routine returns false immediately after finding an error, even if there might be more errors.


validateAction

boolean validateAction()
Validates Action data from Edit Action Window, and transfers it to current action object as appropriate

Returns true if all data checks out OK, otherwise false.

Messages are sent to the user for any errors found. This routine returns false immediately after finding an error, even if there might be more errors.


getActionTypeFromBox

int getActionTypeFromBox(int itemType,
                         int actionTypeSelection)

validateIntegerReference

boolean validateIntegerReference(int actionType,
                                 String intReference)
Checks if String is an integer or references an integer


validateInteger

boolean validateInteger(int actionType,
                        int time)
Checks text represents an integer suitable for timing throws NumberFormatException


displayBadIntegerReference

void displayBadIntegerReference(int actionType)

validateMemoryReference

String validateMemoryReference(String name)
Checks Memory reference of text.


validateTurnoutReference

String validateTurnoutReference(String name)
Checks Turnout reference of text.


validateSignalHeadReference

String validateSignalHeadReference(String name)
Checks SignalHead reference of text.


validateSignalMastReference

String validateSignalMastReference(String name)
Checks SignalMast reference of text.


validateWarrantReference

String validateWarrantReference(String name)

validateOBlockReference

String validateOBlockReference(String name)

validateSensorReference

String validateSensorReference(String name)
Checks Sensor reference of text.


validateLightReference

String validateLightReference(String name)
Checks Light reference of text.


validateConditionalReference

String validateConditionalReference(String name)
Checks Conditional reference of text. Forces name to System name


validateLogixReference

String validateLogixReference(String name)
Checks Logix reference of text.


validateRouteReference

String validateRouteReference(String name)
Checks Route reference of text.


validateAudioReference

String validateAudioReference(String name)

validateEntryExitReference

String validateEntryExitReference(String name)

getLight

Light getLight(String name)
get Light instance.


parseTime

int parseTime(String s)

formatTime

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


messageInvalidSignalHeadAppearance

void messageInvalidSignalHeadAppearance(String name,
                                        String appearance)
Error Dialogs


messageInvalidActionItemName

void messageInvalidActionItemName(String name,
                                  String itemType)

messageDuplicateConditionalUserName

void messageDuplicateConditionalUserName(String svName)
Sends a duplicate Conditional user name message for Edit Logix window


getClassDescription

public String getClassDescription()
Overrides:
getClassDescription in class AbstractTableAction

getClassName

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


Copyright © 1997-2013 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