SORTIE Java Interface
1
|
Window for editing subplot information. More...
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... | |
Window for editing subplot information.
Copyright: Copyright (c) Charles D. Canham 2003
Company: Cary Institute of Ecosystem Studies
December 8, 2011: Wiped the slate clean for version 7 (LEM)
sortie.gui.SubplotEdit.SubplotEdit | ( | JDialog | oOwner, |
OutputBehaviors | oOutputBeh, | ||
DisturbanceBehaviors | oDisturbanceBehaviors, | ||
PlantingBehaviors | oPlantBehaviors, | ||
boolean | bIsShort | ||
) | throws ModelException |
Constructor.
Creates the GUI.
oOwner | Parent frame of this dialog. |
oOutputBeh | Output behaviors 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 sortie.gui.SubplotEdit.actionPerformed | ( | ActionEvent | oEvent | ) |
Responds to window events.
oEvent | Event triggering this call. |
|
private |
Displays a small dialog box so that the user can update the subplot size.
|
private |
Deletes a subplot from the window.
iSubplot | Subplot number. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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.
|
private |
Creates the GUI.
|
private |
Create the dataset and renderer for the trees.
|
protected |
Refreshes the chart to show the data currently held in m_oDataset.
ModelException | if the chart cannot be created. |
|
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. |
|
private |
Flag for what kind of output this is.
If true, it's short output. If false, detailed.
|
private |
Length of cells in the X direction.
|
private |
Length of cells in the Y direction.
|
private |
First index value of the subplot data in m_oDataset.mp_bData.
|
private |
Harvest data layer index in m_oDataset.mp_bData.
|
private |
Mortality episode data layer index in m_oDataset.mp_bData.
|
private |
Number of subplots.
|
private |
Number of total harvest events that can be displayed.
|
private |
Number of total mortality episodes that can be displayed.
|
private |
Number of total planting events that can be displayed.
|
private |
Number of X cells in the grid.
|
private |
Number of Y cells in the grid.
|
private |
Planting data layer index in m_oDataset.mp_bData.
|
private |
Length of the plot in the X direction, as an integer number of meters.
|
private |
Length of the plot in the Y direction, as an integer number of meters.
|
private |
Panel container for the chart.
|
protected |
Label that displays the number of the current harvest event.
|
protected |
Label that displays the number of the current mortality episode.
|
protected |
Label that displays the number of the current planting event.
|
private |
Radio button for first subplot.
|
private |
Color for first subplot.
|
private |
Name of first subplot.
|
private |
Radio button for second subplot.
|
private |
Color for second subplot.
|
private |
Name of second subplot.
|
private |
Radio button for third subplot.
|
private |
Color for third subplot.
|
private |
Name of third subplot.
|
private |
Radio button for fourth subplot.
|
private |
Color for fourth subplot.
|
private |
Name of fourth subplot.
|
private |
Radio button for fifth subplot.
|
private |
Color for fifth subplot.
|
private |
Name of fifth subplot.
|
protected |
ChartPanel displaying the chart.
|
private |
For display of disturbance events.
|
private |
For display of disturbance events.
|
private |
Object to exchange subplot data with.
|
private |
For display of planting events.
|
protected |
Renderer which displays current cell selections.
|
private |
A dataset for trees, one series for each species.
|
private |
Renderer for displaying the trees along with disturbance event data.
|
private |
Help ID string.