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

Provides a base class with common methods for display of current specifications for harvest, episodic mortality, and planting. More...

Inheritance diagram for sortie.gui.harvepplant.DisplayWindowBase:
sortie.gui.harvepplant.HarvestDisplayWindow sortie.gui.harvepplant.MortalityEpisodeDisplayWindow sortie.gui.harvepplant.PlantingDisplayWindow

Classes

enum  windowType
 

Public Member Functions

 DisplayWindowBase (JFrame oOwner, DisturbanceBehaviors oDisturbanceBehaviors, PlantingBehaviors oPlantBehaviors, String sWindowTitle, windowType iWinType) throws ModelException
 Constructor. More...
 
void actionPerformed (ActionEvent oEvent)
 Responds to window events. More...
 
TreePopulation getTreePopulation ()
 Gets access to the tree population for benefit of child windows. More...
 
HelpBroker getHelpBroker ()
 Gets access to the HelpBroker object for benefit of child windows. More...
 

Static Public Attributes

static final Color HARVEST_COLOR = new Color(255, 100, 255)
 Color for displaying harvests. More...
 
static final Color PLANT_COLOR = new Color(255, 255, 100)
 Color for displaying plantings. More...
 
static final Color MORTALITY_EPISODE_COLOR = new Color(150, 225, 225)
 Color for displaying mortality episode events. More...
 

Protected Member Functions

void setUpCharting (windowType iWinType) throws ModelException
 Sets up the chart and displays any trees. More...
 
void replaceChart ()
 Replace the chart when it needs to be refreshed. More...
 
void makeTreeDatasetAndRenderer () throws ModelException
 Create the dataset and renderer for the trees. More...
 
void getPlotAndGridInfo (windowType iWinType) throws ModelException
 Gets information on the plot and the grids. More...
 
JPanel makeLegendPanel () throws ModelException
 Creates a legend panel. More...
 
JDialog sizeChildWindow (JDialog jChildWindow)
 Sizes a child window to fit within the bounds of this window. More...
 
void addFinishedData () throws ModelException
 Takes the final data and adds it back to the behavior groups. More...
 

Protected Attributes

DefaultXYZDataset m_oTreeDataset = new DefaultXYZDataset()
 A dataset for trees, one series for each species. More...
 
XYTreeRenderer m_oTreeRenderer
 Renderer for displaying the trees along with episodic event data. More...
 
XYPlot m_oPlot = new XYPlot()
 Plot object for rendering events. More...
 
XYZSimpleDataset m_oDataset
 Dataset for displaying harvest events - controls which cells show up which color. More...
 
XYSimpleCellRenderer m_oRenderer = new XYSimpleCellRenderer()
 Renderer for displaying harvest events. More...
 
DisturbanceBehaviors m_oDisturbanceBehaviors
 DisturbanceBehaviors object to exchange data with. More...
 
PlantingBehaviors m_oPlantBehaviors
 PlantingBehaviors object to exchange data with. More...
 
ArrayList< HarvestDatamp_oHarvestData = new ArrayList<HarvestData>(0)
 Copy of harvest data to display. More...
 
ArrayList< HarvestDatamp_oMortEpisodeData = new ArrayList<HarvestData>(0)
 Copy of mortality episode data to display. More...
 
ArrayList< PlantingDatamp_oPlantingData = new ArrayList<PlantingData>(0)
 Copy of planting data to display. More...
 
JPanel m_jChartPanel = new JPanel()
 Panel displaying the chart. More...
 
Dimension m_jParentSize
 Size of the parent calling window - so we can make sure children fit within this. More...
 
float m_fLengthXCells
 Length of grid cells in the X direction. More...
 
float m_fLengthYCells
 Length of grid cells in the Y direction. 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_iPlotLengthX
 Length of the plot in the X direction, in meters. More...
 
int m_iPlotLengthY
 Length of the plot in the Y direction, in meters. More...
 
