org.ascape.view.nonvis
Class ConsoleOutView

java.lang.Object
  extended by org.ascape.model.event.DefaultScapeListener
      extended by org.ascape.view.nonvis.NonGraphicView
          extended by org.ascape.view.nonvis.DataView
              extended by org.ascape.view.nonvis.ConsoleOutView
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.EventListener, ScapeListener, HasName
Direct Known Subclasses:
StandardOutView

public class ConsoleOutView
extends DataView

A view providing basic system out reporting.

Since:
1.2
Version:
1.2 8/4/1999 first in
Author:
Miles Parker
See Also:
Serialized Form

Field Summary
static java.lang.String EOL
          The character(s) to use for end-of-line.
 
Fields inherited from class org.ascape.view.nonvis.DataView
dataSelection
 
Fields inherited from class org.ascape.model.event.DefaultScapeListener
listeningToScape, name, scape
 
Constructor Summary
ConsoleOutView()
           
 
Method Summary
 boolean isPrintResultsEachPeriod()
          Are results being printed to standard out every period? False by default.
 void print(java.lang.String string)
           
 void println()
           
 void println(java.lang.String string)
           
 java.lang.String resultsDescription()
          Prints the current model results to standard out.
 void scapeIterated(ScapeEvent scapeEvent)
          On update, if printing results on update, print the current results to the screen.
 void scapeStarted(ScapeEvent scapeEvent)
          On start, print the model settings to the console.
 void scapeStopped(ScapeEvent scapeEvent)
          On stop, print the time taken and final results to the screen.
 void setIMessageStream(IMessageStream consoleStream)
           
 void setPrintResultsEachPeriod(boolean printResultsEachPeriod)
          Should results be printed to standard out every period?.
 void setSystemStream()
           
 java.lang.String settingsDescription()
          Prints the current model settings to standard out.
 java.lang.String stopDescription()
          Stop description.
 
Methods inherited from class org.ascape.view.nonvis.DataView
getDataSelection, scapeAdded
 
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, scapeNotification, scapeRemoved, scapeSetup, setName, setNotifyScapeAutomatically, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EOL

public static java.lang.String EOL
The character(s) to use for end-of-line.

Constructor Detail

ConsoleOutView

public ConsoleOutView()
Method Detail

settingsDescription

public java.lang.String settingsDescription()
Prints the current model settings to standard out.

Returns:
the string

resultsDescription

public java.lang.String resultsDescription()
Prints the current model results to standard out.

Returns:
the string

isPrintResultsEachPeriod

public boolean isPrintResultsEachPeriod()
Are results being printed to standard out every period? False by default.

Returns:
true, if is print results each period

setPrintResultsEachPeriod

public void setPrintResultsEachPeriod(boolean printResultsEachPeriod)
Should results be printed to standard out every period?.

Parameters:
printResultsEachPeriod - true to print results each period, false to print results on stop only.

scapeStarted

public void scapeStarted(ScapeEvent scapeEvent)
On start, print the model settings to the console.

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

print

public void print(java.lang.String string)

println

public void println()

println

public void println(java.lang.String string)

scapeIterated

public void scapeIterated(ScapeEvent scapeEvent)
On update, if printing results on update, print the current results to the screen.

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

scapeStopped

public void scapeStopped(ScapeEvent scapeEvent)
On stop, print the time taken and final results to the screen.

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

stopDescription

public java.lang.String stopDescription()
Stop description.

Returns:
the string

setSystemStream

public void setSystemStream()

setIMessageStream

public void setIMessageStream(IMessageStream consoleStream)


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