Class ConditionalEditFrame
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Frame
-
- javax.swing.JFrame
-
- jmri.util.JmriJFrame
-
- jmri.jmrit.conditional.ConditionalFrame
-
- jmri.jmrit.conditional.ConditionalEditFrame
-
- All Implemented Interfaces:
java.awt.event.ComponentListener,java.awt.event.WindowListener,java.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable,java.util.EventListener,javax.accessibility.Accessible,javax.swing.RootPaneContainer,javax.swing.WindowConstants,BeanInterface,ModifiedFlag,WindowInterface
public class ConditionalEditFrame extends ConditionalFrame
Extracted from ConditionalEditList. Allows ConditionalEditList to open alternate frame for copying Conditionals.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classConditionalEditFrame.ActionTableModelTable model for Actions in Edit Conditional pane.(package private) classConditionalEditFrame.ActionTypeListenerListener for _actionTypeBox.classConditionalEditFrame.VariableTableModelTable model for State Variables in Edit Conditional pane.-
Nested classes/interfaces inherited from class jmri.util.JmriJFrame
JmriJFrame.ScreenDimensions
-
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
-
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
-
Nested classes/interfaces inherited from interface jmri.util.swing.WindowInterface
WindowInterface.Hint
-
-
Field Summary
Fields Modifier and Type Field Description (package private) javax.swing.JComboBox<java.lang.String>_actionBox(package private) javax.swing.JPanel_actionComboNamePanel(package private) javax.swing.JComboBox<Conditional.ItemType>_actionItemBox(package private) javax.swing.JTextField_actionNameField(package private) javax.swing.JPanel_actionNamePanel(package private) javax.swing.JComboBox<java.lang.String>_actionOptionBox(package private) javax.swing.JPanel_actionPanel(package private) ConditionalEditFrame.ActionTableModel_actionTableModel(package private) javax.swing.JComboBox<Conditional.Action>_actionTypeBox(package private) ConditionalEditFrame.ActionTypeListener_actionTypeListener(package private) javax.swing.JPanel_actionTypePanel(package private) javax.swing.JComboBox<java.lang.String>_andOperatorBox(package private) javax.swing.JTextField_antecedentField(package private) javax.swing.JPanel_antecedentPanel(package private) NamedBeanComboBox<?>_comboNameBox(package private) ConditionalAction_curAction(package private) Conditional.ItemType_curActionItem(package private) int_curActionRowNumber(package private) ConditionalVariable_curVariable(package private) Conditional.ItemType_curVariableItem(package private) int_curVariableRowNumber(package private) JmriJFrame_editActionFrame(package private) JmriJFrame_editVariableFrame(package private) boolean_inActReorder(package private) boolean_inVarReorder(package private) javax.swing.JTextField_longActionString(package private) boolean_newItem(package private) int_nextInOrder(package private) javax.swing.JComboBox<java.lang.String>_notOperatorBox(package private) javax.swing.JComboBox<Conditional.AntecedentOperator>_operatorBox(package private) javax.swing.JPanel_optionPanel(package private) javax.swing.JButton_reorderVarButton(package private) javax.swing.JComboBox<java.lang.String>_selectConditionalBox(package private) java.util.ArrayList<java.lang.String>_selectConditionalList(package private) javax.swing.JPanel_selectConditionalPanel(package private) javax.swing.JComboBox<java.lang.String>_selectLogixBox(package private) java.util.TreeMap<java.lang.String,java.lang.String>_selectLogixMap(package private) javax.swing.JPanel_selectLogixPanel(package private) javax.swing.JPanel_setPanel(package private) javax.swing.JTextField_shortActionString(package private) javax.swing.JPanel_shortTextPanel(package private) javax.swing.JPanel_textPanel(package private) javax.swing.JRadioButton_triggerOnChangeButton(package private) javax.swing.JPanel_variableComboNamePanel(package private) javax.swing.JComboBox<java.lang.String>_variableCompareOpBox(package private) javax.swing.JPanel_variableComparePanel(package private) javax.swing.JComboBox<Conditional.Type>_variableCompareTypeBox(package private) javax.swing.JTextField_variableData1Field(package private) javax.swing.JPanel_variableData1Panel(package private) javax.swing.JTextField_variableData2Field(package private) javax.swing.JPanel_variableData2Panel(package private) javax.swing.JComboBox<Conditional.ItemType>_variableItemBox(package private) javax.swing.JTextField_variableNameField(package private) javax.swing.JPanel_variableNamePanel(package private) javax.swing.JComboBox<java.lang.String>_variableSignalBox(package private) javax.swing.JPanel_variableSignalPanel(package private) javax.swing.JComboBox<Conditional.Type>_variableStateBox(package private) javax.swing.JPanel_variableStatePanel(package private) ConditionalEditFrame.VariableTableModel_variableTableModel(package private) java.awt.event.ActionListeneractionSignalHeadNameListener(package private) java.awt.event.ActionListeneractionSignalMastNameListener(package private) javax.swing.JFileChooserdefaultFileChooser(package private) ScriptFileChooserscriptFileChooser(package private) java.awt.event.ActionListenerselectConditionalBoxListener(package private) java.awt.event.ActionListenerselectLogixBoxListener(package private) javax.swing.JFileChoosersndFileChooser(package private) java.awt.event.ActionListenervariableSignalHeadNameListener(package private) java.awt.event.ActionListenervariableSignalMastNameListener(package private) java.awt.event.ActionListenervariableSignalTestStateListener-
Fields inherited from class jmri.jmrit.conditional.ConditionalFrame
_actionList, _antecedent, _dataChanged, _logicType, _parent, _referenceByMemory, _trigger, _variableList, STRUT
-
Fields inherited from class jmri.util.JmriJFrame
allowInFrameServlet, properties, reuseFrameSavedPosition, reuseFrameSavedSized, windowInterface
-
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description ConditionalEditFrame(java.lang.String title, Conditional conditional, ConditionalList parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidactionItemChanged(Conditional.ItemType type)Respond to a change in an Action Type comboBox on the Edit Conditional Action pane.(package private) voidaddActionPressed(java.awt.event.ActionEvent e)Respond to Add action button in the EditConditional window.(package private) voidaddVariablePressed(java.awt.event.ActionEvent e)Respond to the Add State Variable Button in the Edit Conditional window.(package private) booleanalreadyEditingActionOrVariable()Check if an editing session is going on.(package private) voidappendToAntecedent()Add a R# to the antecedent statement.(package private) voidcancelConditionalPressed()Respond to the Cancel button in the Edit Conditional frame.(package private) voidcancelEditActionPressed()Respond to Cancel action button and window closer of the Edit Action window.(package private) voidcancelEditVariablePressed()Respond to Cancel action button and window closer of the Edit Variable pane.(package private) voidcheckVariablePressed(java.awt.event.ActionEvent e)Respond to the Check State Variable Button in the Edit Conditional window.(package private) voidcleanUpAction()Clean up Update and Delete Action buttons.(package private) voidcleanUpVariable()Clean up Update and Delete Variable buttons.(package private) voiddeleteActionPressed()Respond to Delete action button in the Edit Action window.(package private) voiddeleteActionPressed(int row)Respond to Delete action button in an action row of the Edit Conditional pane.(package private) voiddeleteVariablePressed()Respond to Delete action button in the Edit Variable window.(package private) voiddeleteVariablePressed(int row)Respond to the Delete Button in the State Variable Table of the Edit Conditional window.(package private) voidhelpPressed(java.awt.event.ActionEvent e)Respond to Help button press in the Edit Conditional pane.(package private) voidinitializeActionVariables()Set display to show current action (curAction) parameters.(package private) voidinitializeStateVariables()Set display to show current state variable (_curVariable) parameters.(package private) voidloadJComboBoxWithHeadAppearances(javax.swing.JComboBox<java.lang.String> box, java.lang.String signalHeadName)Fetch valid localized appearances for a given Signal Head.(package private) voidloadJComboBoxWithMastAspects(javax.swing.JComboBox<java.lang.String> box, java.lang.String mastName)Fetch valid aspects for a given Signal Mast.(package private) voidloadSelectConditionalBox(java.lang.String logixName, ConditionalVariable curVariable)Load the Conditional selection box.(package private) voidloadSelectLogixBox(ConditionalVariable curVariable)Load the Logix selection box.(package private) booleanlogicTypeChanged(java.awt.event.ActionEvent e)Respond to a change of Conditional Type in the Edit Conditional pane by showing/hiding the _antecedentPanel when Mixed is selected.(package private) voidmakeAntecedent()Build the antecedent statement.(package private) javax.swing.JPanelmakeButtonPanel(java.awt.event.ActionListener updateListener, java.awt.event.ActionListener cancelListener, java.awt.event.ActionListener deleteListener)Create Variable and Action editing pane bottom part.(package private) voidmakeConditionalFrame(Conditional conditional)(package private) voidmakeEditActionWindow(int row)Create and/or initialize the Edit Action window.(package private) voidmakeEditVariableWindow(int row)Create and/or initialize the Edit a Variable pane.(package private) javax.swing.JPanelmakeTopPanel(javax.swing.JFrame frame, java.lang.String title, int width, int height)Create Variable and Action editing pane top part.(package private) voidreorderActionPressed(java.awt.event.ActionEvent e)Respond to the Reorder Action Button in the Edit Conditional window.(package private) voidreorderVariablePressed(java.awt.event.ActionEvent e)Respond to the Reorder Variable Button in the Edit Conditional window.(package private) voidsetActionNameBox(Conditional.ItemType itemType)Update the name combo box selection based on the current contents of the name field.(package private) voidsetFileLocation(java.awt.event.ActionEvent e)Respond to the [...] button in the Edit Action window action section.(package private) voidsetVariableNameBox(Conditional.ItemType itemType)Update the name combo box selection based on the current contents of the name field.(package private) voidswapActions(int row)Respond to the First/Next (Delete) Button in the Edit Conditional window.(package private) voidswapVariables(int row)Respond to the First/Next (Delete) Button in the Edit Conditional window.(package private) voidupdateActionPressed()Respond to Update Action button in the Edit Action pane.(package private) booleanupdateConditionalPressed(java.awt.event.ActionEvent e)Respond to the Update Conditional Button in the Edit Conditional window.(package private) voidupdateVariablePressed()Respond to Update Variable button in the Edit Action pane.(package private) booleanvalidateAction()Validate Action data from Edit Action Window, and transfer it to current action object as appropriate.(package private) booleanvalidateAntecedent()Check the antecedent and logic type.(package private) booleanvalidateVariable()Validate Variable data from Edit Variable Window, and transfer it to current action object as appropriate.(package private) voidvariableNegationChanged(int row, java.lang.String oper)Respond to the Negation column in the Edit Conditional window.(package private) voidvariableOperatorChanged(int row, java.lang.String oper)Respond to the Operator column in the Edit Conditional window.-
Methods inherited from class jmri.jmrit.conditional.ConditionalFrame
checkIsAction, checkIsVariable, checkReferenceByMemory, makeEditPanel, makeTopPanel
-
Methods inherited from class jmri.util.JmriJFrame
addHelpMenu, componentHidden, componentMoved, componentResized, componentShown, dispose, generateWindowRef, getAllowInFrameServlet, getEscapeKeyAction, getEscapeKeyClosesWindow, getFrame, getFrame, getFrameList, getFrameList, getIndexedProperty, getMaximumSize, getModifiedFlag, getPreferredSize, getProperty, getPropertyNames, getSavePosition, getSaveSize, getScreenDimensions, getWindowFrameRef, getWindowInterface, handleModified, hasIndexedProperty, hasProperty, initComponents, makePrivateWindow, makePublicWindow, markWindowModified, multipleInstances, pack, setAllowInFrameServlet, setEscapeKeyAction, setEscapeKeyClosesWindow, setFrameLocation, setIndexedProperty, setModifiedFlag, setProperty, setSavePosition, setSaveSize, setShutDownTask, setWindowInterface, show, show, storeValues, undecorate, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
-
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
-
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
-
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
_triggerOnChangeButton
javax.swing.JRadioButton _triggerOnChangeButton
-
_inActReorder
boolean _inActReorder
-
_inVarReorder
boolean _inVarReorder
-
_nextInOrder
int _nextInOrder
-
_selectLogixPanel
javax.swing.JPanel _selectLogixPanel
-
_selectConditionalPanel
javax.swing.JPanel _selectConditionalPanel
-
_actionTableModel
ConditionalEditFrame.ActionTableModel _actionTableModel
-
_variableTableModel
ConditionalEditFrame.VariableTableModel _variableTableModel
-
_operatorBox
javax.swing.JComboBox<Conditional.AntecedentOperator> _operatorBox
-
_andOperatorBox
javax.swing.JComboBox<java.lang.String> _andOperatorBox
-
_notOperatorBox
javax.swing.JComboBox<java.lang.String> _notOperatorBox
-
_antecedentField
javax.swing.JTextField _antecedentField
-
_antecedentPanel
javax.swing.JPanel _antecedentPanel
-
_newItem
boolean _newItem
-
_editVariableFrame
JmriJFrame _editVariableFrame
-
_variableItemBox
javax.swing.JComboBox<Conditional.ItemType> _variableItemBox
-
_variableStateBox
javax.swing.JComboBox<Conditional.Type> _variableStateBox
-
_variableNameField
javax.swing.JTextField _variableNameField
-
_variableCompareOpBox
javax.swing.JComboBox<java.lang.String> _variableCompareOpBox
-
_variableSignalBox
javax.swing.JComboBox<java.lang.String> _variableSignalBox
-
_variableCompareTypeBox
javax.swing.JComboBox<Conditional.Type> _variableCompareTypeBox
-
_variableData1Field
javax.swing.JTextField _variableData1Field
-
_variableData2Field
javax.swing.JTextField _variableData2Field
-
_reorderVarButton
javax.swing.JButton _reorderVarButton
-
_variableNamePanel
javax.swing.JPanel _variableNamePanel
-
_variableStatePanel
javax.swing.JPanel _variableStatePanel
-
_variableComparePanel
javax.swing.JPanel _variableComparePanel
-
_variableSignalPanel
javax.swing.JPanel _variableSignalPanel
-
_variableData1Panel
javax.swing.JPanel _variableData1Panel
-
_variableData2Panel
javax.swing.JPanel _variableData2Panel
-
_variableComboNamePanel
javax.swing.JPanel _variableComboNamePanel
-
_editActionFrame
JmriJFrame _editActionFrame
-
_actionItemBox
javax.swing.JComboBox<Conditional.ItemType> _actionItemBox
-
_actionTypeBox
javax.swing.JComboBox<Conditional.Action> _actionTypeBox
-
_actionBox
javax.swing.JComboBox<java.lang.String> _actionBox
-
_actionNameField
javax.swing.JTextField _actionNameField
-
_longActionString
javax.swing.JTextField _longActionString
-
_shortActionString
javax.swing.JTextField _shortActionString
-
_actionOptionBox
javax.swing.JComboBox<java.lang.String> _actionOptionBox
-
_actionPanel
javax.swing.JPanel _actionPanel
-
_actionTypePanel
javax.swing.JPanel _actionTypePanel
-
_actionNamePanel
javax.swing.JPanel _actionNamePanel
-
_shortTextPanel
javax.swing.JPanel _shortTextPanel
-
_optionPanel
javax.swing.JPanel _optionPanel
-
_actionComboNamePanel
javax.swing.JPanel _actionComboNamePanel
-
_setPanel
javax.swing.JPanel _setPanel
-
_textPanel
javax.swing.JPanel _textPanel
-
_comboNameBox
NamedBeanComboBox<?> _comboNameBox
-
_curVariable
ConditionalVariable _curVariable
-
_curVariableRowNumber
int _curVariableRowNumber
-
_curVariableItem
Conditional.ItemType _curVariableItem
-
_curAction
ConditionalAction _curAction
-
_curActionRowNumber
int _curActionRowNumber
-
_curActionItem
Conditional.ItemType _curActionItem
-
_selectLogixBox
javax.swing.JComboBox<java.lang.String> _selectLogixBox
-
_selectConditionalBox
javax.swing.JComboBox<java.lang.String> _selectConditionalBox
-
_selectLogixMap
java.util.TreeMap<java.lang.String,java.lang.String> _selectLogixMap
-
_selectConditionalList
java.util.ArrayList<java.lang.String> _selectConditionalList
-
variableSignalTestStateListener
transient java.awt.event.ActionListener variableSignalTestStateListener
-
variableSignalHeadNameListener
transient java.awt.event.ActionListener variableSignalHeadNameListener
-
variableSignalMastNameListener
transient java.awt.event.ActionListener variableSignalMastNameListener
-
selectLogixBoxListener
transient java.awt.event.ActionListener selectLogixBoxListener
-
selectConditionalBoxListener
transient java.awt.event.ActionListener selectConditionalBoxListener
-
sndFileChooser
javax.swing.JFileChooser sndFileChooser
-
scriptFileChooser
ScriptFileChooser scriptFileChooser
-
defaultFileChooser
javax.swing.JFileChooser defaultFileChooser
-
_actionTypeListener
ConditionalEditFrame.ActionTypeListener _actionTypeListener
-
actionSignalHeadNameListener
transient java.awt.event.ActionListener actionSignalHeadNameListener
-
actionSignalMastNameListener
transient java.awt.event.ActionListener actionSignalMastNameListener
-
-
Constructor Detail
-
ConditionalEditFrame
ConditionalEditFrame(java.lang.String title, Conditional conditional, ConditionalList parent)
-
-
Method Detail
-
makeConditionalFrame
void makeConditionalFrame(Conditional conditional)
-
addVariablePressed
void addVariablePressed(java.awt.event.ActionEvent e)
Respond to the Add State Variable Button in the Edit Conditional window.- Parameters:
e- The event heard
-
checkVariablePressed
void checkVariablePressed(java.awt.event.ActionEvent e)
Respond to the Check State Variable Button in the Edit Conditional window.- Parameters:
e- the event heard
-
reorderVariablePressed
void reorderVariablePressed(java.awt.event.ActionEvent e)
Respond to the Reorder Variable Button in the Edit Conditional window.- Parameters:
e- The event heard
-
swapVariables
void swapVariables(int row)
Respond to the First/Next (Delete) Button in the Edit Conditional window.- Parameters:
row- index of the row to put as next in line (instead of the one that was supposed to be next)
-
variableNegationChanged
void variableNegationChanged(int row, java.lang.String oper)
Respond to the Negation column in the Edit Conditional window.- Parameters:
row- index of the Conditional to change the setting onoper- NOT (i18n) as negation of condition
-
variableOperatorChanged
void variableOperatorChanged(int row, java.lang.String oper)
Respond to the Operator column in the Edit Conditional window.- Parameters:
row- index of the Conditional to change the setting onoper- AND or OR (i18n) as operand on the list of conditions
-
addActionPressed
void addActionPressed(java.awt.event.ActionEvent e)
Respond to Add action button in the EditConditional window.- Parameters:
e- The event heard
-
reorderActionPressed
void reorderActionPressed(java.awt.event.ActionEvent e)
Respond to the Reorder Action Button in the Edit Conditional window.- Parameters:
e- The event heard
-
swapActions
void swapActions(int row)
Respond to the First/Next (Delete) Button in the Edit Conditional window.- Parameters:
row- index of the row to put as next in line (instead of the one that was supposed to be next)
-
updateConditionalPressed
boolean updateConditionalPressed(java.awt.event.ActionEvent e)
Respond to the Update Conditional Button in the Edit Conditional window.- Overrides:
updateConditionalPressedin classConditionalFrame- Parameters:
e- The event heard- Returns:
- true if updated
-
cancelConditionalPressed
void cancelConditionalPressed()
Respond to the Cancel button in the Edit Conditional frame.Does the cleanup from deleteConditionalPressed, updateConditionalPressed and _editConditionalFrame window closer.
- Overrides:
cancelConditionalPressedin classConditionalFrame
-
logicTypeChanged
boolean logicTypeChanged(java.awt.event.ActionEvent e)
Respond to a change of Conditional Type in the Edit Conditional pane by showing/hiding the _antecedentPanel when Mixed is selected.- Parameters:
e- The event heard- Returns:
- false if there is no change in operator
-
helpPressed
void helpPressed(java.awt.event.ActionEvent e)
Respond to Help button press in the Edit Conditional pane.- Parameters:
e- The event heard
-
makeAntecedent
void makeAntecedent()
Build the antecedent statement.
-
appendToAntecedent
void appendToAntecedent()
Add a R# to the antecedent statement.
-
validateAntecedent
boolean validateAntecedent()
Check the antecedent and logic type.- Returns:
- false if antecedent can't be validated
-
alreadyEditingActionOrVariable
boolean alreadyEditingActionOrVariable()
Check if an editing session is going on.If it is, display a message to user and bring current editing pane to front.
- Returns:
- true if an _editActionFrame or _editVariableFrame exists
-
loadJComboBoxWithHeadAppearances
void loadJComboBoxWithHeadAppearances(javax.swing.JComboBox<java.lang.String> box, java.lang.String signalHeadName)
Fetch valid localized appearances for a given Signal Head.Warn if head is not found.
- Parameters:
box- the comboBox on the setup pane to fillsignalHeadName- user or system name of the Signal Head
-
loadJComboBoxWithMastAspects
void loadJComboBoxWithMastAspects(javax.swing.JComboBox<java.lang.String> box, java.lang.String mastName)
Fetch valid aspects for a given Signal Mast.Warn if mast is not found.
- Parameters:
box- the comboBox on the setup pane to fillmastName- user or system name of the Signal Mast
-
makeTopPanel
javax.swing.JPanel makeTopPanel(javax.swing.JFrame frame, java.lang.String title, int width, int height)
Create Variable and Action editing pane top part.- Parameters:
frame- JFrame to add totitle- property key for border titlewidth- fixed dimension to useheight- fixed dimension to use- Returns:
- JPanel containing interface
-
makeButtonPanel
javax.swing.JPanel makeButtonPanel(java.awt.event.ActionListener updateListener, java.awt.event.ActionListener cancelListener, java.awt.event.ActionListener deleteListener)
Create Variable and Action editing pane bottom part.Called from
makeEditVariableWindow(int)- Parameters:
updateListener- listener for Update pressedcancelListener- listener for Cancel presseddeleteListener- listener for Delete pressed- Returns:
- JPanel containing Update etc. buttons
-
makeEditVariableWindow
void makeEditVariableWindow(int row)
Create and/or initialize the Edit a Variable pane.Note: you can get here via the New Variable button (addVariablePressed) or via an Edit button in the Variable table of the EditConditional window.
- Parameters:
row- index of item to be edited in _variableList
-
initializeStateVariables
void initializeStateVariables()
Set display to show current state variable (_curVariable) parameters.
-
setVariableNameBox
void setVariableNameBox(Conditional.ItemType itemType)
Update the name combo box selection based on the current contents of the name field.- Parameters:
itemType- The type of name box to be created.- Since:
- 4.7.3
-
updateVariablePressed
void updateVariablePressed()
Respond to Update Variable button in the Edit Action pane.
-
cancelEditVariablePressed
void cancelEditVariablePressed()
Respond to Cancel action button and window closer of the Edit Variable pane.Also does cleanup of Update and Delete Variable buttons.
-
cleanUpVariable
void cleanUpVariable()
Clean up Update and Delete Variable buttons.
-
deleteVariablePressed
void deleteVariablePressed()
Respond to Delete action button in the Edit Variable window.
-
deleteVariablePressed
void deleteVariablePressed(int row)
Respond to the Delete Button in the State Variable Table of the Edit Conditional window.- Parameters:
row- index in table of variable to be deleted
-
validateVariable
boolean validateVariable()
Validate Variable data from Edit Variable Window, and transfer it to current action object as appropriate.Messages are sent to the user for any errors found. This routine returns false immediately after finding the first error, even if there might be more errors.
- Returns:
- true if all data checks out OK, otherwise false
-
makeEditActionWindow
void makeEditActionWindow(int row)
Create and/or initialize 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.
- Parameters:
row- index in the table of the Action to be edited
-
loadSelectLogixBox
void loadSelectLogixBox(ConditionalVariable curVariable)
Load the Logix selection box. Set the selection to the current Logix.- Parameters:
curVariable- Current ConditionalVariable- Since:
- 4.7.4
-
loadSelectConditionalBox
void loadSelectConditionalBox(java.lang.String logixName, ConditionalVariable curVariable)
Load the Conditional selection box. The first row is a prompt.- Parameters:
logixName- The Logix system name for selecting the owned ConditionalscurVariable- Current ConditionalVariable- Since:
- 4.7.4
-
initializeActionVariables
void initializeActionVariables()
Set display to show current action (curAction) parameters.
-
actionItemChanged
void actionItemChanged(Conditional.ItemType type)
Respond to a change in an Action Type comboBox on the Edit Conditional Action pane.Set components visible for the selected type.
- Parameters:
type- index of the newly selected Action type
-
setActionNameBox
void setActionNameBox(Conditional.ItemType itemType)
Update the name combo box selection based on the current contents of the name field. Called byactionItemChanged(Conditional.ItemType).- Parameters:
itemType- The type of name box to be created.- Since:
- 4.7.3
-
updateActionPressed
void updateActionPressed()
Respond to Update Action button in the Edit Action pane.
-
cancelEditActionPressed
void cancelEditActionPressed()
Respond to Cancel action button and window closer of the Edit Action window.Also does cleanup of Update and Delete buttons.
-
cleanUpAction
void cleanUpAction()
Clean up Update and Delete Action buttons.
-
deleteActionPressed
void deleteActionPressed()
Respond to Delete action button in the Edit Action window.
-
deleteActionPressed
void deleteActionPressed(int row)
Respond to Delete action button in an action row of the Edit Conditional pane.- Parameters:
row- index in table of action to be deleted
-
setFileLocation
void setFileLocation(java.awt.event.ActionEvent e)
Respond to the [...] button in the Edit Action window action section.Ask user to select an audio or python script file on disk.
- Parameters:
e- the event heard
-
validateAction
boolean validateAction()
Validate Action data from Edit Action Window, and transfer it to current action object as appropriate.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.
- Returns:
- true if all data checks out OK, otherwise false
-
-