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

Window for editing subplot information. More...

Inheritance diagram for sortie.gui.SubplotEdit:

Classes

class  SubplotCellResolutionPicker
 A small window for changing subplot resolution.
 
class  SubplotMouseListener
 Class for interpreting mouse clicks on the chart for selecting cells for subplot editing.
 

Public Member Functions

 SubplotEdit (JDialog oOwner, OutputBehaviors oOutputBeh, DisturbanceBehaviors oDisturbanceBehaviors, PlantingBehaviors oPlantBehaviors, boolean bIsShort) throws ModelException
 Constructor. More...
 
void actionPerformed (ActionEvent oEvent)
 Responds to window events. More...
 

Protected Member Functions

void setUpCharting () throws ModelException
 Sets up the data cell charting. 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...
 
void refreshChart ()
 Refreshes the chart to show the data currently held in m_oDataset. More...
 

Protected Attributes

XYSimpleCellRenderer m_oRenderer = new XYSimpleCellRenderer()
 Renderer which displays current cell selections. More...
 
org.jfree.chart.ChartPanel m_oChart
 ChartPanel displaying the chart. 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...
 

Private Member Functions

void makeGUI ()
 Creates the GUI. More...
 
void loadData ()
 Loads existing subplot data. More...
 
void makeTreeDatasetAndRenderer () throws ModelException
 Create the dataset and renderer for the trees. More...
 
void changeSubplotSize ()
 Displays a small dialog box so that the user can update the subplot size. More...
 
void deleteSubplot (int iSubplot)
 Deletes a subplot from the window. More...
 
void enterData () throws ModelException
 Validates and enters subplot data back into the OutputBehaviors object. More...
 

Private Attributes

OutputBehaviors m_oOutput
 Object to exchange subplot data with. More...
 
Harvest m_oHarvest
 For display of disturbance events. More...
 
EpisodicMortality m_oMortEpisode
 For display of disturbance events. More...
 
Planting m_oPlant
 For display of planting events. More...
 
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 disturbance event data. More...
 
JPanel m_jChartPanel = new JPanel()
 Panel container for the chart. More...
 
JTextField m_jSubplot1Name = new JTextField("")
 Name of first subplot. More...
 
JTextField m_jSubplot2Name = new JTextField("")
 Name of second subplot. More...
 
JTextField m_jSubplot3Name = new JTextField("")
 Name of third subplot. More...
 
JTextField m_jSubplot4Name = new JTextField("")
 Name of fourth subplot. More...
 
JTextField m_jSubplot5Name = new JTextField("")
 Name of fifth subplot. More...
 
JRadioButton m_jSubplot1Button = new JRadioButton("Subplot #1")
 Radio button for first subplot. More...
 
JRadioButton m_jSubplot2Button = new JRadioButton("Subplot #2")
 Radio button for second subplot. More...
 
JRadioButton m_jSubplot3Button = new JRadioButton("Subplot #3")
 Radio button for third subplot. More...
 
JRadioButton m_jSubplot4Button = new JRadioButton("Subplot #4")
 Radio button for fourth subplot. More...
 
JRadioButton m_jSubplot5Button = new JRadioButton("Subplot #5")
 Radio button for fifth subplot. More...
 
Color m_jSubplot1Color = new Color(100, 100, 0)
 Color for first subplot. More...
 
Color m_jSubplot2Color = new Color(0, 255, 0)
 Color for second subplot. More...
 
Color m_jSubplot3Color = new Color(150, 255, 255)
 Color for third subplot. More...
 
Color m_jSubplot4Color = new Color(255, 0, 0)
 Color for fourth subplot. More...
 
Color m_jSubplot5Color = new Color(0, 0, 255)
 Color for fifth subplot. More...
 
String m_sHelpID = "windows.edit_subplots_window"
 Help ID string. More...
 
int m_iNumberSubplots = 5
 Number of subplots. More...
 
int m_iFirstSubplotIndex = 4
 First index value of the subplot data in m_oDataset.mp_bData. 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_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...
 
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, as an integer number of meters. More...
 
int m_iPlotLengthY
 Length of the plot in the Y direction, as an integer number of meters. More...
 
float m_fLengthXCells
 Length of cells in the X direction. More...
 
float m_fLengthYCells
 Length of cells in the Y direction. More...
 
boolean m_bIsShort
 Flag for what kind of output this is. More...
 

Detailed Description

Window for editing subplot information.

Copyright: Copyright (c) Charles D. Canham 2003

Company: Cary Institute of Ecosystem Studies

Author
Lora E. Murphy
Version
1.0

Edit History:


December 8, 2011: Wiped the slate clean for version 7 (LEM)

Constructor & Destructor Documentation

◆ SubplotEdit()

sortie.gui.SubplotEdit.SubplotEdit ( JDialog  oOwner,
OutputBehaviors  oOutputBeh,
DisturbanceBehaviors  oDisturbanceBehaviors,
PlantingBehaviors  oPlantBehaviors,
boolean  bIsShort 
) throws ModelException

Constructor.

Creates the GUI.

Parameters
oOwnerParent frame of this dialog.
oOutputBehOutput behaviors to exchange subplot data with.
oDisturbanceBehaviorsFor displaying disturbance events.
oPlantBehaviorsFor displaying planting events.
bIsShortWhether this is for short output (true) or detailed output (false)
Exceptions
ModelExceptionif anything goes wrong with window creation.

Member Function Documentation

◆ actionPerformed()

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

Responds to window events.

Parameters
oEventEvent triggering this call.

◆ changeSubplotSize()

void sortie.gui.SubplotEdit.changeSubplotSize ( )
private

Displays a small dialog box so that the user can update the subplot size.

◆ deleteSubplot()

void sortie.gui.SubplotEdit.deleteSubplot ( int  iSubplot)
private

Deletes a subplot from the window.

Parameters
iSubplotSubplot number.

◆ displayHarvest()

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

◆ enterData()

void sortie.gui.SubplotEdit.enterData ( ) throws ModelException
private

Validates and enters subplot data back into the OutputBehaviors object.

This makes sure that a subplot has a name entered if any cells are selected for it. If all the data is good, then any existing subplots in the OutputBehaviors object are erased and replaced with the subplots entered here.

Exceptions
ModelExceptionif there is a subplot with cells selected but no name assigned.

◆ loadData()

void sortie.gui.SubplotEdit.loadData ( )
private

Loads existing subplot data.

This takes all current subplots in the output behavior, up to five, and loads them into m_oDataset so they can be displayed on the map.

◆ makeGUI()

void sortie.gui.SubplotEdit.makeGUI ( )
private

Creates the GUI.

◆ makeTreeDatasetAndRenderer()

void sortie.gui.SubplotEdit.makeTreeDatasetAndRenderer ( ) throws ModelException
private

Create the dataset and renderer for the trees.

◆ refreshChart()

void sortie.gui.SubplotEdit.refreshChart ( )
protected

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

Exceptions
ModelExceptionif the chart cannot be created.

◆ setUpCharting()

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

◆ m_bIsShort

boolean sortie.gui.SubplotEdit.m_bIsShort
private

Flag for what kind of output this is.

If true, it's short output. If false, detailed.

◆ m_fLengthXCells

float sortie.gui.SubplotEdit.m_fLengthXCells
private

Length of cells in the X direction.

◆ m_fLengthYCells

float sortie.gui.SubplotEdit.m_fLengthYCells
private

Length of cells in the Y direction.

◆ m_iFirstSubplotIndex

int sortie.gui.SubplotEdit.m_iFirstSubplotIndex = 4
private

First index value of the subplot data in m_oDataset.mp_bData.

◆ m_iHarvestDataIndex

int sortie.gui.SubplotEdit.m_iHarvestDataIndex = 1
private

Harvest data layer index in m_oDataset.mp_bData.

◆ m_iMortEpisodeDataIndex

int sortie.gui.SubplotEdit.m_iMortEpisodeDataIndex = 2
private

Mortality episode data layer index in m_oDataset.mp_bData.

◆ m_iNumberSubplots

int sortie.gui.SubplotEdit.m_iNumberSubplots = 5
private

Number of subplots.

◆ m_iNumTotalHarvestEvents

int sortie.gui.SubplotEdit.m_iNumTotalHarvestEvents
private

Number of total harvest events that can be displayed.

◆ m_iNumTotalMortEpisodes

int sortie.gui.SubplotEdit.m_iNumTotalMortEpisodes
private

Number of total mortality episodes that can be displayed.

◆ m_iNumTotalPlantingEvents

int sortie.gui.SubplotEdit.m_iNumTotalPlantingEvents
private

Number of total planting events that can be displayed.

◆ m_iNumXCells

int sortie.gui.SubplotEdit.m_iNumXCells
private

Number of X cells in the grid.

◆ m_iNumYCells

int sortie.gui.SubplotEdit.m_iNumYCells
private

Number of Y cells in the grid.

◆ m_iPlantingDataIndex

int sortie.gui.SubplotEdit.m_iPlantingDataIndex = 3
private

