|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.engine.BaseController
uchicago.src.sim.engine.AbstractGUIController
public abstract class AbstractGUIController
Base class for GUI controllers. This provides access to various dialogs and JPanels that can be used subclassses creating full-blown GUI controllers.
| Field Summary | |
|---|---|
static boolean |
ALPHA_ORDER
|
protected java.util.ArrayList |
chartModels
|
protected RepastConsole |
console
|
static boolean |
CONSOLE_ERR
|
static boolean |
CONSOLE_OUT
|
protected java.util.ArrayList |
customCharts
|
static boolean |
DEFAULTS_INCLUDE_RNGSEED
|
protected java.util.Vector |
mediaSchedulers
Lists of MediaSchedulers used to schedule media actions (taking snapshots etc.) |
protected java.lang.String[] |
myParams
Repast parameters. |
static boolean |
PROBE_ALPHA_ORDER
|
static boolean |
SHOW_CHARTS
|
static boolean |
UPDATE_PROBES
|
| Fields inherited from class uchicago.src.sim.engine.BaseController |
|---|
done, doStep, executeBegin, exitOnExit, go, isGui, listenerList, model, monitor, params, pauseActionsExecuted, pauseAt, pauseAtAction, pauseSim, persistentObj, runFinished, runThread, schedule, simRun, sleepValue, time |
| Constructor Summary | |
|---|---|
AbstractGUIController()
Constructs an AbstractGUIController with no associated model, or parameters. |
|
AbstractGUIController(ParameterSetter parameters)
Constructs a AbstractGUIController whose model has the specified parameters. |
|
| Method Summary | |
|---|---|
void |
beginModel()
Executes begin() on the SimModel associated with this AbstractGUIController. |
void |
enableManipulation(boolean enable)
Enables the user customized actions. |
void |
exitSim()
Exits the simulation. |
void |
exitSimulation()
Exits the simulation. |
boolean |
getConsoleErr()
|
boolean |
getConsoleOut()
|
IntrospectPanel |
getModelParameterPanel()
Creates an IntrospectPanel that contains the parameters this AbstractGUIController's SimModel. |
IntrospectPanel |
getRepastParameterPanel()
Creates an IntrospectPanel that contains the parameters for all repast models. |
long |
getRunCount()
Returns the current run count. |
boolean |
isBatch()
Is this a BatchController. |
boolean |
isGUI()
Returns true; |
void |
loadAndStart()
Loads any default parameters and starts the simulation. |
void |
makeCurrentParamsDefault()
Makes the SimModel's current parameters the default parameters. |
protected void |
onTickCountUpdate()
Updates the tick clock whenever the tick count is incremented |
void |
pauseSimulation()
Pauses the simulation. |
void |
setConsoleErr(boolean err)
|
void |
setConsoleOut(boolean out)
|
void |
setModel(SimModel model)
Sets the model that is controlled by this Controller. |
protected void |
setParameters()
Sets the parameters of this AbstractGUIController's SimModel to their default values, if any. |
void |
setup()
Sets up this controller and is associated SimModel prior to a model run. |
void |
showChartDialog(javax.swing.JFrame f)
Displays a dialog for creating custom charts. |
void |
showLoadModelDialog(javax.swing.JFrame frame)
Displays the LoadModelDialog and loads the selected SimModel. |
void |
showMakeMovieDialog(javax.swing.JFrame frame)
Displays a dialog for creating movies of the simulation. |
javax.swing.Action |
showSnapshotDialog(javax.swing.JFrame f)
Displays the dialog for taking snapshot images. |
void |
showVersion()
Displays a message box showing the version number of repast. |
void |
showWriteParamsDialog(javax.swing.JFrame f)
Displays a dialog for writing the SimModel's parameters to a file. |
void |
shutdown()
Exits the simulation but does not exit the jvm. |
void |
simEventPerformed(SimEvent evt)
Invoked by a source on which this is a listener when a SimEvent is fired. |
void |
stepSim()
Steps the simulation through one iteration of execution. |
void |
stopSimulation()
Stops the simulation. |
| Methods inherited from class uchicago.src.sim.engine.BaseController |
|---|
addSimEventListener, fireSimEvent, getCellDepth, getCellHeight, getCellWidth, getCurrentTime, getDefaultModelParameters, getExitOnExit, getModel, getModelParameters, getPauseAt, getPersistentObj, getRandomSeed, getSchedule, notifyMonitor, pauseSim, putPersistentObj, removeSimEventListener, setCellDepth, setCellHeight, setCellWidth, setExitOnExit, setPauseAt, setRandomSeed, setSchedule, setupSchedule, startSim, stopSim |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean SHOW_CHARTS
public static boolean PROBE_ALPHA_ORDER
public static boolean ALPHA_ORDER
public static boolean CONSOLE_OUT
public static boolean CONSOLE_ERR
public static boolean DEFAULTS_INCLUDE_RNGSEED
public static boolean UPDATE_PROBES
protected java.lang.String[] myParams
protected java.util.Vector mediaSchedulers
protected java.util.ArrayList chartModels
protected java.util.ArrayList customCharts
protected RepastConsole console
| Constructor Detail |
|---|
public AbstractGUIController()
public AbstractGUIController(ParameterSetter parameters)
parameters - default values for the model's parameters| Method Detail |
|---|
public void setConsoleOut(boolean out)
public boolean getConsoleOut()
public void setConsoleErr(boolean err)
public boolean getConsoleErr()
public void setModel(SimModel model)
setModel in interface IControllersetModel in class BaseControllermodel - the model associated with this BaseControllerpublic void showLoadModelDialog(javax.swing.JFrame frame)
frame - the parent frame for the LoadModelDialogpublic void beginModel()
beginModel in class BaseControllerpublic void stepSim()
public void loadAndStart()
public void setup()
public void exitSim()
public void shutdown()
protected void onTickCountUpdate()
onTickCountUpdate in class BaseControllerpublic void enableManipulation(boolean enable)
enable - public void stopSimulation()
public void pauseSimulation()
public void exitSimulation()
protected void setParameters()
public IntrospectPanel getModelParameterPanel()
public IntrospectPanel getRepastParameterPanel()
public javax.swing.Action showSnapshotDialog(javax.swing.JFrame f)
f - the parent frame for the dialog
public void showMakeMovieDialog(javax.swing.JFrame frame)
frame - the parent frame for the dialogpublic void showVersion()
public void makeCurrentParamsDefault()
public void showWriteParamsDialog(javax.swing.JFrame f)
f - the parent frame for this dialogpublic void showChartDialog(javax.swing.JFrame f)
f - public void simEventPerformed(SimEvent evt)
SimEvent is fired. Controller listens
for stop, end, and rng_seed events. Stop will stop the
simulation, end will end the simluation and an rng_seed event
will update the model panel with the new rng seed value.
public long getRunCount()
public boolean isGUI()
public boolean isBatch()
BaseController
isBatch in interface IControllerisBatch in class BaseController
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||