|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ascape.model.event.DefaultScapeListener org.ascape.view.nonvis.ScapeTransitionListener
public class ScapeTransitionListener
A listener providing notification when a scape transitions from one state to another. For example, when a scape was paused and is now resumed, an apporiate method will be called. Additionally, this view also guarantees that updateTransitions of the view at least 6 times a second regardless of the nature of the scape notification. This will allow pauses and resumes to be noticed in time to immediately alert the user, regardless of what is happening with the model.
Field Summary | |
---|---|
protected boolean |
lastScapeAppearsPaused
Did the scape appear to be paused last iteration?. |
Fields inherited from class org.ascape.model.event.DefaultScapeListener |
---|
listeningToScape, name, scape |
Constructor Summary | |
---|---|
ScapeTransitionListener()
Constructs the control view, creating and laying out its components. |
|
ScapeTransitionListener(java.lang.String name)
Constructs the speed slider view. |
Method Summary | |
---|---|
void |
environmentNowNoScape()
Environment now no scape. |
void |
environmentNowScape()
Environment now scape. |
boolean |
isLifeOfScape()
Returns true if the listener is intended to be used only for the current scape; in this case returns false because control views typically will exist for multiple scapes. |
void |
scapeAdded(ScapeEvent scapeEvent)
Called on interation; delays models return by delay slider setting. |
void |
scapeNotification(ScapeEvent scapeEvent)
Notifies this view that something has happened on the scape. |
void |
scapeNowPaused()
Scape now paused. |
void |
scapeNowResumed()
Scape now resumed. |
void |
scapeNowRunning()
Scape now running. |
void |
scapeNowSteppable()
Scape now steppable. |
void |
scapeNowStopped()
Scape now stopped. |
void |
scapeRemoved(ScapeEvent scapeEvent)
Called on interation; delays models return by delay slider setting. |
void |
updateTransitions()
Update the components. |
Methods inherited from class org.ascape.model.event.DefaultScapeListener |
---|
clone, environmentQuiting, getName, getScape, isGraphic, isNotifyScapeAutomatically, notifyScapeUpdated, scapeClosing, scapeDeserialized, scapeInitialized, scapeIterated, scapeSetup, scapeStarted, scapeStopped, setName, setNotifyScapeAutomatically, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected boolean lastScapeAppearsPaused
Constructor Detail |
---|
public ScapeTransitionListener()
public ScapeTransitionListener(java.lang.String name)
name
- a user relevant name for this viewMethod Detail |
---|
public void scapeNowRunning()
public void scapeNowStopped()
public void scapeNowPaused()
public void scapeNowResumed()
public void scapeNowSteppable()
public void environmentNowScape()
public void environmentNowNoScape()
public void scapeAdded(ScapeEvent scapeEvent) throws java.util.TooManyListenersException
scapeAdded
in interface ScapeListener
scapeAdded
in class DefaultScapeListener
scapeEvent
- the scape event
java.util.TooManyListenersException
- the too many listeners exceptionpublic void scapeRemoved(ScapeEvent scapeEvent)
scapeRemoved
in interface ScapeListener
scapeRemoved
in class DefaultScapeListener
scapeEvent
- the scape eventscapeAdded
public void updateTransitions()
public boolean isLifeOfScape()
isLifeOfScape
in interface ScapeListener
isLifeOfScape
in class DefaultScapeListener
public void scapeNotification(ScapeEvent scapeEvent)
scapeNotification
in interface ScapeListener
scapeNotification
in class DefaultScapeListener
scapeEvent
- a scape event update
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |