SORTIE Java Interface  1
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
sortie.gui.EpisodicEventsEditBase Class Reference

Base class for windows for episodic event editing. More...

Inheritance diagram for sortie.gui.EpisodicEventsEditBase:
sortie.gui.HarvestEdit sortie.gui.MortalityEpisodeEdit sortie.gui.PlantEdit

Public Member Functions

 EpisodicEventsEditBase (EpisodicEventsWindow oWindow, String sTitle) throws ModelException
 Constructor.
 
void actionPerformed (ActionEvent oEvent)
 Responds to window events.
 

Static Public Attributes

static final Color LT_HARVEST_COLOR = new Color(255, 175, 255)
 Color for displaying harvests.
 
static final Color LT_PLANT_COLOR = new Color(255, 255, 175)
 Color for displaying plantings.
 
static final Color LT_MORT_EPISODE_COLOR = new Color(175, 250, 250)
 Color for displaying mortality episode events.
 

Protected Member Functions

void setUpCharting () throws ModelException
 Sets up the data cell charting.
 
void refreshChart () throws ModelException
 Refreshes the chart to show the data currently held in the dataset.
 
JPanel makeTreeLegendPanel (TreePopulation oPop)
 Creates a tree legend panel.
 
JPanel makeEventsDisplay ()
 Display for harvests, mortality episodes, plantings.
 
void displayHarvest (HarvestData oHarvest) throws ModelException
 Causes a harvest event to be displayed in the window.
 
void displayMortEpisode (HarvestData oEpisode) throws ModelException
 Causes a mortality episode to be displayed in the window.
 
void displayPlanting (PlantingData oPlanting) throws ModelException
 Causes a planting event to be displayed in the window.
 
void displayNextHarvest () throws ModelException
 Displays the next harvest when the ">>" button is pressed.
 
void displayNextMortEpisode () throws ModelException
 Displays the next mortality episode when the next button is pressed.
 
void displayNextPlanting () throws ModelException
 Displays the next planting event when the ">>" button is pressed.
 
void displayPreviousHarvest () throws ModelException
 Displays the next harvest when the previous button is pressed.
 
void displayPreviousMortEpisode () throws ModelException
 Displays the next mortality episode when the previous button is pressed.
 
void displayPreviousPlanting () throws ModelException
 Displays the next plant event when the previous button is pressed.
 

Protected Attributes

EpisodicEventsWindow m_oEpisodicEventsWindow
 Copy of the EpisodicEventsWindow object to exchange data with.
 
XYSimpleCellRenderer m_oRenderer = new XYSimpleCellRenderer()
 Renderer which displays current cell selections.
 
XYZSimpleDataset m_oDataset
 Dataset of values that says whether a cell is currently selected (true) or not (false)
 
JPanel m_jChartPanel = new JPanel()
 Panel container for the chart.
 
org.jfree.chart.ChartPanel m_oChart
 ChartPanel displaying the chart.
 
java.awt.Color m_jColor
 Color for displaying selected cells.
 
float m_fLengthXCells
 Length of cells in the X direction.
 
float m_fLengthYCells
 Length of cells in the Y direction.
 
int m_iNumSpecies
 Total number of tree species.
 
int m_iNumXCells
 Number of X cells in the grid.
 
int m_iNumYCells
 Number of Y cells in the grid.
 
int m_iMortEpisodeDataIndex = 2
 Mortality episode data layer index in m_oDataset.mp_bData.
 
int m_iPlantingDataIndex = 3
 Planting data layer index in m_oDataset.mp_bData.
 
int m_iCurrentEventDataIndex = 4
 Current event definition data layer index in m_oDataset.mp_bData.
 
JLabel m_jHarvestNumber = new JLabel("0")
 Label that displays the number of the current harvest event.
 
JLabel m_jMortEpisodeNumber = new JLabel("0")
 Label that displays the number of the current mortality episode.
 
JLabel m_jPlantNumber = new JLabel("0")
 Label that displays the number of the current planting event.
 
int m_iNumTotalHarvestEvents
 Number of total harvest events that can be displayed.
 
int m_iNumTotalMortEpisodes
 Number of total mortality episodes that can be displayed.
 
int m_iNumTotalPlantingEvents
 Number of total planting events that can be displayed.
 

