|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
jmri.util.JmriJFrame
jmri.jmrit.display.Editor
jmri.jmrit.display.controlPanelEditor.ControlPanelEditor
jmri.jmrit.display.controlPanelEditor.CircuitBuilder
public class CircuitBuilder
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class jmri.jmrit.display.controlPanelEditor.ControlPanelEditor |
|---|
ControlPanelEditor.PositionableListDnD |
| Nested classes/interfaces inherited from class jmri.jmrit.display.Editor |
|---|
Editor.JFrameItem, Editor.TargetPane |
| Nested classes/interfaces inherited from class javax.swing.JFrame |
|---|
JFrame.AccessibleJFrame |
| Nested classes/interfaces inherited from class java.awt.Frame |
|---|
Frame.AccessibleAWTFrame |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static Color |
_editGroupColor
|
static Color |
_highlightColor
|
static Color |
_pathColor
|
static ResourceBundle |
rbcp
|
| Fields inherited from class jmri.jmrit.display.controlPanelEditor.ControlPanelEditor |
|---|
_debug, _editMenu, _fileMenu, _iconMenu, _menuBar, _optionMenu, _zoomMenu, POSITIONABLE_LIST_FLAVOR |
| Fields inherited from class jmri.jmrit.display.Editor |
|---|
_anchorX, _anchorY, _contents, _currentSelection, _dragging, _editable, _highlightcomponent, _lastX, _lastY, _paintScale, _pastePending, _scrollState, _selectionGroup, _selectRect, _targetPanel, BKG, CLOCK, defaultBackgroundColor, frameLocationX, frameLocationY, ICON_EDITORS, ICONS, LABELS, LIGHTS, MARKERS, MEMORIES, NUM_LEVELS, OPTION_CONTROLS, OPTION_HIDDEN, OPTION_POSITION, OPTION_TOOLTIP, POSITIONABLE_FLAVOR, rb, rbean, REPORTERS, SCROLL_BOTH, SCROLL_HORIZONTAL, SCROLL_NONE, SCROLL_VERTICAL, SECURITY, SENSORS, SIGNALS, TEMP, TURNOUTS, xLoc, yLoc |
| Fields inherited from class jmri.util.JmriJFrame |
|---|
reuseFrameSavedPosition, reuseFrameSavedSized |
| Fields inherited from class javax.swing.JFrame |
|---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| 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 |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
CircuitBuilder()
|
|
CircuitBuilder(String name)
|
|
| Method Summary | |
|---|---|
protected void |
closeCircuitFrame(OBlock block)
Update block data in menus |
protected void |
closePathFrame(OBlock block)
|
protected void |
closePortalFrame(OBlock block)
|
protected void |
convertIcon(Positionable pos)
|
protected void |
convertIcons()
|
protected static void |
doSize(JComponent comp,
int max,
int min)
static methods |
protected void |
editCircuit(String title)
|
protected void |
editCircuitPaths(String title)
|
protected void |
editPortals(String title)
|
protected OBlock |
getBlock(Positionable pos)
Used by Portal Frame |
protected List<Positionable> |
getCircuitGroup()
Used by Path Frame |
protected List<Positionable> |
getCircuitIcons(OBlock block)
Used by Portal Frame |
protected Hashtable<String,PortalIcon> |
getPortalIconMap()
Used by Portal Frame and Path Frame |
protected List<Positionable> |
getSelectedItems(MouseEvent event)
Return a List of all items whose bounding rectangle contain the mouse position. |
protected List<Positionable> |
getSelectionGroup()
Used by Path Frame |
protected void |
highlight(Positionable pos)
|
protected boolean |
iconsConverted()
Check if the block being edited has all its icons converted to indicator icons |
protected void |
init()
Second init needed because changeView() must call init(String name) before contents are transferred to this editor. |
protected void |
init(String name)
|
protected boolean |
isTrack(Positionable pos)
|
protected static JPanel |
makeBoxPanel(boolean vertical,
JComponent textField,
String label,
String tooltip)
|
protected static JPanel |
makeTextBoxPanel(boolean vertical,
JTextField textField,
String label,
boolean editable,
String tooltip)
|
protected void |
modifySelectionGroup(Positionable selection,
MouseEvent event)
|
void |
mouseDragged(MouseEvent event)
No dragging when editing |
void |
mousePressed(MouseEvent event)
Keep selections when editing. |
void |
mouseReleased(MouseEvent event)
|
protected void |
newCircuit()
Set up editing Frames |
void |
paintTargetPanel(Graphics g)
Overriden methods of Editor |
protected void |
removeBlock(OBlock block)
Remove block, but keep the track icons. |
void |
setAllEditable(boolean state)
Control whether target panel items are editable. |
protected void |
setEditColors(boolean highlight)
|
| Methods inherited from class jmri.jmrit.display.controlPanelEditor.ControlPanelEditor |
|---|
copyItem, dragEnter, dragExit, dragOver, drop, dropActionChanged, getClipGroup, getCopySelection, getCurrentSelection, initView, loadComplete, lostOwnership, makeDataFlavors, makeEditMenu, makeIconMenu, makeOptionMenu, makePalette, makeZoomMenu, mouseClicked, mouseEntered, mouseExited, mouseMoved, setCopyMenu, setNextLocation, setTitle, setUseGlobalFlag, showPopUp, targetWindowClosingEvent |
| Methods inherited from class java.awt.Frame |
|---|
getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.dnd.DropTargetListener |
|---|
dragEnter, dragExit, dragOver, drop, dropActionChanged |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
public static final ResourceBundle rbcp
public static final Color _editGroupColor
public static final Color _pathColor
public static final Color _highlightColor
| Constructor Detail |
|---|
public CircuitBuilder()
public CircuitBuilder(String name)
| Method Detail |
|---|
protected void init(String name)
init in class ControlPanelEditorprotected void init()
protected void newCircuit()
protected void editCircuit(String title)
protected void editPortals(String title)
protected void editCircuitPaths(String title)
protected void closeCircuitFrame(OBlock block)
protected void closePathFrame(OBlock block)
protected void closePortalFrame(OBlock block)
protected List<Positionable> getSelectionGroup()
protected List<Positionable> getCircuitIcons(OBlock block)
protected OBlock getBlock(Positionable pos)
protected List<Positionable> getCircuitGroup()
protected Hashtable<String,PortalIcon> getPortalIconMap()
protected void highlight(Positionable pos)
protected void removeBlock(OBlock block)
protected void setEditColors(boolean highlight)
public void paintTargetPanel(Graphics g)
paintTargetPanel in class ControlPanelEditorpublic void setAllEditable(boolean state)
EditorPositionable.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).
setAllEditable in class ControlPanelEditorstate - true for editable.protected boolean iconsConverted()
protected void convertIcons()
protected void convertIcon(Positionable pos)
protected boolean isTrack(Positionable pos)
public void mousePressed(MouseEvent event)
mousePressed in interface MouseListenermousePressed in class ControlPanelEditorpublic void mouseReleased(MouseEvent event)
mouseReleased in interface MouseListenermouseReleased in class ControlPanelEditorpublic void mouseDragged(MouseEvent event)
mouseDragged in interface MouseMotionListenermouseDragged in class ControlPanelEditorprotected List<Positionable> getSelectedItems(MouseEvent event)
getSelectedItems in class Editor
protected void modifySelectionGroup(Positionable selection,
MouseEvent event)
modifySelectionGroup in class Editor
protected static void doSize(JComponent comp,
int max,
int min)
protected static JPanel makeTextBoxPanel(boolean vertical,
JTextField textField,
String label,
boolean editable,
String tooltip)
protected static JPanel makeBoxPanel(boolean vertical,
JComponent textField,
String label,
String tooltip)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||