All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.hdf.jhv.JHV

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----ncsa.hdf.jhv.JHV

public class JHV
extends Applet
implements ActionListener, ItemListener
JHV displays the HDF tree structure and data content Modifications: 1. Keep track of current HDF directory, and the selected HDF file will be located under previous selected HDF file directory. Also improve the "Load File" and let it do more work than "Open file". 08/08/97 xlu 2. Support lagre HDF file access, more changes. 09/06/97 xlu 3. Separate hdf file access from the UI. 01/14/98, Peter Cao 4. Support remote file access. 01/14/98, Peter Cao 5. Add documentation. 01/14/98, Peter Cao

Version:
1.00 8/10/97
Author:
Xinjian LU, HDF Group, NCSA

Variable Index

 o ANIMATION
animation view selection
 o DEFAULT
default view selection
 o delimiter
data delimiter
 o DEVELOPER
the developer's display level
 o dispLevel
 o LAYER
layer view selection
 o NL
the new line charactor
 o nl
new line feed plus carrage return
 o USER
the user's display level
 o USER_PROPS
the local property file name

Constructor Index

 o JHV()

Method Index

 o actionPerformed(ActionEvent)
handles the viewer action events.
 o addHostMenuItems()
 o createDisplayPanel()
create the new display panel for JHV
 o createFileMenu(String)
create a open menu by provided title
 o createHelpMenu(String)
create a help menu with specific menu title
 o createMenuBar()
create menubar for jhv viewer
 o createOptionMenu(String)
create an option menu with specific menu title
 o createViewMenu(String)
create a view menu by provided title
 o extractHdfObj(Queue, Vector)
extract the HDF object node into Vector
 o getFrame()
 o getHDFObject(HDFObjectNode)
get the HDFObject from server
 o getHDFObject(String, int, String, HDFObjectNode)
get the HDFObject from server
 o getHostList()
 o getProperties()
 o getTree()
Returns the HDFTree
 o init(String)
Initialize jhv with specified hdf file
 o isDirectory(String)
 o isFile(String)
Determines whether the specified string is a local file
 o isHDF()
 o isLocal()
Is local access
 o isMac()
Is the current platform MacOS
 o isWin()
Is the current platform Windows 95/NT
 o itemStateChanged(ItemEvent)
java.awt.event.ItemListener stuff
 o main(String[])
It is called automatically by the system the application is started.
 o openFile()
opens a local file
 o openFile(String, String)
open a file from a remote machine
 o openOnlineGuide()
Open online user's guide
 o removeHostMenuItems()
 o save()
save the data into HDF file or ASCII file
 o setHostList(String)
set up HDF server hosts from the user properties
 o setJHVFrame(Frame)
 o setup(String)
reset the viewer and display the HDF hierarchy when a new file is selected.
 o updateServerHosts(List)
updates the current host list and change the configuration file
 o writeHosts(String, List)
writes the server host list into the user property file which also deletes the old host list the user property file

Variables

 o USER_PROPS
 public static final String USER_PROPS
the local property file name

 o USER
 public static final int USER
the user's display level

 o DEVELOPER
 public static final int DEVELOPER
the developer's display level

 o DEFAULT
 public static final int DEFAULT
default view selection

 o ANIMATION
 public static final int ANIMATION
animation view selection

 o LAYER
 public static final int LAYER
layer view selection

 o nl
 public static char nl[]
new line feed plus carrage return

 o NL
 public static final String NL
the new line charactor

 o delimiter
 public static String delimiter
data delimiter

 o dispLevel
 public int dispLevel

Constructors

 o JHV
 public JHV()

Methods

 o main
 public static void main(String args[])
It is called automatically by the system the application is started.

 o init
 public void init(String hdffile)
Initialize jhv with specified hdf file

Parameters:
hdffile - the name of hdf file
 o getProperties
 public Properties getProperties()
 o actionPerformed
 public void actionPerformed(ActionEvent e)
handles the viewer action events. modified by Peter Cao (xcao@ncsa.uiuc.edu) on Jan. 13, 1998

 o setup
 public void setup(String hdfFileName)
reset the viewer and display the HDF hierarchy when a new file is selected.

Parameters:
hdfFileName - the name of the hdf file
 o createDisplayPanel
 public Panel createDisplayPanel()
create the new display panel for JHV

Returns:
the panel for HDF Browser
 o isMac
 public boolean isMac()
Is the current platform MacOS

 o isWin
 public boolean isWin()
Is the current platform Windows 95/NT

 o isLocal
 public boolean isLocal()
Is local access

 o getTree
 public HDFTree getTree()
Returns the HDFTree

 o extractHdfObj
 public void extractHdfObj(Queue hdfQueue,
                           Vector vec)
extract the HDF object node into Vector

Parameters:
hdfQueue - the HDF object node Queue
vec - the vector to store the HDF object node sequencely
 o createMenuBar
 public MenuBar createMenuBar()
create menubar for jhv viewer

 o createFileMenu
 public Menu createFileMenu(String menuTitle)
create a open menu by provided title

Parameters:
menuTitle - the menu title
 o createOptionMenu
 public Menu createOptionMenu(String title)
create an option menu with specific menu title

Parameters:
title - the menu title
Returns:
the option menu
 o createViewMenu
 public Menu createViewMenu(String menuTitle)
create a view menu by provided title

Parameters:
menuTitle - the menu title
 o createHelpMenu
 public Menu createHelpMenu(String title)
create a help menu with specific menu title

Parameters:
title - the menu title
Returns:
the option menu
 o isFile
 public boolean isFile(String str)
Determines whether the specified string is a local file

Parameters:
str - the file string
Returns:
true if str is a file, otherwise false
 o isDirectory
 public boolean isDirectory(String str)
 o openFile
 public void openFile(String location,
                      String afilename)
open a file from a remote machine

Parameters:
location - the remote machine
afilename - the requested hdf file
 o openFile
 public void openFile()
opens a local file

 o setJHVFrame
 public void setJHVFrame(Frame f)
 o getFrame
 public Frame getFrame()
 o itemStateChanged
 public void itemStateChanged(ItemEvent e)
java.awt.event.ItemListener stuff

 o getHostList
 public List getHostList()
 o addHostMenuItems
 public void addHostMenuItems()
 o removeHostMenuItems
 public void removeHostMenuItems()
 o setHostList
 public void setHostList(String hosts)
set up HDF server hosts from the user properties

Parameters:
hosts - the string of hosts separated by space
 o updateServerHosts
 public void updateServerHosts(List list)
updates the current host list and change the configuration file

Parameters:
list - the new list of server hosts
 o writeHosts
 public void writeHosts(String filename,
                        List hosts)
writes the server host list into the user property file which also deletes the old host list the user property file

Parameters:
filename - The name of the configuration file
hosts - The list of server hosts
 o getHDFObject
 public HDFObject getHDFObject(HDFObjectNode node)
get the HDFObject from server

Parameters:
node - The selected node in the hdf hierarchy tree
Returns:
The HDFObject containing the requested data
 o getHDFObject
 public HDFObject getHDFObject(String host,
                               int port,
                               String filename,
                               HDFObjectNode node)
get the HDFObject from server

Parameters:
host - The name of the remote machine
port - The port number of the server
filename - The hdf file name
node - The selected node in the hdf hierarchy tree
Returns:
The HDFObject containing the requested data
 o isHDF
 public boolean isHDF()
 o save
 public void save()
save the data into HDF file or ASCII file

 o openOnlineGuide
 public void openOnlineGuide()
Open online user's guide


All Packages  Class Hierarchy  This Package  Previous  Next  Index