hydroScalingAPI.mainGUI.objects
Class GUI_InfoManager

java.lang.Object
  extended by hydroScalingAPI.mainGUI.objects.GUI_InfoManager

public class GUI_InfoManager
extends java.lang.Object

This class manages the information needed by the main CUENCAS GUI created by ParentGUI

Author:
Ricardo Mantilla

Field Summary
 boolean dataBaseDocumentationExists
          This boolean inticates if the database directory contains the Documentation subdirectory
 java.io.File dataBaseDocumentationPath
          The path to the Documentation subdirectory in the database
 boolean dataBaseExists
          This boolean inticates if a database directory is available
 boolean dataBaseLinesExists
          This boolean inticates if the database directory contains the Lines subdirectory
 java.io.File dataBaseLinesPath
          The path to the Lines subdirectory in the database
 boolean dataBaseLogoExists
          This boolean inticates if the database directory contains the logo.jpg file.
 java.io.File dataBaseLogoPath
          The path to the logo.jpg in the database
 java.lang.String dataBaseName
          The path to the name.txt file in the database
 boolean dataBaseNameExists
          This boolean inticates if the database directory contains the name.txt file.
 java.io.File dataBaseNamePath
          The path to the name.txt file in the database
 java.io.File dataBasePath
          The path to the database directory
 boolean dataBasePolygonsExists
          This boolean inticates if the database directory contains the Polygons subdirectory
 java.io.File dataBasePolygonsPath
          The path to the Polygons subdirectory in the database
 boolean dataBaseRastersDemExists
          This boolean inticates if the database directory contains the Rasters/Topography subdirectory
 java.io.File dataBaseRastersDemPath
          The path to the Rasters/Topography subdirectory in the database
 boolean dataBaseRastersHydExists
          This boolean inticates if the database directory contains the Rasters/Hydrology subdirectory
 java.io.File dataBaseRastersHydPath
          The path to the Rasters/Hydrology subdirectory in the database
 boolean dataBaseSitesGaugesExists
          This boolean inticates if the database directory contains the Sites/Gauges subdirectory
 java.io.File dataBaseSitesGaugesPath
          The path to the Sites/Gauges subdirectory in the database
 boolean dataBaseSitesLocationsExists
          This boolean inticates if the database directory contains the Sites/Locations subdirectory
 java.io.File dataBaseSitesLocationsPath
          The path to the Sites/Locations subdirectory in the database
 boolean dataBaseVectorsExists
          This boolean inticates if the database directory contains the Vectors subdirectory
 java.io.File dataBaseVectorsPath
          The path to the Vectors subdirectory in the database
 int gui_Xpos
          The initial horizontal position for the CUENCAS GUI
 int gui_Xsize
          The initial horizontal size for the CUENCAS GUI
 int gui_Ypos
          The initial vertical position for the CUENCAS GUI
 int gui_Ysize
          The initial vertical size for the CUENCAS GUI
 java.lang.String language
          The language of the GUI (Currently only English has been implemented)
 java.io.File metaFileActive
          The path to the active metaFile (Used by GUI tools)
 java.util.Vector recentCalcMaps
          A Vector containing the list of files recently created by the user using the MapCalculator
 java.util.Vector recentDataBases
          A Vector containing the list of database directories recently opened by the user
 java.util.Vector recentFiles
          A Vector containing the list of files recently opened by the user
 
Constructor Summary
GUI_InfoManager()
          Creates a new instance of GUI_InfoManager
GUI_InfoManager(java.io.File predifined)
          Creates a new instance of GUI_InfoManager
 
Method Summary
 void assignProperty(java.lang.String tag)
          Assigns the value of a property
 void assignProperty(java.lang.String tag, java.io.BufferedReader buffer)
          Assigns the value of a property using information contained in a file
 void checkDataBase()
          Checks the directory structure of the CUENCAS database directory to determine if it follows the guidelines established.
 visad.DataReferenceImpl getDataReference(java.lang.String refName)
          Returns the visad.DataReferenceImpl associated to a given name from a list of global references.
 float[] getNetworkBlue()
          Return the array of intensities of blue color (RGB) for the river Network.
 float[] getNetworkGreen()
          Return the array of intensities of green color (RGB) for the river Network.
 float[] getNetworkRed()
          Return the array of intensities of red color (RGB) for the river Network.
static void main(java.lang.String[] args)
          Test for the class
 void registerDataReference(java.lang.String refName, visad.DataReferenceImpl theRef)
          Add a reference to the list of global references.
 void setBounds(java.awt.Rectangle newBounds)
          Assigns the frame location and size properties
 void writePreferences()
          Writes File of preferences including list of recently openned files and databases
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gui_Xpos

public int gui_Xpos
The initial horizontal position for the CUENCAS GUI


gui_Ypos

public int gui_Ypos
The initial vertical position for the CUENCAS GUI


gui_Xsize

public int gui_Xsize
The initial horizontal size for the CUENCAS GUI


gui_Ysize

public int gui_Ysize
The initial vertical size for the CUENCAS GUI


language

public java.lang.String language
The language of the GUI (Currently only English has been implemented)


recentFiles

public java.util.Vector recentFiles
A Vector containing the list of files recently opened by the user


recentDataBases

public java.util.Vector recentDataBases
A Vector containing the list of database directories recently opened by the user


recentCalcMaps

public java.util.Vector recentCalcMaps
A Vector containing the list of files recently created by the user using the MapCalculator


dataBaseExists

public boolean dataBaseExists
This boolean inticates if a database directory is available


dataBaseRastersDemExists

