ccl.swing
Class AutoGridBagLayout
java.lang.Object
|
+--java.awt.GridBagLayout
|
+--ccl.swing.AutoGridBagLayout
- All Implemented Interfaces:
- java.awt.LayoutManager, java.awt.LayoutManager2, java.io.Serializable
- public class AutoGridBagLayout
- extends java.awt.GridBagLayout
This layout manager hides a lot of complexity from the
GridBagLayout manager, especially through hiding the
GridBagConstraints object. Meanwhile you can still do
all the things the original GridBagLayout manager offers.
Personally This is one of the two most regularly used
classes of the ccl.swing package (together with the
ccl.swing.SwingUtil class of course).
- See Also:
- Serialized Form
Field Summary |
static int |
CENTER
Put the component in the center of its display area. |
static int |
EAST
Put the component on the right side of its display area,
centered vertically. |
static int |
NORTH
Put the component at the top of its display area,
centered horizontally. |
static int |
NORTHEAST
Put the component at the top-right corner of its display area. |
static int |
NORTHWEST
Put the component at the top-left corner of its display area. |
static int |
SOUTH
Put the component at the bottom of its display area, centered
horizontally. |
static int |
SOUTHEAST
Put the component at the bottom-right corner of its display area. |
static int |
SOUTHWEST
Put the component at the bottom-left corner of its display area. |
static int |
WEST
Put the component on the left side of its display area,
centered vertically. |
Fields inherited from class java.awt.GridBagLayout |
columnWeights, columnWidths, comptable, defaultConstraints, layoutInfo, MAXGRIDSIZE, MINSIZE, PREFERREDSIZE, rowHeights, rowWeights |
Methods inherited from class java.awt.GridBagLayout |
addLayoutComponent, AdjustForGravity, ArrangeGrid, getConstraints, getLayoutAlignmentX, getLayoutAlignmentY, getLayoutDimensions, GetLayoutInfo, getLayoutOrigin, getLayoutWeights, GetMinSize, invalidateLayout, layoutContainer, location, lookupConstraints, maximumLayoutSize, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent, setConstraints, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CENTER
public static final int CENTER
- Put the component in the center of its display area.
NORTH
public static final int NORTH
- Put the component at the top of its display area,
centered horizontally.
NORTHEAST
public static final int NORTHEAST
- Put the component at the top-right corner of its display area.
EAST
public static final int EAST
- Put the component on the right side of its display area,
centered vertically.
SOUTHEAST
public static final int SOUTHEAST
- Put the component at the bottom-right corner of its display area.
SOUTH
public static final int SOUTH
- Put the component at the bottom of its display area, centered
horizontally.
SOUTHWEST
public static final int SOUTHWEST
- Put the component at the bottom-left corner of its display area.
WEST
public static final int WEST
- Put the component on the left side of its display area,
centered vertically.
NORTHWEST
public static final int NORTHWEST
- Put the component at the top-left corner of its display area.
AutoGridBagLayout
public AutoGridBagLayout()
AutoGridBagLayout
public AutoGridBagLayout(int insets_)
setInsets
public void setInsets(int inset)
setInsets
public void setInsets(int vertical_,
int horizontal_)
setInsets
public void setInsets(java.awt.Insets pInsets_)
setAnchor
public void setAnchor(int anchor)
setAnchorNorth
public void setAnchorNorth()
setAnchorEast
public void setAnchorEast()
setAnchorSouth
public void setAnchorSouth()
setAnchorWest
public void setAnchorWest()
setAnchorCenter
public void setAnchorCenter()
setFillNone
public void setFillNone()
setExpandNone
public void setExpandNone()
setFillBoth
public void setFillBoth()
setExpandBoth
public void setExpandBoth()
setExpandBoth
public void setExpandBoth(double dX_,
double dY_)
setFillHorizontal
public void setFillHorizontal()
setExpandHorizontal
public void setExpandHorizontal()
setExpandHorizontal
public void setExpandHorizontal(double dHorizontal_)
setFillVertical
public void setFillVertical()
setExpandVertical
public void setExpandVertical()
setExpandVertical
public void setExpandVertical(double dVertical_)
skip
public void skip()
endLine
public void endLine()
nextLine
public void nextLine()
gotoGrid
public void gotoGrid(int x_,
int y_)
setExtend
public void setExtend(int extendX_,
int extendY_)
addLayoutComponent
public void addLayoutComponent(java.awt.Component pComponent_,
java.lang.Object oConstraints_)
- Adds the specified component to the layout, using the specified
constraint object.
- Overrides:
addLayoutComponent
in class java.awt.GridBagLayout
- Parameters:
pComponent_
- the component to be addedoConstraints_
- where/how the component is added to the layout.
setLayoutOn
public void setLayoutOn(java.awt.Container pContainer_)
add
public void add(java.awt.Container container_,
java.awt.Component component_)