Class JmriJFrame
- All Implemented Interfaces:
ComponentListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,RootPaneContainer,WindowConstants,BeanInterface,ModifiedFlag,WindowInterface
- Direct Known Subclasses:
AbstractAudioFrame,AbstractMonFrame,AbstractPacketGenFrame,AbstractRouteAddEditFrame,AcelaPacketGenFrame,ActivateTrainFrame,AddEditSingleLightControlFrame,AddEntryExitPairFrame,AddNodeFrame,AddSignalMastJFrame,AlignTableFrame,AnalogClockFrame,AppsLaunchFrame,AssociateFrame,AutomatTableFrame,AutoTrainsFrame,BeanTableFrame,BlockBossFrame,BlockPathEditFrame,CbusEventHighlightFrame,CbusFilterFrame,CbusNodeEditEventFrame,CbusNodeRestoreFcuFrame,CircuitBuilder.CBFrame,CMRInetManagerFrame,CMRInetMetricsFrame,ConditionalFrame,ConditionalNGDebugger,ConfigBaseStationFrame,ConsistToolFrame,ControllerFilterFrame,CoordinateEdit,DataSource,DebuggerFrame,DiagnosticFrame,DispatcherFrame,DisplayFrame,DmiFrame,DrawFrame,DualDecoderSelectFrame,EasyDccPacketGenFrame,EditFrame,EditNodeFrame,Editor.JFrameItem,EditorFrame,FollowerFrame,HexFileFrame,ImageIndexEditor,ImportLogixFrame,InlineLogixNGsFrame,ItemDialog,JmriJFrameWithPermissions,JmriServerFrame,JmriSRCPServerFrame,LcdClockFrame,LearnThrottleFrame,LI101Frame,ListFrame,ListFrame,LIUSBConfigFrame,LnTcpServerFrame,LoaderFrame,LogFrame,LogixNGBrowseWindow,LogixNGInitializationTable,LV102Frame,LZ100Frame,LZV100Frame,ManageLocationsFrame,MastBuilderPane,MdiMainFrame,MeterFrame,MultiPaneWindow,MultiSensorIconFrame,NixieClockFrame,NodeConfigFrame,NodeConfigFrame,NodeConfigFrame,NodeConfigFrame,NodeConfigFrame,NodeConfigFrame,NodeConfigManagerFrame,NodeIOListFrame,NodeSpecificFrame,NodeTableFrame,NumberMapFrame,OperationsFrame,OsIndicatorFrame,PacketGenFrame,PacketGenFrame,PacketGenFrame,PacketTableFrame,PaneProgFrame,PickFrame,PollTableFrame,PortalEditFrame,PowerPanelFrame,PragotronClockFrame,PreferencesFrame,ProtocolOptionsFrame,RenumberFrame,ReportFrame,RosterGroupTableFrame,RpsTrackingFrame,SendPacketFrame,SensorGroupFrame,SensorTextEdit,SerialFilterFrame,SerialPacketGenFrame,SerialPacketGenFrame,SerialPacketGenFrame,SerialPacketGenFrame,SerialPacketGenFrame,SerialPacketGenFrame,SerialPacketGenFrame,ServerFrame,SignalEditFrame,SignalHeadAddEditFrame,SignallingFrame,SignallingSourceFrame,SignalMastRepeaterJFrame,SimpleClockFrame,SimpleLightCtrlFrame,SimpleProgFrame,SimpleServerFrame,SimpleTurnoutCtrlFrame,SlipTurnoutTextEdit,SoundSetFrame,SpeedoConsoleFrame,SpeedometerFrame,SpeedProfileFrame,SpeedProfileTable,SprogCbusModeSwitcherFrame,SprogHexFile,SprogPacketGenFrame,SprogSlotMonFrame,SprogUpdateFrame,SprogVersionFrame,StackMonFrame,StatusFrame,SystemInfoFrame,TabbedPreferencesFrame,ThreePaneTLRWindow,ThrottlesPreferencesWindow,ThrottleWindow,TieToolFrame,TimeTableFrame,TrackerTableAction.TableFrame,TreeFrame,TreeViewer,TwoPaneTBWindow,UsbBrowserFrame,UserInterface,UserInterface,VirtualLCDFrame,VSDManagerFrame,WarrantRoute,WarrantTableFrame,WhereUsedFrame,WhereUsedFrame,XpaConfigureFrame,XpaPacketGenFrame,Z21ConfigFrame
We needed a place to refactor common JFrame additions in JMRI code, so this class was created.
Features:
- Size limited to the maximum available on the screen, after removing any menu bars (macOS) and taskbars (Windows)
- Cleanup upon closing the frame: When the frame is closed (WindowClosing
event), the
dispose()method is invoked to do cleanup. This is inherited from JFrame itself, so super.dispose() needs to be invoked in the over-loading methods. - Maintains a list of existing JmriJFrames
Window Closing
Normally, a JMRI window wants to be disposed when it closes. This is what's needed when each invocation of the corresponding action can create a new copy of the window. To do this, you don't have to do anything in your subclass.
If you want this behavior, but need to do something when the window is
closing, override the windowClosing(java.awt.event.WindowEvent)
method to do what you want. Also, if you override dispose(), make
sure to call super.dispose().
If you want the window to just do nothing or just hide, rather than be disposed, when closed, set the DefaultCloseOperation to DO_NOTHING_ON_CLOSE or HIDE_ON_CLOSE depending on what you're looking for.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents the dimensions of an attached screen/displayNested 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 TypeFieldDescriptionprotected booleanprotected booleanprotected boolean(package private) static final String(package private) Stringprotected 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
ConstructorsConstructorDescriptionCreates a JFrame with standard settings, including saving/restoring of size and position.JmriJFrame(boolean saveSize, boolean savePosition) Creates a JFrame with standard settings, optional save/restore of size and position.JmriJFrame(String name) Creates a JFrame with with given name plus standard settings, including saving/restoring of size and position.JmriJFrame(String name, boolean saveSize, boolean savePosition) Creates a JFrame with with given name plus standard settings, including optional save/restore of size and position. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddHelpMenu(String ref, boolean direct) Add a standard help menu, including window specific help item.(package private) voidAdds a "Close Window" key shortcut to close window on op-W.voidDoes nothing in this classvoidvoidvoidDoes nothing in this classvoiddispose()When window is finally destroyed, remove it from the list of windows.voidRegenerates the window frame ref that is used for saving and setting frame size and position against.booleanThe action associated with the Escape key.booleanDoes the Escape key close the window?getFrame()Returns the WindowInterface as a Frame or null.static JmriJFrameGet a JmriJFrame of a particular name.static List<JmriJFrame>Get a List of the currently-existing JmriJFrame objects.static <T extends JmriJFrame>
List<T>getFrameList(Class<T> type) Get a list of currently-existing JmriJFrame objects that are specific sub-classes of JmriJFrame.getIndexedProperty(String key, int index) Get the value of an element in an indexed property.Provide a maximum frame size that is limited to what can fit on the screen after toolbars, etc are deducted.booleanGet the current value of the modified flag.The preferred size must fit on the physical screen, so calculate the lesser of either the preferred size from the layout or the screen size.getProperty(String key) Get the value of a property.List all property names or keys.booleanReturns if the frame Position is saved or not.booleanReturns if the frame Size is saved or not.static ArrayList<JmriJFrame.ScreenDimensions>returns the previously initialized array of screens.protected voidHandle closing a window or quiting the program while the modified bit was set.booleanhasIndexedProperty(String key) Test that a property exists and is indexed.booleanhasProperty(String key) Test that a property exists.voidBy default, Swing components should be created an installed in this method, rather than in the ctor itself.(package private) final voidvoidRemove this window from the Windows Menu by removing it from the list of active JmriJFrames.voidAdd this window to the Windows Menu by adding it to the list of active JmriJFrames.voidmarkWindowModified(boolean yes) booleanShould 2nd and subsequent requests for a panel create a new instance, or provide the 1st one for reuse?(package private) voidMove a frame down and to the left by it's top offset or a fixed amount, whichever is largervoidpack()(package private) voidTries to get window to fix entirely on screen.voidsetAllowInFrameServlet(boolean allow) voidsetEscapeKeyAction(AbstractAction action) Bind an action to the Escape key.voidsetEscapeKeyClosesWindow(boolean closesWindow) Bind the Escape key to an action that closes the window.voidReset frame location and size to stored preference value(package private) final voidsetFrameTitle(String name) voidsetIndexedProperty(String key, int index, Object value) Set the value of an element in an indexed property.voidsetModifiedFlag(boolean flag) Set the modified flag to a specific valuevoidsetProperty(String key, Object value) Set the value of a property.voidsetSavePosition(boolean save) Set whether the frame Position is saved or not after it has been created.voidsetSaveSize(boolean save) Set whether the frame Size is saved or not after it has been created.protected voidvoidvoidshow(JmriPanel child, JmriAbstractAction action) Show, in whatever way is appropriate, a specific JmriPanelvoidshow(JmriPanel child, JmriAbstractAction action, WindowInterface.Hint hint) Show, in whatever way is appropriate, a specific JmriPanel, in a hinted locationprotected voidvoidRemove any decoration, such as the title bar or close window control, from the JFrame.voidDoes nothing in this classvoidDoes nothing in this classvoidThe JmriJFrame implementation callshandleModified().voidDoes nothing in this classvoidDoes nothing in this classvoidDoes nothing in this classvoidDoes nothing in this classMethods 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
-
allowInFrameServlet
-
windowFrameRef
-
WINDOW_MODIFIED
- See Also:
-
reuseFrameSavedPosition
-
reuseFrameSavedSized
-
properties
-
windowInterface
-
-
Constructor Details
-
JmriJFrame
Creates a JFrame with standard settings, optional save/restore of size and position.- Parameters:
saveSize- Set true to save the last known sizesavePosition- Set true to save the last known location
-
JmriJFrame
public JmriJFrame()Creates a JFrame with standard settings, including saving/restoring of size and position. -
JmriJFrame
Creates a JFrame with with given name plus standard settings, including saving/restoring of size and position.- Parameters:
name- Title of the JFrame
-
JmriJFrame
Creates a JFrame with with given name plus standard settings, including optional save/restore of size and position.- Parameters:
name- Title of the JFramesaveSize- Set true to save the last knowm sizesavePosition- Set true to save the last known location
-
-
Method Details
-
initFrame
-
setFrameTitle
-
makePrivateWindow
Remove this window from the Windows Menu by removing it from the list of active JmriJFrames. -
makePublicWindow
Add this window to the Windows Menu by adding it to the list of active JmriJFrames. -
setFrameLocation
Reset frame location and size to stored preference value -
getScreenDimensions
returns the previously initialized array of screens. See getScreenDimensionsOnce()- Returns:
- ArrayList of screen bounds and insets
-
generateWindowRef
Regenerates the window frame ref that is used for saving and setting frame size and position against. -
pack
-
undecorate
Remove any decoration, such as the title bar or close window control, from the JFrame.JmriJFrames are often built internally and presented to the user before any scripting action can interact with them. At that point it's too late to directly invoke setUndecorated(true) because the JFrame is already displayable. This method uses dispose() to drop the windowing resources, sets undecorated, and then redisplays the window.
-
reSizeToFitOnScreen
void reSizeToFitOnScreen()Tries to get window to fix entirely on screen. First choice is to move the origin up and left as needed, then to make the window smaller -
offSetFrameOnScreen
Move a frame down and to the left by it's top offset or a fixed amount, whichever is larger- Parameters:
f- JmirJFrame to move
-
getWindowFrameRef
-
initComponents
By default, Swing components should be created an installed in this method, rather than in the ctor itself. -
addHelpMenu
Add a standard help menu, including window specific help item. Final because it defines the content of a standard help menu, not to be messed with individually- Parameters:
ref- JHelp reference for the desired window-specific help page; null means no pagedirect- true if the help main-menu item goes directly to the help system, such as when there are no items in the help menu
-
addWindowCloseShortCut
void addWindowCloseShortCut()Adds a "Close Window" key shortcut to close window on op-W. -
setEscapeKeyAction
Bind an action to the Escape key.Binds an AbstractAction to the Escape key. If an action is already bound to the Escape key, that action will be replaced. Passing
nullunbinds any existing actions from the Escape key.Note that binding the Escape key to any action may break expected or standardized behaviors. See Keyboard Shortcuts, Mnemonics, and Other Keyboard Operations in the Java Look and Feel Design Guidelines for standardized behaviors.
- Parameters:
action- The AbstractAction to bind to.- See Also:
-
getEscapeKeyAction
The action associated with the Escape key.- Returns:
- An AbstractAction or null if no action is bound to the Escape key.
- See Also:
-
setEscapeKeyClosesWindow
Bind the Escape key to an action that closes the window.If closesWindow is true, this method creates an action that triggers the "window is closing" event; otherwise this method removes any actions from the Escape key.
- Parameters:
closesWindow- Create or destroy an action to close the window.- See Also:
-
getEscapeKeyClosesWindow
Does the Escape key close the window?- Returns:
trueif Escape key is bound to action created by setEscapeKeyClosesWindow,falsein all other cases.- See Also:
-
getMaximumSize
Provide a maximum frame size that is limited to what can fit on the screen after toolbars, etc are deducted.Some of the methods used here return null pointers on some Java implementations, however, so this will return the superclasses's maximum size if the algorithm used here fails.
- Overrides:
getMaximumSizein classContainer- Returns:
- the maximum window size
-
getPreferredSize
The preferred size must fit on the physical screen, so calculate the lesser of either the preferred size from the layout or the screen size.- Overrides:
getPreferredSizein classContainer- Returns:
- the preferred size or the maximum size, whichever is smaller
-
getFrameList
Get a List of the currently-existing JmriJFrame objects. The returned list is a copy made at the time of the call, so it can be manipulated as needed by the caller.- Returns:
- a list of JmriJFrame instances. If there are no instances, an empty list is returned.
-
getFrameList
Get a list of currently-existing JmriJFrame objects that are specific sub-classes of JmriJFrame.The returned list is a copy made at the time of the call, so it can be manipulated as needed by the caller.
- Type Parameters:
T- generic JmriJframe.- Parameters:
type- The Class the list should be limited to.- Returns:
- An ArrayList of Frames.
-
getFrame
Get a JmriJFrame of a particular name. If more than one exists, there's no guarantee as to which is returned.- Parameters:
name- the name of one or more JmriJFrame objects- Returns:
- a JmriJFrame with the matching name or null if no matching frames exist
-
setSavePosition
Set whether the frame Position is saved or not after it has been created.- Parameters:
save- true if the frame position should be saved.
-
setSaveSize
Set whether the frame Size is saved or not after it has been created.- Parameters:
save- true if the frame size should be saved.
-
getSavePosition
Returns if the frame Position is saved or not.- Returns:
- true if the frame position should be saved
-
getSaveSize
Returns if the frame Size is saved or not.- Returns:
- true if the frame size should be saved
-
setModifiedFlag
Set the modified flag to a specific value A frame is considered "modified" if it has changes that have not been stored.- Specified by:
setModifiedFlagin interfaceModifiedFlag- Parameters:
flag- true if the object has been modified
-
getModifiedFlag
Get the current value of the modified flag.- Specified by:
getModifiedFlagin interfaceModifiedFlag- Returns:
- true if the object has been modified and needs to be stored
-
handleModified
Handle closing a window or quiting the program while the modified bit was set. -
storeValues
-
markWindowModified
-
windowOpened
Does nothing in this class- Specified by:
windowOpenedin interfaceWindowListener
-
windowClosed
Does nothing in this class- Specified by:
windowClosedin interfaceWindowListener
-
windowActivated
Does nothing in this class- Specified by:
windowActivatedin interfaceWindowListener
-
windowDeactivated
Does nothing in this class- Specified by:
windowDeactivatedin interfaceWindowListener
-
windowIconified
Does nothing in this class- Specified by:
windowIconifiedin interfaceWindowListener
-
windowDeiconified
Does nothing in this class- Specified by:
windowDeiconifiedin interfaceWindowListener
-
windowClosing
The JmriJFrame implementation callshandleModified().- Specified by:
windowClosingin interfaceWindowListener
-
componentHidden
Does nothing in this class- Specified by:
componentHiddenin interfaceComponentListener
-
componentMoved
- Specified by:
componentMovedin interfaceComponentListener
-
componentResized
- Specified by:
componentResizedin interfaceComponentListener
-
componentShown
Does nothing in this class- Specified by:
componentShownin interfaceComponentListener
-
setShutDownTask
-
dispose
When 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 classWindow
-
setIndexedProperty
Set the value of an element in an indexed property.NOTE Implementing methods must not call
Bean.setIndexedProperty(), as doing so will cause a stack overflow. Implementing methods may callBeans.setIntrospectedIndexedProperty()instead.- Specified by:
setIndexedPropertyin interfaceBeanInterface- Parameters:
key- name of the propertyindex- index of the property element to changevalue- the value to set the property to
-
getIndexedProperty
Get the value of an element in an indexed property.NOTE Implementing methods must not call
Bean.getIndexedProperty(), as doing so will cause a stack overflow. Implementing methods may callBeans.getIntrospectedIndexedProperty()instead.- Specified by:
getIndexedPropertyin interfaceBeanInterface- Parameters:
key- name of the propertyindex- index of the property element to change- Returns:
- value of the property or null
-
setProperty
Set the value of a property.NOTE Implementing methods must not call
Bean.setProperty(), as doing so will cause a stack overflow. Implementing methods may callBeans.setIntrospectedProperty()instead. Subclasses should override this method with something more direct and faster- Specified by:
setPropertyin interfaceBeanInterface- Parameters:
key- name of the propertyvalue- the value to set the property to
-
getProperty
Get the value of a property.NOTE Implementing methods must not call
Bean.getProperty(), as doing so will cause a stack overflow. Implementing methods may callBeans.getIntrospectedProperty()instead. Subclasses should override this method with something more direct and faster- Specified by:
getPropertyin interfaceBeanInterface- Parameters:
key- name of the property- Returns:
- The value of the property or null
-
hasProperty
Test that a property exists.NOTE Implementing method must not call
Bean.hasProperty(), as doing so will cause a stack overflow. Implementing methods may callBeans.hasIntrospectedProperty()instead.- Specified by:
hasPropertyin interfaceBeanInterface- Parameters:
key- name of the property- Returns:
- true is property key exists
-
hasIndexedProperty
Test that a property exists and is indexed.NOTE Implementing method must not call
Bean.hasIndexedProperty(), as doing so will cause a stack overflow. Implementing methods may callBeans.hasIntrospectedIndexedProperty()instead.- Specified by:
hasIndexedPropertyin interfaceBeanInterface- Parameters:
key- name of the property- Returns:
- true is property key exists and is indexed
-
show
Show, in whatever way is appropriate, a specific JmriPanel- Specified by:
showin interfaceWindowInterface- Parameters:
child- new JmriPanel to showaction- JmriAbstractAction making the request
-
show
Show, in whatever way is appropriate, a specific JmriPanel, in a hinted location- Specified by:
showin interfaceWindowInterface- Parameters:
child- new JmriPanel to showaction- JmriAbstractAction making the requesthint- suggestion on where to put the content
-
multipleInstances
Should 2nd and subsequent requests for a panel create a new instance, or provide the 1st one for reuse?- Specified by:
multipleInstancesin interfaceWindowInterface- Returns:
- true if multiple instances should be provided, false if only one should be provided
-
setWindowInterface
-
getWindowInterface
-
getPropertyNames
List all property names or keys.NOTE Implementing method must not call
Bean.getPropertyNames(), as doing so will cause a stack overflow. Implementing methods may callBeans.getIntrospectedPropertyNames()instead.NOTE Implementations of this method should not return null.
- Specified by:
getPropertyNamesin interfaceBeanInterface- Returns:
- property names or an empty Set.
-
setAllowInFrameServlet
-
getAllowInFrameServlet
-
getFrame
Returns the WindowInterface as a Frame or null.- Specified by:
getFramein interfaceWindowInterface- Returns:
- a Frame or null
-