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 DEVELOPER
the developer's display level
 o dispLevel
 o hdf
the generic hdf object
 o hdfObjQueue
the queue to store the hdf object
 o HOSTHEADER
the host header in the configuration file
 o LAYER
layer view selection
 o nl
new line feed plus carrage return
 o NL
the new line charactor
 o USER
the user's display level

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 createHdbMenuBar()
create menubar for jhv viewer
 o createHelpMenu(String)
create a help menu with specific menu title
 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 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 isLocal()
Is local access
 o isMac()
Is the current platform MacOS
 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 readHosts(String)
reads server host list from jhv configuration file
 o removeHostMenuItems()
 o setHostList(List)
 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 jhv configuration file which also deletes the old host list from the configuration file

Variables

 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 String NL
the new line charactor

 o HOSTHEADER
 public static String HOSTHEADER
the host header in the configuration file

 o hdfObjQueue
 public Queue hdfObjQueue
the queue to store the hdf object

 o hdf
 public HDFLibrary hdf
the generic hdf object

 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 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 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 createHdbMenuBar
 public MenuBar createHdbMenuBar()
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 setHostList
 public void setHostList(List list)
 o getHostList
 public List getHostList()
 o addHostMenuItems
 public void addHostMenuItems()
 o removeHostMenuItems
 public void removeHostMenuItems()
 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 readHosts
 public List readHosts(String filename)
reads server host list from jhv configuration file

Parameters:
filename - The name of the configuration file
config - The configurations except the server hosts
Returns:
The list of server hosts
 o writeHosts
 public void writeHosts(String filename,
                        List hosts)
writes the server host list into the jhv configuration file which also deletes the old host list from the configuration 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

All Packages  Class Hierarchy  This Package  Previous  Next  Index