public boolean dataBaseRastersDemExists
This boolean inticates if the database directory contains the Rasters/Topography subdirectory


dataBaseRastersHydExists

public boolean dataBaseRastersHydExists
This boolean inticates if the database directory contains the Rasters/Hydrology subdirectory


dataBaseVectorsExists

public boolean dataBaseVectorsExists
This boolean inticates if the database directory contains the Vectors subdirectory


dataBasePolygonsExists

public boolean dataBasePolygonsExists
This boolean inticates if the database directory contains the Polygons subdirectory


dataBaseLinesExists

public boolean dataBaseLinesExists
This boolean inticates if the database directory contains the Lines subdirectory


dataBaseSitesGaugesExists

public boolean dataBaseSitesGaugesExists
This boolean inticates if the database directory contains the Sites/Gauges subdirectory


dataBaseSitesLocationsExists

public boolean dataBaseSitesLocationsExists
This boolean inticates if the database directory contains the Sites/Locations subdirectory


dataBaseDocumentationExists

public boolean dataBaseDocumentationExists
This boolean inticates if the database directory contains the Documentation subdirectory


dataBaseLogoExists

public boolean dataBaseLogoExists
This boolean inticates if the database directory contains the logo.jpg file. The file properties are described in the Developer's Guide


dataBaseNameExists

public boolean dataBaseNameExists
This boolean inticates if the database directory contains the name.txt file. The file properties are described in the Developer's Guide


dataBasePath

public java.io.File dataBasePath
The path to the database directory


dataBaseRastersDemPath

public java.io.File dataBaseRastersDemPath
The path to the Rasters/Topography subdirectory in the database


dataBaseRastersHydPath

public java.io.File dataBaseRastersHydPath
The path to the Rasters/Hydrology subdirectory in the database


dataBaseVectorsPath

public java.io.File dataBaseVectorsPath
The path to the Vectors subdirectory in the database


dataBasePolygonsPath

public java.io.File dataBasePolygonsPath
The path to the Polygons subdirectory in the database


dataBaseLinesPath

public java.io.File dataBaseLinesPath
The path to the Lines subdirectory in the database


dataBaseSitesGaugesPath

public java.io.File dataBaseSitesGaugesPath
The path to the Sites/Gauges subdirectory in the database


dataBaseSitesLocationsPath

public java.io.File dataBaseSitesLocationsPath
The path to the Sites/Locations subdirectory in the database


dataBaseDocumentationPath

public java.io.File dataBaseDocumentationPath
The path to the Documentation subdirectory in the database


dataBaseLogoPath

public java.io.File dataBaseLogoPath
The path to the logo.jpg in the database


dataBaseNamePath

public java.io.File dataBaseNamePath
The path to the name.txt file in the database


metaFileActive

public java.io.File metaFileActive
The path to the active metaFile (Used by GUI tools)


dataBaseName

public java.lang.String dataBaseName
The path to the name.txt file in the database

Constructor Detail

GUI_InfoManager

public GUI_InfoManager(java.io.File predifined)
Creates a new instance of GUI_InfoManager

Parameters:
predifined - The path to a pre-existing .cuencas.ini file

GUI_InfoManager

public GUI_InfoManager()
Creates a new instance of GUI_InfoManager

Method Detail

assignProperty

public void assignProperty(java.lang.String tag)
Assigns the value of a property

Parameters:
tag - The tag of the property to be assigned

assignProperty

public void assignProperty(java.lang.String tag,
                           java.io.BufferedReader buffer)
                    throws java.io.IOException
Assigns the value of a property using information contained in a file

Parameters:
tag - The tag of the property to be assigned
buffer - The file where the property value resides
Throws:
java.io.IOException - Captures errors while reading from the file

checkDataBase

public void checkDataBase()
Checks the directory structure of the CUENCAS database directory to determine if it follows the guidelines established. See the Developer's Manual for more information


setBounds

public void setBounds(java.awt.Rectangle newBounds)
Assigns the frame location and size properties

Parameters:
newBounds - A Rectangle containing the properties of the interface frame

getDataReference

public visad.DataReferenceImpl getDataReference(java.lang.String refName)
Returns the visad.DataReferenceImpl associated to a given name from a list of global references. The references point to Vectors, Polygons and Lines. These references are stored by the GUI Manager and passed to every internal map panel.

Parameters:
refName - The name of the desired reference
Returns:
A visad.DataReferenceImpl ready to be added into a visad.Display

getNetworkRed

public float[] getNetworkRed()
Return the array of intensities of red color (RGB) for the river Network.

Returns:
An array of red intensities

getNetworkGreen

public float[] getNetworkGreen()
Return the array of intensities of green color (RGB) for the river Network.

Returns:
An array of green intensities

getNetworkBlue

public float[] getNetworkBlue()
Return the array of intensities of blue color (RGB) for the river Network.

Returns:
An array of blue intensities

registerDataReference

public void registerDataReference(java.lang.String refName,
                                  visad.DataReferenceImpl theRef)
Add a reference to the list of global references. These references are stored by the GUI Manager and passed to every internal map panel.

Parameters:
refName - A name for the reference
theRef - The visad.DataReferenceImpl

writePreferences

public void writePreferences()
Writes File of preferences including list of recently openned files and databases


main

public static void main(java.lang.String[] args)
Test for the class

Parameters:
args - the command line arguments


CUENCAS was initially developed by Ricardo Mantilla at the University of Colorado under the supervision of Dr. Vijay K. Gupta. We wish to recognize the support from the National Science Fundation.