|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.GridBagLayout
public class GridBagLayout
Field Summary | |
---|---|
double[] |
columnWeights
|
int[] |
columnWidths
|
protected Hashtable<Component,GridBagConstraints> |
comptable
|
protected GridBagConstraints |
defaultConstraints
|
protected java.awt.GridBagLayoutInfo |
layoutInfo
|
protected static int |
MAXGRIDSIZE
|
protected static int |
MINSIZE
|
protected static int |
PREFERREDSIZE
|
int[] |
rowHeights
|
double[] |
rowWeights
|
Constructor Summary | |
---|---|
GridBagLayout()
|
Method Summary | |
---|---|
void |
addLayoutComponent(Component component,
Object constraints)
Adds the specified component to the layout, with the specified constraints object. |
void |
addLayoutComponent(String name,
Component component)
Adds the specified component to the layout group. |
protected void |
adjustForGravity(GridBagConstraints constraints,
Rectangle r)
Move and resize a rectangle according to a set of grid bag constraints. |
protected void |
AdjustForGravity(GridBagConstraints constraints,
Rectangle r)
Move and resize a rectangle according to a set of grid bag constraints. |
protected void |
arrangeGrid(Container parent)
|
protected void |
ArrangeGrid(Container parent)
Obsolete. |
GridBagConstraints |
getConstraints(Component component)
|
float |
getLayoutAlignmentX(Container target)
Returns the preferred X axis alignment for the specified target container. |
float |
getLayoutAlignmentY(Container target)
Returns the preferred Y axis alignment for the specified target container. |
int[][] |
getLayoutDimensions()
|
protected java.awt.GridBagLayoutInfo |
getLayoutInfo(Container parent,
int sizeflag)
|
protected java.awt.GridBagLayoutInfo |
GetLayoutInfo(Container parent,
int sizeflag)
Obsolete. |
Point |
getLayoutOrigin()
|
double[][] |
getLayoutWeights()
|
protected Dimension |
getMinSize(Container parent,
java.awt.GridBagLayoutInfo info)
|
protected Dimension |
GetMinSize(Container parent,
java.awt.GridBagLayoutInfo info)
Obsolete. |
void |
invalidateLayout(Container target)
Forces the layout manager to purge any cached information about the layout of the target container. |
void |
layoutContainer(Container parent)
Lays out the components in the given container. |
Point |
location(int x,
int y)
|
protected GridBagConstraints |
lookupConstraints(Component component)
|
Dimension |
maximumLayoutSize(Container target)
Determines the maximum size of the specified target container. |
Dimension |
minimumLayoutSize(Container parent)
Calculates the minimum size for this container, taking into account the components it contains. |
Dimension |
preferredLayoutSize(Container parent)
Calculates the preferred size for this container, taking into account the components it contains. |
void |
removeLayoutComponent(Component component)
Removes the specified component from the layout group. |
void |
setConstraints(Component component,
GridBagConstraints constraints)
|
String |
toString()
Return a string representation of this GridBagLayout. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final int MINSIZE
protected static final int PREFERREDSIZE
protected static final int MAXGRIDSIZE
protected Hashtable<Component,GridBagConstraints> comptable
protected java.awt.GridBagLayoutInfo layoutInfo
protected GridBagConstraints defaultConstraints
public double[] columnWeights
public int[] columnWidths
public double[] rowWeights
public int[] rowHeights
Constructor Detail |
---|
public GridBagLayout()
Method Detail |
---|
public void addLayoutComponent(String name, Component component)
LayoutManager
addLayoutComponent
in interface LayoutManager
name
- the name of the component to addcomponent
- the component to addpublic void removeLayoutComponent(Component component)
LayoutManager
removeLayoutComponent
in interface LayoutManager
component
- the component to removepublic void addLayoutComponent(Component component, Object constraints)
LayoutManager2
addLayoutComponent
in interface LayoutManager2
component
- the component to addconstraints
- the constraints to satisfypublic Dimension preferredLayoutSize(Container parent)
LayoutManager
preferredLayoutSize
in interface LayoutManager
parent
- the parent container to lay out
LayoutManager.minimumLayoutSize(Container)
public Dimension minimumLayoutSize(Container parent)
LayoutManager
minimumLayoutSize
in interface LayoutManager
parent
- the parent container to lay out
LayoutManager.preferredLayoutSize(Container)
public Dimension maximumLayoutSize(Container target)
LayoutManager2
maximumLayoutSize
in interface LayoutManager2
target
- the container to lay out
Component.getMaximumSize()
public void layoutContainer(Container parent)
LayoutManager
layoutContainer
in interface LayoutManager
parent
- the container to lay outpublic float getLayoutAlignmentX(Container target)
LayoutManager2
getLayoutAlignmentX
in interface LayoutManager2
target
- the target container
public float getLayoutAlignmentY(Container target)
LayoutManager2
getLayoutAlignmentY
in interface LayoutManager2
target
- the target container
public void invalidateLayout(Container target)
LayoutManager2
invalidateLayout
in interface LayoutManager2
target
- the target containerpublic void setConstraints(Component component, GridBagConstraints constraints)
public GridBagConstraints getConstraints(Component component)
protected GridBagConstraints lookupConstraints(Component component)
public Point getLayoutOrigin()
public int[][] getLayoutDimensions()
public double[][] getLayoutWeights()
public Point location(int x, int y)
public String toString()
toString
in class Object
Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)
protected void AdjustForGravity(GridBagConstraints constraints, Rectangle r)
constraints
- position and size constraintsr
- rectangle to be moved and resizedprotected void ArrangeGrid(Container parent)
protected java.awt.GridBagLayoutInfo GetLayoutInfo(Container parent, int sizeflag)
protected Dimension GetMinSize(Container parent, java.awt.GridBagLayoutInfo info)
protected Dimension getMinSize(Container parent, java.awt.GridBagLayoutInfo info)
protected void arrangeGrid(Container parent)
protected java.awt.GridBagLayoutInfo getLayoutInfo(Container parent, int sizeflag)
protected void adjustForGravity(GridBagConstraints constraints, Rectangle r)
constraints
- position and size constraintsr
- rectangle to be moved and resized
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |