Package jmri.jmrit.display.layoutEditor
Class LayoutEditorToolBarPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- jmri.jmrit.display.layoutEditor.LayoutEditorToolBarPanel
-
- All Implemented Interfaces:
java.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable,javax.accessibility.Accessible,Disposable
- Direct Known Subclasses:
LayoutEditorFloatingToolBarPanel,LayoutEditorHorizontalToolBarPanel,LayoutEditorVerticalToolBarPanel
public class LayoutEditorToolBarPanel extends javax.swing.JPanel implements Disposable
This is the base class for the horizontal, vertical and floating toolbar panels- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLayoutEditorToolBarPanel.LocationFormat-
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.JRadioButtonanchorButtonprotected javax.swing.JRadioButtonaudioButtonprotected MultiIconEditoraudioEditorprotected javax.swing.JFrameaudioFrameprotected javax.swing.JRadioButtonblockContentsButtonprotected NamedBeanComboBox<Block>blockContentsComboBoxprotected NamedBeanComboBox<Block>blockIDComboBoxprotected javax.swing.JLabelblockLabelprotected javax.swing.JPanelblockPropertiesPanelprotected NamedBeanComboBox<Sensor>blockSensorComboBoxprotected javax.swing.JLabelblockSensorLabelprotected java.awt.FlowLayoutcenterRowLayoutprotected javax.swing.JButtonchangeIconsButtonprotected javax.swing.JCheckBoxdashedLineprotected javax.swing.JRadioButtondoubleXoverButtonprotected javax.swing.JRadioButtonedgeButtonprotected javax.swing.JRadioButtonendBumperButtonprotected NamedBeanComboBox<Turnout>extraTurnoutNameComboBoxprotected javax.swing.JPanelextraTurnoutPanelprotected javax.swing.JRadioButtonglobalVariableButtonprotected javax.swing.JCheckBoxhighlightBlockCheckBoxprotected MultiIconEditoriconEditorprotected javax.swing.JFrameiconFrameprotected javax.swing.JRadioButtoniconLabelButtonprotected javax.swing.ButtonGroupitemGroupprotected javax.swing.JLabellabelsLabelprotected javax.swing.JRadioButtonlayoutDoubleSlipButtonprotected LayoutEditorlayoutEditorprotected javax.swing.JRadioButtonlayoutSingleSlipButtonprotected java.awt.FlowLayoutleftRowLayoutprotected javax.swing.JRadioButtonlevelXingButtonprotected javax.swing.JRadioButtonlhXoverButtonprotected javax.swing.JPanellocationPanelprotected javax.swing.JPopupMenulocationPopupMenuprotected javax.swing.JRadioButtonlogixngButtonprotected MultiIconEditorlogixngEditorprotected javax.swing.JFramelogixngFrameprotected javax.swing.JCheckBoxmainlineTrackprotected javax.swing.JRadioButtonmemoryButtonprotected javax.swing.JRadioButtonmultiSensorButtonprotected MultiSensorIconFramemultiSensorFrame(package private) java.util.Map<javax.swing.JRadioButton,java.lang.String>quickKeyMapprotected javax.swing.JRadioButtonrhXoverButtonprotected java.awt.FlowLayoutrightRowLayoutprotected javax.swing.JComboBox<java.lang.String>rotationComboBoxprotected javax.swing.JPanelrotationPanelprotected javax.swing.JRadioButtonsensorButtonprotected NamedBeanComboBox<Sensor>sensorComboBoxprotected javax.swing.JFramesensorFrameprotected MultiIconEditorsensorIconEditorprotected javax.swing.JRadioButtonshapeButtonprotected javax.swing.JRadioButtonsignalButtonprotected javax.swing.JFramesignalFrameprotected NamedBeanComboBox<SignalHead>signalHeadComboBoxprotected MultiIconEditorsignalIconEditorprotected javax.swing.JRadioButtonsignalMastButtonprotected NamedBeanComboBox<SignalMast>signalMastComboBoxprotected NamedBeanComboBox<Audio>textAudioComboBoxprotected NamedBeanComboBox<GlobalVariable>textGlobalVariableComboBoxprotected javax.swing.JRadioButtontextLabelButtonprotected javax.swing.JTextFieldtextLabelTextFieldprotected NamedBeanComboBox<Memory>textMemoryComboBoxprotected booleantoolBarIsWideprotected javax.swing.JRadioButtontrackButtonprotected javax.swing.JLabeltrackLabelprotected javax.swing.JPaneltrackSegmentPropertiesPanelprotected javax.swing.JLabelturnoutLabelprotected javax.swing.JRadioButtonturnoutLHButtonprotected NamedBeanComboBox<Turnout>turnoutNameComboBoxprotected javax.swing.JLabelturnoutNameLabelprotected javax.swing.JPanelturnoutNamePanelprotected javax.swing.JRadioButtonturnoutRHButtonprotected javax.swing.JRadioButtonturnoutWYEButtonprotected javax.swing.JLabelxLabelprotected javax.swing.JLabelyLabelprotected javax.swing.JLabelzoomLabelprotected javax.swing.JPanelzoomPanel-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor Description LayoutEditorToolBarPanel(LayoutEditor layoutEditor)Constructor for LayoutEditorToolBarPanel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Called when disposing of a disposable.LayoutEditorToolBarPanel.LocationFormatgetLocationFormat()voidkeyPressed(java.awt.event.KeyEvent event)protected voidlayoutComponents()layout the components in this panelvoidsetLocationFormat(LayoutEditorToolBarPanel.LocationFormat locationFormat)voidsetLocationText(java.awt.geom.Point2D p)protected voidsetupComponents()-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
layoutEditor
protected final LayoutEditor layoutEditor
-
turnoutLabel
protected javax.swing.JLabel turnoutLabel
-
turnoutRHButton
protected javax.swing.JRadioButton turnoutRHButton
-
turnoutLHButton
protected javax.swing.JRadioButton turnoutLHButton
-
turnoutWYEButton
protected javax.swing.JRadioButton turnoutWYEButton
-
doubleXoverButton
protected javax.swing.JRadioButton doubleXoverButton
-
rhXoverButton
protected javax.swing.JRadioButton rhXoverButton
-
lhXoverButton
protected javax.swing.JRadioButton lhXoverButton
-
layoutSingleSlipButton
protected javax.swing.JRadioButton layoutSingleSlipButton
-
layoutDoubleSlipButton
protected javax.swing.JRadioButton layoutDoubleSlipButton
-
leftRowLayout
protected java.awt.FlowLayout leftRowLayout
-
centerRowLayout
protected java.awt.FlowLayout centerRowLayout
-
rightRowLayout
protected java.awt.FlowLayout rightRowLayout
-
turnoutNameComboBox
protected NamedBeanComboBox<Turnout> turnoutNameComboBox
-
turnoutNameLabel
protected javax.swing.JLabel turnoutNameLabel
-
turnoutNamePanel
protected javax.swing.JPanel turnoutNamePanel
-
extraTurnoutPanel
protected javax.swing.JPanel extraTurnoutPanel
-
extraTurnoutNameComboBox
protected NamedBeanComboBox<Turnout> extraTurnoutNameComboBox
-
rotationComboBox
protected javax.swing.JComboBox<java.lang.String> rotationComboBox
-
rotationPanel
protected javax.swing.JPanel rotationPanel
-
trackLabel
protected javax.swing.JLabel trackLabel
-
levelXingButton
protected javax.swing.JRadioButton levelXingButton
-
trackButton
protected javax.swing.JRadioButton trackButton
-
trackSegmentPropertiesPanel
protected javax.swing.JPanel trackSegmentPropertiesPanel
-
mainlineTrack
protected javax.swing.JCheckBox mainlineTrack
-
dashedLine
protected javax.swing.JCheckBox dashedLine
-
blockLabel
protected javax.swing.JLabel blockLabel
-
blockIDComboBox
protected NamedBeanComboBox<Block> blockIDComboBox
-
highlightBlockCheckBox
protected javax.swing.JCheckBox highlightBlockCheckBox
-
blockSensorLabel
protected javax.swing.JLabel blockSensorLabel
-
blockSensorComboBox
protected NamedBeanComboBox<Sensor> blockSensorComboBox
-
endBumperButton
protected javax.swing.JRadioButton endBumperButton
-
anchorButton
protected javax.swing.JRadioButton anchorButton
-
edgeButton
protected javax.swing.JRadioButton edgeButton
-
labelsLabel
protected javax.swing.JLabel labelsLabel
-
textLabelButton
protected javax.swing.JRadioButton textLabelButton
-
textLabelTextField
protected javax.swing.JTextField textLabelTextField
-
memoryButton
protected javax.swing.JRadioButton memoryButton
-
textMemoryComboBox
protected NamedBeanComboBox<Memory> textMemoryComboBox
-
globalVariableButton
protected javax.swing.JRadioButton globalVariableButton
-
textGlobalVariableComboBox
protected NamedBeanComboBox<GlobalVariable> textGlobalVariableComboBox
-
blockContentsButton
protected javax.swing.JRadioButton blockContentsButton
-
blockContentsComboBox
protected NamedBeanComboBox<Block> blockContentsComboBox
-
multiSensorButton
protected javax.swing.JRadioButton multiSensorButton
-
signalMastButton
protected javax.swing.JRadioButton signalMastButton
-
signalMastComboBox
protected NamedBeanComboBox<SignalMast> signalMastComboBox
-
sensorButton
protected javax.swing.JRadioButton sensorButton
-
sensorComboBox
protected NamedBeanComboBox<Sensor> sensorComboBox
-
signalButton
protected javax.swing.JRadioButton signalButton
-
signalHeadComboBox
protected NamedBeanComboBox<SignalHead> signalHeadComboBox
-
iconLabelButton
protected javax.swing.JRadioButton iconLabelButton
-
logixngButton
protected javax.swing.JRadioButton logixngButton
-
audioButton
protected javax.swing.JRadioButton audioButton
-
textAudioComboBox
protected NamedBeanComboBox<Audio> textAudioComboBox
-
shapeButton
protected javax.swing.JRadioButton shapeButton
-
changeIconsButton
protected javax.swing.JButton changeIconsButton
-
sensorIconEditor
protected MultiIconEditor sensorIconEditor
-
sensorFrame
protected javax.swing.JFrame sensorFrame
-
signalIconEditor
protected MultiIconEditor signalIconEditor
-
signalFrame
protected javax.swing.JFrame signalFrame
-
iconEditor
protected MultiIconEditor iconEditor
-
iconFrame
protected javax.swing.JFrame iconFrame
-
logixngEditor
protected MultiIconEditor logixngEditor
-
logixngFrame
protected javax.swing.JFrame logixngFrame
-
audioEditor
protected MultiIconEditor audioEditor
-
audioFrame
protected javax.swing.JFrame audioFrame
-
multiSensorFrame
protected MultiSensorIconFrame multiSensorFrame
-
zoomPanel
protected javax.swing.JPanel zoomPanel
-
zoomLabel
protected javax.swing.JLabel zoomLabel
-
locationPanel
protected javax.swing.JPanel locationPanel
-
locationPopupMenu
protected javax.swing.JPopupMenu locationPopupMenu
-
xLabel
protected javax.swing.JLabel xLabel
-
yLabel
protected javax.swing.JLabel yLabel
-
blockPropertiesPanel
protected javax.swing.JPanel blockPropertiesPanel
-
toolBarIsWide
protected boolean toolBarIsWide
-
itemGroup
protected javax.swing.ButtonGroup itemGroup
-
quickKeyMap
final java.util.Map<javax.swing.JRadioButton,java.lang.String> quickKeyMap
-
-
Constructor Detail
-
LayoutEditorToolBarPanel
public LayoutEditorToolBarPanel(@Nonnull LayoutEditor layoutEditor)
Constructor for LayoutEditorToolBarPanel.Note an unusual design feature: Since this calls the
setupComponents()andlayoutComponents()non-final methods in the constructor, any subclass reimplementing those must provide versions that will work before the subclasses own initializers and constructor is run.- Parameters:
layoutEditor- the layout editor that this is for
-
-
Method Detail
-
setupComponents
protected void setupComponents()
-
getLocationFormat
public LayoutEditorToolBarPanel.LocationFormat getLocationFormat()
-
setLocationFormat
public void setLocationFormat(LayoutEditorToolBarPanel.LocationFormat locationFormat)
-
setLocationText
public void setLocationText(java.awt.geom.Point2D p)
-
layoutComponents
protected void layoutComponents()
layout the components in this panel
-
keyPressed
public void keyPressed(@Nonnull java.awt.event.KeyEvent event)
-
dispose
public void dispose()
Description copied from interface:DisposableCalled when disposing of a disposable.Note there are no assurances this method will not be called multiple times against a single instance of this Disposable. It is the responsibility of this Disposable to protect itself and the application from ensuring that calling this method multiple times has no unwanted side effects.
- Specified by:
disposein interfaceDisposable
-
-