|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.esa.beam.framework.ui.GridBagUtils
public class GridBagUtils
A utility class providing helper methods for JPanels with a GridBagLayout layout manager.
| Constructor Summary | |
|---|---|
GridBagUtils()
|
|
| Method Summary | |
|---|---|
static void |
addHorizontalFiller(JPanel panel,
GridBagConstraints gbc)
|
static void |
addToPanel(JPanel panel,
Component comp,
GridBagConstraints gbc)
Adds a component to a panel with a grid bag layout. |
static void |
addToPanel(JPanel panel,
Component comp,
GridBagConstraints gbc,
String code)
Adds a component to a panel with a grid bag layout. |
static void |
addVerticalFiller(JPanel panel,
GridBagConstraints gbc)
|
static GridBagConstraints |
createConstraints(String code)
Creates a GridBagConstraints instance with the attributes given as a comma separated key-value pairs
in a text string. |
static GridBagConstraints |
createDefaultConstraints()
Creates a GridBagConstraints instance with the following attributes: |
static JPanel |
createDefaultEmptyBorderPanel()
|
static JPanel |
createPanel()
|
static GridBagConstraints |
setAttributes(GridBagConstraints gbc,
String code)
Sets the attributes of a given GridBagConstraints instance to the attribute values given as a comma
separated key-value pairs in a text string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GridBagUtils()
| Method Detail |
|---|
public static JPanel createPanel()
public static JPanel createDefaultEmptyBorderPanel()
public static GridBagConstraints createConstraints(String code)
GridBagConstraints instance with the attributes given as a comma separated key-value pairs
in a text string.
According to the public GridBagConstraints attributes, the following key-value pairs are can
occur in the text string:
gridx=RELATIVE|integergridy=RELATIVE|integergridwidth=REMAINDER|RELATIVE|integergridheight=REMAINDER|RELATIVE|integerweightx=doubleweighty=doubleanchor=CENTER|NORTH|NORTHEAST|EAST|SOUTHEAST|SOUTH|SOUTHWEST|WEST|NORTHWEST|integerfill=NONE|HORIZONTAL|VERTICAL|BOTH|integerinsets.bottom=integerinsets.left=integerinsets.right=integerinsets.top=integeripadx=integeripady=integer
code - a textual representation of the attributes to be setpublic static GridBagConstraints createDefaultConstraints()
GridBagConstraints instance with the following attributes: anchor=WESTinsets.top=0insets.left=3insets.bottom=0insets.right=3
public static void addToPanel(JPanel panel,
Component comp,
GridBagConstraints gbc)
panel - the panel to which to add the componentcomp - the component to be addedgbc - the grid bag constraints to be used, can be null if code is not
null
public static void addToPanel(JPanel panel,
Component comp,
GridBagConstraints gbc,
String code)
For the code parameter, see also setAttributes(GridBagConstraints, String).
panel - the panel to which to add the componentcomp - the component to be addedgbc - the grid bag constraints to be used, can be null if code is not
nullcode - the code containing the constraints, can be null if gbc is not
nullsetAttributes(GridBagConstraints, String)
public static void addHorizontalFiller(JPanel panel,
GridBagConstraints gbc)
public static void addVerticalFiller(JPanel panel,
GridBagConstraints gbc)
public static GridBagConstraints setAttributes(GridBagConstraints gbc,
String code)
GridBagConstraints instance to the attribute values given as a comma
separated key-value pairs in a text string.
According to the public GridBagConstraints attributes, the following key-value pairs are can
occur in the text string:
gridx=RELATIVE|integergridy=RELATIVE|integergridwidth=REMAINDER|RELATIVE|integergridheight=REMAINDER|RELATIVE|integerweightx=doubleweighty=doubleanchor=CENTER|NORTH|NORTHEAST|EAST|SOUTHEAST|SOUTH|SOUTHWEST|WEST|NORTHWEST|integerfill=NONE|HORIZONTAL|VERTICAL|BOTH|integerinsets.bottom=integerinsets.left=integerinsets.right=integerinsets.top=integeripadx=integeripady=integer
gbc - the grid bag constraints whose attributes are to be set, must not be nullcode - a textual representation of the attributes to be set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||