|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--thinSoft.ui.ChessPiece
Represents a Component in the ChessLayout.
Each component has the following characteristics:
row/column coordinates on chessboard
number of rows/columns a piece occupies
horizontal & vertical position within row/column area
minimum height/width constraint
maximum height/width constraint
insets within the square.
ChessLayout
Field Summary | |
static byte |
BOTTOM
Place the component on the bottom |
static byte |
CENTER
Center the component horizontally or vertically |
int |
col
Column position of this component |
int |
cols
Number of additional columns this component occupies |
int |
horizontalPosition
Horizontal position of the component |
java.awt.Insets |
insets
Insets within the space (may be null) |
static byte |
LEFT
Place the component on the left side |
int |
minimumHeight
Minimum component height |
int |
minimumWidth
Minimum component width |
int |
preferredHeight
Maximum component height |
int |
preferredWidth
Maximum component width |
static byte |
RIGHT
Place the component on the right side |
int |
row
Row position of this component |
int |
rows
Number of additional rows this component occupies |
static byte |
STRETCH
Stretch the component horizontally or vertically |
static byte |
TOP
Place the component on the top |
int |
verticalPosition
Vertical position of the component |
Constructor Summary | |
ChessPiece()
Default ChessPiece constructor. |
|
ChessPiece(byte horizontalPosition,
byte verticalPosition)
Constructs a ChessPiece with the specified horizontal and vertical positioning. |
|
ChessPiece(byte horizontalPosition,
byte verticalPosition,
int minimumWidth,
int minimumHeight)
Constructs a ChessPiece from row/column coordinates, positioning, and minimum pixel size. |
|
ChessPiece(byte horizontalPosition,
byte verticalPosition,
int minimumWidth,
int minimumHeight,
int preferredWidth,
int preferredHeight)
Constructs a ChessPiece from vertical/horizontal position, row/column size, and minimum/preferred size. |
|
ChessPiece(byte horizontalPosition,
byte verticalPosition,
int minimumWidth,
int minimumHeight,
int preferredWidth,
int preferredHeight,
java.awt.Insets insets)
Constructs a ChessPiece from vertical/horizontal position, row/column size, and minimum/preferred size and Insets. |
Method Summary | |
java.lang.Object |
clone()
Clones the object. |
java.lang.String |
toString()
Expresses a ChessPiece as a String. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final byte CENTER
public static final byte STRETCH
public static final byte LEFT
public static final byte RIGHT
public static final byte TOP
public static final byte BOTTOM
public int row
public int col
public int rows
public int cols
public int horizontalPosition
public int verticalPosition
public int minimumWidth
public int minimumHeight
public int preferredWidth
public int preferredHeight
public java.awt.Insets insets
Constructor Detail |
public ChessPiece()
public ChessPiece(byte horizontalPosition, byte verticalPosition)
horizontalPosition
- LEFT/CENTER/RIGHT/STRETCH position.verticalPosition
- TOP/CENTER/BOTTOM/STRETCH position.public ChessPiece(byte horizontalPosition, byte verticalPosition, int minimumWidth, int minimumHeight)
horizontalPosition
- LEFT/CENTER/RIGHT/STRETCH position.verticalPosition
- TOP/CENTER/BOTTOM/STRETCH position.minimumWidth
- minimum component width.minimumHeight
- minimum component height.public ChessPiece(byte horizontalPosition, byte verticalPosition, int minimumWidth, int minimumHeight, int preferredWidth, int preferredHeight)
horizontalPosition
- LEFT/CENTER/RIGHT/STRETCH position.verticalPosition
- TOP/CENTER/BOTTOM/STRETCH position.minimumWidth
- minimum component width.minimumHeight
- minimum component height.preferredWidth
- Preferred component width.preferredHeight
- Preferred component height.public ChessPiece(byte horizontalPosition, byte verticalPosition, int minimumWidth, int minimumHeight, int preferredWidth, int preferredHeight, java.awt.Insets insets)
horizontalPosition
- LEFT/CENTER/RIGHT/STRETCH position.verticalPosition
- TOP/CENTER/BOTTOM/STRETCH position.minimumWidth
- minimum component width.minimumHeight
- minimum component height.preferredWidth
- Preferred component width.preferredHeight
- Preferred component height.insets
- component insets.Method Detail |
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |