|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ascape.model.event.DefaultScapeListener
org.ascape.view.nonvis.NonGraphicView
org.ascape.view.nonvis.ScapeStateView
public class ScapeStateView
A view 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 updateScapeGraphics 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 immediatly 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 | |
|---|---|
ScapeStateView()
|
|
| Method Summary | |
|---|---|
void |
environmentNowNoScape()
Environment now no scape. |
void |
environmentNowScape()
Environment now scape. |
protected long |
getLastUpdateInMillis()
|
protected long |
getMaxMillisBetweenUpdates()
|
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. |
protected void |
setLastUpdateInMillis(long lastUpdateInMillis)
|
protected void |
setMaxMillisBetweenUpdates(long maxMillisBetweenUpdates)
|
void |
updateScapeState()
Allow for overriding thread implementations. |
void |
updateScapeStateImpl()
Update the components. |
| Methods inherited from class org.ascape.view.nonvis.NonGraphicView |
|---|
isGraphic |
| Methods inherited from class org.ascape.model.event.DefaultScapeListener |
|---|
clone, environmentQuiting, getName, getScape, 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 ScapeStateView()
| Method 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 ScapeListenerscapeAdded in class DefaultScapeListenerscapeEvent - the scape event
java.util.TooManyListenersException - the too many listeners exceptionpublic void scapeRemoved(ScapeEvent scapeEvent)
scapeRemoved in interface ScapeListenerscapeRemoved in class DefaultScapeListenerscapeEvent - the scape eventscapeAddedpublic void updateScapeState()
public void updateScapeStateImpl()
public boolean isLifeOfScape()
isLifeOfScape in interface ScapeListenerisLifeOfScape in class DefaultScapeListenerpublic void scapeNotification(ScapeEvent scapeEvent)
scapeNotification in interface ScapeListenerscapeNotification in class DefaultScapeListenerscapeEvent - a scape event updateprotected long getLastUpdateInMillis()
protected void setLastUpdateInMillis(long lastUpdateInMillis)
protected long getMaxMillisBetweenUpdates()
protected void setMaxMillisBetweenUpdates(long maxMillisBetweenUpdates)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||