SORTIE Java Interface  1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sortie.datavisualizer.DataFileManager Class Referenceabstract

This class manages a single data file for the data visualizer. More...

Inheritance diagram for sortie.datavisualizer.DataFileManager:
sortie.datavisualizer.DetailedOutputFileManager sortie.datavisualizer.ShortOutputFileManager

Public Member Functions

Legend getLegend ()
 Get the legend for this file. More...
 
int getNumberOpenCharts ()
 Gets the number of open charts for this file. More...
 
void closeAllCharts ()
 Closes all the open charts for this window. More...
 
void cleanUp () throws ModelException
 Any clean-up tasks that must be done can be put here. More...
 
 DataFileManager (DataVisualizerManager oManager, String sFileName)
 Constructor. More...
 
String getFileName ()
 Gets the file being managed. More...
 
abstract JPopupMenu getLineGraphOptions (ActionListener sActionListener)
 Gets a list of the line graphs this object is capable of drawing. More...
 
abstract JPopupMenu getMapOptions (ActionListener sActionListener)
 Gets a list of maps this object is capable of drawing. More...
 
abstract JPopupMenu getHistogramOptions (ActionListener sActionListener)
 Gets a list of histograms this object is capable of drawing. More...
 
abstract JPopupMenu getTableOptions (ActionListener sActionListener)
 Gets a list of tables this object is capable of drawing. More...
 
JInternalFrame createNewChart (String sGraphName) throws ModelException
 Creates a requested chart as a JInternalFrame. More...
 
abstract void updateCharts () throws ModelException
 Prompts the redrawing of all open charts. More...
 
abstract void updateCurrentRunCharts () throws ModelException
 Prompts the redrawing of open charts for the current run. More...
 

Protected Member Functions

abstract JInternalFrame drawChart (String sGraphName) throws ModelException
 Creates a requested chart as a JInternalFrame. More...
 

Protected Attributes

DataVisualizerManager m_oManager
 Manager object. More...
 
String m_sFilename
 File under management. More...
 
ArrayList< JInternalFrame > mp_oCharts = new ArrayList<JInternalFrame>(0)
 All charts under management. More...
 
Legend m_oLegend
 The legend for this file. More...
 
String [] mp_sDeadCodeNames = new String[OutputBehaviors.NUMCODES]
 Text equivalents of dead codes. More...
 

Detailed Description

This class manages a single data file for the data visualizer.

It is responsible for parsing the data out of the file, telling the data visualizer what charts are available, and providing requested charts.

Each DataFileManager object keeps track of the charts it has created and placed in JInternalFrame objects. These objects are under the direct management of the entitity to which they were originally passed when DrawChart() was called to create them, but the DataFileManager object retains the ability to update them per user request.

Copyright: Copyright (c) Charles D. Canham 2004

Company: Cary Institute of Ecosystem Studies

Author
Lora E. Murphy
Version
1.0


Edit history:
---------------—
April 28, 2004: Submitted in beta version (LEM)
November 18, 2004: Added real-time data visualization (LEM)
February 4, 2008: Updated to conform to Java 6 compliance (LEM)

Constructor & Destructor Documentation

◆ DataFileManager()

sortie.datavisualizer.DataFileManager.DataFileManager ( DataVisualizerManager  oManager,
String  sFileName 
)

Constructor.

Parameters
oManagerData visualizer manager that manages this object.
sFileNameFile name for this manager to manage.

Member Function Documentation

◆ cleanUp()

void sortie.datavisualizer.DataFileManager.cleanUp ( ) throws ModelException

Any clean-up tasks that must be done can be put here.

This will be called before the object is destroyed.

◆ closeAllCharts()

void sortie.datavisualizer.DataFileManager.closeAllCharts ( )

Closes all the open charts for this window.

◆ createNewChart()

JInternalFrame sortie.datavisualizer.DataFileManager.createNewChart ( String  sGraphName) throws ModelException

Creates a requested chart as a JInternalFrame.

If the chart already exists, a new one is not created; the existing one is returned. If the chart is new, the JInternalFrame will not be packed or set to visible - it will simply have its GUI components.

Parameters
sGraphNameThe string name of the chart - should be from one of the "getXOptions()" methods
Returns
The chart window, or null if no such chart can be drawn.
Exceptions
ModelExceptionif there are any problems drawing the chart

◆ drawChart()

abstract JInternalFrame sortie.datavisualizer.DataFileManager.drawChart ( String  sGraphName) throws ModelException
abstractprotected

Creates a requested chart as a JInternalFrame.

The JInternalFrame will not be packed or set to visible - it will simply have its GUI components. If the chart requested already exists, the existing chart is returned.

Parameters
sGraphNameThe string name of the chart - should be from one of the "getXOptions()" methods
Returns
The chart window, or null if no such chart can be drawn.
Exceptions
ModelExceptionif there are any problems drawing the chart.

◆ getFileName()

String sortie.datavisualizer.DataFileManager.getFileName ( )

Gets the file being managed.

Returns
File name of managed file.

◆ getHistogramOptions()

abstract JPopupMenu sortie.datavisualizer.DataFileManager.getHistogramOptions ( ActionListener  sActionListener)
abstract

Gets a list of histograms this object is capable of drawing.

Parameters
sActionListenerAction listener that will respond to menu events
Returns
Menu of histogram labels, submenus allowed, null if there are no options

◆ getLegend()

Legend sortie.datavisualizer.DataFileManager.getLegend ( )

Get the legend for this file.

Returns
The legend.

◆ getLineGraphOptions()

abstract JPopupMenu sortie.datavisualizer.DataFileManager.getLineGraphOptions ( ActionListener  sActionListener)
abstract

Gets a list of the line graphs this object is capable of drawing.

Parameters
sActionListenerAction listener that will respond to menu events
Returns
Menu of line graph labels, submenus allowed, null if there are no options

◆ getMapOptions()

abstract JPopupMenu sortie.datavisualizer.DataFileManager.getMapOptions ( ActionListener  sActionListener)
abstract

Gets a list of maps this object is capable of drawing.

Parameters
sActionListenerAction listener that will respond to menu events
Returns
Menu of map labels, submenus allowed, null if there are no options

◆ getNumberOpenCharts()

int sortie.datavisualizer.DataFileManager.getNumberOpenCharts ( )

Gets the number of open charts for this file.

Returns
int Number of open charts for this file.

◆ getTableOptions()

abstract JPopupMenu sortie.datavisualizer.DataFileManager.getTableOptions ( ActionListener  sActionListener)
abstract

Gets a list of tables this object is capable of drawing.

Parameters
sActionListenerAction listener that will respond to menu events
Returns
Menu of table labels, submenus allowed, null if there are no options

◆ updateCharts()

abstract void sortie.datavisualizer.DataFileManager.updateCharts ( ) throws ModelException
abstract

Prompts the redrawing of all open charts.

Exceptions
ModelExceptionwrapping other exceptions

◆ updateCurrentRunCharts()

abstract void sortie.datavisualizer.DataFileManager.updateCurrentRunCharts ( ) throws ModelException
abstract

Prompts the redrawing of open charts for the current run.

The data file manager should search for and display the most recent information.

Exceptions
ModelExceptionif there is a problem drawing the charts.

Member Data Documentation

◆ m_oLegend

Legend sortie.datavisualizer.DataFileManager.m_oLegend
protected

The legend for this file.

◆ m_oManager

DataVisualizerManager sortie.datavisualizer.DataFileManager.m_oManager
protected

Manager object.

◆ m_sFilename

String sortie.datavisualizer.DataFileManager.m_sFilename
protected

File under management.

◆ mp_oCharts

ArrayList<JInternalFrame> sortie.datavisualizer.DataFileManager.mp_oCharts = new ArrayList<JInternalFrame>(0)
protected

All charts under management.

◆ mp_sDeadCodeNames

String [] sortie.datavisualizer.DataFileManager.mp_sDeadCodeNames = new String[OutputBehaviors.NUMCODES]
protected

Text equivalents of dead codes.


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