|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.simplegamenet.util.proportionlayout.ProportionConstraints
The ProportionConstraints
class specifies constraints for components that are laid
out using the ProportionLayout
class.
Field Summary | |
static int |
BOTH
Resize the component both horizontally and vertically. |
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 |
HORIZONTAL
Resize the component horizontally but not vertically. |
static int |
NONE
Do not resize the component. |
static int |
NORTH
Put the component at the top of its display area, centered horizontally. |
static int |
NORTH_EAST
Put the component at the top-right corner of its display area. |
static int |
NORTH_WEST
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 |
SOUTH_EAST
Put the component at the bottom-right corner of its display area. |
static int |
SOUTH_WEST
Put the component at the bottom-left corner of its display area. |
static int |
VERTICAL
Resize the component vertically but not horizontally. |
static int |
WEST
Put the component on the left side of its display area, centered vertically. |
Constructor Summary | |
ProportionConstraints(int gridX,
int gridY)
Creates a new instance of ProportionConstraints |
|
ProportionConstraints(int gridX,
int gridY,
int gridWidth,
int gridHeight)
Creates a new instance of ProportionConstraints |
|
ProportionConstraints(int gridX,
int gridY,
int gridWidth,
int gridHeight,
int extendGridX,
int extendGridY)
Creates a new instance of ProportionConstraints |
|
ProportionConstraints(int gridX,
int gridY,
int gridWidth,
int gridHeight,
int extendGridX,
int extendGridY,
int anchor,
int fill)
Creates a new instance of ProportionConstraints |
|
ProportionConstraints(int gridX,
int gridY,
int gridWidth,
int gridHeight,
int extendGridX,
int extendGridY,
int anchor,
int fill,
Insets insets,
int iPadX,
int iPadY)
Creates a new instance of ProportionConstraints |
|
ProportionConstraints(int gridX,
int gridY,
int gridWidth,
int gridHeight,
int extendGridX,
int extendGridY,
int anchor,
int fill,
int insetNorth,
int insetEast,
int insetSouth,
int insetWest,
int iPadX,
int iPadY)
Creates a new instance of ProportionConstraints |
Method Summary | |
net.sourceforge.simplegamenet.util.proportionlayout.ProportionLinePart |
getColumnLinePart(Component component,
int linesSize)
Represents the x-dimension of a specific cell made with ProportionConstraints. |
net.sourceforge.simplegamenet.util.proportionlayout.ProportionLinePart |
getRowLinePart(Component component,
int linesSize)
Represents the y-dimension of a specific cell made with ProportionConstraints. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NONE
public static final int BOTH
public static final int HORIZONTAL
public static final int VERTICAL
public static final int CENTER
public static final int NORTH
public static final int NORTH_EAST
public static final int EAST
public static final int SOUTH_EAST
public static final int SOUTH
public static final int SOUTH_WEST
public static final int WEST
public static final int NORTH_WEST
Constructor Detail |
public ProportionConstraints(int gridX, int gridY) throws IllegalArgumentException
gridX
- specifies the column containing the left edge of the component's display area.
The first column has gridX = 0.gridY
- specifies the row containing the upper edge of the component's display area. The
first row has gridY = 0.
IllegalArgumentException
- if gridX or GridY < 0.public ProportionConstraints(int gridX, int gridY, int gridWidth, int gridHeight) throws IllegalArgumentException
gridX
- specifies the column containing the left edge of the component's display
area. The first column has gridX = 0.gridY
- specifies the row containing the upper edge of the component's display
area. The first row has gridY = 0.gridWidth
- Specifies the width of the cell (gridX,gridY).gridHeight
- Specifies the height of the cell (gridX, gridY).
IllegalArgumentException
- if gridX or GridY < 0.public ProportionConstraints(int gridX, int gridY, int gridWidth, int gridHeight, int extendGridX, int extendGridY) throws IllegalArgumentException
gridX
- specifies the column containing the left edge of the component's display
area. The first column has gridX = 0.gridY
- specifies the row containing the left edge of the component's display
area. The first row has gridY = 0.gridWidth
- specifies the width of the cell (gridX,gridY).gridHeight
- specifies the height of the cell (gridX,gridY).extendGridX
- specifies the number of cells to extend the cell (gridX, gridY)
horizontally when a component needs more space then the cells combined.extendGridY
- specifies the number of cells to extend the cell (gridX, gridY) vertically
when a component needs more space then the cells combined.
IllegalArgumentException
- if gridX or GridY < 0.public ProportionConstraints(int gridX, int gridY, int gridWidth, int gridHeight, int extendGridX, int extendGridY, int anchor, int fill) throws IllegalArgumentException
gridX
- specifies the column containing the left edge of the component's display
area. The first column has gridX = 0.gridY
- specifies the row containing the left edge of the component's display
area. The first row has gridY = 0.gridWidth
- specifies the width of the cell (gridX,gridY).gridHeight
- specifies the height of the cell (gridX,gridY).extendGridX
- specifies the number of cells to extend the cell (gridX, gridY)
horizontally when a component needs more space then the cells combined.extendGridY
- specifies the number of cells to extend the cell (gridX, gridY) vertically
when a component needs more space then the cells combined.anchor
- this field is used when the component is smaller than its display area. It
determines where, within the display area, to place the component. The
possible values are: CENTER
, NORTH
,
NORTHEAST
, EAST
, SOUTHEAST
,
SOUTH
, SOUTHWEST
, WEST
and
NORTHWEST
. The default value is CENTER
.fill
- this field is used when the component's display area is larger than the
component's requested size. It determines whether to resize the component,
and if so, how.
The following values are valid for fill
:
NONE
: Do not resize the component. HORIZONTAL
: Make the component wide enough to fill its
display area horizontally, but do not change its height. VERTICAL
: Make the component tall enough to fill its display
area vertically, but do not change its width. BOTH
: Make
the component fill its display area entirely. NONE
.
IllegalArgumentException
- if gridX or GridY < 0.public ProportionConstraints(int gridX, int gridY, int gridWidth, int gridHeight, int extendGridX, int extendGridY, int anchor, int fill, Insets insets, int iPadX, int iPadY) throws IllegalArgumentException
gridX
- specifies the column containing the left edge of the component's display
area. The first column has gridX = 0.gridY
- specifies the row containing the left edge of the component's display
area. The first row has gridY = 0.gridWidth
- specifies the width of the cell (gridX,gridY).gridHeight
- specifies the height of the cell (gridX,gridY).extendGridX
- specifies the number of cells to extend the cell (gridX, gridY)
horizontally when a component needs more space then the cells combined.extendGridY
- specifies the number of cells to extend the cell (gridX, gridY) vertically
when a component needs more space then the cells combined.anchor
- this field is used when the component is smaller than its display area. It
determines where, within the display area, to place the component. The
possible values are: CENTER
, NORTH
,
NORTHEAST
, EAST
, SOUTHEAST
,
SOUTH
, SOUTHWEST
, WEST
, and
NORTHWEST
. The default value is CENTER
.fill
- this field is used when the component's display area is larger than the
component's requested size. It determines whether to resize the component,
and if so, how.
The following values are valid for fill
:
NONE
: Do not resize the component. HORIZONTAL
: Make the component wide enough to fill its
display area horizontally, but do not change its height. VERTICAL
: Make the component tall enough to fill its display
area vertically, but do not change its width. BOTH
: Make
the component fill its display area entirely. NONE
.insets
- this field specifies the external padding of the component, the minimum
amount of space between the component and the edges of its display area.iPadX
- this field specifies the internal padding of the component, how much space
to add to the minimum width of the component. The width of the component
is at least its minimum width plus (ipadx * 2) pixels.iPadY
- this field specifies the internal padding, that is, how much space to add
to the minimum height of the component. The height of the component is at
least its minimum height plus (ipady * 2) pixels.
IllegalArgumentException
- if gridX or GridY < 0.public ProportionConstraints(int gridX, int gridY, int gridWidth, int gridHeight, int extendGridX, int extendGridY, int anchor, int fill, int insetNorth, int insetEast, int insetSouth, int insetWest, int iPadX, int iPadY) throws IllegalArgumentException
gridX
- specifies the column containing the left edge of the component's display
area. The first column has gridX = 0.gridY
- specifies the row containing the left edge of the component's display
area. The first row has gridY = 0.gridWidth
- specifies the width of the cell (gridX,gridY).gridHeight
- specifies the height of the cell (gridX,gridY).extendGridX
- specifies the number of cells to extend the cell (gridX, gridY)
horizontally when a component needs more space then the cells combined.extendGridY
- specifies the number of cells to extend the cell (gridX, gridY) vertically
when a component needs more space then the cells combined.anchor
- this field is used when the component is smaller than its display area. It
determines where, within the display area, to place the component. The
possible values are: CENTER
, NORTH
,
NORTHEAST
, EAST
, SOUTHEAST
,
SOUTH
, SOUTHWEST
, WEST
, and
NORTHWEST
. The default value is CENTER
.fill
- this field is used when the component's display area is larger than the
component's requested size. It determines whether to resize the component,
and if so, how.
The following values are valid for fill
:
NONE
: Do not resize the component. HORIZONTAL
: Make the component wide enough to fill its
display area horizontally, but do not change its height. VERTICAL
: Make the component tall enough to fill its display
area vertically, but do not change its width. BOTH
: Make
the component fill its display area entirely. NONE
.insetNorth
- This field specifies the external padding of the component, the minimum
amount of space between the component and the northern edge of its display
area.insetEast
- This field specifies the external padding of the component, the minimum
amount of space between the component and the eastern edge of its display
area.insetSouth
- This field specifies the external padding of the component, the minimum
amount of space between the component and the southern edge of its display
area.insetWest
- This field specifies the external padding of the component, the minimum
amount of space between the component and the western edge of its display
area.iPadX
- This field specifies the internal padding of the component, how much space
to add to the minimum width of the component. The width of the component
is at least its minimum width plus (ipadx * 2) pixels.iPadY
- This field specifies the internal padding, that is, how much space to add
to the minimum height of the component. The height of the component is at
least its minimum height plus (ipady * 2) pixels.
IllegalArgumentException
- if gridX or GridY < 0.Method Detail |
public net.sourceforge.simplegamenet.util.proportionlayout.ProportionLinePart getColumnLinePart(Component component, int linesSize) throws IndexOutOfBoundsException
component
- specifies the component to which this column's ProportionLinePart belongs.linesSize
- specifies the number of columns in the grid made with addColumn.
IndexOutOfBoundsException
- if gridX + gridWidth > the number of columns that are added
to this grid addColumn.public net.sourceforge.simplegamenet.util.proportionlayout.ProportionLinePart getRowLinePart(Component component, int linesSize) throws IndexOutOfBoundsException
component
- specifies the component to which this row's ProportionLinePart belongs.linesSize
- specifies the number of rows in the grid made with addRow.
IndexOutOfBoundsException
- if gridY + gridHeigth > the number of rows that are added
to this grid with addRow.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |