app.gui
Class Wrap

java.lang.Object
  extended by app.gui.Wrap

public final class Wrap
extends java.lang.Object

Wrap provides a collection of class methods each of which wraps a new container round given collection of GUI components.


Constructor Summary
Wrap()
           
 
Method Summary
static javax.swing.JPanel wrapInFlowLayoutPane(java.awt.Component cmpnnt)
          Wraps the given component in a JPanel and returns that panel -- which has a FlowLayout, centred with no padding.
static javax.swing.JPanel wrapInFlowLayoutPane(java.awt.Component cmpnnt, int align)
          Wraps the given component in a JPanel and returns that panel -- which has a FlowLayout with the given alignment and no padding.
static javax.swing.JPanel wrapInFLPaneAndVBox(javax.swing.JComponent[] cmpnnts, float alignx)
          Wraps the given list of components in a vertical box, wraps the box in a flow layout pane, and returns that pane.
static javax.swing.JPanel wrapInFLPaneAndVBox(javax.swing.JComponent[] cmpnnts, int gap)
          Wraps the given list of components in a vertical box, wraps the box in a flow layout pane, and returns that pane.
static javax.swing.JPanel wrapInFLPaneAndVBox(javax.swing.JComponent[] cmpnnts, int gap, float alignx)
          Wraps the given list of components in a vertical box, wraps the box in a flow layout pane, and returns that pane.
static javax.swing.JPanel wrapInNCSPane(java.awt.Component cnorth, java.awt.Component ccentre, java.awt.Component csouth)
          Returns a new JPanel with a BorderLayout containing the given pair of components in its north and south regions.
static javax.swing.JPanel wrapInNWCESPane(java.awt.Component cnorth, java.awt.Component cwest, java.awt.Component ccentre, java.awt.Component ceast, java.awt.Component csouth)
          Returns a new JPanel with a BorderLayout containing the given components in its north, west, centre, east and south regions.
static javax.swing.Box wrapInVerticalBox(javax.swing.JComponent[] cmpnnts, float alignx)
          Creates an returns a Box containing the given components, giving each component the specified X-alignment.
static javax.swing.Box wrapInVerticalBox(javax.swing.JComponent[] cmpnnts, int gap)
          Creates an returns a Box containing the given components, with a gap at the top of the specified size (which is expected to be non-negative), and giving each component the defaul X-alignment of 0.5 (which centres it within the box).
static javax.swing.Box wrapInVerticalBox(javax.swing.JComponent[] cmpnnts, int gap, float alignx)
          Creates an returns a Box containing the given components, with a gap at the top of the specified size (which is expected to be non-negative), and giving each component the specified X-alignment.
static javax.swing.JPanel wrapInWCEPane(java.awt.Component cwest, java.awt.Component ccentre, java.awt.Component ceast)
          Returns a new JPanel with a BorderLayout containing the given components in its west, central and east regions.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Wrap

public Wrap()
Method Detail

wrapInFLPaneAndVBox

public static final javax.swing.JPanel wrapInFLPaneAndVBox(javax.swing.JComponent[] cmpnnts,
                                                           float alignx)
Wraps the given list of components in a vertical box, wraps the box in a flow layout pane, and returns that pane. Each component is given the specified X-alignment.


wrapInFLPaneAndVBox

public static final javax.swing.JPanel wrapInFLPaneAndVBox(javax.swing.JComponent[] cmpnnts,
                                                           int gap)
Wraps the given list of components in a vertical box, wraps the box in a flow layout pane, and returns that pane. The box has a gap at the top of the specified size (which is expected to be non-negative), and each component is given the default X-alignment of 0.5 (which centres it in the box).


wrapInFLPaneAndVBox

public static final javax.swing.JPanel wrapInFLPaneAndVBox(javax.swing.JComponent[] cmpnnts,
                                                           int gap,
                                                           float alignx)
Wraps the given list of components in a vertical box, wraps the box in a flow layout pane, and returns that pane. The box has a gap at the top of the specified size (which is expected to be non-negative), and each component is given the specified X-alignment.


wrapInVerticalBox

public static final javax.swing.Box wrapInVerticalBox(javax.swing.JComponent[] cmpnnts,
                                                      float alignx)
Creates an returns a Box containing the given components, giving each component the specified X-alignment.


wrapInVerticalBox

public static final javax.swing.Box wrapInVerticalBox(javax.swing.JComponent[] cmpnnts,
                                                      int gap)
Creates an returns a Box containing the given components, with a gap at the top of the specified size (which is expected to be non-negative), and giving each component the defaul X-alignment of 0.5 (which centres it within the box).


wrapInVerticalBox

public static final javax.swing.Box wrapInVerticalBox(javax.swing.JComponent[] cmpnnts,
                                                      int gap,
                                                      float alignx)
Creates an returns a Box containing the given components, with a gap at the top of the specified size (which is expected to be non-negative), and giving each component the specified X-alignment.


wrapInFlowLayoutPane

public static final javax.swing.JPanel wrapInFlowLayoutPane(java.awt.Component cmpnnt)
Wraps the given component in a JPanel and returns that panel -- which has a FlowLayout, centred with no padding.


wrapInFlowLayoutPane

public static final javax.swing.JPanel wrapInFlowLayoutPane(java.awt.Component cmpnnt,
                                                            int align)
Wraps the given component in a JPanel and returns that panel -- which has a FlowLayout with the given alignment and no padding.


wrapInNCSPane

public static final javax.swing.JPanel wrapInNCSPane(java.awt.Component cnorth,
                                                     java.awt.Component ccentre,
                                                     java.awt.Component csouth)
Returns a new JPanel with a BorderLayout containing the given pair of components in its north and south regions. If either component is null the corresponding region is empty.


wrapInWCEPane

public static final javax.swing.JPanel wrapInWCEPane(java.awt.Component cwest,
                                                     java.awt.Component ccentre,
                                                     java.awt.Component ceast)
Returns a new JPanel with a BorderLayout containing the given components in its west, central and east regions. If any of these components is null the corresponding region is empty.


wrapInNWCESPane

public static final javax.swing.JPanel wrapInNWCESPane(java.awt.Component cnorth,
                                                       java.awt.Component cwest,
                                                       java.awt.Component ccentre,
                                                       java.awt.Component ceast,
                                                       java.awt.Component csouth)
Returns a new JPanel with a BorderLayout containing the given components in its north, west, centre, east and south regions. A null component value causes the corresponding region to be empty.