|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.aplu.jcardgame.HandLayout ch.aplu.jcardgame.ColumnLayout
public class ColumnLayout
Class to store the column layout options for a hand.
Displays the cards in a column with given maximal height.
If stepDelay > 0, the spread out is animated and blocks until
the final position is reached.
The cards are drawn one on top others with the current
card list order.
If the column height is equal or less than the card height, the hand shows like
stacked, but uses more memory than a when StackLayout is used.
For negative columnHeight, the vertical card distance is fixed to
the absolute value of this parameter. This is useful to align lines of cards.
Constructor Summary | |
---|---|
ColumnLayout(Location handLocation,
int columnHeight)
Same as ColumnLayout(handLocation, columnHeight, rotationAngle) with rotationAngle = 0. |
|
ColumnLayout(Location handLocation,
int columnHeight,
double rotationAngle)
Creates a ColumnLayout instance with given hand location, maximum column height and rotation angle. |
Method Summary | |
---|---|
ColumnLayout |
clone()
Creates a new ColumnLayout instance with same options. |
Hand.CardAlignment |
getCardAlignment()
Returns the current card alignment |
int |
getColumnHeight()
Returns the current column height. |
double |
getRotationAngle()
Returns the current rotation angle. |
int |
getStepDelay()
Returns the current step delay. |
void |
setCardAlignment(Hand.CardAlignment cardAlignment)
Sets the current card alignment to the given alignment. |
void |
setColumnHeight(int columnHeight)
Sets the current column height to the given height. |
void |
setRotationAngle(double rotationAngle)
Sets the current rotation angle to the given angle. |
void |
setStepDelay(int stepDelay)
Sets the current step delay to the given delay (in ms). |
Methods inherited from class ch.aplu.jcardgame.HandLayout |
---|
getHandLocation, getScaleFactor, setHandLocation, setScaleFactor |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColumnLayout(Location handLocation, int columnHeight)
handLocation
- the location of the first, last or middle card, depending
on the card alignment.columnHeight
- the height of the columnpublic ColumnLayout(Location handLocation, int columnHeight, double rotationAngle)
handLocation
- the location of the first, last or middle card, depending
on the card alignment.columnHeight
- the height of the columnrotationAngle
- the rotion angle (in degrees, clockwise, zero to east)Method Detail |
---|
public ColumnLayout clone()
clone
in class java.lang.Object
public int getColumnHeight()
public double getRotationAngle()
public int getStepDelay()
public Hand.CardAlignment getCardAlignment()
public void setColumnHeight(int columnHeight)
columnHeight
- the new current column heightpublic void setRotationAngle(double rotationAngle)
rotationAngle
- the new current rotation angle (in degrees, clockwise)public void setStepDelay(int stepDelay)
stepDelay
- the new current step delaypublic void setCardAlignment(Hand.CardAlignment cardAlignment)
cardAlignment
- the new current card alignment
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |