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

Allows management of tree maps. More...

Inheritance diagram for sortie.gui.ManageTreeMap:

Public Member Functions

 ManageTreeMap (JFrame jParent, TreePopulation oPop) throws ModelException
 Constructor. More...
 
void actionPerformed (ActionEvent e)
 Controls actions for this window. More...
 

Protected Member Functions

void restoreOriginalView ()
 Restores the original view of the tree map with the scale at which it was first displayed. More...
 
void scroll (int iDirection) throws ModelException
 Scrolls the view 10% in the specified direction. More...
 
void writeTreeMap () throws ModelException
 Writes the tree map trees to a tab-delimited text file. More...
 
void refreshChart () throws ModelException
 Refreshes the chart to show the data currently held in the dataset. More...
 
JPanel makeTreeLegendPanel ()
 Creates a tree legend panel. More...
 

Protected Attributes

JPanel m_jChartPanel = new JPanel()
 Tree dataset. More...
 
Color [] mp_jSpeciesColors
 Colors for each species. More...
 
TreePopulation m_oPop
 TreePopulation object that data changes will be communicated to. More...
 
JButton m_jClearTreeMap
 Button for clearing tree map trees. More...
 
JButton m_jWriteTreeMap
 Button for writing a tree map as tab-delimited text. More...
 

Private Member Functions

DefaultXYZDataset createTreeMapDataset () throws ModelException
 Creates the tree map dataset. More...
 

Private Attributes

JTextField m_jDBHScale = new JTextField("")
 Field displaying the DBH scale factor. More...
 
JTextField m_jMinDbh = new JTextField("")
 Field displaying the minimum DBH. More...
 
String m_sHelpID = "windows.edit_manage_tree_maps_window"
 Help ID string. More...
 
float m_fMinDbh
 Minimum dbh to draw. More...
 
float m_fDBHScale = (float)1.0
 DBH scale factor. More...
 
float m_fXPlotLength
 X plot length in meters. More...
 
float m_fYPlotLength
 Y plot length in meters. More...
 

Static Private Attributes

static final int LEFT = 1
 Scrolling left. More...
 
static final int RIGHT = 2
 Scrolling right. More...
 
static final int UP = 3
 Scrolling up. More...
 
static final int DOWN = 4
 Scrolling down. More...
 

Detailed Description

Allows management of tree maps.

Author
Lora Murphy
Edit history:
---------------—
February 27, 2008: Created by breaking off of a single tree setup window (LEM)
March 5, 2008: Added tree map display (LEM)

Constructor & Destructor Documentation

◆ ManageTreeMap()

sortie.gui.ManageTreeMap.ManageTreeMap ( JFrame  jParent,
TreePopulation  oPop 
) throws ModelException

Constructor.

Constructs and displays the GUI.

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

Member Function Documentation

◆ actionPerformed()

void sortie.gui.ManageTreeMap.actionPerformed ( ActionEvent  e)

Controls actions for this window.

Parameters
eActionEvent.

◆ createTreeMapDataset()

DefaultXYZDataset sortie.gui.ManageTreeMap.createTreeMapDataset ( ) throws ModelException
private

Creates the tree map dataset.

◆ makeTreeLegendPanel()

JPanel sortie.gui.ManageTreeMap.makeTreeLegendPanel ( )
protected

Creates a tree legend panel.

Returns
JPanel Panel with tree legend on it.

◆ refreshChart()

void sortie.gui.ManageTreeMap.refreshChart ( ) throws ModelException
protected

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

Exceptions
ModelExceptionif the chart cannot be created.

◆ restoreOriginalView()

void sortie.gui.ManageTreeMap.restoreOriginalView ( )
protected

Restores the original view of the tree map with the scale at which it was first displayed.

◆ scroll()

void sortie.gui.ManageTreeMap.scroll ( int  iDirection) throws ModelException
protected

Scrolls the view 10% in the specified direction.

If the view is full-size nothing happens. If the view is already scrolled all the way over in the specified direction nothing happens.

Parameters
iDirectionint Direction in which to scroll.

◆ writeTreeMap()

void sortie.gui.ManageTreeMap.writeTreeMap ( ) throws ModelException
protected

Writes the tree map trees to a tab-delimited text file.

It first displays to the user a dialog for specifying the file name. It then organizes a 2-D array of strings for all possible tree data members that have been defined. Each tree contributes its applicable values to the table. Then the table is written out.

Exceptions
ModelExceptionif the file cannot be written.

Member Data Documentation

◆ DOWN

final int sortie.gui.ManageTreeMap.DOWN = 4
staticprivate

Scrolling down.

◆ LEFT

final int sortie.gui.ManageTreeMap.LEFT = 1
staticprivate

Scrolling left.

◆ m_fDBHScale

float sortie.gui.ManageTreeMap.m_fDBHScale = (float)1.0
private

DBH scale factor.

◆ m_fMinDbh

float sortie.gui.ManageTreeMap.m_fMinDbh
private

Minimum dbh to draw.

◆ m_fXPlotLength

float sortie.gui.ManageTreeMap.m_fXPlotLength
private

X plot length in meters.

◆ m_fYPlotLength

float sortie.gui.ManageTreeMap.m_fYPlotLength
private

Y plot length in meters.

◆ m_jChartPanel

JPanel sortie.gui.ManageTreeMap.m_jChartPanel = new JPanel()
protected

Tree dataset.

Panel container for the chart

◆ m_jClearTreeMap

JButton sortie.gui.ManageTreeMap.m_jClearTreeMap
protected

Button for clearing tree map trees.

◆ m_jDBHScale

JTextField sortie.gui.ManageTreeMap.m_jDBHScale = new JTextField("")
private

Field displaying the DBH scale factor.

◆ m_jMinDbh

JTextField sortie.gui.ManageTreeMap.m_jMinDbh = new JTextField("")
private

Field displaying the minimum DBH.

◆ m_jWriteTreeMap

JButton sortie.gui.ManageTreeMap.m_jWriteTreeMap
protected

Button for writing a tree map as tab-delimited text.

◆ m_oPop

TreePopulation sortie.gui.ManageTreeMap.m_oPop
protected

TreePopulation object that data changes will be communicated to.

◆ m_sHelpID

String sortie.gui.ManageTreeMap.m_sHelpID = "windows.edit_manage_tree_maps_window"
private

Help ID string.

◆ mp_jSpeciesColors

Color [] sortie.gui.ManageTreeMap.mp_jSpeciesColors
protected

Colors for each species.

◆ RIGHT

final int sortie.gui.ManageTreeMap.RIGHT = 2
staticprivate

Scrolling right.

◆ UP

final int sortie.gui.ManageTreeMap.UP = 3
staticprivate

Scrolling up.


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