Class SwitchboardEditor

All Implemented Interfaces:
ActionListener, ComponentListener, KeyListener, MouseListener, MouseMotionListener, WindowListener, ImageObserver, MenuContainer, VetoableChangeListener, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants, BeanInterface, ModifiedFlag, WindowInterface

public class SwitchboardEditor
extends Editor
Provides a simple editor for adding jmri.jmrit.display.switchBoard items to a JLayeredPane inside a captive JFrame. Primary use is for new users.

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:
Serialized Form