net.pacbell.jfai.toh.ui
Class BaseView

java.lang.Object
  extended by net.pacbell.jfai.toh.ui.BaseView

public class BaseView
extends Object

Visualizes the base of the Tower Of Hanoi puzzle. The base has pins aligned in a row.


Constructor Summary
BaseView(Base aModel)
          Creates a default view of the given base.
 
Method Summary
static Point3f bottomCenter()
          Answers the center point of the bottom of the platform.
static float depth()
          Answers the depth of the platform.
 Appearance getAppearance()
          Gets the appearance.
 BranchGroup getGroup()
          Gets the branch group.
 Base getModel()
          Gets the model.
 float getPinDistance()
          Answers the distance between the center points of pins.
static float height()
          Answers the height of the platform.
 PinView pinView(Pin pin)
          Answer the pin view corresponding to the specified pin.
static Point3f topCenter()
          Answers the center point of the top of the platform.
static float width()
          Answers the width of the platform.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseView

public BaseView(Base aModel)
Creates a default view of the given base.

Parameters:
aModel - the base
Method Detail

bottomCenter

public static final Point3f bottomCenter()
Answers the center point of the bottom of the platform.

Returns:
center point of bottom of platform

depth

public static final float depth()
Answers the depth of the platform.

Returns:
the depth of the platform

height

public static final float height()
Answers the height of the platform.

Returns:
the height of the platform

topCenter

public static final Point3f topCenter()
Answers the center point of the top of the platform.

Returns:
center point of top of platform

width

public static final float width()
Answers the width of the platform.

Returns:
the width of the platform

getAppearance

public Appearance getAppearance()
Gets the appearance.

Returns:
the appearance

getGroup

public BranchGroup getGroup()
Gets the branch group.

Returns:
the branch group

getModel

public Base getModel()
Gets the model.

Returns:
the model

getPinDistance

public float getPinDistance()
Answers the distance between the center points of pins.

Returns:
the distance on center between pins

pinView

public PinView pinView(Pin pin)
Answer the pin view corresponding to the specified pin. The result is null if there is no corresponding pin view.

Parameters:
pin - a pin
Returns:
the corresponding pin view (or null)