Inheritance diagram for datavisualizer::Legend:
Public Member Functions | |
Legend (DataFileManager oManager, String sTitle, String[] p_sSpeciesNames) throws ModelException | |
Constructor. | |
Color | GetSpeciesColor (int iIndex) throws ModelException |
Gets the color associated with a particular species. | |
Color | GetSpeciesColor (String sName) throws ModelException |
Gets the color associated with a particular species. | |
boolean | GetIsSpeciesSelected (int iIndex) throws ModelException |
Get whether or not a species' checkbox indicates that it is selected. | |
int | GetNumberOfSpecies () |
Gets the total number of species for this legend. | |
void | CheckBox_actionPerformed (ActionEvent e) |
Triggered when a checkbox is toggled on or off. | |
String | GetSpeciesCodeName (int i) throws ModelException |
Gets the internal code species name for a given species index. | |
String | GetSpeciesDisplayName (int i) throws ModelException |
Gets the species display name for a given species index. | |
void | ChooseColor (ActionEvent e) |
Displays the color chooser when the user clicks the color chooser button, and extracts the chosen color. | |
Protected Member Functions | |
void | CreateColorList () |
This picks a default color for each of our species. | |
Protected Attributes | |
String[] | mp_sSpeciesNames |
The names of each of the species. | |
String[] | mp_sDisplayNames |
The names that will be displayed. | |
Color[] | mp_oSpeciesColors |
The color for each species. | |
JPanel[] | mp_jSpeciesPanels |
The panel grouping each species label with its color. | |
JLabel[] | mp_jSpeciesLabels |
The text label for each species. | |
JButton[] | mp_jSpeciesColorDisplays |
The color display for each species. | |
JCheckBox[] | mp_jSpeciesChecks |
Checkboxes indicating whether or not a species should be visible. | |
FlowLayout[] | mp_oLayouts |
To lay out everything correctly in each species panel. | |
GridLayout | gridLayout1 = new GridLayout() |
Layout manager for this window. | |
DataFileManager | m_oManager |
Parent data file manager. | |
Private Member Functions | |
void | CreateGUI () throws Exception |
Creates the GUI and lays out all the components. |
When the user clicks on a color, they get a color chooser that lets them change a species's color.
When species names come in, they may have underscores substituted for spaces. Thus, a separate set of display names is used that will have the underscores removed. The species names with underscores is what all other objects will expect when they ask the legend for help parsing a detailed output file.
Copyright: Copyright (c) Charles D. Canham 2003
Company: Institute of Ecosystem Studies
|
Constructor. This will create the legend window and assign default colors to all the species.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Triggered when a checkbox is toggled on or off. All open charts are redrawn.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Displays the color chooser when the user clicks the color chooser button, and extracts the chosen color.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
This picks a default color for each of our species.
|
|
Creates the GUI and lays out all the components.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Get whether or not a species' checkbox indicates that it is selected.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Gets the total number of species for this legend.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Gets the internal code species name for a given species index.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Gets the color associated with a particular species.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Gets the color associated with a particular species.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Gets the species display name for a given species index.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |