Package jmri.jmrit.logixng.tools.swing
Class LogixNGEditor
- java.lang.Object
-
- jmri.jmrit.logixng.tools.swing.LogixNGEditor
-
- All Implemented Interfaces:
AbstractLogixNGEditor<LogixNG>
public final class LogixNGEditor extends java.lang.Object implements AbstractLogixNGEditor<LogixNG>
Editor for LogixNG
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classLogixNGEditor.ConditionalNGTableModelTable model for ConditionalNGs in the Edit LogixNG pane.static interfaceLogixNGEditor.LogixNGEventListenerCreate a custom listener event.-
Nested classes/interfaces inherited from interface jmri.jmrit.logixng.tools.swing.AbstractLogixNGEditor
AbstractLogixNGEditor.EditorEventListener
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ConditionalNG_Manager_conditionalNG_Manager(package private) int_conditionalRowNumber(package private) LogixNG_curLogixNG(package private) ConditionalNGDebugger_debugger(package private) boolean_inActReorder(package private) boolean_inEditMode(package private) boolean_inReorderMode(package private) boolean_inVarReorder(package private) LogixNG_Manager_logixNG_Manager(package private) int_nextInOrder(package private) int_numConditionalNGs(package private) java.util.ArrayList<java.lang.String>_selectConditionalNGList(package private) javax.swing.JPanel_selectConditionalNGPanel(package private) java.util.TreeMap<java.lang.String,java.lang.String>_selectLogixNGMap(package private) javax.swing.JPanel_selectLogixNGPanel(package private) boolean_showReminder(package private) boolean_suppressIndirectRef(package private) boolean_suppressReminder(package private) ConditionalNGEditor_treeEdit(package private) javax.swing.JRadioButton_triggerOnChangeButton(package private) BeanTableDataModel<LogixNG>beanTableDataModel(package private) javax.swing.JTextFieldeditUserName(package private) java.util.List<AbstractLogixNGEditor.EditorEventListener>listenerListMaintain a list of listeners -- normally only one.(package private) javax.swing.JLabelstatus
-
Constructor Summary
Constructors Constructor Description LogixNGEditor(BeanTableDataModel<LogixNG> m, java.lang.String sName)Create a new ConditionalNG List View editor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEditorEventListener(AbstractLogixNGEditor.EditorEventListener listener)Add a listener.(package private) voidautoSystemName()Enable/disable fields for data entry when user selects to have system name automatically generated.voidbringToFront()(package private) booleancheckConditionalNGSysName()Check validity of ConditionalNG system name.(package private) booleancheckConditionalNGSystemName(java.lang.String sName)Check form of ConditionalNG systemName.(package private) booleancheckConditionalNGUserName(java.lang.String uName, LogixNG logixNG)(package private) voiddebugConditionalNGPressed(int rx)Respond to Edit Button in the ConditionalNG table of the Edit LogixNG Window.(package private) voiddeletePressed()Respond to the Delete button in the Edit LogixNG window.(package private) voiddonePressed(java.awt.event.ActionEvent e)Respond to the Done button in the Edit LogixNG window.(package private) voideditConditionalNGPressed(int rx)Respond to Edit Button in the ConditionalNG table of the Edit LogixNG Window.(package private) voidexecutePressed(java.awt.event.ActionEvent e)Responds to the Execute Button in the Edit LogixNG window.(package private) voidfinishDone()(package private) voidmakeDebugConditionalNGWindow()Create and/or initialize the Edit Conditional window.(package private) voidmakeEditConditionalNGWindow()Create and/or initialize the Edit Conditional window.(package private) voidmakeEditLogixNGWindow()Create and/or initialize the Edit LogixNG pane.(package private) voidmessageDuplicateConditionalNGUserName(java.lang.String svName)Send a duplicate Conditional user name message for Edit Logix pane.(package private) voidnewConditionalNGPressed(java.awt.event.ActionEvent e)Respond to the New ConditionalNG Button in Edit LogixNG Window.voidremoveEditorEventListener(AbstractLogixNGEditor.EditorEventListener listener)Remove a listener -- not used.(package private) voidreorderPressed(java.awt.event.ActionEvent e)Respond to the Reorder Button in the Edit LogixNG pane.(package private) voidshowSaveReminder()Display reminder to save.(package private) voidswapConditionalNG(int row)Respond to the First/Next (Delete) Button in the Edit LogixNG window.
-
-
-
Field Detail
-
beanTableDataModel
BeanTableDataModel<LogixNG> beanTableDataModel
-
_logixNG_Manager
LogixNG_Manager _logixNG_Manager
-
_curLogixNG
LogixNG _curLogixNG
-
_conditionalNG_Manager
ConditionalNG_Manager _conditionalNG_Manager
-
_treeEdit
ConditionalNGEditor _treeEdit
-
_debugger
ConditionalNGDebugger _debugger
-
_numConditionalNGs
int _numConditionalNGs
-
_inEditMode
boolean _inEditMode
-
_showReminder
boolean _showReminder
-
_suppressReminder
boolean _suppressReminder
-
_suppressIndirectRef
boolean _suppressIndirectRef
-
editUserName
javax.swing.JTextField editUserName
-
status
javax.swing.JLabel status
-
_conditionalRowNumber
int _conditionalRowNumber
-
_inReorderMode
boolean _inReorderMode
-
_inActReorder
boolean _inActReorder
-
_inVarReorder
boolean _inVarReorder
-
_nextInOrder
int _nextInOrder
-
_selectLogixNGPanel
javax.swing.JPanel _selectLogixNGPanel
-
_selectConditionalNGPanel
javax.swing.JPanel _selectConditionalNGPanel
-
_selectLogixNGMap
java.util.TreeMap<java.lang.String,java.lang.String> _selectLogixNGMap
-
_selectConditionalNGList
java.util.ArrayList<java.lang.String> _selectConditionalNGList
-
_triggerOnChangeButton
javax.swing.JRadioButton _triggerOnChangeButton
-
listenerList
java.util.List<AbstractLogixNGEditor.EditorEventListener> listenerList
Maintain a list of listeners -- normally only one.
-
-
Constructor Detail
-
LogixNGEditor
public LogixNGEditor(BeanTableDataModel<LogixNG> m, java.lang.String sName)
Create a new ConditionalNG List View editor.- Parameters:
m- the bean table modelsName- name of the LogixNG being edited
-
-
Method Detail
-
makeEditLogixNGWindow
void makeEditLogixNGWindow()
Create and/or initialize the Edit LogixNG pane.
-
bringToFront
public void bringToFront()
- Specified by:
bringToFrontin interfaceAbstractLogixNGEditor<LogixNG>
-
showSaveReminder
void showSaveReminder()
Display reminder to save.
-
reorderPressed
void reorderPressed(java.awt.event.ActionEvent e)
Respond to the Reorder Button in the Edit LogixNG pane.- Parameters:
e- The event heard
-
swapConditionalNG
void swapConditionalNG(int row)
Respond to the First/Next (Delete) Button in the Edit LogixNG window.- Parameters:
row- index of the row to put as next in line (instead of the one that was supposed to be next)
-
executePressed
void executePressed(java.awt.event.ActionEvent e)
Responds to the Execute Button in the Edit LogixNG window.- Parameters:
e- The event heard
-
donePressed
void donePressed(java.awt.event.ActionEvent e)
Respond to the Done button in the Edit LogixNG window.Note: We also get here if the Edit LogixNG window is dismissed, or if the Add button is pressed in the Logic Table with an active Edit LogixNG window.
- Parameters:
e- The event heard
-
finishDone
void finishDone()
-
deletePressed
void deletePressed()
Respond to the Delete button in the Edit LogixNG window.
-
newConditionalNGPressed
void newConditionalNGPressed(java.awt.event.ActionEvent e)
Respond to the New ConditionalNG Button in Edit LogixNG Window.- Parameters:
e- The event heard
-
checkConditionalNGSysName
boolean checkConditionalNGSysName()
Check validity of ConditionalNG system name.Fixes name if it doesn't start with "IQC" or is missing the $ for alpha suffixes.
- Returns:
- false if the name fails the NameValidity check
-
autoSystemName
void autoSystemName()
Enable/disable fields for data entry when user selects to have system name automatically generated.
-
makeEditConditionalNGWindow
void makeEditConditionalNGWindow()
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.
-
makeDebugConditionalNGWindow
void makeDebugConditionalNGWindow()
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.
-
editConditionalNGPressed
void editConditionalNGPressed(int rx)
Respond to Edit Button in the ConditionalNG table of the Edit LogixNG Window.- Parameters:
rx- index (row number) of ConditionalNG to be edited
-
debugConditionalNGPressed
void debugConditionalNGPressed(int rx)
Respond to Edit Button in the ConditionalNG table of the Edit LogixNG Window.- Parameters:
rx- index (row number) of ConditionalNG to be edited
-
checkConditionalNGUserName
boolean checkConditionalNGUserName(java.lang.String uName, LogixNG logixNG)
-
checkConditionalNGSystemName
boolean checkConditionalNGSystemName(java.lang.String sName)
Check form of ConditionalNG systemName.- Parameters:
sName- system name of bean to be checked- Returns:
- false if sName is empty string or null
-
messageDuplicateConditionalNGUserName
void messageDuplicateConditionalNGUserName(java.lang.String svName)
Send a duplicate Conditional user name message for Edit Logix pane.- Parameters:
svName- proposed name that duplicates an existing name
-
addEditorEventListener
public void addEditorEventListener(AbstractLogixNGEditor.EditorEventListener listener)
Add a listener.- Specified by:
addEditorEventListenerin interfaceAbstractLogixNGEditor<LogixNG>- Parameters:
listener- The recipient
-
removeEditorEventListener
public void removeEditorEventListener(AbstractLogixNGEditor.EditorEventListener listener)
Remove a listener -- not used.- Specified by:
removeEditorEventListenerin interfaceAbstractLogixNGEditor<LogixNG>- Parameters:
listener- The recipient
-
-