Class SwitchboardEditor
- All Implemented Interfaces:
ActionListener,ComponentListener,KeyListener,WindowListener,ImageObserver,MenuContainer,VetoableChangeListener,Serializable,EventListener,Accessible,RootPaneContainer,WindowConstants,BeanInterface,ModifiedFlag,JmriMouseListener,JmriMouseMotionListener,WindowInterface
GUI is structured as a separate setup panel to set the visible range and type plus menus.
All created objects are placed in a GridLayout grid. No special use of the LayeredPane layers. Inspired by Oracle JLayeredPane demo.
The "switchesOnBoard" LinkedHashMap keeps track of all the objects added to the target
frame for later manipulation. May be used in an update to store mixed
switchboards with more than 1 connection and more than 1 bean type/range.
The 'ready' flag protects the map during regeneration.
No DnD as panels will be automatically populated in order of the DCC address. New beans may be created from the Switchboard by right clicking an unconnected switch. TODO allow user entry of connection specific starting name, validated in manager using hardwareAddressValidator
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.jmrit.display.Editor
Editor.JFrameItem, Editor.TargetPane, Editor.UrlErrorDialogNested 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 TypeFieldDescriptionprotected JMenuprotected JMenuBarprotected JMenu(package private) JTextField(package private) static final intprotected static final Colorprotected static final Color(package private) ImageIcon(package private) ImageIcon(package private) static final int(package private) static final Stringprotected LightManager(package private) static final Stringprotected SensorManager(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final Stringprotected TurnoutManagerFields inherited from class jmri.jmrit.display.Editor
_anchorX, _anchorY, _currentSelection, _dragging, _editable, _highlightcomponent, _iconEditorFrame, _lastX, _lastY, _paintScale, _pastePending, _scrollState, _selectionGroup, _selectRect, _targetPanel, BKG, BOTHPOPUPS, CLOCK, defaultBackgroundColor, EDITPOPUPONLY, frameLocationX, frameLocationY, HIGHLIGHT_COLOR, ICONS, LABELS, LIGHTS, MARKERS, MEMORIES, NUM_LEVELS, OPTION_CONTROLS, OPTION_HIDDEN, OPTION_POSITION, OPTION_TOOLTIP, POSITIONABLE_FLAVOR, REPORTERS, SCROLL_BOTH, SCROLL_HORIZONTAL, SCROLL_NONE, SCROLL_VERTICAL, SECURITY, SENSORS, SIGNALS, TEMP, TURNOUTS, VIEWPOPUPONLY, xLoc, yLocFields 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 TypeMethodDescriptionbooleanprotected EditorchangeView(String className) changeView is not supported by SwitchBoards.protected voidConfigure the combo box listing managers.protected voidSet up item(s) to be copied by paste.protected voidShow only one of the manuf (manager) combo boxes.Get current default background color.intprotected Manager<?>Get the currently active manager.protected Manager<?>getManager(char typeChar) intStore Range maximum.intStore Range minimum.intgetRows()Store Switchboard rowsNum JSpinner or turn on autoRows option.protected ArrayList<Positionable>protected BeanSwitchGet a beanSwitch object from this SwitchBoard panel by a given name.Get a list with copies of BeanSwitch objects currently displayed to transfer to Web Server for display.Store connection type.Store switch shape.Store bean type.Get bean type name.intintgetTotal()Store total number of switches displayed (unconnected/hidden excluded).getUsageReport(NamedBean bean) booleanprotected final voidInitialize the newly created Switchboard.voidinitView()After construction, initialize all the widgets to their saved config settings.booleanisDirty()Check the dirty state.voidKeyListener of Editor.voidCreate sequence of panels, etc. for switches: JFrame contains its ContentPane which contains a JPanel with BoxLayout (p1) which contains a JScrollPane (js) which contains the targetPane.protected voidvoidmouseClicked(JmriMouseEvent event) Invoked when the mouse button has been clicked (pressed and released) on a component.voidmouseDragged(JmriMouseEvent event) Invoked when a mouse button is pressed on a component and then dragged.voidmouseEntered(JmriMouseEvent event) Invoked when the mouse enters a component.voidmouseExited(JmriMouseEvent event) Invoked when the mouse exits a component.voidmouseMoved(JmriMouseEvent event) Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.voidmousePressed(JmriMouseEvent event) Invoked when a mouse button has been pressed on a component.voidmouseReleased(JmriMouseEvent event) Invoked when a mouse button has been released on a component.Get the label type.protected voidCalled from TargetPanel's paint method for additional drawing by editor view.voidAllow external reset of dirty bit.voidsetAllEditable(boolean edit) Control whether target panel items are editable.voidsetAutoItemRange(boolean state) Control whether range of items is automatically preserved.voidsetDefaultActiveColor(Color color) voidsetDefaultBackgroundColor(Color color) Load from xml and set bg color of _targetpanel as well as variable.voidsetDefaultInactiveColor(Color color) voidsetDefaultTextColor(Color color) voidsetDirty()voidsetDirty(boolean val) Allow external set of dirty bit.voidsetHideUnconnected(boolean state) Control whether target panel items without a connection to the layout are displayed.voidsetIconScale(int size) voidsetLabel(SwitchBoardLabelDisplays label) protected voidsetMaxSpinner(int value) protected voidsetMinSpinner(int value) voidSet an object's location when it is created.voidsetPanelMenuRangeMax(int rangemax) Load Range maximum.voidsetPanelMenuRangeMin(int rangemin) Load Range minimum.voidsetRows(int rws) Load Switchboard rowsNum JSpinner.voidvoidsetSwitchManu(String manuPrefix) Load connection type.voidsetSwitchShape(String switchShape) Load switch shape.voidsetSwitchType(String prefix) Load bean type from xml.voidsetTitle()voidsetUseGlobalFlag(boolean set) Set which flag should be used, global or local for Positioning and Control of individual items.voidswitchAllLights(int on) Set connected Lights (only).protected voidThe target window has been requested to close.voidCreate a new set of switches after removing the current array.voidHandle close of Editor window.voidHandle opening of Editor window.Methods inherited from class jmri.jmrit.display.Editor
actionPerformed, addAudioEditor, addBackgroundEditor, addBlockContentsEditor, addClock, addGlobalVariableEditor, addGlobalVariableInputBox, addGlobalVariableSpinner, addIconEditor, addLabel, addLeftTOEditor, addLight, addLightEditor, addLocoIcon, addLogixNGEditor, addMemoryEditor, addMemoryInputBox, addMemorySpinner, addMultiSensor, addMultiSensorEditor, addReporter, addReporterEditor, addRightTOEditor, addRpsReporter, addSensorEditor, addSignalHeadEditor, addSignalMastEditor, addSlipTOEditor, addTextEditor, addToPopUpMenu, addToTarget, addTrainIcon, addTurnout, allControlling, allPositionable, clearBackgroundColor, deletePanel, deselectSelectionGroup, displayLevelChange, dispose, disposeLoadData, dockSelections, drawSelectRect, getAnchorX, getAnchorY, getBackgroundColor, getClassNames, getContents, getFlag, getIconEditor, getIconFrame, getIdContents, getItemX, getItemY, getLastX, getLastY, getPaintScale, getPanelScrollPane, getPositionablesByClassName, getScrollable, getSelectedItems, getSelectRect, getSignalHeadEditor, getTargetFrame, getTargetPanel, getTargetPanelSize, isEditable, isPanelMenuVisible, keyReleased, keyTyped, loadFailed, loadFailed, loadOK, locoMarkerFromInput, locoMarkerFromRoster, makeAddIconFrame, makeSelectionGroup, modifySelectionGroup, moveItem, newPanelDefaults, positionalAddClass, positionalIdChange, positionalRemoveClass, putAudio, putBlockContents, putGlobalVariable, putIcon, putItem, putLocoIcon, putLogixNG, putMemory, putSensor, putSignalHead, putSignalMast, removeFromContents, removeFromTarget, removeMarkers, removeSelections, selectLoco, selectLoco, setAllControlling, setAllPositionable, setAllShowToolTip, setAttributes, setBackgroundColor, setDefaultToolTip, setDisplayLevelMenu, setEditClassesMenu, setEditIdMenu, setEmptyHiddenMenu, setGlobalSetsLocalFlag, setHiddenMenu, setLogixNGPositionableMenu, setPaintScale, setPanelMenuVisible, setPositionableMenu, setRemoveMenu, setScroll, setScroll, setSelectionsAttributes, setSelectionsDisplayLevel, setSelectionsDockingLocation, setSelectionsHidden, setSelectionsPositionable, setSelectionsRotation, setSelectionsScale, setShowAlignmentMenu, setShowCoordinatesMenu, setShowHidden, setShowToolTipMenu, setTargetPanel, setTargetPanelSize, setToolTip, setUpBackground, setValueEditDisabledMenu, showAlignPopup, showHidden, showToolTip, showToolTip, targetWindowClosing, useGlobalFlag, vetoableChangeMethods inherited from class jmri.jmrit.display.JmriJFrameWithPermissions
getContentPane, getJMenuBar, revalidate, setContentPane, setJMenuBar, setKeepSize, setVisibleMethods 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, initComponents, makePrivateWindow, makePublicWindow, markWindowModified, multipleInstances, pack, setAllowInFrameServlet, setEscapeKeyAction, setEscapeKeyClosesWindow, setFrameLocation, setIndexedProperty, setModifiedFlag, setProperty, setSavePosition, setSaveSize, setShutDownTask, setWindowInterface, show, show, storeValues, undecorate, windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconifiedMethods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getDefaultCloseOperation, getGlassPane, getGraphics, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, 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, 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, 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
-
_fileMenu
-
_optionMenu
-
iconPrev
-
iconNext
-
TURNOUT
-
SENSOR
-
LIGHT
-
BUTTON
- See Also:
-
SLIDER
- See Also:
-
KEY
- See Also:
-
SYMBOL
- See Also:
-
turnoutManager
-
sensorManager
-
lightManager
-
addressTextField
-
darkActiveColor
-
darkInactiveColor
-
SIZE_MIN
- See Also:
-
SIZE_INIT
- See Also:
-
SIZE_MAX
- See Also:
-
Constructor Details
-
SwitchboardEditor
public SwitchboardEditor()Ctor -
SwitchboardEditor
Ctor by a given name.- Parameters:
name- title to assign to the new SwitchBoard
-
-
Method Details
-
init
Initialize the newly created Switchboard. -
updatePressed
Create a new set of switches after removing the current array.Called by Update button click, and automatically after loading a panel from XML (with all saved options set). Switchboard JPanel WindowResize() event is handled by resizeInFrame()
-
setMinSpinner
-
setMaxSpinner
-
makeOptionMenu
-
setDefaultTextColor
-
getDefaultTextColor
-
getDefaultTextColorAsColor
-
getActiveSwitchColor
-
getActiveColorAsColor
-
setDefaultActiveColor
-
getInactiveSwitchColor
-
getInactiveColorAsColor
-
setDefaultInactiveColor
-
setDefaultBackgroundColor
Load from xml and set bg color of _targetpanel as well as variable.- Parameters:
color- RGB Color for switchboard background and beanSwitches
-
getDefaultBackgroundColor
Get current default background color.- Returns:
- background color of this Switchboard
-
setLabel
-
setAllEditable
Description copied from class:EditorControl whether target panel items are editable. Does this by invoke thePositionable.setEditable(boolean)function of each item on the target panel. This also controls the relevant pop-up menu items (which are the primary way that items are edited).- Overrides:
setAllEditablein classEditor- Parameters:
edit- true for editable.
-
setUseGlobalFlag
Description copied from class:EditorSet which flag should be used, global or local for Positioning and Control of individual items. Items call getFlag() to return the appropriate flag it should use.- Overrides:
setUseGlobalFlagin classEditor- Parameters:
set- True if global flags should be used for positioning.
-
setTitle
-
setHideUnconnected
Control whether target panel items without a connection to the layout are displayed.- Parameters:
state- true to hide all in range
-
hideUnconnected
-
setAutoItemRange
Control whether range of items is automatically preserved.- Parameters:
state- true to calculate upper limit from lowest value range value set (default)
-
autoItemRange
-
resetDirty
Allow external reset of dirty bit. -
setDirty
Allow external set of dirty bit.- Parameters:
val- new dirty flag value, true dirty, false clean.
-
setDirty
-
isDirty
Check the dirty state.- Returns:
- true if panel changed, else false.
-
setPanelMenuRangeMin
Load Range minimum.- Parameters:
rangemin- lowest address to show
-
setPanelMenuRangeMax
Load Range maximum.- Parameters:
rangemax- highest address to show
-
getPanelMenuRangeMin
Store Range minimum.- Returns:
- lowest address shown
-
getPanelMenuRangeMax
Store Range maximum.- Returns:
- highest address shown
-
getSwitchType
Store bean type.- Returns:
- bean type prefix as set for Switchboard
-
getSwitchTypeName
Get bean type name.- Returns:
- bean type name
-
setSwitchType
Load bean type from xml.- Parameters:
prefix- the bean type prefix
-
getSwitchManu
Store connection type.- Returns:
- active bean connection prefix
-
setSwitchManu
Load connection type.- Parameters:
manuPrefix- connection prefix
-
getSwitchShape
Store switch shape.- Returns:
- bean shape prefix
-
setSwitchShape
Load switch shape.- Parameters:
switchShape- name of switch shape
-
getRows
Store Switchboard rowsNum JSpinner or turn on autoRows option.- Returns:
- the number of switches to display per row or 0 if autoRowsBox (menu-setting) is selected
-
setRows
Load Switchboard rowsNum JSpinner.- Parameters:
rws- the number of switches displayed per row (as text) or 0 te activate autoRowsBox setting
-
getTotal
Store total number of switches displayed (unconnected/hidden excluded).- Returns:
- the total number of switches displayed
-
loadComplete
-
showUserName
-
nameDisplay
Get the label type.- Returns:
- current setting of display type (e.g. system name, both, user name)
-
setShowUserName
-
initView
After construction, initialize all the widgets to their saved config settings. -
getManager
-
getManager
Get the currently active manager.- Returns:
- manager in use for the currently selected bean type and connection
-
keyPressed
KeyListener of Editor.- Specified by:
keyPressedin interfaceKeyListener- Overrides:
keyPressedin classEditor- Parameters:
e- the key event heard
-
mousePressed
Description copied from interface:JmriMouseListenerInvoked when a mouse button has been pressed on a component.- Specified by:
mousePressedin interfaceJmriMouseListener- Specified by:
mousePressedin classEditor- Parameters:
event- the event to be processed
-
mouseReleased
Description copied from interface:JmriMouseListenerInvoked when a mouse button has been released on a component.- Specified by:
mouseReleasedin interfaceJmriMouseListener- Specified by:
mouseReleasedin classEditor- Parameters:
event- the event to be processed
-
mouseClicked
Description copied from interface:JmriMouseListenerInvoked when the mouse button has been clicked (pressed and released) on a component.- Specified by:
mouseClickedin interfaceJmriMouseListener- Specified by:
mouseClickedin classEditor- Parameters:
event- the event to be processed
-
mouseDragged
Description copied from interface:JmriMouseMotionListenerInvoked when a mouse button is pressed on a component and then dragged.MOUSE_DRAGGEDevents will continue to be delivered to the component where the drag originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).Due to platform-dependent Drag&Drop implementations,
MOUSE_DRAGGEDevents may not be delivered during a native Drag&Drop operation.- Specified by:
mouseDraggedin interfaceJmriMouseMotionListener- Specified by:
mouseDraggedin classEditor- Parameters:
event- the event to be processed
-
mouseMoved
Description copied from interface:JmriMouseMotionListenerInvoked when the mouse cursor has been moved onto a component but no buttons have been pushed.- Specified by:
mouseMovedin interfaceJmriMouseMotionListener- Specified by:
mouseMovedin classEditor- Parameters:
event- the event to be processed
-
mouseEntered
Description copied from interface:JmriMouseListenerInvoked when the mouse enters a component.- Specified by:
mouseEnteredin interfaceJmriMouseListener- Specified by:
mouseEnteredin classEditor- Parameters:
event- the event to be processed
-
mouseExited
Description copied from interface:JmriMouseListenerInvoked when the mouse exits a component.- Specified by:
mouseExitedin interfaceJmriMouseListener- Specified by:
mouseExitedin classEditor- Parameters:
event- the event to be processed
-
windowClosing
Handle close of Editor window.Overload/override method in JmriJFrame parent, which by default is permanently closing the window. Here, we just want to make it invisible, so we don't dispose it (yet).
- Specified by:
windowClosingin interfaceWindowListener- Overrides:
windowClosingin classJmriJFrame
-
windowOpened
Handle opening of Editor window.Overload/override method in JmriJFrame parent to reset _menuBar.
- Specified by:
windowOpenedin interfaceWindowListener- Overrides:
windowOpenedin classJmriJFrame
-
targetWindowClosingEvent
The target window has been requested to close. Don't delete it at this time. Deletion must be accomplished via the "Delete this Panel" menu item.- Specified by:
targetWindowClosingEventin classEditor
-
changeView
changeView is not supported by SwitchBoards.- Overrides:
changeViewin classEditor
-
makeFrame
Create sequence of panels, etc. for switches: JFrame contains its ContentPane which contains a JPanel with BoxLayout (p1) which contains a JScrollPane (js) which contains the targetPane. Note this is a private menuBar, looking identical to the Editor's _menuBar- Parameters:
name- title for the Switchboard.- Returns:
- frame containing the switchboard editor.
-
paintTargetPanel
Description copied from class:EditorCalled from TargetPanel's paint method for additional drawing by editor view.- Specified by:
paintTargetPanelin classEditor- Parameters:
g- the context to paint within
-
getSwitch
Get a beanSwitch object from this SwitchBoard panel by a given name.- Parameters:
sName- name of switch label/connected bean- Returns:
- BeanSwitch switch object with the given name
-
getSwitches
Get a list with copies of BeanSwitch objects currently displayed to transfer to Web Server for display.- Returns:
- list of all BeanSwitch switch object
-
copyItem
Set up item(s) to be copied by paste.Not used on switchboards but has to override Editor.
-
setNextLocation
Set an object's location when it is created.Not used on switchboards but has to override Editor.
- Specified by:
setNextLocationin classEditor- Parameters:
obj- object to position
-
getSelectionGroup
-
getUsageReport
- Overrides:
getUsageReportin classEditor
-
getTileSize
-
switchAllLights
Set connected Lights (only).- Parameters:
on- state to set Light.ON or Light.OFF
-
configureManagerComboBoxes
Configure the combo box listing managers. Adapted from AbstractTableAction. -
displayManagerComboBoxes
Show only one of the manuf (manager) combo boxes.- Parameters:
type- one of the three NamedBean types as String
-
setIconScale
-
getIconScale
-