|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.gui.util.GridBagHelper
public class GridBagHelper
This helper class provides convenience methods to add components to a
GridBagLayout
.
Field Summary | |
---|---|
static java.awt.Insets |
COMPONENT_INSETS
The default insets for components. |
static java.awt.Insets |
LABEL_INSETS
The default insets for labels. |
static java.awt.Insets |
PANEL_INSETS
The default insets for panels. |
static java.awt.Insets |
STRING_INSETS
The default insets for strings. |
static int |
X_SPACING
|
Constructor Summary | |
---|---|
GridBagHelper()
|
Method Summary | |
---|---|
static void |
add(java.awt.Container p,
java.awt.Component c)
|
static void |
add(java.awt.Container p,
java.awt.Component c,
boolean fill)
|
static void |
add(java.awt.Container p,
java.awt.Component c,
java.awt.Insets insets,
boolean fill)
|
static void |
add(java.awt.Container p,
java.awt.Component c,
java.awt.Insets insets,
boolean fill,
int anchor)
|
static javax.swing.JLabel |
add(java.awt.Container p,
java.lang.String s)
|
static void |
addComponent(java.awt.Container p,
java.awt.Component c)
Adds c without a break. |
static void |
addComponent(java.awt.Container p,
java.awt.Component c,
int anchor)
Adds c without a break. |
static void |
addHorizontalSpacer(java.awt.Container p)
Adds a horizontal spacer to p that sucks up the remaining
space. |
static javax.swing.JLabel |
addLabel(java.awt.Container p,
java.lang.String s)
Fill is set to false. |
static javax.swing.JLabel |
addLabel(java.awt.Container p,
java.lang.String s,
boolean fill)
Adds a label to p that displays s . |
static void |
addPanel(java.awt.Container p,
java.awt.Component c)
|
static void |
addVerticalSpacer(java.awt.Container p)
Adds a vertical spacer to p that sucks up the remaining
space. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int X_SPACING
public static final java.awt.Insets COMPONENT_INSETS
public static final java.awt.Insets LABEL_INSETS
public static final java.awt.Insets PANEL_INSETS
public static final java.awt.Insets STRING_INSETS
Constructor Detail |
---|
public GridBagHelper()
Method Detail |
---|
public static void add(java.awt.Container p, java.awt.Component c, java.awt.Insets insets, boolean fill, int anchor)
public static void add(java.awt.Container p, java.awt.Component c, java.awt.Insets insets, boolean fill)
public static void add(java.awt.Container p, java.awt.Component c, boolean fill)
public static void add(java.awt.Container p, java.awt.Component c)
public static javax.swing.JLabel add(java.awt.Container p, java.lang.String s)
public static void addComponent(java.awt.Container p, java.awt.Component c, int anchor)
c
without a break.
public static void addComponent(java.awt.Container p, java.awt.Component c)
c
without a break.
public static javax.swing.JLabel addLabel(java.awt.Container p, java.lang.String s, boolean fill)
p
that displays s
. The
label is placed a bit more south than the rest of the controls.
public static void addHorizontalSpacer(java.awt.Container p)
p
that sucks up the remaining
space. All components that have been added to p are pushed eastwards.
public static javax.swing.JLabel addLabel(java.awt.Container p, java.lang.String s)
addLabel(Container, String, boolean)
public static void addPanel(java.awt.Container p, java.awt.Component c)
public static void addVerticalSpacer(java.awt.Container p)
p
that sucks up the remaining
space. All components that have been added to p are pushed northwards.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |