ch.aplu.jcardgame
Class StackLayout

java.lang.Object
  extended by ch.aplu.jcardgame.HandLayout
      extended by ch.aplu.jcardgame.StackLayout

public class StackLayout
extends HandLayout

Class to store the stacked layout options for a hand. Displays the cards in a stacked pile (only the top card is visible).


Constructor Summary
StackLayout(Location handLocation)
          Same as StackLayout(handLocation, rotationAngle) with rotationAngle = 0.
StackLayout(Location handLocation, double rotationAngle)
          Creates a StackLayout instance with given hand location and rotationAngle.
 
Method Summary
 StackLayout clone()
          Creates a new StackLayout instance with same options.
 double getRotationAngle()
          Returns the current rotation angle.
 void setRotationAngle(double rotationAngle)
          Sets the current rotation angle to the given angle.
 
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

StackLayout

public StackLayout(Location handLocation)
Same as StackLayout(handLocation, rotationAngle) with rotationAngle = 0. Defaults:
scaleFactor = 1
rotationAngle = 0

Parameters:
handLocation - the location of the visible card

StackLayout

public StackLayout(Location handLocation,
                   double rotationAngle)
Creates a StackLayout instance with given hand location and rotationAngle. Default:
scaleFactor = 1

Parameters:
handLocation - the location of the visible card
rotationAngle - the rotion angle (in degrees, clockwise, zero to east)
Method Detail

getRotationAngle

public double getRotationAngle()
Returns the current rotation angle.

Returns:
the rotation angle (in degrees, clockwise)

setRotationAngle

public void setRotationAngle(double rotationAngle)
Sets the current rotation angle to the given angle.

Parameters:
rotationAngle - the new current rotation angle (in degrees, clockwise)

clone

public StackLayout clone()
Creates a new StackLayout instance with same options.

Overrides:
clone in class java.lang.Object
Returns:
the new instance with same options