int m_iNumSpecies
 Number of species. More...
 

Private Attributes

String m_sHelpID = "windows.episodic_events_window"
 Help ID string. More...
 

Detailed Description

Provides a base class with common methods for display of current specifications for harvest, episodic mortality, and planting.

Copyright: Copyright (c) Charles D. Canham 2013

Company: Cary Institute of Ecosystem Studies

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

Constructor & Destructor Documentation

◆ DisplayWindowBase()

sortie.gui.harvepplant.DisplayWindowBase.DisplayWindowBase ( JFrame  oOwner,
DisturbanceBehaviors  oDisturbanceBehaviors,
PlantingBehaviors  oPlantBehaviors,
String  sWindowTitle,
windowType  iWinType 
) throws ModelException

Constructor.

Builds the window.

Parameters
oOwnerOwner window for this dialog.
oDisturbanceBehaviorsDisturbanceBehaviors object to exchange data with.
oPlantBehaviorsPlantingBehaviors object to exchange data with.
sWindowTitleTitle for the window.
iWinTypeA value from the enum windowType saying what kind of window this is.
Exceptions
ModelExceptionpassing through from called methods.

Member Function Documentation

◆ actionPerformed()

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

Responds to window events.

Parameters
oEventEvent triggering this call.

◆ addFinishedData()

void sortie.gui.harvepplant.DisplayWindowBase.addFinishedData ( ) throws ModelException
protected

Takes the final data and adds it back to the behavior groups.

This takes the contents of mp_oHarvestData, mp_oMortEpisodeData, and mp_oPlantingData, and puts them back into the parent behavior groups. Then, if there is a set of data for any of the behaviors, it makes sure that they are enabled.

◆ getHelpBroker()

HelpBroker sortie.gui.harvepplant.DisplayWindowBase.getHelpBroker ( )

Gets access to the HelpBroker object for benefit of child windows.

Returns
HelpBroker object.

◆ getPlotAndGridInfo()

void sortie.gui.harvepplant.DisplayWindowBase.getPlotAndGridInfo ( windowType  iWinType) throws ModelException
protected

Gets information on the plot and the grids.

Parameters
iWinTypeA value from the enum windowType saying what kind of window this is.
Exceptions
ModelExceptionpassing through from called methods.

◆ getTreePopulation()

TreePopulation sortie.gui.harvepplant.DisplayWindowBase.getTreePopulation ( )

Gets access to the tree population for benefit of child windows.

Returns
TreePopulation object.

◆ makeLegendPanel()

JPanel sortie.gui.harvepplant.DisplayWindowBase.makeLegendPanel ( ) throws ModelException
protected

Creates a legend panel.

Exceptions
ModelExceptionpassing through from called methods.

◆ makeTreeDatasetAndRenderer()

void sortie.gui.harvepplant.DisplayWindowBase.makeTreeDatasetAndRenderer ( ) throws ModelException
protected

Create the dataset and renderer for the trees.

◆ replaceChart()

void sortie.gui.harvepplant.DisplayWindowBase.replaceChart ( )
protected

Replace the chart when it needs to be refreshed.

◆ setUpCharting()

void sortie.gui.harvepplant.DisplayWindowBase.setUpCharting ( windowType  iWinType) throws ModelException
protected

Sets up the chart and displays any trees.

Exceptions
ModelExceptionshould not be thrown.

◆ sizeChildWindow()

JDialog sortie.gui.harvepplant.DisplayWindowBase.sizeChildWindow ( JDialog  jChildWindow)
protected

Sizes a child window to fit within the bounds of this window.

Parameters
jChildWindowJDialog The window to size.
Returns
JDialog The sized window.

Member Data Documentation

◆ HARVEST_COLOR

final Color sortie.gui.harvepplant.DisplayWindowBase.HARVEST_COLOR = new Color(255, 100, 255)
static

Color for displaying harvests.

◆ m_fLengthXCells

