public final class GridLayoutManager extends AbstractLayout
Modifier and Type | Field and Description |
---|---|
static java.lang.Object |
DESIGN_TIME_INSETS
Key for accessing client property which is set on the root Swing component of the design-time component
hierarchy and specifies the value of extra insets added to all components.
|
DEFAULT_HGAP, DEFAULT_VGAP, myComponents, myConstraints, myMargin
Constructor and Description |
---|
GridLayoutManager(int rowCount,
int columnCount) |
GridLayoutManager(int rowCount,
int columnCount,
java.awt.Insets margin,
int hGap,
int vGap)
don't delete this constructor! don't use this constructor!!! should be used ONLY in generated code or in tests
|
GridLayoutManager(int rowCount,
int columnCount,
java.awt.Insets margin,
int hGap,
int vGap,
boolean sameSizeHorizontally,
boolean sameSizeVertically)
don't delete this constructor! don't use this constructor!!! should be used ONLY in generated code or in tests
|
Modifier and Type | Method and Description |
---|---|
void |
addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints) |
int |
getCellCount(boolean isRow) |
int |
getCellSizePolicy(boolean isRow,
int cellIndex) |
int |
getColumnCount() |
int |
getColumnStretch(int columnIndex) |
int[] |
getCoords(boolean isRow) |
int[] |
getHeights()
for design time only
|
int[] |
getHorizontalGridLines() |
int |
getRowCount() |
int |
getRowStretch(int rowIndex) |
int[] |
getSizes(boolean isRow) |
int[] |
getVerticalGridLines() |
int[] |
getWidths()
for design time only
|
int[] |
getXs()
for design time only
|
int[] |
getYs()
for design time only
|
void |
invalidateLayout(java.awt.Container container) |
boolean |
isSameSizeHorizontally() |
boolean |
isSameSizeVertically() |
void |
layoutContainer(java.awt.Container container) |
java.awt.Dimension |
maximumLayoutSize(java.awt.Container target) |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container container) |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container container) |
void |
setColumnStretch(int columnIndex,
int stretch) |
void |
setRowStretch(int rowIndex,
int stretch) |
void |
setSameSizeHorizontally(boolean sameSizeHorizontally) |
void |
setSameSizeVertically(boolean sameSizeVertically) |
addLayoutComponent, getConstraintsForComponent, getHGap, getHGapImpl, getLayoutAlignmentX, getLayoutAlignmentY, getMargin, getVGap, getVGapImpl, removeLayoutComponent, setHGap, setMargin, setVGap
public static java.lang.Object DESIGN_TIME_INSETS
public GridLayoutManager(int rowCount, int columnCount)
public GridLayoutManager(int rowCount, int columnCount, java.awt.Insets margin, int hGap, int vGap)
public GridLayoutManager(int rowCount, int columnCount, java.awt.Insets margin, int hGap, int vGap, boolean sameSizeHorizontally, boolean sameSizeVertically)
public void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints)
addLayoutComponent
in interface java.awt.LayoutManager2
addLayoutComponent
in class AbstractLayout
public int getRowCount()
public int getColumnCount()
public int getRowStretch(int rowIndex)
[1..Integer.MAX_VALUE]
.public void setRowStretch(int rowIndex, int stretch)
java.lang.IllegalArgumentException
- if stretch
is less
then 1
.public int getColumnStretch(int columnIndex)
public void setColumnStretch(int columnIndex, int stretch)
java.lang.IllegalArgumentException
- if stretch
is less
then 1
.public java.awt.Dimension maximumLayoutSize(java.awt.Container target)
maximumLayoutSize
in interface java.awt.LayoutManager2
maximumLayoutSize
in class AbstractLayout
public java.awt.Dimension minimumLayoutSize(java.awt.Container container)
minimumLayoutSize
in interface java.awt.LayoutManager
minimumLayoutSize
in class AbstractLayout
public java.awt.Dimension preferredLayoutSize(java.awt.Container container)
preferredLayoutSize
in interface java.awt.LayoutManager
preferredLayoutSize
in class AbstractLayout
public void layoutContainer(java.awt.Container container)
layoutContainer
in interface java.awt.LayoutManager
layoutContainer
in class AbstractLayout
public void invalidateLayout(java.awt.Container container)
invalidateLayout
in interface java.awt.LayoutManager2
invalidateLayout
in class AbstractLayout
public int[] getXs()
public int[] getWidths()
public int[] getYs()
public int[] getHeights()
public int[] getCoords(boolean isRow)
public int[] getSizes(boolean isRow)
public boolean isSameSizeHorizontally()
public boolean isSameSizeVertically()
public void setSameSizeHorizontally(boolean sameSizeHorizontally)
public void setSameSizeVertically(boolean sameSizeVertically)
public int[] getHorizontalGridLines()
public int[] getVerticalGridLines()
public int getCellCount(boolean isRow)
public int getCellSizePolicy(boolean isRow, int cellIndex)