|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.pacbell.jfai.toh.ui.DiskView
public class DiskView
Visualizes a disk of the Tower Of Hanoi puzzle.
| Constructor Summary | |
|---|---|
DiskView(Disk aModel,
Point3f position,
int numberOfDisks,
BaseView aBaseView)
Create a new instance given a Disk as the model, the position (relative to the path that leads to the instance), the number of disks for the puzzle, and the base view. |
|
| Method Summary | |
|---|---|
void |
disappear()
Removes the receiver's visual from the scene. |
BaseView |
getBaseView()
Gets the base view. |
BranchGroup |
getGroup()
Gets the branch group. |
static float |
getHeight()
Gets the absolute height. |
Disk |
getModel()
Gets the Model. |
Point3f |
getPosition()
Answers the center point of the disk. |
float |
getRadius()
Gets the radius. |
Point3f |
modelPosition()
Answer the position where the receiver should be based on where its model is. |
static void |
setHeight(float newHeight)
Sets the absolute height. |
void |
setPosition(Point3f newPosition)
Sets the center point of the disk. |
void |
update(Observable o,
Object arg)
The model has changed and notifies the receiver. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DiskView(Disk aModel,
Point3f position,
int numberOfDisks,
BaseView aBaseView)
aModel - a Diskposition - relative positionnumberOfDisks - number of disks of the puzzleaBaseView - the view of the Base| Method Detail |
|---|
public static final float getHeight()
public static final void setHeight(float newHeight)
newHeight - the absolute heightpublic void disappear()
public BaseView getBaseView()
public BranchGroup getGroup()
public Disk getModel()
public Point3f getPosition()
public float getRadius()
public Point3f modelPosition()
public void setPosition(Point3f newPosition)
newPosition - the absolute coordinates of the disk's center
public void update(Observable o,
Object arg)
update in interface Observero - a Disk that changed its positionarg - ignored
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||