Class ConditionalListEdit
Conditionals now have two policies to trigger execution of their action lists:
- the previous policy - Trigger on change of state only
- the new default - Trigger on any enabled state calculation
Two additional action and variable name selection methods have been added:
- Single Pick List
- Combo Box Selection
Add a Browse Option to the Logix Select Menu. This will display a window that creates a formatted list of the contents of the selected Logix with each Conditional, Variable and Action. The code is courtesy of Chuck Catania and is used with his permission. Apr 2, 2017 - Dave Sand
Compare with the other Conditional Edit tool ConditionalTreeEdit
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassTable model for Conditionals in the Edit Logix pane.Nested classes/interfaces inherited from class jmri.jmrit.conditional.ConditionalEditBase
ConditionalEditBase.LogixEventListener, ConditionalEditBase.NameBoxListener, ConditionalEditBase.PickSingleListener, ConditionalEditBase.SelectionMode -
Field Summary
FieldsModifier and TypeFieldDescription(package private) int(package private) JTextField(package private) boolean(package private) int(package private) int(package private) JLabel(package private) ConditionalListEdit.ConditionalTableModel(package private) static final intFields inherited from class jmri.jmrit.conditional.ConditionalList
_conditionalFrame, _curConditional, _newConditional, _oldTargetNamesFields inherited from class jmri.jmrit.conditional.ConditionalEditBase
_conditionalManager, _curLogix, _editLogixFrame, _inEditMode, _logixManager, _pickListener, _pickSingleFrame, _pickTable, _pickTables, _pickTabPane, _selectionMode, _showReminder, _suppressIndirectRef, _suppressReminder, listenerList, logixData -
Constructor Summary
ConstructorsConstructorDescriptionConditionalListEdit(String sName) Create a new Conditional List View editor. -
Method Summary
Modifier and TypeMethodDescription(package private) voidResponds to the Calculate Button in the Edit Logix window.(package private) booleancheckConditionalUserName(String uName) (package private) booleanCheck if edit of a conditional is in progress.(package private) void(package private) voidRespond to the Delete Conditional Button in the Edit Conditional window.(package private) voidRespond to the Delete button in the Edit Logix window.(package private) voidRespond to the Done button in the Edit Logix window.(package private) voideditConditionalPressed(int rx) Respond to Edit Button in the Conditional table of the Edit Logix Window.(package private) voidprotected String(package private) JPanelMake the bottom panel for _conditionalFrame to hold buttons for Update/Save, Cancel, Delete/FullEdit(package private) voidCreate and/or initialize the Edit Conditional window.(package private) voidCreate and/or initialize the Edit Logix pane.(package private) voidRespond to the New Conditional Button in Edit Logix Window.(package private) voidRespond to the Reorder Button in the Edit Logix pane.(package private) voidswapConditional(int row) Respond to the First/Next (Delete/Reorder) Button in the ConditionalTableModel.(package private) booleanupdateConditional(String uName, Conditional.AntecedentOperator logicType, boolean trigger, String antecedent) Update _curConditional, the current Conditional.(package private) voidMethods inherited from class jmri.jmrit.conditional.ConditionalList
closeConditionalFrame, getPickSingleListener, makeNewConditional, updateConditionalMethods inherited from class jmri.jmrit.conditional.ConditionalEditBase
addLogixEventListener, appendToAntecedent, bringToFront, checkConditionalReferences, checkConditionalUserName, closeSinglePanelPickList, confirmActionAsVariable, confirmIndirectMemory, createNameBox, createSinglePanelPickList, displayBadNumberReference, findPickListTabPane, fireLogixEvent, formatTime, getLight, hidePickListTable, loadReferenceNames, loadSelectionMode, locateAt, makeAntecedent, messageDuplicateConditionalUserName, messageInvalidActionItemName, openPickListTable, parseTime, removeLogixEventListener, setPickListTab, showSaveReminder, translateAntecedent, updateWhereUsed, validateAntecedent, validateAudioReference, validateConditionalReference, validateEntryExitReference, validateIntensity, validateIntensityReference, validateLightReference, validateLogixReference, validateMemoryReference, validateOBlockReference, validateRouteReference, validateSensorReference, validateSignalHeadReference, validateSignalMastReference, validateTime, validateTimeReference, validateTurnoutReference, validateWarrantReference
-
Field Details
-
_editUserName
-
_status
-
_numConditionals
int _numConditionals -
conditionalTableModel
-
_conditionalRowNumber
-
_inReorderMode
boolean _inReorderMode -
_nextInOrder
int _nextInOrder -
STRUT
- See Also:
-
-
Constructor Details
-
ConditionalListEdit
Create a new Conditional List View editor.- Parameters:
sName- name of the Logix being edited
-
ConditionalListEdit
public ConditionalListEdit()
-
-
Method Details
-
makeEditLogixWindow
void makeEditLogixWindow()Create and/or initialize the Edit Logix pane. -
newConditionalPressed
Respond to the New Conditional Button in Edit Logix Window.- Parameters:
e- The event heard
-
updateConditionalTableModel
void updateConditionalTableModel()- Specified by:
updateConditionalTableModelin classConditionalList
-
editConditionalPressed
Respond to Edit Button in the Conditional table of the Edit Logix Window.- Parameters:
rx- index (row number) of Conditional to be edited
-
reorderPressed
Respond to the Reorder Button in the Edit Logix pane.- Parameters:
e- The event heard
-
calculatePressed
Responds to the Calculate Button in the Edit Logix window.- Parameters:
e- The event heard
-
donePressed
Respond to the Done button in the Edit Logix window.Note: We 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.
- Parameters:
e- The event heard
-
finishDone
void finishDone() -
deletePressed
Respond to the Delete button in the Edit Logix window.- Parameters:
e- The event heard
-
deleteConditionalPressed
void deleteConditionalPressed()Respond to the Delete Conditional Button in the Edit Conditional window. -
checkEditConditional
boolean checkEditConditional()Check if edit of a conditional is in progress.- Returns:
- true if this is the case, after showing dialog to user
-
makeEditConditionalWindow
void makeEditConditionalWindow()Create and/or initialize 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.
-
makeBottomPanel
Make the bottom panel for _conditionalFrame to hold buttons for Update/Save, Cancel, Delete/FullEdit- Specified by:
makeBottomPanelin classConditionalList- Returns:
- the panel
-
updateConditional
boolean updateConditional(String uName, Conditional.AntecedentOperator logicType, boolean trigger, String antecedent) Description copied from class:ConditionalListUpdate _curConditional, the current Conditional. Checks for being well formed rules and registers its usage.- Specified by:
updateConditionalin classConditionalList- Parameters:
uName- Conditiona's user namelogicType- Logic type od antecedenttrigger- Trigger on variablr change action choiceantecedent- the antecedent- Returns:
- true, if update is made
-
closeConditionalFrame
void closeConditionalFrame()- Specified by:
closeConditionalFramein classConditionalList
-
checkConditionalUserName
-
swapConditional
Respond to the First/Next (Delete/Reorder) Button in the ConditionalTableModel.- Parameters:
row- index of the row to put as next in line (instead of the one that was supposed to be next)
-
getClassName
- Overrides:
getClassNamein classConditionalList
-