Planting data layer index in m_oDataset.mp_bData.

◆ m_iPlotLengthX

int sortie.gui.SubplotEdit.m_iPlotLengthX
private

Length of the plot in the X direction, as an integer number of meters.

◆ m_iPlotLengthY

int sortie.gui.SubplotEdit.m_iPlotLengthY
private

Length of the plot in the Y direction, as an integer number of meters.

◆ m_jChartPanel

JPanel sortie.gui.SubplotEdit.m_jChartPanel = new JPanel()
private

Panel container for the chart.

◆ m_jHarvestNumber

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

Label that displays the number of the current harvest event.

◆ m_jMortEpisodeNumber

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

Label that displays the number of the current mortality episode.

◆ m_jPlantNumber

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

Label that displays the number of the current planting event.

◆ m_jSubplot1Button

JRadioButton sortie.gui.SubplotEdit.m_jSubplot1Button = new JRadioButton("Subplot #1")
private

Radio button for first subplot.

◆ m_jSubplot1Color

Color sortie.gui.SubplotEdit.m_jSubplot1Color = new Color(100, 100, 0)
private

Color for first subplot.

◆ m_jSubplot1Name

JTextField sortie.gui.SubplotEdit.m_jSubplot1Name = new JTextField("")
private

Name of first subplot.

◆ m_jSubplot2Button

JRadioButton sortie.gui.SubplotEdit.m_jSubplot2Button = new JRadioButton("Subplot #2")
private

Radio button for second subplot.

◆ m_jSubplot2Color

Color sortie.gui.SubplotEdit.m_jSubplot2Color = new Color(0, 255, 0)
private

Color for second subplot.

◆ m_jSubplot2Name

JTextField sortie.gui.SubplotEdit.m_jSubplot2Name = new JTextField("")
private

Name of second subplot.

◆ m_jSubplot3Button

JRadioButton sortie.gui.SubplotEdit.m_jSubplot3Button = new JRadioButton("Subplot #3")
private

Radio button for third subplot.

◆ m_jSubplot3Color

Color sortie.gui.SubplotEdit.m_jSubplot3Color = new Color(150, 255, 255)
private

Color for third subplot.

◆ m_jSubplot3Name

JTextField sortie.gui.SubplotEdit.m_jSubplot3Name = new JTextField("")
private

Name of third subplot.

◆ m_jSubplot4Button

JRadioButton sortie.gui.SubplotEdit.m_jSubplot4Button = new JRadioButton("Subplot #4")
private

Radio button for fourth subplot.

◆ m_jSubplot4Color

Color sortie.gui.SubplotEdit.m_jSubplot4Color = new Color(255, 0, 0)
private

Color for fourth subplot.

◆ m_jSubplot4Name

JTextField sortie.gui.SubplotEdit.m_jSubplot4Name = new JTextField("")
private

Name of fourth subplot.

◆ m_jSubplot5Button

JRadioButton sortie.gui.SubplotEdit.m_jSubplot5Button = new JRadioButton("Subplot #5")
private

Radio button for fifth subplot.

◆ m_jSubplot5Color

Color sortie.gui.SubplotEdit.m_jSubplot5Color = new Color(0, 0, 255)
private

Color for fifth subplot.

◆ m_jSubplot5Name

JTextField sortie.gui.SubplotEdit.m_jSubplot5Name = new JTextField("")
private

Name of fifth subplot.

◆ m_oChart

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

ChartPanel displaying the chart.

◆ m_oHarvest

Harvest sortie.gui.SubplotEdit.m_oHarvest
private

For display of disturbance events.

◆ m_oMortEpisode

EpisodicMortality sortie.gui.SubplotEdit.m_oMortEpisode
private

For display of disturbance events.

◆ m_oOutput

OutputBehaviors sortie.gui.SubplotEdit.m_oOutput
private

Object to exchange subplot data with.

◆ m_oPlant

Planting sortie.gui.SubplotEdit.m_oPlant
private

For display of planting events.

◆ m_oRenderer

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

Renderer which displays current cell selections.

◆ m_oTreeDataset

DefaultXYZDataset sortie.gui.SubplotEdit.m_oTreeDataset = new DefaultXYZDataset()
private

A dataset for trees, one series for each species.

◆ m_oTreeRenderer

XYTreeRenderer sortie.gui.SubplotEdit.m_oTreeRenderer
private

Renderer for displaying the trees along with disturbance event data.

◆ m_sHelpID

String sortie.gui.SubplotEdit.m_sHelpID = "windows.edit_subplots_window"
private

Help ID string.


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