|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.pacbell.jfai.toh.ui.TowerOfHanoiEditor
public class TowerOfHanoiEditor
Provides apply/cancel editor functions for the bound properties of the Solver model.
| Field Summary | |
|---|---|
(package private) static Log |
LOG
The trace log. |
| Constructor Summary | |
|---|---|
TowerOfHanoiEditor(TowerOfHanoiView aView)
Creates an instance for the given view. |
|
| Method Summary | |
|---|---|
void |
applyChanges()
Commits all changes that have been made to buffered values. |
void |
cancelChanges()
Cancels all changes that have been made to buffered values. |
protected CanvasPanel |
getCanvasPanel()
Gets the panel with the drawing canvas. |
protected ControlPanel |
getControlPanel()
Gets the panel with the controls. |
protected Solver |
getModel()
Gets the model. |
int |
getNumberOfDisks()
Answers the number of disks. |
BufferedValue |
getNumberOfDisksModel()
Answers a buffered value for the number of disks for the puzzle. |
Pin |
getSourcePin()
Answers the source pin. |
BufferedValue |
getSourcePinModel()
Answers a buffered value for the source pin. |
protected StatusPanel |
getStatusPanel()
Gets the panel with the status information. |
Pin |
getTargetPin()
Answers the target pin. |
BufferedValue |
getTargetPinModel()
Answers a buffered value for the target pin. |
protected TowerOfHanoiView |
getView()
Gets the view. |
boolean |
isChanged()
Checks for pending configuration changes. |
void |
setModel(Solver newModel)
Hooks the receiver up to the bound properties of the new model. |
protected void |
setNumberOfDisks(int numDisks)
The model's number of disks has changed. |
protected void |
setSourcePin(Pin source)
The model's source pin has changed. |
protected void |
setTargetPin(Pin target)
The model's target pin has changed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final Log LOG
| Constructor Detail |
|---|
public TowerOfHanoiEditor(TowerOfHanoiView aView)
aView - the puzzle's view| Method Detail |
|---|
public void applyChanges()
This may be called outside of the event dispatch thread.
public void cancelChanges()
Assumes that this method is called in the event dispatch thread, e.g. when a cancel button was pressed.
public int getNumberOfDisks()
public BufferedValue getNumberOfDisksModel()
public Pin getSourcePin()
public BufferedValue getSourcePinModel()
public Pin getTargetPin()
public BufferedValue getTargetPinModel()
public boolean isChanged()
isChanged in interface IChangeStatusIChangeStatus.isChanged()public void setModel(Solver newModel)
newModel - the modelprotected CanvasPanel getCanvasPanel()
protected ControlPanel getControlPanel()
protected Solver getModel()
protected StatusPanel getStatusPanel()
protected TowerOfHanoiView getView()
protected void setNumberOfDisks(int numDisks)
Note: the implementation assumes that the object path of each DiskView has the same parent, the receiver's sceneTransformGroup.
numDisks - the number of disks of the puzzleprotected void setSourcePin(Pin source)
source - the source pinprotected void setTargetPin(Pin target)
target - the target pin
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||