Package jmri.jmrit.timetable.swing
Class TimeTableFrame
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
jmri.util.JmriJFrame
jmri.jmrit.timetable.swing.TimeTableFrame
- All Implemented Interfaces:
ComponentListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,RootPaneContainer,WindowConstants,BeanInterface,ModifiedFlag,WindowInterface
Create and maintain timetables.
A timetable describes the layout and trains along with the times that each train should be at specified locations. Logical Schema Layout Train Types Segments Stations Schedules Trains Stops
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classTimetable Tree Node Definition.Nested classes/interfaces inherited from class jmri.util.JmriJFrame
JmriJFrame.ScreenDimensionsNested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrameNested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrameNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategyNested classes/interfaces inherited from interface jmri.util.swing.WindowInterface
WindowInterface.Hint -
Field Summary
FieldsModifier and TypeFieldDescription(package private) JButton(package private) JPanel(package private) JButton(package private) JButton(package private) JPanel(package private) TimeTableFrame.TimeTableTreeNode(package private) int(package private) int(package private) String(package private) String(package private) TreePath(package private) TimeTableDataManager(package private) JButton(package private) JPanel(package private) JPanel(package private) JPanel(package private) JButton(package private) JButton(package private) JPanel(package private) boolean(package private) JTextField(package private) JTextField(package private) JCheckBox(package private) JSpinner(package private) JTextField(package private) JTextField(package private) JTextField(package private) JCheckBox(package private) JTextField(package private) JTextField(package private) JTextField(package private) JSpinner(package private) JSpinner(package private) JSpinner(package private) JSpinner(package private) JTextField(package private) JTextField(package private) JTextArea(package private) JComboBox<TimeTableDataManager.SegmentStation>(package private) JSpinner(package private) JTextField(package private) JTextField(package private) JTextField(package private) JTextArea(package private) JTextField(package private) JColorChooser(package private) JTextField(package private) JPanel(package private) JPanel(package private) boolean(package private) TimeTableFrame.TimeTableTreeNode(package private) TimeTableFrame.TimeTableTreeNode(package private) JPanel(package private) JPanel(package private) JButton(package private) JButton(package private) TimeTableFrame.TimeTableTreeNode(package private) TimeTableFrame.TimeTableTreeNode(package private) TimeTableFrame.TimeTableTreeNode(package private) TimeTableFrame.TimeTableTreeNode(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) boolean(package private) TimeTableFrame.TimeTableTreeNode(package private) TimeTableFrame.TimeTableTreeNode(package private) TreeSelectionListener(package private) DefaultTreeModel(package private) DefaultMutableTreeNode(package private) JTree(package private) TimeTableFrame.TimeTableTreeNode(package private) boolean(package private) TimeTableFrame.TimeTableTreeNode(package private) TimeTableFrame.TimeTableTreeNode(package private) JButton(package private) ChangeListenerEnable edit mode.(package private) FocusListenerEnable edit mode.static final String(package private) JFileChooser(package private) ItemListenerIf the custom scale item is selected provide a dialog to set the scale ratio(package private) ItemListenerChange the max spinner value based on the station data.Fields inherited from class jmri.util.JmriJFrame
allowInFrameServlet, properties, reuseFrameSavedPosition, reuseFrameSavedSized, windowInterfaceFields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabledFields 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_CURSORFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidCreate a new Layout object with default values.(package private) voidAdd new items.(package private) voidCreate a new Schedule object with default values.(package private) voidCreate a new Segment object with default values.(package private) voidCreate a new Station object with default values.(package private) voidaddStop()(package private) voidaddTrain()(package private) voidCreate a new Train Type object.(package private) voidInitialize components.(package private) StringbuildNodeText(String nodeType, Object component, int idx) Create the localized node text display strings based on node type.(package private) JTreeCreate the TimeTable tree structure.(package private) voidCancel the current node edit.(package private) voidcompleteImport(File file) (package private) voidCopy the stops from an existing train.(package private) TrainSelect the train whose stops will be added to the new train.(package private) voidCreate a Options/Tools menu(package private) voidCreate the tree content.(package private) voidAfter confirmation, perform a cascade delete of the layout and its components.(package private) voidProcess the node delete request.(package private) voidDelete a Schedule.(package private) voidDelete a Segment.(package private) voidDelete a Station after checking for usage.(package private) voidDelete a Stop.(package private) voidDelete a Train.(package private) voidDelete a train type after checking for usage.(package private) voidCheck for pending updates and close if none or approved.(package private) voidMove a Stop row down 1 row.(package private) voidduplicateLayout(int layoutId) Create a copy of a layout.(package private) voidDuplicate selected item.(package private) voidduplicateSchedule(int layoutId, int scheduleId, TimeTableFrame.TimeTableTreeNode schedulesNode) Create a copy of a schedule.(package private) voidduplicateSegment(int layoutId, int segmentId, TimeTableFrame.TimeTableTreeNode segmentsNode) Create a copy of a segment.(package private) voidduplicateStation(int segmentId, int stationId, TimeTableFrame.TimeTableTreeNode segmentNode) Create a copy of a station.(package private) voidduplicateStop(int trainId, int stopId, int stationId, int seq, TimeTableFrame.TimeTableTreeNode trainNode) Create a copy of a stop.(package private) voidduplicateTrain(int schedId, int trainId, int typeId, TimeTableFrame.TimeTableTreeNode schedNode) Create a copy of a train.(package private) voidduplicateTrainType(int layoutId, int typeId, TimeTableFrame.TimeTableTreeNode typesNode) Create a copy of a train type.(package private) void(package private) voidSet up the edit environment for the selected node Called fromtreeRowSelected(jmri.jmrit.timetable.swing.TimeTableFrame.TimeTableTreeNode).(package private) void(package private) void(package private) void(package private) voideditStop()(package private) void(package private) void(package private) voidprotected String(package private) voidgraphPressed(String graphType) (package private) void(package private) void(package private) void(package private) voidmakeDetailGrid(String gridType) Build new GridBag content.(package private) voidThis grid is used when there are no edit grids required.(package private) voidmakeGridLabel(int row, String label, String hint, GridBagConstraints c) Create the label portion of a grid row.(package private) voidThis grid is used to edit Layout data.(package private) voidThis grid is used to edit the Schedule data.(package private) voidThis grid is used to edit the Segment data.(package private) voidThis grid is used to edit the Station data.(package private) voidThis grid is used to edit the Stop data.(package private) voidThis grid is used to edit the Train data.(package private) voidThis grid is used to edit the Train Type data.(package private) voidmoveTreeNode(String direction) Move a tree node in response to a up or down request.(package private) intparseNumber(JTextField textField, String fieldName) Convert text input to an integer.(package private) voidSave the current set of timetable data.(package private) voidsetEditMode(boolean active) Enable/disable buttons based on edit state.(package private) voidEnable/Disable the Up and Down buttons based on the postion in the list.voidsetShowReminder(boolean dirty) Set/clear dirty flag and save button(package private) voidDisplay reminder to save.(package private) voidtreeRowSelected(TimeTableFrame.TimeTableTreeNode selectedNode) Change the button row based on the currently selected node type.(package private) voidUpdate the layout information.(package private) voidApply the updates to the current node.(package private) voidUpdate the schedule information.(package private) voidUpdate the segment information.(package private) voidUpdate the station information.(package private) voidUpdate the stop information.(package private) voidUpdate the train information.(package private) voidUpdate the train type information.(package private) voidMove a Stop row up 1 row.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, windowOpenedMethods 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, updateMethods 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, setUndecoratedMethods 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, toFrontMethods 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, validateTreeMethods 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, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.awt.MenuContainer
getFont, postEvent
-
Field Details
-
EMPTY_GRID
- See Also:
-
_dataMgr
-
_isDirty
boolean _isDirty -
_showTrainTimes
boolean _showTrainTimes -
_twoPage
boolean _twoPage -
_timetableTree
-
_timetableModel
-
_timetableRoot
-
_timetableListener
-
_curTreePath
-
_layoutNode
-
_typeHead
-
_typeNode
-
_segmentHead
-
_segmentNode
-
_stationNode
-
_scheduleHead
-
_scheduleNode
-
_trainNode
-
_stopNode
-
_leafNode
-
_curNode
-
_curNodeId
int _curNodeId -
_curNodeType
-
_curNodeText
-
_curNodeRow
int _curNodeRow -
_detailGrid
-
_gridPanel
-
_editActive
boolean _editActive -
_cancelAction
-
_updateAction
-
_editLayoutName
-
_editScale
-
_editFastClock
-
_editThrottles
-
_editMetric
-
_editTrainTypeName
-
_editTrainTypeColor
-
_editSegmentName
-
_editStationName
-
_editDistance
-
_editDoubleTrack
-
_editSidings
-
_editStaging
-
_editScheduleName
-
_editEffDate
-
_editStartHour
-
_editDuration
-
_editTrainName
-
_editTrainDesc
-
_editTrainType
-
_editDefaultSpeed
-
_editTrainStartTime
-
_editThrottle
-
_editTrainNotes
-
_showRouteDuration
-
_showStopSeq
-
_editStopStation
-
_editStopDuration
-
_editNextSpeed
-
_editStagingTrack
-
_editStopNotes
-
_showArriveTime
-
_showDepartTime
-
_leftButtonBar
-
_addButtonPanel
-
_duplicateButtonPanel
-
_copyButtonPanel
-
_deleteButtonPanel
-
_moveButtonPanel
-
_graphButtonPanel
-
_addButton
-
_duplicateButton
-
_copyButton
-
_deleteButton
-
_displayButton
-
_printButton
-
_saveButton
-
detailFocusEvent
Enable edit mode. Used for JTextFields and JComboBoxs. -
detailChangeEvent
Enable edit mode. Used for JCheckBoxs, JSpinners and JColorChoosers. -
stopStationItemEvent
Change the max spinner value based on the station data. The number of staging tracks varies depending on the selected station. -
layoutScaleItemEvent
If the custom scale item is selected provide a dialog to set the scale ratio -
fileChooser
-
feedbackList
-
-
Constructor Details
-
TimeTableFrame
public TimeTableFrame() -
TimeTableFrame
-
-
Method Details
-
createMenu
void createMenu()Create a Options/Tools menu. - Option: Show train times on the graph. - Option: Enable two page graph printing. - Tool: Import a SchedGen data file. - Tool: Import a CSV data file. - Tool: Export a CSV data file. Include the standard Windows and Help menu bar items. -
buildComponents
void buildComponents()Initialize components. Add Focus and Change listeners to activate edit mode. Create the color selector for train types. -
makeDetailGrid
Build new GridBag content. The grid panel is hidden, emptied, re-built and made visible.- Parameters:
gridType- The type of grid to create
-
makeEmptyGrid
This grid is used when there are no edit grids required.- Parameters:
c- The constraints object used for the grid construction
-
makeLayoutGrid
This grid is used to edit Layout data.- Parameters:
c- The constraints object used for the grid construction
-
makeTrainTypeGrid
This grid is used to edit the Train Type data.- Parameters:
c- The constraints object used for the grid construction
-
makeSegmentGrid
This grid is used to edit the Segment data.- Parameters:
c- The constraints object used for the grid construction
-
makeStationGrid
This grid is used to edit the Station data.- Parameters:
c- The constraints object used for the grid construction
-
makeScheduleGrid
This grid is used to edit the Schedule data.- Parameters:
c- The constraints object used for the grid construction
-
makeTrainGrid
This grid is used to edit the Train data.- Parameters:
c- The constraints object used for the grid construction
-
makeStopGrid
This grid is used to edit the Stop data.- Parameters:
c- The constraints object used for the grid construction
-
makeGridLabel
Create the label portion of a grid row.- Parameters:
row- The grid row number.label- The bundle key for the label text.hint- The bundle key for the label tool tip.c- The grid bag contraints object.
-
addPressed
void addPressed()Add new items. -
addLayout
void addLayout()Create a new Layout object with default values. Add the layout node and the TrainTypes, Segments and Schedules collection nodes. -
addTrainType
void addTrainType()Create a new Train Type object. The default color is black. -
addSegment
void addSegment()Create a new Segment object with default values. -
addStation
void addStation()Create a new Station object with default values. -
addSchedule
void addSchedule()Create a new Schedule object with default values. -
addTrain
void addTrain() -
addStop
void addStop() -
duplicatePressed
void duplicatePressed()Duplicate selected item. -
duplicateLayout
Create a copy of a layout.- Parameters:
layoutId- The id of the layout to be duplicated.
-
duplicateTrainType
Create a copy of a train type.- Parameters:
layoutId- The id for the parent layout. Zero if within the same layout.typeId- The id of the train type to be duplicated.typesNode- The types node which will be parent for the new train type.
-
duplicateSegment
Create a copy of a segment.- Parameters:
layoutId- The id for the parent layout. Zero if within the same layout.segmentId- The id of the segment to be duplicated.segmentsNode- The segments node which will be parent for the new segment.
-
duplicateStation
Create a copy of a station.- Parameters:
segmentId- The id for the parent segment. Zero if within the same segment.stationId- The id of the station to be duplicated.segmentNode- The segment node which will be parent for the new station.
-
duplicateSchedule
void duplicateSchedule(int layoutId, int scheduleId, TimeTableFrame.TimeTableTreeNode schedulesNode) Create a copy of a schedule.- Parameters:
layoutId- The id for the parent layout. Zero if within the same layout.scheduleId- The id of the schedule to be duplicated.schedulesNode- The schedules node which will be parent for the new schedule.
-
duplicateTrain
void duplicateTrain(int schedId, int trainId, int typeId, TimeTableFrame.TimeTableTreeNode schedNode) Create a copy of a train.- Parameters:
schedId- The id for the parent schedule. Zero if within the same schedule.trainId- The id of the train to be duplicated.typeId- The id of the train type. If zero use the source train type.schedNode- The schedule node which will be parent for the new train.
-
duplicateStop
void duplicateStop(int trainId, int stopId, int stationId, int seq, TimeTableFrame.TimeTableTreeNode trainNode) Create a copy of a stop.- Parameters:
trainId- The id for the parent train. Zero if within the same train.stopId- The id of the stop to be duplicated.stationId- The id of the station. If zero use the source station.seq- The sequence for the new stop. If zero calculate the next sequence number.trainNode- The train node which will be parent for the new stop.
-
copyPressed
void copyPressed()Copy the stops from an existing train. -
copyTrainSelection
Select the train whose stops will be added to the new train.- Returns:
- the selected train or null if there is no selection made.
-
editPressed
void editPressed()Set up the edit environment for the selected node Called fromtreeRowSelected(jmri.jmrit.timetable.swing.TimeTableFrame.TimeTableTreeNode). This takes the place of an actual button. -
editLayout
void editLayout() -
editTrainType
void editTrainType() -
editSegment
void editSegment() -
editStation
void editStation() -
editSchedule
void editSchedule() -
editTrain
void editTrain() -
editStop
void editStop() -
updatePressed
void updatePressed()Apply the updates to the current node. -
updateLayout
void updateLayout()Update the layout information. If the fast clock or metric values change, a recalc will be required. The throttles value cannot be less than the highest throttle assigned to a train. -
updateTrainType
void updateTrainType()Update the train type information. -
updateSegment
void updateSegment()Update the segment information. -
updateStation
void updateStation()Update the station information. The staging track value cannot be less than any train references. -
updateSchedule
void updateSchedule()Update the schedule information. Changes to the schedule times cannot make a train start time or a stop's arrival or departure times invalid. -
updateTrain
void updateTrain()Update the train information. The train start time has to have a h:mm format and cannot fall outside of the schedules times. -
updateStop
void updateStop()Update the stop information. -
parseNumber
Convert text input to an integer.- Parameters:
textField- JTextField containing the probable integer.fieldName- The name of the field for the dialog.- Returns:
- the valid number or -1 for an invalid input.
-
deletePressed
void deletePressed()Process the node delete request. -
deleteLayout
void deleteLayout()After confirmation, perform a cascade delete of the layout and its components. -
deleteTrainType
void deleteTrainType()Delete a train type after checking for usage. -
deleteSegment
void deleteSegment()Delete a Segment. If the segment contains inactive stations, provide the option to perform a cascade delete. -
deleteStation
void deleteStation()Delete a Station after checking for usage. -
deleteSchedule
void deleteSchedule()Delete a Schedule. If the schedule contains trains, provide the option to perform a cascade delete of trains and their stops. -
deleteTrain
void deleteTrain()Delete a Train. If the train contains stops, provide the option to perform a cascade delete of the stops. -
deleteStop
void deleteStop()Delete a Stop. -
cancelPressed
void cancelPressed()Cancel the current node edit. -
upPressed
void upPressed()Move a Stop row up 1 row. -
downPressed
void downPressed()Move a Stop row down 1 row. -
moveTreeNode
Move a tree node in response to a up or down request.- Parameters:
direction- The direction of movement, Up or Down
-
setMoveButtons
void setMoveButtons()Enable/Disable the Up and Down buttons based on the postion in the list. -
graphPressed
-
importPressed
void importPressed() -
importCsvPressed
void importCsvPressed() -
completeImport
-
importFromOperationsPressed
void importFromOperationsPressed() -
exportCsvPressed
void exportCsvPressed() -
savePressed
void savePressed()Save the current set of timetable data. -
donePressed
void donePressed()Check for pending updates and close if none or approved. -
buildTree
Create the TimeTable tree structure.- Returns:
- _timetableTree The tree ddefinition with its content
-
createTimeTableContent
void createTimeTableContent()Create the tree content. Level 1 -- Layouts Level 2 -- Train Type, Segment and Schedule Containers Level 3 -- Train Types, Segments, Schedules Level 4 -- Stations, Trains Level 5 -- Stops -
buildNodeText
Create the localized node text display strings based on node type.- Parameters:
nodeType- The type of the nodecomponent- The object or child objectidx- Optional index value- Returns:
- nodeText containing the text to display on the node
-
treeRowSelected
Change the button row based on the currently selected node type. Invoke edit where appropriate.- Parameters:
selectedNode- The node object
-
showNodeEditMessage
void showNodeEditMessage()Display reminder to save. -
setShowReminder
Set/clear dirty flag and save button- Parameters:
dirty- True if changes have been made that are not saved.
-
setEditMode
Enable/disable buttons based on edit state. The edit state controls the ability to select tree nodes.- Parameters:
active- True to make edit active, false to make edit inactive
-
getClassName
-