org.ascape.view.nonvis
Class SweepControlView

java.lang.Object
  extended by org.ascape.model.event.DefaultScapeListener
      extended by org.ascape.view.nonvis.NonGraphicView
          extended by org.ascape.view.nonvis.SweepControlView
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.EventListener, ScapeListener, HasName

public class SweepControlView
extends NonGraphicView

A view that is used in conjunction with a sweep group to control model parameters. While sweep group continues to have a next parameter setting state, the sweep control view will restart the scape with the next sweep group settings.

Since:
1.9
Version:
1.9.2 8/1/00
Author:
Miles Parker
See Also:
SweepGroup, DataOutputView, Scape, Serialized Form

Field Summary
 
Fields inherited from class org.ascape.model.event.DefaultScapeListener
listeningToScape, name, scape
 
Constructor Summary
SweepControlView()
          Consturcts a new sweep view.
SweepControlView(java.lang.String name)
          Consturcts a new sweep view.
SweepControlView(SweepGroup sweep)
          Consturcts a new sweep view.
 
Method Summary
 SweepGroup getSweepGroup()
          Sets the runs per, or number of runs per each sweep setting.
 void scapeAdded(ScapeEvent scapeEvent)
          On scape add, set scape auto restart to false, as sweep view will be handling scape control.
 void scapeSetup(ScapeEvent scapeEvent)
          On scape setup, create a new file and set the output stream to write to it.
 void scapeStopped(ScapeEvent scapeEvent)
          On scape stop, close the data stream and files.
 void setSweepGroup(SweepGroup sweep)
          Returns the runs per, or number of runs per each sweep setting.
 java.lang.String toString()
          Returns a string describing this as a "Sweep Control View".
 
Methods inherited from class org.ascape.view.nonvis.NonGraphicView
isGraphic
 
Methods inherited from class org.ascape.model.event.DefaultScapeListener
clone, environmentQuiting, getName, getScape, isLifeOfScape, isNotifyScapeAutomatically, notifyScapeUpdated, scapeClosing, scapeDeserialized, scapeInitialized, scapeIterated, scapeNotification, scapeRemoved, scapeStarted, setName, setNotifyScapeAutomatically
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SweepControlView

public SweepControlView()
Consturcts a new sweep view.


SweepControlView

public SweepControlView(java.lang.String name)
Consturcts a new sweep view.

Parameters:
name - the sweep group name

SweepControlView

public SweepControlView(SweepGroup sweep)
Consturcts a new sweep view.

Parameters:
sweep - the sweep group that will be used for this sweep view.
Method Detail

scapeAdded

public void scapeAdded(ScapeEvent scapeEvent)
                throws java.util.TooManyListenersException
On scape add, set scape auto restart to false, as sweep view will be handling scape control.

Specified by:
scapeAdded in interface ScapeListener
Overrides:
scapeAdded in class DefaultScapeListener
Parameters:
scapeEvent - the scape event
Throws:
java.util.TooManyListenersException - the too many listeners exception

scapeSetup

public void scapeSetup(ScapeEvent scapeEvent)
On scape setup, create a new file and set the output stream to write to it.

Specified by:
scapeSetup in interface ScapeListener
Overrides:
scapeSetup in class DefaultScapeListener
Parameters:
scapeEvent - the scape event

scapeStopped

public void scapeStopped(ScapeEvent scapeEvent)
On scape stop, close the data stream and files. If you don't want the file closed on stop, override this method. Similarily, you could override onStart to open a new data stream.

Specified by:
scapeStopped in interface ScapeListener
Overrides:
scapeStopped in class DefaultScapeListener
Parameters:
scapeEvent - the scape event
See Also:
DataOutputView.scapeStarted(org.ascape.model.event.ScapeEvent), DataOutputView.scapeStopped(org.ascape.model.event.ScapeEvent)

getSweepGroup

public SweepGroup getSweepGroup()
Sets the runs per, or number of runs per each sweep setting.

Returns:
the sweep group

setSweepGroup

public void setSweepGroup(SweepGroup sweep)
Returns the runs per, or number of runs per each sweep setting.

Parameters:
sweep - the sweep

toString

public java.lang.String toString()
Returns a string describing this as a "Sweep Control View".

Overrides:
toString in class DefaultScapeListener
Returns:
the string


Copyright © 1998-2008 The Brookings Institution, NuTech Solutions, Metascape, LLC All Rights Reserved.