Package megamek.client.ui
Class GBC
java.lang.Object
java.awt.GridBagConstraints
megamek.client.ui.GBC
- All Implemented Interfaces:
Serializable
,Cloneable
A helper class for setting line-wise GridBagLayouts
Do not use this if you need a Component to span two rows
- See Also:
-
Field Summary
Fields inherited from class java.awt.GridBagConstraints
ABOVE_BASELINE, ABOVE_BASELINE_LEADING, ABOVE_BASELINE_TRAILING, anchor, BASELINE, BASELINE_LEADING, BASELINE_TRAILING, BELOW_BASELINE, BELOW_BASELINE_LEADING, BELOW_BASELINE_TRAILING, BOTH, CENTER, EAST, fill, FIRST_LINE_END, FIRST_LINE_START, gridheight, gridwidth, gridx, gridy, HORIZONTAL, insets, ipadx, ipady, LAST_LINE_END, LAST_LINE_START, LINE_END, LINE_START, NONE, NORTH, NORTHEAST, NORTHWEST, PAGE_END, PAGE_START, RELATIVE, REMAINDER, SOUTH, SOUTHEAST, SOUTHWEST, VERTICAL, weightx, weighty, WEST
-
Method Summary
Modifier and TypeMethodDescriptionanchor
(int a) change the anchor of thisGridBagConstraints
static GBC
eol()
static GBC
eop()
fill()
set thisGridBagConstraints
so that the corresponding Component will fill horizontally and vertically.fill
(int value) set thisGridBagConstraints
so that the corresponding will fill according to thegridheight
(int height) Set the gridheight of thisGridBagConstraints
gridwidth
(int width) Set the gridwidth of thisGridBagConstraints
gridx
(int gridx) Set the gridx of thisGridBagConstraints
gridy
(int gridy) Set the gridy of thisGridBagConstraints
insets
(int left, int top, int right, int bottom) change the insets of thisGridBagConstraints
pad
(int padx, int pady) Set the padding of thisGridBagConstraints
static GBC
std()
weightx
(double weight) Set the weightx of thisGridBagConstraints
weighty
(double weight) Set the weighty of thisGridBagConstraints
Methods inherited from class java.awt.GridBagConstraints
clone
-
Method Details
-
std
- Returns:
- a standard
GridBagConstraints
, anchored toGridBagConstraints.WEST
-
eol
- Returns:
- a
GridBagConstraints
that will have a component fill a line - See Also:
-
eop
- Returns:
- a
GridBagConstraints
that will have a component fill a line, and have a 10 pixel inset to the south (ie. a paragraph)
-
anchor
change the anchor of thisGridBagConstraints
- Parameters:
a
- theint
anchor to set- Returns:
this
- See Also:
-
insets
change the insets of thisGridBagConstraints
- Parameters:
left
-top
-right
-bottom
-- Returns:
this
- See Also:
-
fill
set thisGridBagConstraints
so that the corresponding Component will fill horizontally and vertically.- Returns:
this
-
fill
set thisGridBagConstraints
so that the corresponding will fill according to the- Parameters:
value
- eitherGridBagConstraints.HORIZONTAL
,GridBagConstraints.VERTICAL
orGridBagConstraints.BOTH
and- Returns:
this
-
pad
Set the padding of thisGridBagConstraints
- Parameters:
padx
- theint
ipadx to setpady
- theint
ipady to set- Returns:
this
- See Also:
-
gridx
Set the gridx of thisGridBagConstraints
- Parameters:
gridx
- theint
gridx to set- Returns:
this
- See Also:
-
gridy
Set the gridy of thisGridBagConstraints
- Parameters:
gridy
- theint
gridy to set- Returns:
this
- See Also:
-
gridheight
Set the gridheight of thisGridBagConstraints
- Parameters:
height
- theint
gridheight to set- Returns:
this
- See Also:
-
gridwidth
Set the gridwidth of thisGridBagConstraints
- Parameters:
width
- theint
gridheight to set- Returns:
this
- See Also:
-
weightx
Set the weightx of thisGridBagConstraints
- Parameters:
weight
- thedouble
weightx to set- Returns:
this
- See Also:
-
weighty
Set the weighty of thisGridBagConstraints
- Parameters:
weight
- thedouble
weighty to set- Returns:
this
- See Also:
-