Package jmri.util.swing

Tools and utilities for doing a systematic reworking of the JMRI GUI.

The goal is to allow various GUI types to be available. Subpackages provide key implementation pieces:

jmri.util.swing.sdi
The traditional JMRI "single-document interface", where there are multiple independent windows
jmri.util.swing.mdi
A "multi-document interface", where a primary window contains multiple independent sub-windows
jmri.util.swing.multipane
A "multi-pane" or IDE-style interface", where each window is tiled with inter-related panes
Creating new "windows" through a WindowInterface reference handles the type-specific aspects.

JMRI Swing Usage Structure

JMRI GUI code starts as JmriPanel classes, which extends the Swing JPanel. Managing the frames (windows) that enclose them is done automatically when they are opened via the JmriAbstractAction and JmriNamedPaneAction action classes. JmriNamedPaneAction is preferred because it defers loading of the referenced panel class until the action is invoked, which can reduce JMRI startup time signficantly.

Generic creation of menus, toolbars and navigation trees from XML definition files are provided by the JMenuUtil, JToolBarUtil, JTreeUtil classes

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
Since:
2.9.4