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 class
LogixNGEditor.ConditionalNGTableModel
Table model for ConditionalNGs in the Edit LogixNG pane.static interface
LogixNGEditor.LogixNGEventListener
Create 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) JmriJFrame
_editConditionalNGFrame
(package private) JmriJFrame
_editLogixNGFrame
(package private) boolean
_inActReorder
(package private) boolean
_inEditConditionalNGMode
(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.JTextField
editUserName
(package private) java.util.List<AbstractLogixNGEditor.EditorEventListener>
listenerList
Maintain a list of listeners -- normally only one.(package private) javax.swing.JLabel
status
-
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 void
addEditorEventListener(AbstractLogixNGEditor.EditorEventListener listener)
Add a listener.(package private) void
autoSystemName()
Enable/disable fields for data entry when user selects to have system name automatically generated.void
bringToFront()
(package private) boolean
checkConditionalNGSysName()
Check validity of ConditionalNG system name.(package private) boolean
checkConditionalNGSystemName(java.lang.String sName)
Check form of ConditionalNG systemName.(package private) boolean
checkConditionalNGUserName(java.lang.String uName, LogixNG logixNG)
(package private) void
debugConditionalNGPressed(int rx)
Respond to Edit Button in the ConditionalNG table of the Edit LogixNG Window.(package private) void
deletePressed()
Respond to the Delete button in the Edit LogixNG window.(package private) void
donePressed(java.awt.event.ActionEvent e)
Respond to the Done button in the Edit LogixNG window.(package private) void
editConditionalNGPressed(int rx)
Respond to Edit Button in the ConditionalNG table of the Edit LogixNG Window.(package private) void
executePressed(java.awt.event.ActionEvent e)
Responds to the Execute Button in the Edit LogixNG window.(package private) void
finishDone()
(package private) void
makeDebugConditionalNGWindow()
Create and/or initialize the Edit Conditional window.(package private) void
makeEditConditionalNGWindow()
Create and/or initialize the Edit Conditional window.(package private) void
makeEditLogixNGWindow()
Create and/or initialize the Edit LogixNG pane.(package private) void
messageDuplicateConditionalNGUserName(java.lang.String svName)
Send a duplicate Conditional user name message for Edit Logix pane.(package private) void
newConditionalNGPressed(java.awt.event.ActionEvent e)
Respond to the New ConditionalNG Button in Edit LogixNG Window.void
removeEditorEventListener(AbstractLogixNGEditor.EditorEventListener listener)
Remove a listener -- not used.(package private) void
reorderPressed(java.awt.event.ActionEvent e)
Respond to the Reorder Button in the Edit LogixNG pane.(package private) void
showSaveReminder()
Display reminder to save.(package private) void
swapConditionalNG(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
-
_editLogixNGFrame
JmriJFrame _editLogixNGFrame
-
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
-
_inEditConditionalNGMode
boolean _inEditConditionalNGMode
-
_editConditionalNGFrame
JmriJFrame _editConditionalNGFrame
-
_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:
bringToFront
in 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:
addEditorEventListener
in interfaceAbstractLogixNGEditor<LogixNG>
- Parameters:
listener
- The recipient
-
removeEditorEventListener
public void removeEditorEventListener(AbstractLogixNGEditor.EditorEventListener listener)
Remove a listener -- not used.- Specified by:
removeEditorEventListener
in interfaceAbstractLogixNGEditor<LogixNG>
- Parameters:
listener
- The recipient
-
-