GridBagLayoutNameGridBagLayout
DescriptionThe GridBagLayout LayoutManager provides the means to layout components in a flexible grid-based display model. Class Definition
public class java.awt.GridBagLayout extends java.lang.Object implements java.awt.LayoutManager2, java.io.Serializable { // Protected Constants protected static final MAXGRIDSIZE; protected static final MINSIZE; protected static final PREFERREDSIZE; // Variables public double columnWeights[]; public int columnWidths[]; public int rowHeights[]; public double rowWeights[]; // Protected Variables protected Hashtable comptable; protected GridBagConstraints defaultConstraints; protected GridBagLayoutInfo layoutInfo; // Constructors public GridBagLayout(); // Instance Methods public void addLayoutComponent (Component comp, Object constraints); Protected ConstantsMAXGRIDSIZEprotected static final MAXGRIDSIZEMaximum number of rows and columns within container managed by GridBagLayout. MINSIZEprotected static final MINSIZEUsed for internal sizing purposes. PREFERREDSIZEprotected static final PREFERREDSIZEUsed for internal sizing purposes. VariablescolumnWeightspublic double[] columnWeightsThe weightx values of the components in the row with the most elements. columnWidthspublic int[] columnWidthsThe width values of the components in the row with the most elements. rowHeightspublic int[] rowHeightsThe height values of the components in the column with the most elements. rowWeightspublic double[] rowWeightsThe weighty values of the components in the column with the most elements. Protected Variablescomptableprotected Hashtable comptableInternal table to manage components. defaultConstraintsprotected GridBagConstraints defaultConstraintsConstraints to use for Components that have none. layoutInfoprotected GridBagLayoutInfo layoutInfoInternal information about the GridBagLayout. ConstructorsGridBagLayoutpublic GridBagLayout()
Instance MethodsaddLayoutComponentpublic void addLayoutComponent (Component comp, Object constraints)
public void addLayoutComponent (String name, Component component)
getConstraintspublic GridBagConstraints getConstraints (Component component)
getLayoutAlignmentXpublic abstract float getLayoutAlignmentX (Container target)
getLayoutAlignmentYpublic abstract float getLayoutAlignmentY (Container target)
getLayoutDimensionspublic int[][] getLayoutDimensions()
getLayoutOriginpublic Point getLayoutOrigin()
getLayoutWeightspublic double[][] getLayoutWeights()
invalidateLayoutpublic abstract void invalidateLayout (Container target)
layoutContainerpublic void layoutContainer (Container target)
locationpublic Point location (int x, int y)
maximumLayoutSizepublic abstract Dimension maximumLayoutSize (Container target)
minimumLayoutSizepublic Dimension minimumLayoutSize (Container target)
preferredLayoutSizepublic Dimension preferredLayoutSize (Container target)
removeLayoutComponentpublic void removeLayoutComponent (Component component)
setConstraintspublic void setConstraints (Component component, GridBagConstraints constraints)
toStringpublic String toString()
Protected Instance MethodsAdjustForGravityprotected void AdjustForGravity (GridBagConstraints constraints, Rectangle r)
ArrangeGridprotected void ArrangeGrid (Container target)
GetLayoutInfoprotected GridBagLayoutInfo GetLayoutInfo (Container target, int sizeFlag)
GetMinSizeprotected Dimension GetMinSize (Container target, GridBagLayoutInfo info)
lookupConstraintsprotected GridBagConstraints lookupConstraints (Component comp)
See AlsoComponent, Container, Dimension, GridBagConstraints, Hashtable, LayoutManager, LayoutManager2, Object, Point, Rectangle, String |
|