float sortie.gui.harvepplant.DisplayWindowBase.m_fLengthXCells
protected

Length of grid cells in the X direction.

◆ m_fLengthYCells

float sortie.gui.harvepplant.DisplayWindowBase.m_fLengthYCells
protected

Length of grid cells in the Y direction.

◆ m_iNumSpecies

int sortie.gui.harvepplant.DisplayWindowBase.m_iNumSpecies
protected

Number of species.

◆ m_iNumXCells

int sortie.gui.harvepplant.DisplayWindowBase.m_iNumXCells
protected

Number of X cells in the grid.

◆ m_iNumYCells

int sortie.gui.harvepplant.DisplayWindowBase.m_iNumYCells
protected

Number of Y cells in the grid.

◆ m_iPlotLengthX

int sortie.gui.harvepplant.DisplayWindowBase.m_iPlotLengthX
protected

Length of the plot in the X direction, in meters.

◆ m_iPlotLengthY

int sortie.gui.harvepplant.DisplayWindowBase.m_iPlotLengthY
protected

Length of the plot in the Y direction, in meters.

◆ m_jChartPanel

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

Panel displaying the chart.

◆ m_jParentSize

Dimension sortie.gui.harvepplant.DisplayWindowBase.m_jParentSize
protected

Size of the parent calling window - so we can make sure children fit within this.

◆ m_oDataset

XYZSimpleDataset sortie.gui.harvepplant.DisplayWindowBase.m_oDataset
protected

Dataset for displaying harvest events - controls which cells show up which color.

◆ m_oDisturbanceBehaviors

DisturbanceBehaviors sortie.gui.harvepplant.DisplayWindowBase.m_oDisturbanceBehaviors
protected

DisturbanceBehaviors object to exchange data with.

◆ m_oPlantBehaviors

PlantingBehaviors sortie.gui.harvepplant.DisplayWindowBase.m_oPlantBehaviors
protected

PlantingBehaviors object to exchange data with.

◆ m_oPlot

XYPlot sortie.gui.harvepplant.DisplayWindowBase.m_oPlot = new XYPlot()
protected

Plot object for rendering events.

◆ m_oRenderer

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

Renderer for displaying harvest events.

◆ m_oTreeDataset

DefaultXYZDataset sortie.gui.harvepplant.DisplayWindowBase.m_oTreeDataset = new DefaultXYZDataset()
protected

A dataset for trees, one series for each species.

◆ m_oTreeRenderer

XYTreeRenderer sortie.gui.harvepplant.DisplayWindowBase.m_oTreeRenderer
protected

Renderer for displaying the trees along with episodic event data.

◆ m_sHelpID

String sortie.gui.harvepplant.DisplayWindowBase.m_sHelpID = "windows.episodic_events_window"
private

Help ID string.

◆ MORTALITY_EPISODE_COLOR

final Color sortie.gui.harvepplant.DisplayWindowBase.MORTALITY_EPISODE_COLOR = new Color(150, 225, 225)
static

Color for displaying mortality episode events.

◆ mp_oHarvestData

ArrayList<HarvestData> sortie.gui.harvepplant.DisplayWindowBase.mp_oHarvestData = new ArrayList<HarvestData>(0)
protected

Copy of harvest data to display.

◆ mp_oMortEpisodeData

ArrayList<HarvestData> sortie.gui.harvepplant.DisplayWindowBase.mp_oMortEpisodeData = new ArrayList<HarvestData>(0)
protected

Copy of mortality episode data to display.

◆ mp_oPlantingData

ArrayList<PlantingData> sortie.gui.harvepplant.DisplayWindowBase.mp_oPlantingData = new ArrayList<PlantingData>(0)
protected

Copy of planting data to display.

◆ PLANT_COLOR

final Color sortie.gui.harvepplant.DisplayWindowBase.PLANT_COLOR = new Color(255, 255, 100)
static

Color for displaying plantings.


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