net.sf.swinglib
Class UIHelper

java.lang.Object
  extended by net.sf.swinglib.UIHelper

public class UIHelper
extends Object

Static methods and constants that help build UI objects with a consistent appearance.


Field Summary
static Color HIGHLIGHT_COLOR
          The highlight color for invalid fields.
static int STANDARD_SPACE
          An "inter-component" horizontal space, also used as the standard inset from a frame to its content.
 
Constructor Summary
UIHelper()
           
 
Method Summary
static Border dialogBorder()
          The border to be used around a dialog's content.
static Border dialogGroupBorder()
          The border to be used around a group of components in a dialog.
static Component interButtonSpace()
          A horizontal strut between buttons on the same line.
static JDialog newModalDialog(JFrame owner, String title, JPanel content, Action... actions)
          Builds a standard modal input dialog, with content and buttons to accept or cancel that content.
static JDialog newModalDialog(JFrame owner, String title, JPanel content, JButton... buttons)
          Builds a standard modal input dialog, with content and buttons to accept or cancel that content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STANDARD_SPACE

public static final int STANDARD_SPACE
An "inter-component" horizontal space, also used as the standard inset from a frame to its content. This is the nominal "Em" space.

See Also:
Constant Field Values

HIGHLIGHT_COLOR

public static final Color HIGHLIGHT_COLOR
The highlight color for invalid fields.

Constructor Detail

UIHelper

public UIHelper()
Method Detail

dialogBorder

public static Border dialogBorder()
The border to be used around a dialog's content.


dialogGroupBorder

public static Border dialogGroupBorder()
The border to be used around a group of components in a dialog. Assumes that there will be a label above the group, and that there won't be decoration between groups.


interButtonSpace

public static Component interButtonSpace()
A horizontal strut between buttons on the same line.


newModalDialog

public static JDialog newModalDialog(JFrame owner,
                                     String title,
                                     JPanel content,
                                     JButton... buttons)
Builds a standard modal input dialog, with content and buttons to accept or cancel that content.


newModalDialog

public static JDialog newModalDialog(JFrame owner,
                                     String title,
                                     JPanel content,
                                     Action... actions)
Builds a standard modal input dialog, with content and buttons to accept or cancel that content.