Inherits javax::swing::JDialog, and java::awt::event::ActionListener.
Public Member Functions | |
SubplotEdit (JDialog oOwner, OutputBehaviors oOutput, DisturbanceBehaviors oDisturbanceBehaviors, PlantingBehaviors oPlantBehaviors, boolean bIsShort) 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 m_oDataset. | |
Protected Attributes | |
XYSimpleCellRenderer | m_oRenderer = new XYSimpleCellRenderer() |
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. | |
Package Attributes | |
XYZSimpleDataset | m_oDataset |
The dataset to render. | |
Static Package Attributes | |
static final long | serialVersionUID = 1 |
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 | ChangeSubplotSize () |
Displays a small dialog box so that the user can update the subplot size. | |
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. | |
DefaultXYZDataset | m_oTreeDataset = new DefaultXYZDataset() |
A dataset for trees, one series for each species. | |
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. | |
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 m_oDataset.mp_bData. | |
int | m_iHarvestDataIndex = 1 |
Harvest data layer index in m_oDataset.mp_bData. | |
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_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. | |
boolean | m_bIsShort |
Flag for what kind of output this is. | |
Classes | |
class | SubplotCellResolutionPicker |
A small window for changing subplot resolution. More... | |
class | SubplotMouseListener |
Class for interpreting mouse clicks on the chart for selecting cells for subplot editing. More... |
Copyright: Copyright (c) Charles D. Canham 2003
Company: Institute of Ecosystem Studies
javawrapper.SubplotEdit.SubplotEdit | ( | JDialog | oOwner, | |
OutputBehaviors | oOutput, | |||
DisturbanceBehaviors | oDisturbanceBehaviors, | |||
PlantingBehaviors | oPlantBehaviors, | |||
boolean | bIsShort | |||
) | throws ModelException |
Constructor.
Creates the GUI.
oOwner | Parent frame of this dialog. | |
oOutput | Output behavior to exchange subplot data with. | |
oDisturbanceBehaviors | For displaying disturbance events. | |
oPlantBehaviors | For displaying planting events. | |
bIsShort | Whether this is for short output (true) or detailed output (false) |
ModelException | if anything goes wrong with window creation. |
void javawrapper.SubplotEdit.MakeGUI | ( | ) | [private] |
Creates the GUI.
void javawrapper.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.
void javawrapper.SubplotEdit.MakeTreeDatasetAndRenderer | ( | ) | [private] |
Create the dataset and renderer for the trees.
void javawrapper.SubplotEdit.ChangeSubplotSize | ( | ) | [private] |
Displays a small dialog box so that the user can update the subplot size.
void javawrapper.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.
ModelException | if the chart cannot be created. |
void javawrapper.SubplotEdit.DisplayHarvest | ( | HarvestData | oHarvest | ) | throws ModelException [protected] |
Causes a harvest event to be displayed in the window.
oHarvest | Harvest to display, or NULL if no harvest is to be displayed. |
ModelException | passing through from called methods. |
void javawrapper.SubplotEdit.DisplayMortEpisode | ( | HarvestData | oEpisode | ) | throws ModelException [protected] |
Causes a mortality episode to be displayed in the window.
oEpisode | Mortality episode to display, or NULL if no episode is to be displayed. |
ModelException | passing through from called methods. |
void javawrapper.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.
oPlanting | Planting to display, or NULL if no planting is to be displayed. |
ModelException | passing through from called methods. |
void javawrapper.SubplotEdit.DisplayNextHarvest | ( | ) | throws ModelException [protected] |
Displays the next harvest when the ">>" button is pressed.
If the last harvest is being displayed, then nothing changes.
ModelException | Passing through from called methods. |
void javawrapper.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.
ModelException | Passing through from called methods. |
void javawrapper.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.
ModelException | Passing through from called methods. |
void javawrapper.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.
ModelException | Passing through from called methods. |
void javawrapper.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.
ModelException | Passing through from called methods. |
void javawrapper.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.
ModelException | Passing through from called methods. |
void javawrapper.SubplotEdit.RefreshChart | ( | ) | [protected] |
Refreshes the chart to show the data currently held in m_oDataset.
ModelException | if the chart cannot be created. |
void javawrapper.SubplotEdit.actionPerformed | ( | ActionEvent | oEvent | ) |
Responds to window events.
oEvent | Event triggering this call. |
void javawrapper.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.
ModelException | if there is a subplot with cells selected but no name assigned. |
final long javawrapper.SubplotEdit.serialVersionUID = 1 [static, package] |
Object to exchange subplot data with.
For display of disturbance events.
For display of planting events.
DefaultXYZDataset javawrapper.SubplotEdit.m_oTreeDataset = new DefaultXYZDataset() [private] |
A dataset for trees, one series for each species.
XYSimpleCellRenderer javawrapper.SubplotEdit.m_oRenderer = new XYSimpleCellRenderer() [protected] |
Renderer which displays current cell selections.
Renderer for displaying the trees along with disturbance event data.
JPanel javawrapper.SubplotEdit.m_jChartPanel = new JPanel() [private] |
Panel container for the chart.
org.jfree.chart.ChartPanel javawrapper.SubplotEdit.m_oChart [protected] |
ChartPanel displaying the chart.
JTextField javawrapper.SubplotEdit.m_jSubplot1Name = new JTextField("") [private] |
Name of first subplot.
JTextField javawrapper.SubplotEdit.m_jSubplot2Name = new JTextField("") [private] |
Name of second subplot.
JTextField javawrapper.SubplotEdit.m_jSubplot3Name = new JTextField("") [private] |
Name of third subplot.
JTextField javawrapper.SubplotEdit.m_jSubplot4Name = new JTextField("") [private] |
Name of fourth subplot.
JTextField javawrapper.SubplotEdit.m_jSubplot5Name = new JTextField("") [private] |
Name of fifth subplot.
JRadioButton javawrapper.SubplotEdit.m_jSubplot1Button = new JRadioButton("Subplot #1") [private] |
Radio button for first subplot.
JRadioButton javawrapper.SubplotEdit.m_jSubplot2Button = new JRadioButton("Subplot #2") [private] |
Radio button for second subplot.
JRadioButton javawrapper.SubplotEdit.m_jSubplot3Button = new JRadioButton("Subplot #3") [private] |
Radio button for third subplot.
JRadioButton javawrapper.SubplotEdit.m_jSubplot4Button = new JRadioButton("Subplot #4") [private] |
Radio button for fourth subplot.
JRadioButton javawrapper.SubplotEdit.m_jSubplot5Button = new JRadioButton("Subplot #5") [private] |
Radio button for fifth subplot.
Color javawrapper.SubplotEdit.m_jSubplot1Color = new Color(100, 100, 0) [private] |
Color for first subplot.
Color javawrapper.SubplotEdit.m_jSubplot2Color = new Color(0, 255, 0) [private] |
Color for second subplot.
Color javawrapper.SubplotEdit.m_jSubplot3Color = new Color(150, 255, 255) [private] |
Color for third subplot.
Color javawrapper.SubplotEdit.m_jSubplot4Color = new Color(255, 0, 0) [private] |
Color for fourth subplot.
Color javawrapper.SubplotEdit.m_jSubplot5Color = new Color(0, 0, 255) [private] |
Color for fifth subplot.
JLabel javawrapper.SubplotEdit.m_jHarvestNumber = new JLabel("0") [protected] |
Label that displays the number of the current harvest event.
JLabel javawrapper.SubplotEdit.m_jMortEpisodeNumber = new JLabel("0") [protected] |
Label that displays the number of the current mortality episode.
JLabel javawrapper.SubplotEdit.m_jPlantNumber = new JLabel("0") [protected] |
Label that displays the number of the current planting event.
String javawrapper.SubplotEdit.m_sHelpID = "windows.edit_subplots_window" [private] |
Help ID string.
int javawrapper.SubplotEdit.m_iNumberSubplots = 5 [private] |
Number of subplots.
int javawrapper.SubplotEdit.m_iFirstSubplotIndex = 4 [private] |
First index value of the subplot data in m_oDataset.mp_bData.
int javawrapper.SubplotEdit.m_iHarvestDataIndex = 1 [private] |
Harvest data layer index in m_oDataset.mp_bData.
int javawrapper.SubplotEdit.m_iMortEpisodeDataIndex = 2 [private] |
Mortality episode data layer index in m_oDataset.mp_bData.
int javawrapper.SubplotEdit.m_iPlantingDataIndex = 3 [private] |
Planting data layer index in m_oDataset.mp_bData.
int javawrapper.SubplotEdit.m_iNumTotalHarvestEvents [private] |
Number of total harvest events that can be displayed.
int javawrapper.SubplotEdit.m_iNumTotalMortEpisodes [private] |
Number of total mortality episodes that can be displayed.
int javawrapper.SubplotEdit.m_iNumTotalPlantingEvents [private] |
Number of total planting events that can be displayed.
int javawrapper.SubplotEdit.m_iNumXCells [private] |
Number of X cells in the grid.
int javawrapper.SubplotEdit.m_iNumYCells [private] |
Number of Y cells in the grid.
int javawrapper.SubplotEdit.m_iPlotLengthX [private] |
Length of the plot in the X direction, as an integer number of meters.
int javawrapper.SubplotEdit.m_iPlotLengthY [private] |
Length of the plot in the Y direction, as an integer number of meters.
float javawrapper.SubplotEdit.m_fLengthXCells [private] |
Length of cells in the X direction.
float javawrapper.SubplotEdit.m_fLengthYCells [private] |
Length of cells in the Y direction.
The dataset to render.
It contains the grid of values that says whether a cell is currently selected (true) or not (false) - 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 true 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 false so nothing will be drawn over data values for the layers underneath.
boolean javawrapper.SubplotEdit.m_bIsShort [private] |
Flag for what kind of output this is.
If true, it's short output. If false, detailed.