|
|||||||||
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.FanLayout
public class FanLayout
Class to store the fan layout options for a hand.
Displays the cards in a arc with given center, radius, start and
maximal end angle.
The cards are drawn one on top others with the current
card list order. If endDir is less or equal than startDir,
the hand shows like stacked, but uses more memory than a when
StackedLayout is used.
For negative endDir, the angle distance between cards is fixed to
the absolute value of this parameter. This is useful to align cards.
Constructor Summary | |
---|---|
FanLayout(Location center,
double radius,
double startDir,
double endDir)
Creates a FanLayout instance with given center, radius, start direction and end direction. |
Method Summary | |
---|---|
FanLayout |
clone()
Creates a new FanLayout instance with same options. |
Hand.CardAlignment |
getCardAlignment()
Returns the current card alignment |
Location |
getCenter()
Returns the current center. |
double |
getEndDir()
Returns the current end direction. |
double |
getRadius()
Returns the current radius. |
double |
getStartDir()
Returns the current start direction. |
int |
getStepDelay()
Returns the current step delay. |
void |
setCardAlignment(Hand.CardAlignment cardAlignment)
Sets the current card alignment to the given alignment. |
void |
setCenter(Location center)
Sets the current center to the given center |
void |
setEndDir(double endDir)
Sets the current end direction to the given end direction For negative endDir, the angle distance between cards is fixed to the absolute value of this parameter. |
void |
setRadius(double radius)
Sets the current radius to the given radius |
void |
setStartDir(double startDir)
Sets the current start direction to the given start direction |
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 FanLayout(Location center, double radius, double startDir, double endDir)
center
- the center location of the arcradius
- the radius of the arcstartDir
- the direction to the center of the first card
(in degrees clockwise, zero to east)endDir
- the maximal direction of the last card
(in degrees clockwise, zero to east)Method Detail |
---|
public FanLayout clone()
clone
in class java.lang.Object
public Location getCenter()
public double getRadius()
public double getStartDir()
public double getEndDir()
public int getStepDelay()
public Hand.CardAlignment getCardAlignment()
public void setCenter(Location center)
center
- the new current center.public void setRadius(double radius)
radius
- the new current radius.public void setStartDir(double startDir)
startDir
- the new current start direction (in degrees, clockwise, zero to east)public void setEndDir(double endDir)
endDir
- the new current end direction (in degrees, clockwise, zero to east)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 |