public final class GridConstraints
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static int |
ALIGN_CENTER |
static int |
ALIGN_FILL |
static int |
ALIGN_LEFT |
static int |
ALIGN_RIGHT |
static int |
ANCHOR_CENTER
Put the component in the center of its display area.
|
static int |
ANCHOR_EAST
Put the component on the right side of its display area,
centered vertically.
|
static int |
ANCHOR_NORTH
Put the component at the top of its display area,
centered horizontally.
|
static int |
ANCHOR_NORTHEAST
Put the component at the top-right corner of its display area.
|
static int |
ANCHOR_NORTHWEST
Put the component at the top-left corner of its display area.
|
static int |
ANCHOR_SOUTH
Put the component at the bottom of its display area, centered
horizontally.
|
static int |
ANCHOR_SOUTHEAST
Put the component at the bottom-right corner of its display area.
|
static int |
ANCHOR_SOUTHWEST
Put the component at the bottom-left corner of its display area.
|
static int |
ANCHOR_WEST
Put the component on the left side of its display area,
centered vertically.
|
static GridConstraints[] |
EMPTY_ARRAY |
static int |
FILL_BOTH |
static int |
FILL_HORIZONTAL |
static int |
FILL_NONE |
static int |
FILL_VERTICAL |
java.awt.Dimension |
myMaximumSize |
java.awt.Dimension |
myMinimumSize |
java.awt.Dimension |
myPreferredSize
overridden preferred size.
|
static int |
SIZEPOLICY_CAN_GROW |
static int |
SIZEPOLICY_CAN_SHRINK |
static int |
SIZEPOLICY_FIXED
TODO[anton,vova] write javadoc
|
static int |
SIZEPOLICY_WANT_GROW |
Constructor and Description |
---|
GridConstraints() |
GridConstraints(int row,
int column,
int rowSpan,
int colSpan,
int anchor,
int fill,
int HSizePolicy,
int VSizePolicy,
java.awt.Dimension minimumSize,
java.awt.Dimension preferredSize,
java.awt.Dimension maximumSize) |
GridConstraints(int row,
int column,
int rowSpan,
int colSpan,
int anchor,
int fill,
int HSizePolicy,
int VSizePolicy,
java.awt.Dimension minimumSize,
java.awt.Dimension preferredSize,
java.awt.Dimension maximumSize,
int indent) |
GridConstraints(int row,
int column,
int rowSpan,
int colSpan,
int anchor,
int fill,
int HSizePolicy,
int VSizePolicy,
java.awt.Dimension minimumSize,
java.awt.Dimension preferredSize,
java.awt.Dimension maximumSize,
int indent,
boolean useParentLayout) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
boolean |
contains(boolean isRow,
int cell) |
boolean |
equals(java.lang.Object o) |
int |
getAnchor() |
int |
getCell(boolean isRow) |
int |
getColSpan() |
int |
getColumn() |
int |
getFill() |
int |
getHSizePolicy() |
int |
getIndent() |
int |
getRow() |
int |
getRowSpan() |
int |
getSpan(boolean isRow) |
int |
getVSizePolicy() |
int |
hashCode() |
boolean |
isUseParentLayout() |
void |
restore(GridConstraints constraints) |
void |
setAnchor(int anchor) |
void |
setCell(boolean isRow,
int value) |
void |
setColSpan(int colSpan) |
void |
setColumn(int column) |
void |
setFill(int fill) |
void |
setHSizePolicy(int sizePolicy) |
void |
setIndent(int indent) |
void |
setRow(int row) |
void |
setRowSpan(int rowSpan) |
void |
setSpan(boolean isRow,
int value) |
void |
setUseParentLayout(boolean useParentLayout) |
void |
setVSizePolicy(int sizePolicy) |
GridConstraints |
store() |
java.lang.String |
toString() |
public static final GridConstraints[] EMPTY_ARRAY
public static final int FILL_NONE
public static final int FILL_HORIZONTAL
public static final int FILL_VERTICAL
public static final int FILL_BOTH
public static final int ANCHOR_CENTER
public static final int ANCHOR_NORTH
public static final int ANCHOR_SOUTH
public static final int ANCHOR_EAST
public static final int ANCHOR_WEST
public static final int ANCHOR_NORTHEAST
public static final int ANCHOR_SOUTHEAST
public static final int ANCHOR_SOUTHWEST
public static final int ANCHOR_NORTHWEST
public static final int SIZEPOLICY_FIXED
public static final int SIZEPOLICY_CAN_SHRINK
public static final int SIZEPOLICY_CAN_GROW
public static final int SIZEPOLICY_WANT_GROW
public static final int ALIGN_LEFT
public static final int ALIGN_CENTER
public static final int ALIGN_RIGHT
public static final int ALIGN_FILL
public final java.awt.Dimension myMinimumSize
myPreferredSize
public final java.awt.Dimension myPreferredSize
null
. Term "overridden" means that GridLayoutManager gets
preferred size from the constrains first. Moreover if one of the returned dimensions (x or y)
is negative then the corresponding dimension is also calculated by the component.
It means that it's possible to override any particular dimension without subclassing
of the component. Stantard Swing doesn't have such capability.public final java.awt.Dimension myMaximumSize
myPreferredSize
public GridConstraints()
public GridConstraints(int row, int column, int rowSpan, int colSpan, int anchor, int fill, int HSizePolicy, int VSizePolicy, java.awt.Dimension minimumSize, java.awt.Dimension preferredSize, java.awt.Dimension maximumSize)
public GridConstraints(int row, int column, int rowSpan, int colSpan, int anchor, int fill, int HSizePolicy, int VSizePolicy, java.awt.Dimension minimumSize, java.awt.Dimension preferredSize, java.awt.Dimension maximumSize, int indent)
public GridConstraints(int row, int column, int rowSpan, int colSpan, int anchor, int fill, int HSizePolicy, int VSizePolicy, java.awt.Dimension minimumSize, java.awt.Dimension preferredSize, java.awt.Dimension maximumSize, int indent, boolean useParentLayout)
public java.lang.Object clone()
clone
in class java.lang.Object
GridConstraints
public int getColumn()
public void setColumn(int column)
public int getRow()
public void setRow(int row)
public int getRowSpan()
public void setRowSpan(int rowSpan)
public int getColSpan()
public void setColSpan(int colSpan)
public int getHSizePolicy()
public void setHSizePolicy(int sizePolicy)
public int getVSizePolicy()
public void setVSizePolicy(int sizePolicy)
public int getAnchor()
public void setAnchor(int anchor)
public int getFill()
public void setFill(int fill)
public int getIndent()
public void setIndent(int indent)
public boolean isUseParentLayout()
public void setUseParentLayout(boolean useParentLayout)
public GridConstraints store()
public void restore(GridConstraints constraints)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int getCell(boolean isRow)
public void setCell(boolean isRow, int value)
public int getSpan(boolean isRow)
public void setSpan(boolean isRow, int value)
public boolean contains(boolean isRow, int cell)
public java.lang.String toString()
toString
in class java.lang.Object