Private Attributes

int m_iHarvestDataIndex = 1
 Harvest data layer index in m_oDataset.mp_bData.
 

Detailed Description

Base class for windows for episodic event editing.

Copyright: Copyright (c) Charles D. Canham 2003 Company: Cary Institute of Ecosystem Studies

Author
Lora E. Murphy
Version
1.0
Edit history:
---------------—
February 4, 2008: Updated to conform to Java 6 compliance (LEM)
August 12, 2011: added support for changing grid cell resolution for harvest and episodic mortality (LEM)
October 11, 2011: Added display of other events (LEM)

Constructor & Destructor Documentation

sortie.gui.EpisodicEventsEditBase.EpisodicEventsEditBase ( EpisodicEventsWindow  oWindow,
String  sTitle 
) throws ModelException

Constructor.

Creates the window.

Parameters
oWindowObject to exchange data with.
sTitleWindow title.
Exceptions
ModelExceptionIf the window cannot be set up correctly.

Member Function Documentation

void sortie.gui.EpisodicEventsEditBase.actionPerformed ( ActionEvent  oEvent)

Responds to window events.

Parameters
oEventEvent triggering this call.
void sortie.gui.EpisodicEventsEditBase.displayHarvest ( HarvestData  oHarvest) throws ModelException
protected

Causes a harvest event to be displayed in the window.

Parameters
oHarvestHarvest to display, or NULL if no harvest is to be displayed.
Exceptions
ModelExceptionpassing through from called methods.
void sortie.gui.EpisodicEventsEditBase.displayMortEpisode ( HarvestData  oEpisode) throws ModelException
protected

Causes a mortality episode to be displayed in the window.

Parameters
oEpisodeMortality episode to display, or NULL if no episode is to be displayed.
Exceptions
ModelExceptionpassing through from called methods.
void sortie.gui.EpisodicEventsEditBase.displayNextHarvest ( ) throws ModelException
protected

Displays the next harvest when the ">>" button is pressed.

If the last harvest is being displayed, then nothing changes.

Exceptions
ModelExceptionPassing through from called methods.
void sortie.gui.EpisodicEventsEditBase.displayNextMortEpisode ( ) throws ModelException
protected

Displays the next mortality episode when the next button is pressed.

If the last episode is being displayed, then nothing changes.

Exceptions
ModelExceptionPassing through from called methods.
void sortie.gui.EpisodicEventsEditBase.displayNextPlanting ( ) throws ModelException
protected

Displays the next planting event when the ">>" button is pressed.

If the last planting is being displayed, then nothing changes.

Exceptions
ModelExceptionPassing through from called methods.
void sortie.gui.EpisodicEventsEditBase.displayPlanting ( PlantingData  oPlanting) throws ModelException
protected

Causes a planting event to be displayed in the window.

Planting events are displayed as a transparent texture - this allows harvests to display underneath.

Parameters
oPlantingPlanting to display, or NULL if no planting is to be displayed.
Exceptions
ModelExceptionpassing through from called methods.
void sortie.gui.EpisodicEventsEditBase.displayPreviousHarvest ( ) throws ModelException
protected

Displays the next harvest when the previous button is pressed.

If the first harvest is being displayed, then nothing changes.

Exceptions
ModelExceptionPassing through from called methods.
void sortie.gui.EpisodicEventsEditBase.displayPreviousMortEpisode ( ) throws ModelException
protected

Displays the next mortality episode when the previous button is pressed.

If the first episode is being displayed, then nothing changes.

Exceptions
ModelExceptionPassing through from called methods.
void sortie.gui.EpisodicEventsEditBase.displayPreviousPlanting ( ) throws ModelException
protected

Displays the next plant event when the previous button is pressed.

If the first planting is being displayed, then nothing changes.

Exceptions
ModelExceptionPassing through from called methods.
JPanel sortie.gui.EpisodicEventsEditBase.makeEventsDisplay ( )
protected

Display for harvests, mortality episodes, plantings.

Returns
Panel with controls
JPanel sortie.gui.EpisodicEventsEditBase.makeTreeLegendPanel ( TreePopulation  oPop)
protected

Creates a tree legend panel.

Parameters
oPopTreePopulation Tree population object, for querying for existence of trees.
Returns
JPanel Panel with tree legend on it.
void sortie.gui.EpisodicEventsEditBase.refreshChart ( ) throws ModelException
protected

Refreshes the chart to show the data currently held in the dataset.

Exceptions
ModelExceptionif the chart cannot be created.
void sortie.gui.EpisodicEventsEditBase.setUpCharting ( ) throws ModelException
protected

Sets up the data cell charting.

This creates the cell renderer and the chart, and places the chart in the chart panel.

Exceptions
ModelExceptionif the chart cannot be created.

Member Data Documentation

final Color sortie.gui.EpisodicEventsEditBase.LT_HARVEST_COLOR = new Color(255, 175, 255)
static

Color for displaying harvests.

final Color sortie.gui.EpisodicEventsEditBase.LT_MORT_EPISODE_COLOR = new Color(175, 250, 250)
static

Color for displaying mortality episode events.

final Color sortie.gui.EpisodicEventsEditBase.LT_PLANT_COLOR = new Color(255, 255, 175)
static

Color for displaying plantings.

float sortie.gui.EpisodicEventsEditBase.m_fLengthXCells
protected

Length of cells in the X direction.

Children need to set this value.

float sortie.gui.EpisodicEventsEditBase.m_fLengthYCells
protected

Length of cells in the Y direction.

Children need to set this value.

int sortie.gui.EpisodicEventsEditBase.m_iCurrentEventDataIndex = 4
protected

Current event definition data layer index in m_oDataset.mp_bData.

int sortie.gui.EpisodicEventsEditBase.m_iHarvestDataIndex = 1
private

Harvest data layer index in m_oDataset.mp_bData.

int sortie.gui.EpisodicEventsEditBase.m_iMortEpisodeDataIndex = 2
protected

Mortality episode data layer index in m_oDataset.mp_bData.

int sortie.gui.EpisodicEventsEditBase.m_iNumSpecies
protected

Total number of tree species.

int sortie.gui.EpisodicEventsEditBase.m_iNumTotalHarvestEvents
protected

Number of total harvest events that can be displayed.

int sortie.gui.EpisodicEventsEditBase.m_iNumTotalMortEpisodes
protected

Number of total mortality episodes that can be displayed.

int sortie.gui.EpisodicEventsEditBase.m_iNumTotalPlantingEvents
protected

Number of total planting events that can be displayed.

int sortie.gui.EpisodicEventsEditBase.m_iNumXCells
protected

Number of X cells in the grid.

Children need to set this value.

int sortie.gui.EpisodicEventsEditBase.m_iNumYCells
protected

Number of Y cells in the grid.

Children need to set this value.

int sortie.gui.EpisodicEventsEditBase.m_iPlantingDataIndex = 3
protected

Planting data layer index in m_oDataset.mp_bData.

JPanel sortie.gui.EpisodicEventsEditBase.m_jChartPanel = new JPanel()
protected

Panel container for the chart.

java.awt.Color sortie.gui.EpisodicEventsEditBase.m_jColor
protected

Color for displaying selected cells.

Children need to set this value.

JLabel sortie.gui.EpisodicEventsEditBase.m_jHarvestNumber = new JLabel("0")
protected

Label that displays the number of the current harvest event.

JLabel sortie.gui.EpisodicEventsEditBase.m_jMortEpisodeNumber = new JLabel("0")
protected

Label that displays the number of the current mortality episode.

JLabel sortie.gui.EpisodicEventsEditBase.m_jPlantNumber = new JLabel("0")
protected

Label that displays the number of the current planting event.

org.jfree.chart.ChartPanel sortie.gui.EpisodicEventsEditBase.m_oChart
protected

ChartPanel displaying the chart.

XYZSimpleDataset sortie.gui.EpisodicEventsEditBase.m_oDataset
protected

Dataset of values that says whether a cell is currently selected (true) or not (false)

EpisodicEventsWindow sortie.gui.EpisodicEventsEditBase.m_oEpisodicEventsWindow
protected

Copy of the EpisodicEventsWindow object to exchange data with.

XYSimpleCellRenderer sortie.gui.EpisodicEventsEditBase.m_oRenderer = new XYSimpleCellRenderer()
protected

Renderer which displays current cell selections.


The documentation for this class was generated from the following file: