|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteasik.states.EasikState
easik.states.GetPathState
public class GetPathState
The GetPathState is a state which can be used to retrieve a single path from the user. It ensures that the only edges which are selectable are those which are attached to the previous edge.
Field Summary | |
---|---|
private boolean |
_finishState
Stores whether the next state is the finish state |
private boolean |
_nextState
Stores whether the next state is to add a new path |
private SketchPath |
_pathToReturn
The path created from the edges chosen |
private java.util.Map |
_selectable
Contains elements of the sketch that are selectable |
private java.util.Map |
_unselectable
Contains elements of the sketch that are not selectable |
Fields inherited from class easik.states.EasikState |
---|
_ourSketch |
Constructor Summary | |
---|---|
GetPathState(boolean next,
boolean finish)
Default Constructor |
Method Summary | |
---|---|
void |
cancelClicked()
If path collection has been cancelled, then pop off, and set the path to be null. |
void |
finishClicked()
When finish is clicked, the stack is popped off after an array containing the path is created. |
void |
nextClicked()
When next is clicked, pop off after preparing an array containing the edges in the path. |
void |
poppedOff()
When the state gets popped, then it should tell the new top item what path it had collected before being popped. |
void |
pushedOn()
When pushed on, the first thing done is clearing the selection and then disabling selection for all items except for edges. |
private void |
resetSelection()
Set everything to be selectable |
void |
selectionUpdated()
Update the selection so that the only selectable items will be those within reach of the existing edges. |
java.lang.String |
toString()
State string identifier. |
Methods inherited from class easik.states.EasikState |
---|
gotFocus, resetColors, setCancelButton, setFinishButton, setNextButton |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.util.Map _selectable
private java.util.Map _unselectable
private SketchPath _pathToReturn
private boolean _nextState
private boolean _finishState
Constructor Detail |
---|
public GetPathState(boolean next, boolean finish)
next
- Boolean determining whether the user shoulbe be allowed to select next on this round.
True if next could be selected, false otherwise.finish
- Boolean determining whether the user should be allowed to select finish on this round.
True if finish could be selected, false otherwise.Method Detail |
---|
public void pushedOn()
pushedOn
in class EasikState
public void selectionUpdated()
selectionUpdated
in class EasikState
public void poppedOff()
poppedOff
in class EasikState
public void cancelClicked()
cancelClicked
in class EasikState
public void nextClicked()
nextClicked
in class EasikState
public void finishClicked()
finishClicked
in class EasikState
public java.lang.String toString()
toString
in class EasikState
private void resetSelection()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |