|
|||||||||
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.RowLayout
public class RowLayout
Class to store the row layout options for a hand.
Displays the cards in a row with given maximal width.
If stepDelay > 0, the display is animated and the method blocks until
the final position is reached.
The cards are drawn one on top others with the current
card list order.
If the row width is equal or less than the card width, the hand shows like
stacked, but uses more memory than a when StackLayout is used.
For negative rowWidth, the horizontal card distance is fixed to
the absolute value of this parameter. This is useful to align lines of cards.
Constructor Summary | |
---|---|
RowLayout(Location handLocation,
int rowWidth)
Same as RoyLayout(handLocation, rowWidth, rotationAngle) with rotationAngle = 0. |
|
RowLayout(Location handLocation,
int rowWidth,
double rotationAngle)
Creates a RowLayout instance with given hand location , maximum row width and rotation angle. |
Method Summary | |
---|---|
RowLayout |
clone()
Creates a new RowLayout instance with same options. |
Hand.CardAlignment |
getCardAlignment()
Returns the current card alignment |
double |
getRotationAngle()
Returns the current rotation angle. |
int |
getRowWidth()
Returns the current row width. |
int |
getStepDelay()
Returns the current step delay. |
void |
setCardAlignment(Hand.CardAlignment cardAlignment)
Sets the current card alignment to the given alignment. |
void |
setRotationAngle(double rotationAngle)
Sets the current rotation angle to the given angle. |
void |
setRowWidth(int rowWidth)
Sets the current row width to the given width. |
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 RowLayout(Location handLocation, int rowWidth)
handLocation
- the location of the first, last or middle card, depending
on the card alignment.rowWidth
- the width of the rowpublic RowLayout(Location handLocation, int rowWidth, double rotationAngle)
handLocation
- the location of the first, last or middle card, depending
on the card alignment.rowWidth
- the width of the rowrotationAngle
- the rotion angle (in degrees, clockwise, zero to east)Method Detail |
---|
public RowLayout clone()
clone
in class java.lang.Object
public int getRowWidth()
public double getRotationAngle()
public int getStepDelay()
public Hand.CardAlignment getCardAlignment()
public void setRowWidth(int rowWidth)
rowWidth
- the new current row widthpublic 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 |