Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ascape.model.event
Interface ScapeListener

All Superinterfaces:
  java.lang.Cloneable, java.util.EventListener, HasName

All Known Subinterfaces:
  ScapeCustomizer

All Known Implementing Classes:
  AbstractUIEnvironment, AgentView, BasicModel, BasicMovementModel, CellView, ChartView, City, City3D, ConsoleOutView, DataOutputView, DataView, DefaultScapeListener, DemographicPrisonersDilemma, DemographicPrisonersDilemma3D, EditPartFactoryScapeView, EditPartScapeView, EMFDataOutputView, Epidemic, Epidemic, Epidemic, Epidemic3D, Epidemic3D, Epidemic3D, Epidemic3DTiles, EpidemicPeriods, FixedAgentStretchyView, FixedStretchyView, GAS_Base, GEF3DView, GEFView, GraphicsView, GraphView, Heatbugs, Heatbugs3D, Heatbugs3DCustom, HostedAgentView, Markets, Markets3D, ModelScapeView, ModelWrapperScapeListener, MovingStretchyView, NonGraphicView, NonGraphicViewDelegate, Overhead2DContinuousView, Overhead2DView, Overhead2DView, OverheadRelative2DView, ParameterControlView, Plot2DView, Query, Region, Region3D, RuntimeEnvironment, Scape, ScapeFromFileView, ScapeFromXMLView, ScapeListenerDelegate, ScapeOutputView, ScapeStateView, ScapeTransitionListener, Scrolling1DView, SimplexView, SpatialModel, StandardOutView, StretchyView, StupidModel1, StupidModel13D, StupidModel2, StupidModel23D, StupidModel3, StupidModel33D, StupidModel5, StupidModel53D, SweepControlView, WikiExample, WikiExample3D

    public interface ScapeListener

extends java.util.EventListener, HasName, java.lang.Cloneable

A listener to an agent scape. When a scape is updated, it is the listener's responsility to update itself, and then inform the scape that updating is finished, so that the scape can continue iterating through its rules.

Since:
  1.0
Version:
  2.9.1
Author:
  Miles Parker
See Also:
  `DefaultScapeListener`, `ScapeListenerDelegate`

Method Summary
`java.lang.Object` | `clone()` Require public access for clone.
`void` | `environmentQuiting(ScapeEvent scapeEvent)` Method called as the environment is about to quit.
`Scape` | `getScape()` Returns the Scape being viewed.
`boolean` | `isGraphic()` Returns true if the listener is a graphical user interface component.
`boolean` | `isLifeOfScape()` Returns true if the listener is intended to be used only for the current scape; typical of all but control related listeners.
`void` | `scapeAdded(ScapeEvent scapeEvent)` Notifies the listener that the scape has added it.
`void` | `scapeClosing(ScapeEvent scapeEvent)` Method called as the scape is about to be closed.
`void` | `scapeDeserialized(ScapeEvent scapeEvent)` Method called immediatly after a model is deserialized.
`void` | `scapeInitialized(ScapeEvent scapeEvent)` Called immediatly after the scape is initialized.
`void` | `scapeIterated(ScapeEvent scapeEvent)` Called immediatly after scape is iterated.
`void` | `scapeNotification(ScapeEvent scapeEvent)` Informs the listener that the agent scape has some kind of notification for the listener,.
`void` | `scapeRemoved(ScapeEvent scapeEvent)` Removes the scape from this view.
`void` | `scapeSetup(ScapeEvent scapeEvent)` Method called when the scape is ready for setup.
`void` | `scapeStarted(ScapeEvent scapeEvent)` Called immediatly after the scape is started.
`void` | `scapeStopped(ScapeEvent scapeEvent)` Called immediatly after the scape is stopped.

Methods inherited from interface org.ascape.util.HasName
`getName`

Method Detail

### scapeInitialized

    void scapeInitialized(ScapeEvent scapeEvent)

  Called immediatly after the scape is initialized.

  Parameters:
    `scapeEvent` - the scape event

### scapeStarted

    void scapeStarted(ScapeEvent scapeEvent)

  Called immediatly after the scape is started.

  Parameters:
    `scapeEvent` - the scape event

### scapeStopped

    void scapeStopped(ScapeEvent scapeEvent)

  Called immediatly after the scape is stopped.

  Parameters:
    `scapeEvent` - the scape event

### scapeIterated

    void scapeIterated(ScapeEvent scapeEvent)

  Called immediatly after scape is iterated.

  Parameters:
    `scapeEvent` - the scape event

### scapeSetup

    void scapeSetup(ScapeEvent scapeEvent)

  Method called when the scape is ready for setup. That is, the scape has been created (or it has just finished its previous run) but it has not yet been initialized. This is an appropriate place to change model paramters, persent user's with options, etc.

  Parameters:
    `scapeEvent` - the scape event

### scapeClosing

    void scapeClosing(ScapeEvent scapeEvent)

  Method called as the scape is about to be closed. Allows any final view cleanup.

  Parameters:
    `scapeEvent` - the scape event

### environmentQuiting

    void environmentQuiting(ScapeEvent scapeEvent)

  Method called as the environment is about to quit. Note that this method may not actually be called by a scape at all. Allows any final view cleanup.

  Parameters:
    `scapeEvent` - the scape event

### scapeDeserialized

    void scapeDeserialized(ScapeEvent scapeEvent)

  Method called immediatly after a model is deserialized.

  Parameters:
    `scapeEvent` - the scape event

### scapeNotification

    void scapeNotification(ScapeEvent scapeEvent)

  Informs the listener that the agent scape has some kind of notification for the listener,.

  Parameters:
    `scapeEvent` - the scape setup event

### scapeAdded

    void scapeAdded(ScapeEvent scapeEvent)
                    throws java.util.TooManyListenersException

  Notifies the listener that the scape has added it. This is in affect a call back from the scape after adding the listener. At this point, the listener is responsible for responding back to the scape upon any notifications. A listener typically has one and only one scape, see below. A "good citizen" listener will typically make certain that it isn't added to more than one scape at a time, but one can also imagine cases where a listener might be interested in the activities of many scapes and this would be a perfectly legitimate usage pattern.

  Parameters:
    `scapeEvent` - the scape add event
  Throws:
    `java.util.TooManyListenersException` - the too many listeners exception

### scapeRemoved

    void scapeRemoved(ScapeEvent scapeEvent)

  Removes the scape from this view. Typically there should ony be one scape to remove. This method must be called whenever a listener is destroyed or becomes unresponsive; otherwise the model will wait indefinetly for the listener's updated response.

  Parameters:
    `scapeEvent` - the scape removed event
  See Also:
    `scapeAdded`

### isGraphic

    boolean isGraphic()

  Returns true if the listener is a graphical user interface component.

  Returns:
    true, if is graphic

### isLifeOfScape

    boolean isLifeOfScape()

  Returns true if the listener is intended to be used only for the current scape; typical of all but control related listeners.

  Returns:
    true, if is life of scape

### getScape

    Scape getScape()

  Returns the Scape being viewed.

  Returns:
    the scape

### clone

    java.lang.Object clone()

  Require public access for clone.

  Returns:
    the object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD