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

Base class for windows for disturbance and planting event editing. More...

Inheritance diagram for sortie.gui.harvepplant.EditWindowBase:
sortie.gui.harvepplant.HarvestEdit sortie.gui.harvepplant.MortalityEpisodeEdit sortie.gui.harvepplant.PlantEdit

Public Member Functions

 EditWindowBase (DisplayWindowBase oWindow, String sTitle) throws ModelException
 Constructor. More...
 
void actionPerformed (ActionEvent oEvent)
 Responds to window events. More...
 

Static Public Attributes

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

Protected Member Functions

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

Protected Attributes

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

Detailed Description

Base class for windows for disturbance and planting event editing.

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

Author
Lora E. Murphy
Version
1.0
Edit history:
---------------—
May 28, 2013: Created (LEM)

Constructor & Destructor Documentation

◆ EditWindowBase()

sortie.gui.harvepplant.EditWindowBase.EditWindowBase ( DisplayWindowBase  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

◆ actionPerformed()

void sortie.gui.harvepplant.EditWindowBase.actionPerformed ( ActionEvent  oEvent)

Responds to window events.

Parameters
oEventEvent triggering this call.

◆ displayHarvest()

void sortie.gui.harvepplant.EditWindowBase.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.

◆ displayMortEpisode()

void sortie.gui.harvepplant.EditWindowBase.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.

◆ displayNextHarvest()

void sortie.gui.harvepplant.EditWindowBase.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.

◆ displayNextMortEpisode()

void sortie.gui.harvepplant.EditWindowBase.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.

◆ displayNextPlanting()

void sortie.gui.harvepplant.EditWindowBase.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.

◆ displayPlanting()

void sortie.gui.harvepplant.EditWindowBase.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.

◆ displayPreviousHarvest()

void sortie.gui.harvepplant.EditWindowBase.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.

◆ displayPreviousMortEpisode()

void sortie.gui.harvepplant.EditWindowBase.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.

◆ displayPreviousPlanting()

void sortie.gui.harvepplant.EditWindowBase.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.

◆ makeEventsDisplay()

JPanel sortie.gui.harvepplant.EditWindowBase.makeEventsDisplay ( )
protected

Display for harvests, mortality episodes, plantings.

Returns
Panel with controls

◆ makeTreeLegendPanel()

JPanel sortie.gui.harvepplant.EditWindowBase.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.

◆ refreshChart()

void sortie.gui.harvepplant.EditWindowBase.refreshChart ( ) throws ModelException
protected

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

Exceptions
ModelExceptionif the chart cannot be created.

◆ setUpCharting()

void sortie.gui.harvepplant.EditWindowBase.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

◆ LT_HARVEST_COLOR

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

Color for displaying harvests.

◆ LT_MORT_EPISODE_COLOR

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

Color for displaying mortality episode events.

◆ LT_PLANT_COLOR

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

Color for displaying plantings.

◆ m_fLengthXCells

float sortie.gui.harvepplant.EditWindowBase.m_fLengthXCells
protected

Length of cells in the X direction.

Children need to set this value.

◆ m_fLengthYCells

float sortie.gui.harvepplant.EditWindowBase.m_fLengthYCells
protected

Length of cells in the Y direction.

Children need to set this value.

◆ m_iCurrentEventDataIndex

int sortie.gui.harvepplant.EditWindowBase.m_iCurrentEventDataIndex = 4
protected

Current event definition data layer index in m_oDataset.mp_bData.

◆ m_iHarvestDataIndex

int sortie.gui.harvepplant.EditWindowBase.m_iHarvestDataIndex = 1
protected

Harvest data layer index in m_oDataset.mp_bData.

◆ m_iMortEpisodeDataIndex

int sortie.gui.harvepplant.EditWindowBase.m_iMortEpisodeDataIndex = 2
protected

Mortality episode data layer index in m_oDataset.mp_bData.

◆ m_iNumSpecies

int sortie.gui.harvepplant.EditWindowBase.m_iNumSpecies
protected

Total number of tree species.

◆ m_iNumTotalHarvestEvents

int sortie.gui.harvepplant.EditWindowBase.m_iNumTotalHarvestEvents
protected

Number of total harvest events that can be displayed.

◆ m_iNumTotalMortEpisodes

int sortie.gui.harvepplant.EditWindowBase.m_iNumTotalMortEpisodes
protected

Number of total mortality episodes that can be displayed.

◆ m_iNumTotalPlantingEvents

int sortie.gui.harvepplant.EditWindowBase.m_iNumTotalPlantingEvents
protected

Number of total planting events that can be displayed.

◆ m_iNumXCells

int sortie.gui.harvepplant.EditWindowBase.m_iNumXCells
protected

Number of X cells in the grid.

Children need to set this value.

◆ m_iNumYCells

int sortie.gui.harvepplant.EditWindowBase.m_iNumYCells
protected

Number of Y cells in the grid.

Children need to set this value.

◆ m_iPlantingDataIndex

int sortie.gui.harvepplant.EditWindowBase.m_iPlantingDataIndex = 3
protected

Planting data layer index in m_oDataset.mp_bData.

◆ m_jChartPanel

JPanel sortie.gui.harvepplant.EditWindowBase.m_jChartPanel = new JPanel()
protected

Panel container for the chart.

◆ m_jColor

Color sortie.gui.harvepplant.EditWindowBase.m_jColor
protected

Color for displaying selected cells.

Children need to set this value.

◆ m_jHarvestNumber

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

Label that displays the number of the current harvest event.

◆ m_jMortEpisodeNumber

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

Label that displays the number of the current mortality episode.

◆ m_jPlantNumber

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

Label that displays the number of the current planting event.

◆ m_oChart

org.jfree.chart.ChartPanel sortie.gui.harvepplant.EditWindowBase.m_oChart
protected

ChartPanel displaying the chart.

◆ m_oDataset

XYZSimpleDataset sortie.gui.harvepplant.EditWindowBase.m_oDataset
protected

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

◆ m_oParentDisplayWindow

DisplayWindowBase sortie.gui.harvepplant.EditWindowBase.m_oParentDisplayWindow
protected

Copy of the EpisodicEventsWindow object to exchange data with.

◆ m_oRenderer

XYSimpleCellRenderer sortie.gui.harvepplant.EditWindowBase.m_oRenderer = new XYSimpleCellRenderer()
protected

Renderer which displays current cell selections.


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