Package jmri.util.swing

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

See:
          Description

Interface Summary
WindowInterface Interface for an object that can arrange for a JmriPanel to be displayed.
 

Class Summary
BeanSelectCreatePanel  
EditableResizableImagePanel  
GuiUtilBase Common utility methods for working with GUI items
JMenuUtil Common utility methods for working with JMenus.
JmriAbstractAction Abstract base for actions that will work with multiple JMRI GUIs An opaque Object can be passed as a context, but null is also possible.
JmriBeanComboBox  
JmriNamedPaneAction Action to create and load a JmriPanel from just its name.
JmriPanel JPanel extension to handle automatic creation of window title and help reference.
JToolBarUtil Common utility methods for working with JToolBars.
JTreeUtil Common utility methods for working with JTrees.
ResizableImagePanel A class extending JPanels to have a image display in a panel, supports: + drag'n drop of image file + can resize container + can scale content to size + respect aspect ratio by default (when resizing content) (overrides paintComponent for performances)
SliderSnap This corrects the behaviour of JSliders to correctly snap whilst sliding, rather than to snap after sliding.
SwingSettings Settings for e.g. workarounds, etc.
VerticalLabelUI Allows a JLabel to be displayed vertically, with a defined orientation.
 

Enum Summary
WindowInterface.Hint Suggested location for subsequent panels
 

Package jmri.util.swing Description

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

This whole package might be moved to the apps tree at some later point.

Related Documentation

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

Since:
2.9.4


Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads