Inheritance diagram for datavisualizer::DetailedOutputLegend:
Public Member Functions | |
DetailedOutputLegend (DetailedOutputFileManager oManager, String sTitle, String[] p_sSpeciesNames, int iMaxTimesteps) throws ModelException | |
Constructor. | |
void | actionPerformed (ActionEvent e) |
Responds to button presses. | |
void | GoToTimestep (int iTimestep) throws javawrapper. ModelException |
Changes the display to the desired timestep. | |
int | GetNumberOfTimesteps () |
Gets the number of timesteps contained in this detailed output file. | |
void | SetNumberOfTimesteps (int iNumTimesteps) |
Updates the legend with a new maximum number of timesteps. | |
int | GetCurrentTimestep () |
Gets the timestep currently being displayed. | |
Package Functions | |
DetailedOutputFileManager | GetDetailedOutputFileManager () |
Gets the file manager for this detailed output file. | |
Private Member Functions | |
void | Step (int iDirection) throws ModelException |
Steps the model in the desired direction. | |
void | Jump () throws ModelException |
Jumps the model to the timestep indicated in m_jJumpToTimestepField. | |
void | Run (int iDirection) throws ModelException |
Runs the detailed output file continuously through the timesteps. | |
Private Attributes | |
JLabel | m_jCurrentTimestepLabel = new JLabel() |
Label displaying current timestep. | |
JTextField | m_jRateField = new JTextField("1") |
Field for the rate at which to step or run through the detailed output file. | |
JTextField | m_jJumpToTimestepField = new JTextField("0") |
Field for the user to enter a particular timestep to jump to. | |
int | m_iCurrentTimestep |
The timestep of the data currently being displayed. | |
int | m_iMaxTimestep |
The maximum timestep for this file. | |
boolean | m_bStop = false |
Flag for whether to stop when the file is running through timesteps. | |
boolean | m_bRunning = false |
Flag for whether or not we're currently running. | |
Static Private Attributes | |
static final int | FORWARD = 1 |
Flag for moving forward through timesteps. | |
static final int | BACKWARD = 2 |
Flag for moving backward through timesteps. |
Copyright: Copyright (c) Charles D. Canham 2003
Company: Institute of Ecosystem Studies
datavisualizer::DetailedOutputLegend::DetailedOutputLegend | ( | DetailedOutputFileManager | oManager, | |
String | sTitle, | |||
String[] | p_sSpeciesNames, | |||
int | iMaxTimesteps | |||
) | throws ModelException [inline] |
Constructor.
oManager | Parent detailed output file manager. | |
sTitle | Title to display in window. | |
p_sSpeciesNames | List of species names. | |
iMaxTimesteps | Maximum number of timesteps in this detailed output file. |
ModelException | If there is a problem drawing the window. |
void datavisualizer::DetailedOutputLegend::actionPerformed | ( | ActionEvent | e | ) | [inline] |
Responds to button presses.
e | ActionEvent |
int datavisualizer::DetailedOutputLegend::GetCurrentTimestep | ( | ) | [inline] |
Gets the timestep currently being displayed.
DetailedOutputFileManager datavisualizer::DetailedOutputLegend::GetDetailedOutputFileManager | ( | ) | [inline, package] |
Gets the file manager for this detailed output file.
int datavisualizer::DetailedOutputLegend::GetNumberOfTimesteps | ( | ) | [inline] |
Gets the number of timesteps contained in this detailed output file.
void datavisualizer::DetailedOutputLegend::GoToTimestep | ( | int | iTimestep | ) | throws javawrapper. ModelException [inline] |
Changes the display to the desired timestep.
If the requested timestep is beyond the boundaries of possible timesteps, nothing happens.
iTimestep | int Timestep to display. |
ModelException | if there is a problem updating charts. |
void datavisualizer::DetailedOutputLegend::Jump | ( | ) | throws ModelException [inline, private] |
Jumps the model to the timestep indicated in m_jJumpToTimestepField.
ModelException | if the value in the jump to field is not a positive number. |
void datavisualizer::DetailedOutputLegend::Run | ( | int | iDirection | ) | throws ModelException [inline, private] |
Runs the detailed output file continuously through the timesteps.
It will jump at the rate specified in the m_jRateField field. This will put the running in a separate thread so we can listen if the user wants to stop.
iDirection | int Direction to run in, either FORWARD or BACKWARD. |
ModelException | if the value in the rate field is not a positive number. |
void datavisualizer::DetailedOutputLegend::SetNumberOfTimesteps | ( | int | iNumTimesteps | ) | [inline] |
Updates the legend with a new maximum number of timesteps.
iNumTimesteps | int The new maximum number of timesteps. |
void datavisualizer::DetailedOutputLegend::Step | ( | int | iDirection | ) | throws ModelException [inline, private] |
Steps the model in the desired direction.
The model will be stepped the number of timesteps indicated in the rate field.
iDirection | int Either FORWARD or BACKWARD. |
ModelException | if the value in the rate field is not a positive number. |