Package jmri.jmrit.operations
Class OperationsFrame
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Frame
-
- javax.swing.JFrame
-
- jmri.util.JmriJFrame
-
- jmri.jmrit.operations.OperationsFrame
-
- 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
- Direct Known Subclasses:
AlternateTrackFrame,AutomationCopyFrame,AutomationsTableFrame,AutomationStartupFrame,AutomationTableFrame,BuildReportOptionFrame,CarLoadEditFrame,CarsTableFrame,ChangeDepartureTimesFrame,ChangeTrackFrame,ChangeTracksFrame,DivisionEditFrame,EditManifestHeaderTextFrame,EditManifestTextFrame,EditSwitchListTextFrame,EnginesTableFrame,IgnoreUsedTrackFrame,LocationCopyFrame,LocationEditFrame,LocationsByCarLoadFrame,LocationsByCarTypeFrame,LocationsTableFrame,LocationTrackBlockingOrderFrame,OperationsSettingsFrame,OptionFrame,PoolTrackFrame,PrintCarRosterFrame,PrintEngineRosterFrame,PrintLocationsFrame,PrintMoreOptionFrame,PrintOptionFrame,PrintTrainsFrame,RollingStockAttributeEditFrame,RollingStockEditFrame,RollingStockSetFrame,RouteBlockingOrderEditFrame,RouteCopyFrame,RouteEditFrame,RoutesTableFrame,ScheduleCopyFrame,ScheduleEditFrame,ScheduleOptionsFrame,SchedulesAndStagingFrame,SchedulesByLoadFrame,SchedulesTableFrame,SetPhysicalLocationFrame,SetTrainIconPositionFrame,SetTrainIconRouteFrame,SetupExcelProgramFrame,ShowCarsInTrainFrame,ShowRoutesServingLocationFrame,ShowTrainsServingLocationFrame,TrackCopyFrame,TrackDestinationEditFrame,TrackEditCommentsFrame,TrackEditFrame,TrackLoadEditFrame,TrackPriorityFrame,TrackRoadEditFrame,TrainByCarTypeFrame,TrainConductorFrame,TrainCopyFrame,TrainEditBuildOptionsFrame,TrainEditFrame,TrainLoadOptionsFrame,TrainManifestOptionFrame,TrainRoadOptionsFrame,TrainsByCarTypeFrame,TrainScriptFrame,TrainsScheduleEditFrame,TrainsScheduleTableFrame,TrainsScriptFrame,TrainsTableFrame,TrainsTableSetColorFrame,TrainSwitchListEditFrame,TrainSwitchListEditFrame.TrainSwitchListCommentFrame,YardmasterByTrackFrame,YardmasterFrame
public class OperationsFrame extends JmriJFrame
Frame for operations- See Also:
- Serialized Form
-
-
Nested Class Summary
-
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 static java.lang.StringNEW_LINEstatic java.lang.StringNONE-
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 OperationsFrame()OperationsFrame(java.lang.String s)OperationsFrame(java.lang.String s, OperationsPanel p)OperationsFrame(OperationsPanel p)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddButtonAction(javax.swing.JButton b)protected voidaddCheckBoxAction(javax.swing.JCheckBox b)protected voidaddComboBoxAction(javax.swing.JComboBox<?> b)protected voidaddHorizontalScrollBarKludgeFix(javax.swing.JScrollPane pane, javax.swing.JPanel panel)protected voidaddItem(javax.swing.JComponent c, int x, int y)protected voidaddItem(javax.swing.JPanel p, javax.swing.JComponent c, int x, int y)protected voidaddItemLeft(javax.swing.JPanel p, javax.swing.JComponent c, int x, int y)protected voidaddItemTop(javax.swing.JPanel p, javax.swing.JComponent c, int x, int y)protected voidaddItemWidth(javax.swing.JPanel p, javax.swing.JComponent c, int width, int x, int y)protected voidaddRadioButtonAction(javax.swing.JRadioButton b)protected voidaddSpinnerChangeListerner(javax.swing.JSpinner s)protected voidadjustTextAreaColumnWidth(javax.swing.JScrollPane scrollPane, javax.swing.JTextArea textArea)Will modify the character column width of a TextArea box to 90% of a panels width.protected voidadjustTextAreaColumnWidth(javax.swing.JScrollPane scrollPane, javax.swing.JTextArea textArea, java.awt.Dimension size)protected voidbuttonActionPerformed(java.awt.event.ActionEvent ae)protected voidcheckBoxActionPerformed(java.awt.event.ActionEvent ae)protected voidclearTableSort(javax.swing.JTable table)protected voidcomboBoxActionPerformed(java.awt.event.ActionEvent ae)protected voidcreateShutDownTask()Checks at shutdown if operations files need to be savedvoiddispose()When window is finally destroyed, remove it from the list of windows.OperationsPanelgetContentPane()protected intgetNumberOfCheckboxesPerLine()Gets the number of checkboxes(+1) that can fix in one row see OperationsFrame.MIN_CHECKBOXES and OperationsFrame.MAX_CHECKBOXESvoidinitComponents()By default, Swing components should be created an installed in this method, rather than in the ctor itself.voidinitMinimumSize()voidinitMinimumSize(java.awt.Dimension dimension)voidloadTableDetails(javax.swing.JTable table)Load the table width, position, and sorting status from the user preferences file.protected voidradioButtonActionPerformed(java.awt.event.ActionEvent ae)protected voidselectNextItemComboBox(javax.swing.JComboBox<?> b)voidsetContentPane(java.awt.Container contentPane)protected voidspinnerChangeEvent(javax.swing.event.ChangeEvent ae)protected voidstoreValues()-
Methods inherited from class jmri.util.JmriJFrame
addHelpMenu, componentHidden, componentMoved, componentResized, componentShown, generateWindowRef, getAllowInFrameServlet, getEscapeKeyAction, getEscapeKeyClosesWindow, getFrame, getFrame, getFrameList, getFrameList, getIndexedProperty, getMaximumSize, getModifiedFlag, getPreferredSize, getProperty, getPropertyNames, getSavePosition, getSaveSize, getScreenDimensions, getWindowFrameRef, getWindowInterface, handleModified, hasIndexedProperty, hasProperty, makePrivateWindow, makePublicWindow, markWindowModified, multipleInstances, pack, setAllowInFrameServlet, setEscapeKeyAction, setEscapeKeyClosesWindow, setFrameLocation, setIndexedProperty, setModifiedFlag, setProperty, setSavePosition, setSaveSize, setShutDownTask, setWindowInterface, show, show, undecorate, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
-
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, 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
-
NEW_LINE
public static final java.lang.String NEW_LINE
- See Also:
- Constant Field Values
-
NONE
public static final java.lang.String NONE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OperationsFrame
public OperationsFrame(java.lang.String s)
-
OperationsFrame
public OperationsFrame()
-
OperationsFrame
public OperationsFrame(OperationsPanel p)
-
OperationsFrame
public OperationsFrame(java.lang.String s, OperationsPanel p)
-
-
Method Detail
-
initComponents
public void initComponents()
Description copied from class:JmriJFrameBy default, Swing components should be created an installed in this method, rather than in the ctor itself.- Overrides:
initComponentsin classJmriJFrame
-
initMinimumSize
public void initMinimumSize()
-
initMinimumSize
public void initMinimumSize(java.awt.Dimension dimension)
-
addItem
protected void addItem(javax.swing.JComponent c, int x, int y)
-
addItem
protected void addItem(javax.swing.JPanel p, javax.swing.JComponent c, int x, int y)
-
addItemLeft
protected void addItemLeft(javax.swing.JPanel p, javax.swing.JComponent c, int x, int y)
-
addItemTop
protected void addItemTop(javax.swing.JPanel p, javax.swing.JComponent c, int x, int y)
-
addItemWidth
protected void addItemWidth(javax.swing.JPanel p, javax.swing.JComponent c, int width, int x, int y)
-
getNumberOfCheckboxesPerLine
protected int getNumberOfCheckboxesPerLine()
Gets the number of checkboxes(+1) that can fix in one row see OperationsFrame.MIN_CHECKBOXES and OperationsFrame.MAX_CHECKBOXES- Returns:
- the number of checkboxes, minimum is 5 (6 checkboxes)
-
addButtonAction
protected void addButtonAction(javax.swing.JButton b)
-
buttonActionPerformed
protected void buttonActionPerformed(java.awt.event.ActionEvent ae)
-
addRadioButtonAction
protected void addRadioButtonAction(javax.swing.JRadioButton b)
-
radioButtonActionPerformed
protected void radioButtonActionPerformed(java.awt.event.ActionEvent ae)
-
addCheckBoxAction
protected void addCheckBoxAction(javax.swing.JCheckBox b)
-
checkBoxActionPerformed
protected void checkBoxActionPerformed(java.awt.event.ActionEvent ae)
-
addSpinnerChangeListerner
protected void addSpinnerChangeListerner(javax.swing.JSpinner s)
-
spinnerChangeEvent
protected void spinnerChangeEvent(javax.swing.event.ChangeEvent ae)
-
addComboBoxAction
protected void addComboBoxAction(javax.swing.JComboBox<?> b)
-
comboBoxActionPerformed
protected void comboBoxActionPerformed(java.awt.event.ActionEvent ae)
-
selectNextItemComboBox
protected void selectNextItemComboBox(javax.swing.JComboBox<?> b)
-
adjustTextAreaColumnWidth
protected void adjustTextAreaColumnWidth(javax.swing.JScrollPane scrollPane, javax.swing.JTextArea textArea)
Will modify the character column width of a TextArea box to 90% of a panels width. ScrollPane is set to 95% of panel width.- Parameters:
scrollPane- the pane containing the textAreatextArea- the textArea to adjust
-
adjustTextAreaColumnWidth
protected void adjustTextAreaColumnWidth(javax.swing.JScrollPane scrollPane, javax.swing.JTextArea textArea, java.awt.Dimension size)
-
loadTableDetails
public void loadTableDetails(javax.swing.JTable table)
Load the table width, position, and sorting status from the user preferences file.- Parameters:
table- The table to be adjusted.
-
clearTableSort
protected void clearTableSort(javax.swing.JTable table)
-
createShutDownTask
protected void createShutDownTask()
Checks at shutdown if operations files need to be saved
-
storeValues
protected void storeValues()
- Overrides:
storeValuesin classJmriJFrame
-
dispose
public void dispose()
Description copied from class:JmriJFrameWhen window is finally destroyed, remove it from the list of windows.Subclasses that over-ride this method must invoke this implementation with super.dispose() right before returning.
- Specified by:
disposein interfaceWindowInterface- Overrides:
disposein classJmriJFrame
-
addHorizontalScrollBarKludgeFix
protected void addHorizontalScrollBarKludgeFix(javax.swing.JScrollPane pane, javax.swing.JPanel panel)
-
setContentPane
public void setContentPane(java.awt.Container contentPane)
This implementation only accepts the content pane if it is an
OperationsPanel.- Specified by:
setContentPanein interfacejavax.swing.RootPaneContainer- Overrides:
setContentPanein classjavax.swing.JFrame- Throws:
java.lang.IllegalArgumentException- if the content pane is not an OperationsPanel
-
getContentPane
public OperationsPanel getContentPane()
This implementation only returns the content pane if it is an
OperationsPanel.- Specified by:
getContentPanein interfacejavax.swing.RootPaneContainer- Overrides:
getContentPanein classjavax.swing.JFrame- Throws:
java.lang.IllegalArgumentException- if the content pane is not an OperationsPanel
-
-