Class Editor
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Frame
-
- javax.swing.JFrame
-
- jmri.util.JmriJFrame
-
- jmri.jmrit.display.JmriJFrameWithPermissions
-
- jmri.jmrit.display.Editor
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.ComponentListener
,java.awt.event.KeyListener
,java.awt.event.WindowListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.beans.VetoableChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,javax.swing.RootPaneContainer
,javax.swing.WindowConstants
,BeanInterface
,ModifiedFlag
,JmriMouseListener
,JmriMouseMotionListener
,WindowInterface
- Direct Known Subclasses:
ControlPanelEditor
,PanelEditor
,SwitchboardEditor
public abstract class Editor extends JmriJFrameWithPermissions implements JmriMouseListener, JmriMouseMotionListener, java.awt.event.ActionListener, java.awt.event.KeyListener, java.beans.VetoableChangeListener
This is the Model and a Controller for panel editor Views. (Panel Editor, Layout Editor or any subsequent editors) The Model is simply a list of Positionable objects added to a "target panel". Control of the display attributes of the Positionable objects is done here. However, control of mouse events is passed to the editor views, so control is also done by the editor views.The "contents" List keeps track of all the objects added to the target frame for later manipulation. This class only locates and moves "target panel" items, and does not control their appearance - that is left for the editor views.
The Editor has tri-state "flags" to control the display of Positionable object attributes globally - i.e. "on" or "off" for all - or as a third state, permits the display control "locally" by corresponding flags in each Positionable object
The title of the target and the editor panel are kept consistent via the {#setTitle} method.
Mouse events are initial handled here, rather than in the individual displayed objects, so that selection boxes for moving multiple objects can be provided.
This class also implements an effective ToolTipManager replacement, because the standard Swing one can't deal with the coordinate changes used to zoom a panel. It works by controlling the contents of the _tooltip instance variable, and triggering repaint of the target window when the tooltip changes. The window painting then explicitly draws the tooltip for the underlying object.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Editor.JFrameItem
class
Editor.TargetPane
Special internal class to allow drawing of layout to a JLayeredPane.(package private) static class
Editor.ToolTipTimer
class
Editor.UrlErrorDialog
-
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 protected int
_anchorX
protected int
_anchorY
protected Positionable
_currentSelection
(package private) boolean
_delete
protected boolean
_dragging
protected boolean
_editable
protected java.awt.Rectangle
_highlightcomponent
protected java.util.HashMap<java.lang.String,Editor.JFrameItem>
_iconEditorFrame
(package private) boolean
_ignore
protected int
_lastX
protected int
_lastY
(package private) NamedIcon
_newIcon
protected double
_paintScale
protected boolean
_pastePending
protected int
_scrollState
protected java.util.ArrayList<Positionable>
_selectionGroup
protected java.awt.Rectangle
_selectRect
protected javax.swing.JLayeredPane
_targetPanel
(package private) java.util.HashMap<java.lang.String,java.lang.String>
_urlMap
static int
BKG
static int
BOTHPOPUPS
static int
CLOCK
(package private) java.awt.BasicStroke
DASHED_LINE
protected java.awt.Color
defaultBackgroundColor
(package private) static int
DELTA
static int
EDITPOPUPONLY
int
frameLocationX
int
frameLocationY
static java.awt.Color
HIGHLIGHT_COLOR
(package private) static java.lang.String[]
ICON_EDITORS
static int
ICONS
static int
LABELS
static int
LIGHTS
static int
MARKERS
static int
MEMORIES
static int
NUM_LEVELS
static int
OPTION_CONTROLS
static int
OPTION_HIDDEN
static int
OPTION_POSITION
static int
OPTION_TOOLTIP
static java.lang.String
POSITIONABLE_FLAVOR
static int
REPORTERS
static int
SCROLL_BOTH
static int
SCROLL_HORIZONTAL
static int
SCROLL_NONE
static int
SCROLL_VERTICAL
static int
SECURITY
static int
SENSORS
static int
SIGNALS
static int
TEMP
(package private) static int
TOOLTIPDISMISSDELAY
(package private) static int
TOOLTIPSHOWDELAY
static int
TURNOUTS
static int
VIEWPOPUPONLY
protected int
xLoc
protected int
yLoc
-
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent event)
protected void
addAudioEditor()
protected void
addBackgroundEditor()
protected void
addBlockContentsEditor()
protected AnalogClock2Display
addClock()
protected void
addGlobalVariableEditor()
protected GlobalVariableInputIcon
addGlobalVariableInputBox()
protected GlobalVariableSpinnerIcon
addGlobalVariableSpinner()
protected void
addIconEditor()
protected PositionableLabel
addLabel(java.lang.String text)
protected void
addLeftTOEditor()
protected LightIcon
addLight()
Add a Light indicator to the targetprotected void
addLightEditor()
LocoIcon
addLocoIcon(java.lang.String name)
protected void
addLogixNGEditor()
protected void
addMemoryEditor()
protected MemoryInputIcon
addMemoryInputBox()
protected MemorySpinnerIcon
addMemorySpinner()
MultiSensorIcon
addMultiSensor()
protected Editor.JFrameItem
addMultiSensorEditor()
protected ReporterIcon
addReporter()
protected void
addReporterEditor()
protected void
addRightTOEditor()
protected RpsPositionIcon
addRpsReporter()
protected void
addSensorEditor()
protected void
addSignalHeadEditor()
protected void
addSignalMastEditor()
(package private) SlipTurnoutIcon
addSlip()
protected void
addSlipTOEditor()
protected void
addTextEditor()
Add a label to the target.void
addToPopUpMenu(NamedBean nb, javax.swing.JMenuItem item, int menu)
Provide a method for external code to add items to context menus.protected void
addToTarget(Positionable l)
TrainIcon
addTrainIcon(java.lang.String name)
protected TurnoutIcon
addTurnout(IconAdder editor)
(package private) void
addTurnoutL()
(package private) void
addTurnoutR()
Add a turnout indicator to the targetboolean
allControlling()
boolean
allPositionable()
protected Editor
changeView(java.lang.String className)
void
clearBackgroundColor()
protected abstract void
copyItem(Positionable p)
Set up item(s) to be copied by paste.boolean
deletePanel()
Ask user if panel should be deleted.void
deselectSelectionGroup()
void
displayLevelChange(Positionable l)
void
dispose()
Dispose of the editor.void
disposeLoadData()
protected void
dockSelections(Positionable p)
void
drawSelectRect(int x, int y)
int
getAnchorX()
int
getAnchorY()
java.awt.Color
getBackgroundColor()
java.util.Set<java.lang.String>
getClassNames()
java.util.List<Positionable>
getContents()
boolean
getFlag(int whichOption, boolean localFlag)
Get the setting for the specified option.IconAdder
getIconEditor(java.lang.String name)
Editor.JFrameItem
getIconFrame(java.lang.String name)
Create editor for a given item type.java.util.Map<java.lang.String,Positionable>
getIdContents()
protected int
getItemX(Positionable p, int deltaX)
protected int
getItemY(Positionable p, int deltaY)
int
getLastX()
int
getLastY()
double
getPaintScale()
Get scale for TargetPane drawing.javax.swing.JScrollPane
getPanelScrollPane()
Allow public access to the scroll pane for external control of position, particularly from scripts.java.util.Set<Positionable>
getPositionablesByClassName(java.lang.String className)
java.lang.String
getScrollable()
protected java.util.List<Positionable>
getSelectedItems(JmriMouseEvent event)
Return a List of all items whose bounding rectangle contain the mouse position. ordered from top level to bottomjava.awt.Rectangle
getSelectRect()
protected IconAdder
getSignalHeadEditor()
javax.swing.JFrame
getTargetFrame()
javax.swing.JComponent
getTargetPanel()
Allow public access to the target (content) panel for external modification, particularly from scripts.protected java.awt.Dimension
getTargetPanelSize()
(package private) java.lang.String
getUsageData(Positionable pos)
java.util.List<NamedBeanUsageReport>
getUsageReport(NamedBean bean)
protected abstract void
init(java.lang.String name)
protected abstract void
initView()
After construction, initialize all the widgets to their saved config settings.boolean
isEditable()
boolean
isPanelMenuVisible()
Is the menu on the target panel shown?void
keyPressed(java.awt.event.KeyEvent e)
void
keyReleased(java.awt.event.KeyEvent e)
void
keyTyped(java.awt.event.KeyEvent e)
void
loadFailed()
NamedIcon
loadFailed(java.lang.String msg, java.lang.String url)
boolean
loadOK()
protected void
locoMarkerFromInput()
protected void
locoMarkerFromRoster()
protected Editor.JFrameItem
makeAddIconFrame(java.lang.String name, boolean add, boolean table, IconAdder editor)
Create a frame showing all images in the set used for an icon.protected void
makeSelectionGroup(JmriMouseEvent event)
protected void
modifySelectionGroup(Positionable selection, JmriMouseEvent event)
abstract void
mouseClicked(JmriMouseEvent event)
Invoked when the mouse button has been clicked (pressed and released) on a component.abstract void
mouseDragged(JmriMouseEvent event)
Invoked when a mouse button is pressed on a component and then dragged.abstract void
mouseEntered(JmriMouseEvent event)
Invoked when the mouse enters a component.abstract void
mouseExited(JmriMouseEvent event)
Invoked when the mouse exits a component.abstract void
mouseMoved(JmriMouseEvent event)
Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.abstract void
mousePressed(JmriMouseEvent event)
Invoked when a mouse button has been pressed on a component.abstract void
mouseReleased(JmriMouseEvent event)
Invoked when a mouse button has been released on a component.void
moveItem(Positionable p, int deltaX, int deltaY)
Relocate item.void
newPanelDefaults()
Set white as the default background color for panels created using the New Panel menu item.protected abstract void
paintTargetPanel(java.awt.Graphics g)
Called from TargetPanel's paint method for additional drawing by editor view.void
positionalAddClass(Positionable p, java.lang.String className)
Add a class name to the Positionablevoid
positionalIdChange(Positionable p, java.lang.String newId)
Check if it's possible to change the id of the Positionable to the desired string.void
positionalRemoveClass(Positionable p, java.lang.String className)
Removes a class name from the Positionableprotected Positionable
putAudio()
Add a LogixNG icon to the target.(package private) void
putBackground()
Button pushed, add a background image.protected BlockContentsIcon
putBlockContents()
protected GlobalVariableIcon
putGlobalVariable()
protected Positionable
putIcon()
Add an icon to the target.void
putItem(Positionable l)
void
putLocoIcon(LocoIcon l, java.lang.String name)
protected Positionable
putLogixNG()
Add a LogixNG icon to the target.protected MemoryIcon
putMemory()
protected SensorIcon
putSensor()
Add a sensor indicator to the target.protected SignalHeadIcon
putSignalHead()
Add a signal head to the target.protected SignalMastIcon
putSignalMast()
Add a signal mast to the target.boolean
removeFromContents(Positionable l)
protected void
removeFromTarget(Positionable l)
protected void
removeMarkers()
Remove marker icons from panelprotected void
removeSelections(Positionable p)
protected LocoIcon
selectLoco(java.lang.String rosterEntryTitle)
protected LocoIcon
selectLoco(RosterEntry entry)
void
setAllControlling(boolean state)
Control whether target panel items are controlling layout items.void
setAllEditable(boolean state)
Control whether target panel items are editable.void
setAllPositionable(boolean state)
Control whether panel items can be positioned.void
setAllShowToolTip(boolean state)
void
setAttributes(PositionablePopupUtil newUtil, Positionable p)
Set attributes of a Positionable.void
setBackgroundColor(java.awt.Color col)
void
setDefaultToolTip(ToolTip dtt)
void
setDisplayLevelMenu(Positionable p, javax.swing.JPopupMenu popup)
Display 'z' level of the Positionable item and provide a dialog menu item to edit it.void
setEditClassesMenu(Positionable p, javax.swing.JPopupMenu popup)
Add a menu entry to edit Classes of the Positionable itemvoid
setEditIdMenu(Positionable p, javax.swing.JPopupMenu popup)
Add a menu entry to edit Id of the Positionable itemvoid
setEmptyHiddenMenu(Positionable p, javax.swing.JPopupMenu popup)
Add a menu entry to set visibility of the Positionable item based on the presence of contents.void
setGlobalSetsLocalFlag(boolean set)
Set ifsetAllControlling(boolean)
andsetAllPositionable(boolean)
are set for existing as well as new items.void
setHiddenMenu(Positionable p, javax.swing.JPopupMenu popup)
Add a menu entry to set visibility of the Positionable itemvoid
setLogixNGPositionableMenu(Positionable p, javax.swing.JPopupMenu popup)
Add a menu entry to edit Id of the Positionable itemprotected abstract void
setNextLocation(Positionable obj)
Set an object's location when it is created.protected void
setPaintScale(double newScale)
void
setPanelMenuVisible(boolean state)
Hide or show menus on the target panel.void
setPositionableMenu(Positionable p, javax.swing.JPopupMenu popup)
Add a checkbox to lock the position of the Positionable item.void
setRemoveMenu(Positionable p, javax.swing.JPopupMenu popup)
Add an action to remove the Positionable item.protected void
setScroll(int state)
void
setScroll(java.lang.String strState)
protected void
setSelectionsAttributes(PositionablePopupUtil util, Positionable pos)
protected void
setSelectionsDisplayLevel(int k, Positionable p)
protected void
setSelectionsDockingLocation(Positionable p)
protected void
setSelectionsHidden(boolean enabled, Positionable p)
protected boolean
setSelectionsPositionable(boolean enabled, Positionable p)
protected void
setSelectionsRotation(int k, Positionable p)
protected void
setSelectionsScale(double s, Positionable p)
boolean
setShowAlignmentMenu(Positionable p, javax.swing.JPopupMenu popup)
Offer actions to align the selected Positionable items either Horizontally (at average y coordinates) or Vertically (at average x coordinates).boolean
setShowCoordinatesMenu(Positionable p, javax.swing.JPopupMenu popup)
Display the X & Y coordinates of the Positionable item and provide a dialog menu item to edit them.void
setShowHidden(boolean state)
Control whether target panel hidden items are visible or not.void
setShowToolTipMenu(Positionable p, javax.swing.JPopupMenu popup)
Add a checkbox to display a tooltip for the Positionable item and if showable, provide a dialog menu to edit it.protected void
setTargetPanel(javax.swing.JLayeredPane targetPanel, JmriJFrame frame)
Set the target panel.protected void
setTargetPanelSize(int w, int h)
void
setTitle()
protected void
setToolTip(ToolTip tt)
PositionableLabel
setUpBackground(java.lang.String name)
void
setUseGlobalFlag(boolean set)
Set which flag should be used, global or local for Positioning and Control of individual items.void
setValueEditDisabledMenu(Positionable p, javax.swing.JPopupMenu popup)
Add a menu entry to disable double click value edits.protected boolean
showAlignPopup(Positionable p)
boolean
showHidden()
boolean
showToolTip()
void
showToolTip(Positionable selection, JmriMouseEvent event)
protected void
targetWindowClosing()
protected abstract void
targetWindowClosingEvent(java.awt.event.WindowEvent e)
boolean
useGlobalFlag()
void
vetoableChange(java.beans.PropertyChangeEvent evt)
-
Methods inherited from class jmri.jmrit.display.JmriJFrameWithPermissions
getContentPane, getJMenuBar, revalidate, setContentPane, setJMenuBar, setKeepSize, setVisible
-
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, initComponents, makePrivateWindow, 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, getDefaultCloseOperation, getGlassPane, getGraphics, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, 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, 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, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
BKG
public static final int BKG
- See Also:
- Constant Field Values
-
TEMP
public static final int TEMP
- See Also:
- Constant Field Values
-
ICONS
public static final int ICONS
- See Also:
- Constant Field Values
-
LABELS
public static final int LABELS
- See Also:
- Constant Field Values
-
MEMORIES
public static final int MEMORIES
- See Also:
- Constant Field Values
-
REPORTERS
public static final int REPORTERS
- See Also:
- Constant Field Values
-
SECURITY
public static final int SECURITY
- See Also:
- Constant Field Values
-
TURNOUTS
public static final int TURNOUTS
- See Also:
- Constant Field Values
-
LIGHTS
public static final int LIGHTS
- See Also:
- Constant Field Values
-
SIGNALS
public static final int SIGNALS
- See Also:
- Constant Field Values
-
SENSORS
public static final int SENSORS
- See Also:
- Constant Field Values
-
CLOCK
public static final int CLOCK
- See Also:
- Constant Field Values
-
MARKERS
public static final int MARKERS
- See Also:
- Constant Field Values
-
NUM_LEVELS
public static final int NUM_LEVELS
- See Also:
- Constant Field Values
-
SCROLL_NONE
public static final int SCROLL_NONE
- See Also:
- Constant Field Values
-
SCROLL_BOTH
public static final int SCROLL_BOTH
- See Also:
- Constant Field Values
-
SCROLL_HORIZONTAL
public static final int SCROLL_HORIZONTAL
- See Also:
- Constant Field Values
-
SCROLL_VERTICAL
public static final int SCROLL_VERTICAL
- See Also:
- Constant Field Values
-
HIGHLIGHT_COLOR
public static final java.awt.Color HIGHLIGHT_COLOR
-
POSITIONABLE_FLAVOR
public static final java.lang.String POSITIONABLE_FLAVOR
- See Also:
- Constant Field Values
-
_targetPanel
protected javax.swing.JLayeredPane _targetPanel
-
_scrollState
protected int _scrollState
-
_editable
protected boolean _editable
-
OPTION_POSITION
public static final int OPTION_POSITION
- See Also:
- Constant Field Values
-
OPTION_CONTROLS
public static final int OPTION_CONTROLS
- See Also:
- Constant Field Values
-
OPTION_HIDDEN
public static final int OPTION_HIDDEN
- See Also:
- Constant Field Values
-
OPTION_TOOLTIP
public static final int OPTION_TOOLTIP
- See Also:
- Constant Field Values
-
_lastX
protected int _lastX
-
_lastY
protected int _lastY
-
DASHED_LINE
java.awt.BasicStroke DASHED_LINE
-
_selectRect
protected java.awt.Rectangle _selectRect
-
_highlightcomponent
protected java.awt.Rectangle _highlightcomponent
-
_dragging
protected boolean _dragging
-
_selectionGroup
protected java.util.ArrayList<Positionable> _selectionGroup
-
_currentSelection
protected Positionable _currentSelection
-
xLoc
protected int xLoc
-
yLoc
protected int yLoc
-
_anchorX
protected int _anchorX
-
_anchorY
protected int _anchorY
-
_paintScale
protected double _paintScale
-
defaultBackgroundColor
protected java.awt.Color defaultBackgroundColor
-
_pastePending
protected boolean _pastePending
-
_iconEditorFrame
protected java.util.HashMap<java.lang.String,Editor.JFrameItem> _iconEditorFrame
-
_ignore
boolean _ignore
-
_delete
boolean _delete
-
_urlMap
java.util.HashMap<java.lang.String,java.lang.String> _urlMap
-
TOOLTIPSHOWDELAY
static int TOOLTIPSHOWDELAY
-
TOOLTIPDISMISSDELAY
static int TOOLTIPDISMISSDELAY
-
ICON_EDITORS
static final java.lang.String[] ICON_EDITORS
-
frameLocationX
public int frameLocationX
-
frameLocationY
public int frameLocationY
-
DELTA
static final int DELTA
- See Also:
- Constant Field Values
-
VIEWPOPUPONLY
public static final int VIEWPOPUPONLY
- See Also:
- Constant Field Values
-
EDITPOPUPONLY
public static final int EDITPOPUPONLY
- See Also:
- Constant Field Values
-
BOTHPOPUPS
public static final int BOTHPOPUPS
- See Also:
- Constant Field Values
-
-
Method Detail
-
newPanelDefaults
public void newPanelDefaults()
Set white as the default background color for panels created using the New Panel menu item. Overriden by LE to use a different default background color and set other initial defaults.
-
loadFailed
public void loadFailed()
-
loadFailed
public NamedIcon loadFailed(java.lang.String msg, java.lang.String url)
-
disposeLoadData
public void disposeLoadData()
-
loadOK
public boolean loadOK()
-
getContents
public java.util.List<Positionable> getContents()
-
getIdContents
public java.util.Map<java.lang.String,Positionable> getIdContents()
-
getClassNames
public java.util.Set<java.lang.String> getClassNames()
-
getPositionablesByClassName
public java.util.Set<Positionable> getPositionablesByClassName(java.lang.String className)
-
setDefaultToolTip
public void setDefaultToolTip(ToolTip dtt)
-
setTargetPanel
protected void setTargetPanel(javax.swing.JLayeredPane targetPanel, JmriJFrame frame)
Set the target panel.An Editor may or may not choose to use 'this' as its frame or the interior class 'TargetPane' for its targetPanel.
- Parameters:
targetPanel
- the panel to be editedframe
- the frame to embed the panel in
-
setTargetPanelSize
protected void setTargetPanelSize(int w, int h)
-
getTargetPanelSize
protected java.awt.Dimension getTargetPanelSize()
-
getTargetPanel
public final javax.swing.JComponent getTargetPanel()
Allow public access to the target (content) panel for external modification, particularly from scripts.- Returns:
- the target panel
-
getPanelScrollPane
public final javax.swing.JScrollPane getPanelScrollPane()
Allow public access to the scroll pane for external control of position, particularly from scripts.- Returns:
- the scroll pane containing the target panel
-
getTargetFrame
public final javax.swing.JFrame getTargetFrame()
-
getBackgroundColor
public java.awt.Color getBackgroundColor()
-
setBackgroundColor
public void setBackgroundColor(java.awt.Color col)
-
clearBackgroundColor
public void clearBackgroundColor()
-
getPaintScale
public final double getPaintScale()
Get scale for TargetPane drawing.- Returns:
- the scale
-
setPaintScale
protected final void setPaintScale(double newScale)
-
setToolTip
protected void setToolTip(ToolTip tt)
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
-
setAllEditable
public void setAllEditable(boolean state)
Control 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).- Parameters:
state
- true for editable.
-
deselectSelectionGroup
public void deselectSelectionGroup()
-
isEditable
public boolean isEditable()
-
setUseGlobalFlag
public void setUseGlobalFlag(boolean set)
Set 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.- Parameters:
set
- True if global flags should be used for positioning.
-
useGlobalFlag
public boolean useGlobalFlag()
-
getFlag
public boolean getFlag(int whichOption, boolean localFlag)
Get the setting for the specified option.- Parameters:
whichOption
- The option to getlocalFlag
- is the current setting of the item- Returns:
- The setting for the option
-
setGlobalSetsLocalFlag
public void setGlobalSetsLocalFlag(boolean set)
Set ifsetAllControlling(boolean)
andsetAllPositionable(boolean)
are set for existing as well as new items.- Parameters:
set
- true if setAllControlling() and setAllPositionable() are set for existing items
-
setAllPositionable
public void setAllPositionable(boolean state)
Control whether panel items can be positioned. Markers can always be positioned.- Parameters:
state
- true to set all items positionable; false otherwise
-
allPositionable
public boolean allPositionable()
-
setAllControlling
public void setAllControlling(boolean state)
Control whether target panel items are controlling layout items.Does this by invoking the
Positionable.setControlling(boolean)
function of each item on the target panel. This also controls the relevant pop-up menu items.- Parameters:
state
- true for controlling.
-
allControlling
public boolean allControlling()
-
setShowHidden
public void setShowHidden(boolean state)
Control whether target panel hidden items are visible or not. Does this by invoke thePositionable.setHidden(boolean)
function of each item on the target panel.- Parameters:
state
- true for Visible.
-
showHidden
public boolean showHidden()
-
setAllShowToolTip
public void setAllShowToolTip(boolean state)
-
showToolTip
public boolean showToolTip()
-
setPanelMenuVisible
public void setPanelMenuVisible(boolean state)
Hide or show menus on the target panel.- Parameters:
state
- true to show menus; false to hide menus- Since:
- 3.9.5
-
isPanelMenuVisible
public boolean isPanelMenuVisible()
Is the menu on the target panel shown?- Returns:
- true if menu is visible
- Since:
- 3.9.5
-
setScroll
protected void setScroll(int state)
-
setScroll
public void setScroll(java.lang.String strState)
-
getScrollable
public java.lang.String getScrollable()
-
targetWindowClosing
protected void targetWindowClosing()
-
changeView
protected Editor changeView(java.lang.String className)
-
setPositionableMenu
public void setPositionableMenu(Positionable p, javax.swing.JPopupMenu popup)
Add a checkbox to lock the position of the Positionable item.- Parameters:
p
- the itempopup
- the menu to add the lock menu item to
-
setShowCoordinatesMenu
public boolean setShowCoordinatesMenu(Positionable p, javax.swing.JPopupMenu popup)
Display the X & Y coordinates of the Positionable item and provide a dialog menu item to edit them.- Parameters:
p
- The item to add the menu item topopup
- The menu item to add the action to- Returns:
- always returns true
-
setShowAlignmentMenu
public boolean setShowAlignmentMenu(Positionable p, javax.swing.JPopupMenu popup)
Offer actions to align the selected Positionable items either Horizontally (at average y coordinates) or Vertically (at average x coordinates).- Parameters:
p
- The positionable itempopup
- The menu to add entries to- Returns:
- true if entries added to menu
-
setDisplayLevelMenu
public void setDisplayLevelMenu(Positionable p, javax.swing.JPopupMenu popup)
Display 'z' level of the Positionable item and provide a dialog menu item to edit it.- Parameters:
p
- The itempopup
- the menu to add entries to
-
setHiddenMenu
public void setHiddenMenu(Positionable p, javax.swing.JPopupMenu popup)
Add a menu entry to set visibility of the Positionable item- Parameters:
p
- the itempopup
- the menu to add the entry to
-
setEmptyHiddenMenu
public void setEmptyHiddenMenu(Positionable p, javax.swing.JPopupMenu popup)
Add a menu entry to set visibility of the Positionable item based on the presence of contents. If the value is null or empty, the icon is not visible. This is applicable to memory, block content and LogixNG global variable labels.- Parameters:
p
- the itempopup
- the menu to add the entry to
-
setValueEditDisabledMenu
public void setValueEditDisabledMenu(Positionable p, javax.swing.JPopupMenu popup)
Add a menu entry to disable double click value edits. This applies when not in panel edit mode. This is applicable to memory, block content and LogixNG global variable labels.- Parameters:
p
- the itempopup
- the menu to add the entry to
-
setEditIdMenu
public void setEditIdMenu(Positionable p, javax.swing.JPopupMenu popup)
Add a menu entry to edit Id of the Positionable item- Parameters:
p
- the itempopup
- the menu to add the entry to
-
setEditClassesMenu
public void setEditClassesMenu(Positionable p, javax.swing.JPopupMenu popup)
Add a menu entry to edit Classes of the Positionable item- Parameters:
p
- the itempopup
- the menu to add the entry to
-
setLogixNGPositionableMenu
public void setLogixNGPositionableMenu(Positionable p, javax.swing.JPopupMenu popup)
Add a menu entry to edit Id of the Positionable item- Parameters:
p
- the itempopup
- the menu to add the entry to
-
positionalIdChange
public void positionalIdChange(Positionable p, java.lang.String newId) throws Positionable.DuplicateIdException
Check if it's possible to change the id of the Positionable to the desired string.- Parameters:
p
- the PositionablenewId
- the desired new id- Throws:
Positionable.DuplicateIdException
- if another Positionable in the editor already has this id
-
positionalAddClass
public void positionalAddClass(Positionable p, java.lang.String className)
Add a class name to the Positionable- Parameters:
p
- the PositionableclassName
- the class name- Throws:
java.lang.IllegalArgumentException
- if the name contains a comma
-
positionalRemoveClass
public void positionalRemoveClass(Positionable p, java.lang.String className)
Removes a class name from the Positionable- Parameters:
p
- the PositionableclassName
- the class name
-
setShowToolTipMenu
public void setShowToolTipMenu(Positionable p, javax.swing.JPopupMenu popup)
Add a checkbox to display a tooltip for the Positionable item and if showable, provide a dialog menu to edit it.- Parameters:
p
- the item to set the menu forpopup
- the menu to add for p
-
setRemoveMenu
public void setRemoveMenu(Positionable p, javax.swing.JPopupMenu popup)
Add an action to remove the Positionable item.- Parameters:
p
- the item to set the menu forpopup
- the menu to add for p
-
locoMarkerFromRoster
protected void locoMarkerFromRoster()
-
selectLoco
protected LocoIcon selectLoco(java.lang.String rosterEntryTitle)
-
selectLoco
protected LocoIcon selectLoco(RosterEntry entry)
-
locoMarkerFromInput
protected void locoMarkerFromInput()
-
removeMarkers
protected void removeMarkers()
Remove marker icons from panel
-
setUpBackground
public PositionableLabel setUpBackground(java.lang.String name)
-
addLabel
protected PositionableLabel addLabel(java.lang.String text)
-
displayLevelChange
public void displayLevelChange(Positionable l)
-
addTrainIcon
public TrainIcon addTrainIcon(java.lang.String name)
-
addLocoIcon
public LocoIcon addLocoIcon(java.lang.String name)
-
putLocoIcon
public void putLocoIcon(LocoIcon l, java.lang.String name)
-
putItem
public void putItem(Positionable l) throws Positionable.DuplicateIdException
-
addToTarget
protected void addToTarget(Positionable l)
-
getIconFrame
public Editor.JFrameItem getIconFrame(java.lang.String name)
Create editor for a given item type. Paths to default icons are fixed in code. Compare to respective icon package, eg.addSensorEditor()
andSensorIcon
- Parameters:
name
- Icon editor's name- Returns:
- a window
-
getIconEditor
public IconAdder getIconEditor(java.lang.String name)
-
addTextEditor
protected void addTextEditor()
Add a label to the target.
-
addRightTOEditor
protected void addRightTOEditor()
-
addLeftTOEditor
protected void addLeftTOEditor()
-
addSlipTOEditor
protected void addSlipTOEditor()
-
addSensorEditor
protected void addSensorEditor()
-
addSignalHeadEditor
protected void addSignalHeadEditor()
-
getSignalHeadEditor
protected IconAdder getSignalHeadEditor()
-
addSignalMastEditor
protected void addSignalMastEditor()
-
addMemoryEditor
protected void addMemoryEditor()
-
addGlobalVariableEditor
protected void addGlobalVariableEditor()
-
addBlockContentsEditor
protected void addBlockContentsEditor()
-
addReporterEditor
protected void addReporterEditor()
-
addLightEditor
protected void addLightEditor()
-
addBackgroundEditor
protected void addBackgroundEditor()
-
addMultiSensorEditor
protected Editor.JFrameItem addMultiSensorEditor()
-
addIconEditor
protected void addIconEditor()
-
addAudioEditor
protected void addAudioEditor()
-
addLogixNGEditor
protected void addLogixNGEditor()
-
putSensor
protected SensorIcon putSensor()
Add a sensor indicator to the target.- Returns:
- The sensor that was added to the panel.
-
addTurnoutR
void addTurnoutR()
Add a turnout indicator to the target
-
addTurnoutL
void addTurnoutL()
-
addTurnout
protected TurnoutIcon addTurnout(IconAdder editor)
-
addSlip
SlipTurnoutIcon addSlip()
-
putSignalHead
protected SignalHeadIcon putSignalHead()
Add a signal head to the target.- Returns:
- The signal head that was added to the target.
-
putSignalMast
protected SignalMastIcon putSignalMast()
Add a signal mast to the target.- Returns:
- The signal mast that was added to the target.
-
putMemory
protected MemoryIcon putMemory()
-
addMemorySpinner
protected MemorySpinnerIcon addMemorySpinner()
-
addMemoryInputBox
protected MemoryInputIcon addMemoryInputBox()
-
putGlobalVariable
protected GlobalVariableIcon putGlobalVariable()
-
addGlobalVariableSpinner
protected GlobalVariableSpinnerIcon addGlobalVariableSpinner()
-
addGlobalVariableInputBox
protected GlobalVariableInputIcon addGlobalVariableInputBox()
-
putBlockContents
protected BlockContentsIcon putBlockContents()
-
addLight
protected LightIcon addLight()
Add a Light indicator to the target- Returns:
- The light indicator that was added to the target.
-
addReporter
protected ReporterIcon addReporter()
-
putBackground
void putBackground()
Button pushed, add a background image. Note that a background image differs from a regular icon only in the level at which it's presented.
-
putIcon
protected Positionable putIcon()
Add an icon to the target.- Returns:
- The icon that was added to the target.
-
putAudio
protected Positionable putAudio()
Add a LogixNG icon to the target.- Returns:
- The LogixNG icon that was added to the target.
-
putLogixNG
protected Positionable putLogixNG()
Add a LogixNG icon to the target.- Returns:
- The LogixNG icon that was added to the target.
-
addMultiSensor
public MultiSensorIcon addMultiSensor()
-
addClock
protected AnalogClock2Display addClock()
-
addRpsReporter
protected RpsPositionIcon addRpsReporter()
-
setTitle
public void setTitle()
-
makeAddIconFrame
protected Editor.JFrameItem makeAddIconFrame(java.lang.String name, boolean add, boolean table, IconAdder editor)
Create a frame showing all images in the set used for an icon. Opened when editItemInPanel button is clicked in the Edit Icon Panel, shown after icon's context menu Edit Icon... item is selected.- Parameters:
name
- bean type nameadd
- true when used to add a new item on panel, false when used to edit an item already on the paneltable
- true for bean types presented as table instead of iconseditor
- parent frame of the image frame- Returns:
- JFrame connected to the editor, to be filled with icons
-
removeFromTarget
protected void removeFromTarget(Positionable l)
-
removeFromContents
public boolean removeFromContents(Positionable l)
-
deletePanel
public boolean deletePanel()
Ask user if panel should be deleted. The caller should dispose the panel to delete it.- Returns:
- true if panel should be deleted.
-
dispose
public void dispose()
Dispose of the editor.- Specified by:
dispose
in interfaceWindowInterface
- Overrides:
dispose
in classJmriJFrame
-
showToolTip
public void showToolTip(Positionable selection, JmriMouseEvent event)
-
getItemX
protected int getItemX(Positionable p, int deltaX)
-
getItemY
protected int getItemY(Positionable p, int deltaY)
-
addToPopUpMenu
public void addToPopUpMenu(NamedBean nb, javax.swing.JMenuItem item, int menu)
Provide a method for external code to add items to context menus.- Parameters:
nb
- The namedBean associated with the postionable item.item
- The entry to add to the menu.menu
- The menu to add the entry to.
-
moveItem
public void moveItem(Positionable p, int deltaX, int deltaY)
Relocate item.Note that items can not be moved past the left or top edges of the panel.
- Parameters:
p
- The item to move.deltaX
- The horizontal displacement.deltaY
- The vertical displacement.
-
getSelectedItems
protected java.util.List<Positionable> getSelectedItems(JmriMouseEvent event)
Return a List of all items whose bounding rectangle contain the mouse position. ordered from top level to bottom- Parameters:
event
- contains the mouse position.- Returns:
- a list of positionable items or an empty list.
-
makeSelectionGroup
protected void makeSelectionGroup(JmriMouseEvent event)
-
modifySelectionGroup
protected void modifySelectionGroup(Positionable selection, JmriMouseEvent event)
-
setAttributes
public void setAttributes(PositionablePopupUtil newUtil, Positionable p)
Set attributes of a Positionable.- Parameters:
newUtil
- helper from which to get attributesp
- the item to set attributes of
-
setSelectionsAttributes
protected void setSelectionsAttributes(PositionablePopupUtil util, Positionable pos)
-
setSelectionsHidden
protected void setSelectionsHidden(boolean enabled, Positionable p)
-
setSelectionsPositionable
protected boolean setSelectionsPositionable(boolean enabled, Positionable p)
-
removeSelections
protected void removeSelections(Positionable p)
-
setSelectionsScale
protected void setSelectionsScale(double s, Positionable p)
-
setSelectionsRotation
protected void setSelectionsRotation(int k, Positionable p)
-
setSelectionsDisplayLevel
protected void setSelectionsDisplayLevel(int k, Positionable p)
-
setSelectionsDockingLocation
protected void setSelectionsDockingLocation(Positionable p)
-
dockSelections
protected void dockSelections(Positionable p)
-
showAlignPopup
protected boolean showAlignPopup(Positionable p)
-
getSelectRect
public java.awt.Rectangle getSelectRect()
-
drawSelectRect
public void drawSelectRect(int x, int y)
-
getAnchorX
public final int getAnchorX()
-
getAnchorY
public final int getAnchorY()
-
getLastX
public final int getLastX()
-
getLastY
public final int getLastY()
-
keyTyped
public void keyTyped(java.awt.event.KeyEvent e)
- Specified by:
keyTyped
in interfacejava.awt.event.KeyListener
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)
- Specified by:
keyPressed
in interfacejava.awt.event.KeyListener
-
keyReleased
public void keyReleased(java.awt.event.KeyEvent e)
- Specified by:
keyReleased
in interfacejava.awt.event.KeyListener
-
vetoableChange
public void vetoableChange(java.beans.PropertyChangeEvent evt) throws java.beans.PropertyVetoException
- Specified by:
vetoableChange
in interfacejava.beans.VetoableChangeListener
- Throws:
java.beans.PropertyVetoException
-
mousePressed
public abstract void mousePressed(JmriMouseEvent event)
Description copied from interface:JmriMouseListener
Invoked when a mouse button has been pressed on a component.- Specified by:
mousePressed
in interfaceJmriMouseListener
- Parameters:
event
- the event to be processed
-
mouseReleased
public abstract void mouseReleased(JmriMouseEvent event)
Description copied from interface:JmriMouseListener
Invoked when a mouse button has been released on a component.- Specified by:
mouseReleased
in interfaceJmriMouseListener
- Parameters:
event
- the event to be processed
-
mouseClicked
public abstract void mouseClicked(JmriMouseEvent event)
Description copied from interface:JmriMouseListener
Invoked when the mouse button has been clicked (pressed and released) on a component.- Specified by:
mouseClicked
in interfaceJmriMouseListener
- Parameters:
event
- the event to be processed
-
mouseDragged
public abstract void mouseDragged(JmriMouseEvent event)
Description copied from interface:JmriMouseMotionListener
Invoked when a mouse button is pressed on a component and then dragged.MOUSE_DRAGGED
events 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_DRAGGED
events may not be delivered during a native Drag&Drop operation.- Specified by:
mouseDragged
in interfaceJmriMouseMotionListener
- Parameters:
event
- the event to be processed
-
mouseMoved
public abstract void mouseMoved(JmriMouseEvent event)
Description copied from interface:JmriMouseMotionListener
Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.- Specified by:
mouseMoved
in interfaceJmriMouseMotionListener
- Parameters:
event
- the event to be processed
-
mouseEntered
public abstract void mouseEntered(JmriMouseEvent event)
Description copied from interface:JmriMouseListener
Invoked when the mouse enters a component.- Specified by:
mouseEntered
in interfaceJmriMouseListener
- Parameters:
event
- the event to be processed
-
mouseExited
public abstract void mouseExited(JmriMouseEvent event)
Description copied from interface:JmriMouseListener
Invoked when the mouse exits a component.- Specified by:
mouseExited
in interfaceJmriMouseListener
- Parameters:
event
- the event to be processed
-
init
protected abstract void init(java.lang.String name)
-
targetWindowClosingEvent
protected abstract void targetWindowClosingEvent(java.awt.event.WindowEvent e)
-
paintTargetPanel
protected abstract void paintTargetPanel(java.awt.Graphics g)
Called from TargetPanel's paint method for additional drawing by editor view.- Parameters:
g
- the context to paint within
-
setNextLocation
protected abstract void setNextLocation(Positionable obj)
Set an object's location when it is created.- Parameters:
obj
- the object to locate
-
initView
protected abstract void initView()
After construction, initialize all the widgets to their saved config settings.
-
copyItem
protected abstract void copyItem(Positionable p)
Set up item(s) to be copied by paste.- Parameters:
p
- the item to copy
-
getUsageReport
public java.util.List<NamedBeanUsageReport> getUsageReport(NamedBean bean)
-
getUsageData
java.lang.String getUsageData(Positionable pos)
-
-