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

Dialog allowing the user to set up basic tree information. More...

Inheritance diagram for sortie.gui.TreeSpeciesSetup:

Classes

class  CopySpeciesEditor
 This class creates an interface for copying species. More...
 

Public Member Functions

 TreeSpeciesSetup (JFrame jParent, TreePopulation oPop)
 Constructor. More...
 
void actionPerformed (ActionEvent oEvent)
 Controls actions for this window. More...
 

Protected Member Functions

void addSpecies ()
 Performs a species add in response to the Add button click. More...
 
void removeSpecies ()
 Removes a species. More...
 
void renameSpecies ()
 Puts a species to rename in the list of renamed species, and updates the species list. More...
 
int updateTreePopulation () throws ModelException
 Updates the TreePopulation object with the accumulated changes. More...
 

Protected Attributes

TreePopulation m_oPop
 TreePopulation object that data changes will be communicated to. More...
 
DefaultListModel< String > m_jSpeciesListModel
 List model for species. More...
 
JList< String > m_jSpeciesList
 List displaying the species. More...
 
ArrayList< RenamePair > mp_oRenameSpecies = new ArrayList<RenamePair>(0)
 Vector of RenamePair objects, one for each species the user has asked to rename. More...
 
ArrayList< RenamePair > mp_oCopySpecies = new ArrayList<RenamePair>(0)
 Vector of RenamePair objects, one for each species the user has asked to copy. More...
 
JTextField m_jNewSpecies
 Field for entering a new species name. More...
 

Private Member Functions

void moveUp ()
 Moves selected species up. More...
 
void moveDown ()
 Moves selected species down. More...
 

Private Attributes

String m_sHelpID = "windows.edit_species_list_window"
 Help ID string. More...
 

Detailed Description

Dialog allowing the user to set up basic tree information.

This includes the species list and initial density size classes.

Copyright: Copyright (c) Charles D. Canham 2003

Company: Cary Institute of Ecosystem Studies

Author
Lora E. Murphy
Version
1.0


Edit history:
---------------—
April 28, 2004: Submitted in beta version (LEM)
June 21, 2004: Added support to write tree maps as tab-delimited text (LEM)
November 3, 2005: Added a "Rename" button for species (LEM)
January 11, 2007: Added a "Copy" button for species (LEM)
February 4, 2008: Updated to conform to Java 6 compliance (LEM)

Constructor & Destructor Documentation

◆ TreeSpeciesSetup()

sortie.gui.TreeSpeciesSetup.TreeSpeciesSetup ( JFrame  jParent,
TreePopulation  oPop 
)

Constructor.

Constructs and displays the GUI.

Parameters
jParentParent window in which to display this dialog.
oPopTreePopulation object.

Member Function Documentation

◆ actionPerformed()

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

Controls actions for this window.

Parameters
oEventActionEvent.

◆ addSpecies()

void sortie.gui.TreeSpeciesSetup.addSpecies ( )
protected

Performs a species add in response to the Add button click.

◆ moveDown()

void sortie.gui.TreeSpeciesSetup.moveDown ( )
private

Moves selected species down.

◆ moveUp()

void sortie.gui.TreeSpeciesSetup.moveUp ( )
private

Moves selected species up.

◆ removeSpecies()

void sortie.gui.TreeSpeciesSetup.removeSpecies ( )
protected

Removes a species.

This verifiies the remove operation. Then, if valid, removes the species. This will also make sure that any rename or copy pairs featuring the removed species are also removed.

◆ renameSpecies()

void sortie.gui.TreeSpeciesSetup.renameSpecies ( )
protected

Puts a species to rename in the list of renamed species, and updates the species list.

◆ updateTreePopulation()

int sortie.gui.TreeSpeciesSetup.updateTreePopulation ( ) throws ModelException
protected

Updates the TreePopulation object with the accumulated changes.

Exceptions
ModelExceptionif there are no species present.
Returns
int; if 0, close the window. If anything else, don't.

Member Data Documentation

◆ m_jNewSpecies

JTextField sortie.gui.TreeSpeciesSetup.m_jNewSpecies
protected

Field for entering a new species name.

◆ m_jSpeciesList

JList<String> sortie.gui.TreeSpeciesSetup.m_jSpeciesList
protected

List displaying the species.

◆ m_jSpeciesListModel

DefaultListModel<String> sortie.gui.TreeSpeciesSetup.m_jSpeciesListModel
protected

List model for species.

◆ m_oPop

TreePopulation sortie.gui.TreeSpeciesSetup.m_oPop
protected

TreePopulation object that data changes will be communicated to.

◆ m_sHelpID

String sortie.gui.TreeSpeciesSetup.m_sHelpID = "windows.edit_species_list_window"
private

Help ID string.

◆ mp_oCopySpecies

ArrayList<RenamePair> sortie.gui.TreeSpeciesSetup.mp_oCopySpecies = new ArrayList<RenamePair>(0)
protected

Vector of RenamePair objects, one for each species the user has asked to copy.

◆ mp_oRenameSpecies

ArrayList<RenamePair> sortie.gui.TreeSpeciesSetup.mp_oRenameSpecies = new ArrayList<RenamePair>(0)
protected

Vector of RenamePair objects, one for each species the user has asked to rename.


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