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:
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 TimeTableFrame extends JmriJFrame
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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classTimeTableFrame.TimeTableTreeNodeTimetable Tree Node Definition.-
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.JButton_addButton(package private) javax.swing.JPanel_addButtonPanel(package private) javax.swing.JButton_cancelAction(package private) javax.swing.JButton_copyButton(package private) javax.swing.JPanel_copyButtonPanel(package private) TimeTableFrame.TimeTableTreeNode_curNode(package private) int_curNodeId(package private) int_curNodeRow(package private) java.lang.String_curNodeText(package private) java.lang.String_curNodeType(package private) javax.swing.tree.TreePath_curTreePath(package private) TimeTableDataManager_dataMgr(package private) javax.swing.JButton_deleteButton(package private) javax.swing.JPanel_deleteButtonPanel(package private) javax.swing.JPanel_detailFooter(package private) javax.swing.JPanel_detailGrid(package private) javax.swing.JButton_displayButton(package private) javax.swing.JButton_duplicateButton(package private) javax.swing.JPanel_duplicateButtonPanel(package private) boolean_editActive(package private) javax.swing.JTextField_editDefaultSpeed(package private) javax.swing.JTextField_editDistance(package private) javax.swing.JCheckBox_editDoubleTrack(package private) javax.swing.JSpinner_editDuration(package private) javax.swing.JTextField_editEffDate(package private) javax.swing.JTextField_editFastClock(package private) javax.swing.JTextField_editLayoutName(package private) javax.swing.JCheckBox_editMetric(package private) javax.swing.JTextField_editNextSpeed(package private) javax.swing.JComboBox<Scale>_editScale(package private) javax.swing.JTextField_editScheduleName(package private) javax.swing.JTextField_editSegmentName(package private) javax.swing.JSpinner_editSidings(package private) javax.swing.JSpinner_editStaging(package private) javax.swing.JSpinner_editStagingTrack(package private) javax.swing.JSpinner_editStartHour(package private) javax.swing.JTextField_editStationName(package private) javax.swing.JTextField_editStopDuration(package private) javax.swing.JTextArea_editStopNotes(package private) javax.swing.JComboBox<TimeTableDataManager.SegmentStation>_editStopStation(package private) javax.swing.JSpinner_editThrottle(package private) javax.swing.JTextField_editThrottles(package private) javax.swing.JTextField_editTrainDesc(package private) javax.swing.JTextField_editTrainName(package private) javax.swing.JTextArea_editTrainNotes(package private) javax.swing.JTextField_editTrainStartTime(package private) javax.swing.JComboBox<TrainType>_editTrainType(package private) javax.swing.JColorChooser_editTrainTypeColor(package private) javax.swing.JTextField_editTrainTypeName(package private) javax.swing.JPanel_graphButtonPanel(package private) javax.swing.JPanel_gridPanel(package private) boolean_isDirty(package private) TimeTableFrame.TimeTableTreeNode_layoutNode(package private) TimeTableFrame.TimeTableTreeNode_leafNode(package private) javax.swing.JPanel_leftButtonBar(package private) javax.swing.JPanel_moveButtonPanel(package private) javax.swing.JButton_printButton(package private) javax.swing.JButton_saveButton(package private) TimeTableFrame.TimeTableTreeNode_scheduleHead(package private) TimeTableFrame.TimeTableTreeNode_scheduleNode(package private) TimeTableFrame.TimeTableTreeNode_segmentHead(package private) TimeTableFrame.TimeTableTreeNode_segmentNode(package private) javax.swing.JLabel_showArriveTime(package private) javax.swing.JLabel_showDepartTime(package private) javax.swing.JLabel_showRouteDuration(package private) javax.swing.JLabel_showStopSeq(package private) boolean_showTrainTimes(package private) TimeTableFrame.TimeTableTreeNode_stationNode(package private) TimeTableFrame.TimeTableTreeNode_stopNode(package private) javax.swing.event.TreeSelectionListener_timetableListener(package private) javax.swing.tree.DefaultTreeModel_timetableModel(package private) javax.swing.tree.DefaultMutableTreeNode_timetableRoot(package private) javax.swing.JTree_timetableTree(package private) TimeTableFrame.TimeTableTreeNode_trainNode(package private) boolean_twoPage(package private) TimeTableFrame.TimeTableTreeNode_typeHead(package private) TimeTableFrame.TimeTableTreeNode_typeNode(package private) javax.swing.JButton_updateAction(package private) javax.swing.event.ChangeListenerdetailChangeEventEnable edit mode.(package private) java.awt.event.FocusListenerdetailFocusEventEnable edit mode.static java.lang.StringEMPTY_GRID(package private) java.util.List<java.lang.String>feedbackList(package private) javax.swing.JFileChooserfileChooser(package private) java.awt.event.ItemListenerlayoutScaleItemEventIf the custom scale item is selected provide a dialog to set the scale ratio(package private) java.awt.event.ItemListenerstopStationItemEventChange the max spinner value based on the station data.-
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 TimeTableFrame()TimeTableFrame(java.lang.String tt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidaddLayout()Create a new Layout object with default values.(package private) voidaddPressed()Add new items.(package private) voidaddSchedule()Create a new Schedule object with default values.(package private) voidaddSegment()Create a new Segment object with default values.(package private) voidaddStation()Create a new Station object with default values.(package private) voidaddStop()(package private) voidaddTrain()(package private) voidaddTrainType()Create a new Train Type object.(package private) voidbuildComponents()Initialize components.(package private) java.lang.StringbuildNodeText(java.lang.String nodeType, java.lang.Object component, int idx)Create the localized node text display strings based on node type.(package private) javax.swing.JTreebuildTree()Create the TimeTable tree structure.(package private) voidcancelPressed()Cancel the current node edit.(package private) voidcompleteImport(java.io.File file)(package private) voidcopyPressed()Copy the stops from an existing train.(package private) TraincopyTrainSelection()Select the train whose stops will be added to the new train.(package private) voidcreateMenu()Create a Options/Tools menu(package private) voidcreateTimeTableContent()Create the tree content.(package private) voiddeleteLayout()After confirmation, perform a cascade delete of the layout and its components.(package private) voiddeletePressed()Process the node delete request.(package private) voiddeleteSchedule()Delete a Schedule.(package private) voiddeleteSegment()Delete a Segment.(package private) voiddeleteStation()Delete a Station after checking for usage.(package private) voiddeleteStop()Delete a Stop.(package private) voiddeleteTrain()Delete a Train.(package private) voiddeleteTrainType()Delete a train type after checking for usage.(package private) voiddonePressed()Check for pending updates and close if none or approved.(package private) voiddownPressed()Move a Stop row down 1 row.(package private) voidduplicateLayout(int layoutId)Create a copy of a layout.(package private) voidduplicatePressed()Duplicate 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) voideditLayout()(package private) voideditPressed()Set up the edit environment for the selected node Called fromtreeRowSelected(jmri.jmrit.timetable.swing.TimeTableFrame.TimeTableTreeNode).(package private) voideditSchedule()(package private) voideditSegment()(package private) voideditStation()(package private) voideditStop()(package private) voideditTrain()(package private) voideditTrainType()(package private) voidexportCsvPressed()protected java.lang.StringgetClassName()(package private) voidgraphPressed(java.lang.String graphType)(package private) voidimportCsvPressed()(package private) voidimportFromOperationsPressed()(package private) voidimportPressed()(package private) voidmakeDetailGrid(java.lang.String gridType)Build new GridBag content.(package private) voidmakeEmptyGrid(java.awt.GridBagConstraints c)This grid is used when there are no edit grids required.(package private) voidmakeGridLabel(int row, java.lang.String label, java.lang.String hint, java.awt.GridBagConstraints c)Create the label portion of a grid row.(package private) voidmakeLayoutGrid(java.awt.GridBagConstraints c)This grid is used to edit Layout data.(package private) voidmakeScheduleGrid(java.awt.GridBagConstraints c)This grid is used to edit the Schedule data.(package private) voidmakeSegmentGrid(java.awt.GridBagConstraints c)This grid is used to edit the Segment data.(package private) voidmakeStationGrid(java.awt.GridBagConstraints c)This grid is used to edit the Station data.(package private) voidmakeStopGrid(java.awt.GridBagConstraints c)This grid is used to edit the Stop data.(package private) voidmakeTrainGrid(java.awt.GridBagConstraints c)This grid is used to edit the Train data.(package private) voidmakeTrainTypeGrid(java.awt.GridBagConstraints c)This grid is used to edit the Train Type data.(package private) voidmoveTreeNode(java.lang.String direction)Move a tree node in response to a up or down request.(package private) intparseNumber(javax.swing.JTextField textField, java.lang.String fieldName)Convert text input to an integer.(package private) voidsavePressed()Save the current set of timetable data.(package private) voidsetEditMode(boolean active)Enable/disable buttons based on edit state.(package private) voidsetMoveButtons()Enable/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) voidshowNodeEditMessage()Display reminder to save.(package private) voidtreeRowSelected(TimeTableFrame.TimeTableTreeNode selectedNode)Change the button row based on the currently selected node type.(package private) voidupdateLayout()Update the layout information.(package private) voidupdatePressed()Apply the updates to the current node.(package private) voidupdateSchedule()Update the schedule information.(package private) voidupdateSegment()Update the segment information.(package private) voidupdateStation()Update the station information.(package private) voidupdateStop()Update the stop information.(package private) voidupdateTrain()Update the train information.(package private) voidupdateTrainType()Update the train type information.(package private) voidupPressed()Move 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, 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
-
EMPTY_GRID
public static final java.lang.String EMPTY_GRID
- See Also:
- Constant Field Values
-
_dataMgr
TimeTableDataManager _dataMgr
-
_isDirty
boolean _isDirty
-
_showTrainTimes
boolean _showTrainTimes
-
_twoPage
boolean _twoPage
-
_timetableTree
javax.swing.JTree _timetableTree
-
_timetableModel
javax.swing.tree.DefaultTreeModel _timetableModel
-
_timetableRoot
javax.swing.tree.DefaultMutableTreeNode _timetableRoot
-
_timetableListener
javax.swing.event.TreeSelectionListener _timetableListener
-
_curTreePath
javax.swing.tree.TreePath _curTreePath
-
_layoutNode
TimeTableFrame.TimeTableTreeNode _layoutNode
-
_typeHead
TimeTableFrame.TimeTableTreeNode _typeHead
-
_typeNode
TimeTableFrame.TimeTableTreeNode _typeNode
-
_segmentHead
TimeTableFrame.TimeTableTreeNode _segmentHead
-
_segmentNode
TimeTableFrame.TimeTableTreeNode _segmentNode
-
_stationNode
TimeTableFrame.TimeTableTreeNode _stationNode
-
_scheduleHead
TimeTableFrame.TimeTableTreeNode _scheduleHead
-
_scheduleNode
TimeTableFrame.TimeTableTreeNode _scheduleNode
-
_trainNode
TimeTableFrame.TimeTableTreeNode _trainNode
-
_stopNode
TimeTableFrame.TimeTableTreeNode _stopNode
-
_leafNode
TimeTableFrame.TimeTableTreeNode _leafNode
-
_curNode
TimeTableFrame.TimeTableTreeNode _curNode
-
_curNodeId
int _curNodeId
-
_curNodeType
java.lang.String _curNodeType
-
_curNodeText
java.lang.String _curNodeText
-
_curNodeRow
int _curNodeRow
-
_detailGrid
javax.swing.JPanel _detailGrid
-
_detailFooter
javax.swing.JPanel _detailFooter
-
_gridPanel
javax.swing.JPanel _gridPanel
-
_editActive
boolean _editActive
-
_cancelAction
javax.swing.JButton _cancelAction
-
_updateAction
javax.swing.JButton _updateAction
-
_editLayoutName
javax.swing.JTextField _editLayoutName
-
_editScale
javax.swing.JComboBox<Scale> _editScale
-
_editFastClock
javax.swing.JTextField _editFastClock
-
_editThrottles
javax.swing.JTextField _editThrottles
-
_editMetric
javax.swing.JCheckBox _editMetric
-
_editTrainTypeName
javax.swing.JTextField _editTrainTypeName
-
_editTrainTypeColor
javax.swing.JColorChooser _editTrainTypeColor
-
_editSegmentName
javax.swing.JTextField _editSegmentName
-
_editStationName
javax.swing.JTextField _editStationName
-
_editDistance
javax.swing.JTextField _editDistance
-
_editDoubleTrack
javax.swing.JCheckBox _editDoubleTrack
-
_editSidings
javax.swing.JSpinner _editSidings
-
_editStaging
javax.swing.JSpinner _editStaging
-
_editScheduleName
javax.swing.JTextField _editScheduleName
-
_editEffDate
javax.swing.JTextField _editEffDate
-
_editStartHour
javax.swing.JSpinner _editStartHour
-
_editDuration
javax.swing.JSpinner _editDuration
-
_editTrainName
javax.swing.JTextField _editTrainName
-
_editTrainDesc
javax.swing.JTextField _editTrainDesc
-
_editTrainType
javax.swing.JComboBox<TrainType> _editTrainType
-
_editDefaultSpeed
javax.swing.JTextField _editDefaultSpeed
-
_editTrainStartTime
javax.swing.JTextField _editTrainStartTime
-
_editThrottle
javax.swing.JSpinner _editThrottle
-
_editTrainNotes
javax.swing.JTextArea _editTrainNotes
-
_showRouteDuration
javax.swing.JLabel _showRouteDuration
-
_showStopSeq
javax.swing.JLabel _showStopSeq
-
_editStopStation
javax.swing.JComboBox<TimeTableDataManager.SegmentStation> _editStopStation
-
_editStopDuration
javax.swing.JTextField _editStopDuration
-
_editNextSpeed
javax.swing.JTextField _editNextSpeed
-
_editStagingTrack
javax.swing.JSpinner _editStagingTrack
-
_editStopNotes
javax.swing.JTextArea _editStopNotes
-
_showArriveTime
javax.swing.JLabel _showArriveTime
-
_showDepartTime
javax.swing.JLabel _showDepartTime
-
_leftButtonBar
javax.swing.JPanel _leftButtonBar
-
_addButtonPanel
javax.swing.JPanel _addButtonPanel
-
_duplicateButtonPanel
javax.swing.JPanel _duplicateButtonPanel
-
_copyButtonPanel
javax.swing.JPanel _copyButtonPanel
-
_deleteButtonPanel
javax.swing.JPanel _deleteButtonPanel
-
_moveButtonPanel
javax.swing.JPanel _moveButtonPanel
-
_graphButtonPanel
javax.swing.JPanel _graphButtonPanel
-
_addButton
javax.swing.JButton _addButton
-
_duplicateButton
javax.swing.JButton _duplicateButton
-
_copyButton
javax.swing.JButton _copyButton
-
_deleteButton
javax.swing.JButton _deleteButton
-
_displayButton
javax.swing.JButton _displayButton
-
_printButton
javax.swing.JButton _printButton
-
_saveButton
javax.swing.JButton _saveButton
-
detailFocusEvent
transient java.awt.event.FocusListener detailFocusEvent
Enable edit mode. Used for JTextFields and JComboBoxs.
-
detailChangeEvent
transient javax.swing.event.ChangeListener detailChangeEvent
Enable edit mode. Used for JCheckBoxs, JSpinners and JColorChoosers.
-
stopStationItemEvent
transient java.awt.event.ItemListener stopStationItemEvent
Change the max spinner value based on the station data. The number of staging tracks varies depending on the selected station.
-
layoutScaleItemEvent
transient java.awt.event.ItemListener layoutScaleItemEvent
If the custom scale item is selected provide a dialog to set the scale ratio
-
fileChooser
javax.swing.JFileChooser fileChooser
-
feedbackList
java.util.List<java.lang.String> feedbackList
-
-
Constructor Detail
-
TimeTableFrame
public TimeTableFrame()
-
TimeTableFrame
public TimeTableFrame(java.lang.String tt)
-
-
Method Detail
-
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
void makeDetailGrid(java.lang.String gridType)
Build new GridBag content. The grid panel is hidden, emptied, re-built and made visible.- Parameters:
gridType- The type of grid to create
-
makeEmptyGrid
void makeEmptyGrid(java.awt.GridBagConstraints c)
This grid is used when there are no edit grids required.- Parameters:
c- The constraints object used for the grid construction
-
makeLayoutGrid
void makeLayoutGrid(java.awt.GridBagConstraints c)
This grid is used to edit Layout data.- Parameters:
c- The constraints object used for the grid construction
-
makeTrainTypeGrid
void makeTrainTypeGrid(java.awt.GridBagConstraints c)
This grid is used to edit the Train Type data.- Parameters:
c- The constraints object used for the grid construction
-
makeSegmentGrid
void makeSegmentGrid(java.awt.GridBagConstraints c)
This grid is used to edit the Segment data.- Parameters:
c- The constraints object used for the grid construction
-
makeStationGrid
void makeStationGrid(java.awt.GridBagConstraints c)
This grid is used to edit the Station data.- Parameters:
c- The constraints object used for the grid construction
-
makeScheduleGrid
void makeScheduleGrid(java.awt.GridBagConstraints c)
This grid is used to edit the Schedule data.- Parameters:
c- The constraints object used for the grid construction
-
makeTrainGrid
void makeTrainGrid(java.awt.GridBagConstraints c)
This grid is used to edit the Train data.- Parameters:
c- The constraints object used for the grid construction
-
makeStopGrid
void makeStopGrid(java.awt.GridBagConstraints c)
This grid is used to edit the Stop data.- Parameters:
c- The constraints object used for the grid construction
-
makeGridLabel
void makeGridLabel(int row, java.lang.String label, java.lang.String hint, java.awt.GridBagConstraints c)
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
void duplicateLayout(int layoutId)
Create a copy of a layout.- Parameters:
layoutId- The id of the layout to be duplicated.
-
duplicateTrainType
void duplicateTrainType(int layoutId, int typeId, TimeTableFrame.TimeTableTreeNode typesNode)
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
void duplicateSegment(int layoutId, int segmentId, TimeTableFrame.TimeTableTreeNode segmentsNode)
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
void duplicateStation(int segmentId, int stationId, TimeTableFrame.TimeTableTreeNode segmentNode)
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
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
int parseNumber(javax.swing.JTextField textField, java.lang.String fieldName)
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
void moveTreeNode(java.lang.String direction)
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
void graphPressed(java.lang.String graphType)
-
importPressed
void importPressed()
-
importCsvPressed
void importCsvPressed()
-
completeImport
void completeImport(java.io.File file)
-
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
javax.swing.JTree 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
java.lang.String buildNodeText(java.lang.String nodeType, java.lang.Object component, int idx)
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
void treeRowSelected(TimeTableFrame.TimeTableTreeNode selectedNode)
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
public void setShowReminder(boolean dirty)
Set/clear dirty flag and save button- Parameters:
dirty- True if changes have been made that are not saved.
-
setEditMode
void setEditMode(boolean active)
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
protected java.lang.String getClassName()
-
-