javawrapper::SubplotEdit Class Reference

Window for editing subplot information. More...

List of all members.

Public Member Functions

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

Protected Member Functions

void SetUpCharting () throws ModelException
 Sets up the data cell charting.
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.
void RefreshChart ()
 Refreshes the chart to show the data currently held in mp_iCells.

Protected Attributes

datavisualizer.XYCellRenderer m_oRenderer
 Renderer which displays current cell selections.
org.jfree.chart.ChartPanel m_oChart
 ChartPanel displaying the chart.
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.

Private Member Functions

void MakeGUI ()
 Creates the GUI.
void LoadData ()
 Loads existing subplot data.
void MakeTreeDatasetAndRenderer ()
 Create the dataset and renderer for the trees.
void EnterData () throws ModelException
 Validates and enters subplot data back into the OutputBehaviors object.

Private Attributes

OutputBehaviors m_oOutput
 Object to exchange subplot data with.
DisturbanceBehaviors m_oDisturbanceBehaviors
 For display of disturbance events.
PlantingBehaviors m_oPlantBehaviors
 For display of planting events.
datavisualizer.XYZSeriesCollection m_oTreeDataset
 Dataset for displaying the trees along with disturbance data.
datavisualizer.XYTreeRenderer m_oTreeRenderer
 Renderer for displaying the trees along with disturbance event data.
JPanel m_jChartPanel = new JPanel()
 Panel container for the chart.
JTextField m_jSubplot1Name = new JTextField("")
 Name of first subplot.
JTextField m_jSubplot2Name = new JTextField("")
 Name of second subplot.
JTextField m_jSubplot3Name = new JTextField("")
 Name of third subplot.
JTextField m_jSubplot4Name = new JTextField("")
 Name of fourth subplot.
JTextField m_jSubplot5Name = new JTextField("")
 Name of fifth subplot.
JRadioButton m_jSubplot1Button = new JRadioButton("Subplot #1")
 Radio button for first subplot.
JRadioButton m_jSubplot2Button = new JRadioButton("Subplot #2")
 Radio button for second subplot.
JRadioButton m_jSubplot3Button = new JRadioButton("Subplot #3")
 Radio button for third subplot.
JRadioButton m_jSubplot4Button = new JRadioButton("Subplot #4")
 Radio button for fourth subplot.
JRadioButton m_jSubplot5Button = new JRadioButton("Subplot #5")
 Radio button for fifth subplot.
Color m_jSubplot1Color = new Color(100, 100, 0)
 Color for first subplot.
Color m_jSubplot2Color = new Color(0, 255, 0)
 Color for second subplot.
Color m_jSubplot3Color = new Color(150, 255, 255)
 Color for third subplot.
Color m_jSubplot4Color = new Color(255, 0, 0)
 Color for fourth subplot.
Color m_jSubplot5Color = new Color(0, 0, 255)
 Color for fifth subplot.
Integer[][][] mp_iCells
 Grid of values that says whether a cell is currently selected (1) or not null - sized # subplots + 4 by # plot X cells by # plot Y cells.
String m_sHelpID = "windows.edit_subplots_window"
 Help ID string.
int m_iNumberSubplots = 5
 Number of subplots.
int m_iFirstSubplotIndex = 4
 First index value of the subplot data in mp_iCells.
int m_iHarvestDataIndex = 1
 Harvest data layer index in mp_iCells.
int m_iMortEpisodeDataIndex = 2
 Mortality episode data layer index in mp_iCells.
int m_iPlantingDataIndex = 3
 Planting data layer index in mp_iCells.
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.
int m_iNumXCells
 Number of X cells in the grid.
int m_iNumYCells
 Number of Y cells in the grid.
int m_iPlotLengthX
 Length of the plot in the X direction, as an integer number of meters.
int m_iPlotLengthY
 Length of the plot in the Y direction, as an integer number of meters.
float m_fLengthXCells
 Length of cells in the X direction.
float m_fLengthYCells
 Length of cells in the Y direction.

Classes

class  SubplotMouseListener
 Class for interpreting mouse clicks on the chart for selecting cells for subplot editing. More...


Detailed Description

Window for editing subplot information.

Copyright: Copyright (c) Charles D. Canham 2003

Company: Institute of Ecosystem Studies

Author:
Lora E. Murphy
Version:
1.0


Constructor & Destructor Documentation

javawrapper::SubplotEdit::SubplotEdit JDialog  oOwner,
OutputBehaviors  oOutput,
DisturbanceBehaviors  oDisturbanceBehaviors,
PlantingBehaviors  oPlantBehaviors
throws ModelException [inline]
 

Constructor.

Creates the GUI.

Parameters:
oOwner Parent frame of this dialog.
oOutput Output behavior to exchange subplot data with.
oDisturbanceBehaviors For displaying disturbance events.
oPlantBehaviors For displaying planting events.
Exceptions:
ModelException if anything goes wrong with window creation.


Member Function Documentation

void javawrapper::SubplotEdit::actionPerformed ActionEvent  oEvent  )  [inline]
 

Responds to window events.

Parameters:
oEvent Event triggering this call.

void javawrapper::SubplotEdit::DisplayHarvest HarvestData  oHarvest  )  throws ModelException [inline, protected]
 

Causes a harvest event to be displayed in the window.

Parameters:
oHarvest Harvest to display, or NULL if no harvest is to be displayed.
Exceptions:
ModelException passing through from called methods.

void javawrapper::SubplotEdit::DisplayMortEpisode HarvestData  oEpisode  )  throws ModelException [inline, protected]
 

Causes a mortality episode to be displayed in the window.

Parameters:
oEpisode Mortality episode to display, or NULL if no episode is to be displayed.
Exceptions:
ModelException passing through from called methods.

void javawrapper::SubplotEdit::DisplayNextHarvest  )  throws ModelException [inline, protected]
 

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

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

Exceptions:
ModelException Passing through from called methods.

void javawrapper::SubplotEdit::DisplayNextMortEpisode  )  throws ModelException [inline, protected]
 

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

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

Exceptions:
ModelException Passing through from called methods.

void javawrapper::SubplotEdit::DisplayNextPlanting  )  throws ModelException [inline, protected]
 

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

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

Exceptions:
ModelException Passing through from called methods.

void javawrapper::SubplotEdit::DisplayPlanting PlantingData  oPlanting  )  throws ModelException [inline, 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:
oPlanting Planting to display, or NULL if no planting is to be displayed.
Exceptions:
ModelException passing through from called methods.

void javawrapper::SubplotEdit::DisplayPreviousHarvest  )  throws ModelException [inline, protected]
 

Displays the next harvest when the previous button is pressed.

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

Exceptions:
ModelException Passing through from called methods.

void javawrapper::SubplotEdit::DisplayPreviousMortEpisode  )  throws ModelException [inline, protected]
 

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

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

Exceptions:
ModelException Passing through from called methods.

void javawrapper::SubplotEdit::DisplayPreviousPlanting  )  throws ModelException [inline, protected]
 

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

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

Exceptions:
ModelException Passing through from called methods.

void javawrapper::SubplotEdit::EnterData  )  throws ModelException [inline, 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:
ModelException if there is a subplot with cells selected but no name assigned.

void javawrapper::SubplotEdit::LoadData  )  [inline, private]
 

Loads existing subplot data.

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

void javawrapper::SubplotEdit::RefreshChart  )  [inline, protected]
 

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

Note this function seems a little slow (surprise, surprise, with chart redraw!) so it's a goal to come back and make a faster way to do this.

Exceptions:
ModelException if the chart cannot be created.

void javawrapper::SubplotEdit::SetUpCharting  )  throws ModelException [inline, protected]
 

Sets up the data cell charting.

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

Exceptions:
ModelException if the chart cannot be created.


Member Data Documentation

datavisualizer.XYCellRenderer javawrapper::SubplotEdit::m_oRenderer [protected]
 

Initial value:

 new datavisualizer.
      XYCellRenderer()
Renderer which displays current cell selections.

datavisualizer.XYZSeriesCollection javawrapper::SubplotEdit::m_oTreeDataset [private]
 

Initial value:

 new
      datavisualizer.XYZSeriesCollection()
Dataset for displaying the trees along with disturbance data.

datavisualizer.XYTreeRenderer javawrapper::SubplotEdit::m_oTreeRenderer [private]
 

Initial value:

 new datavisualizer.
      XYTreeRenderer()
Renderer for displaying the trees along with disturbance event data.

Integer [][][] javawrapper::SubplotEdit::mp_iCells [private]
 

Grid of values that says whether a cell is currently selected (1) or not null - sized # subplots + 4 by # plot X cells by # plot Y cells.

The subplots are drawn on the map in layers. There is one series at index 0 with all 0 values, to provide a white underlayer. On top of that are the mortality episodes. For each actual subplot drawn on top of that, if the value is not selected, it's set to null so nothing will be drawn over data values for the layers underneath.


The documentation for this class was generated from the following file:
Generated on Mon Mar 27 15:15:47 2006 for SORTIE Java Interface by  doxygen 1.4.6-NO