Package hdf.view
Class HDFView
- Object
-
- hdf.view.HDFView
-
- All Implemented Interfaces:
hdf.view.DataView.DataViewManager
public class HDFView extends Object implements hdf.view.DataView.DataViewManager
HDFView is the main class of this HDF visual tool. It is used to layout the graphical components of the hdfview. The major GUI components of the HDFView include Menubar, Toolbar, TreeView, ContentView, and MessageArea.The HDFView is designed in such a way that it does not have direct access to the HDF library. All the HDF library access is done through HDF objects. Therefore, the HDFView package depends on the object package but not the library package. The source code of the view package (hdf.view) should be compiled with the library package (hdf.hdflib and hdf.hdf5lib).
- Version:
- 2.4 //2015
- Author:
- Jordan T. Henderson
-
-
Constructor Summary
Constructors Constructor Description HDFView(String root)
Constructs HDFView with a given root directory, where the HDFView is installed, and opens the given files in the viewer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDataView(hdf.view.DataView.DataView dataView)
void
closeFile(FileFormat theFile)
hdf.view.DataView.DataView
getDataView(HObject dataObject)
static List<String>
getListOfImageViews()
static List<?>
getListOfMetaDataViews()
static List<?>
getListOfPaletteViews()
static List<?>
getListOfTableViews()
static List<String>
getListOfTreeViews()
boolean
getTestState()
hdf.view.TreeView.TreeView
getTreeView()
org.eclipse.swt.widgets.Combo
getUrlBar()
static void
main(String[] args)
The starting point of this application.org.eclipse.swt.widgets.Shell
openMainWindow(List<File> flist, int width, int height, int x, int y)
Creates HDFView with a given size, and opens the given files in the viewer.void
removeDataView(hdf.view.DataView.DataView dataView)
void
runMainWindow()
void
setTestState(boolean testing)
Set the testing state that determines if HDFView is being executed for GUI testing.void
showError(String errMsg)
Display error messagevoid
showMetaData(HObject obj)
void
showStatus(String msg)
Display feedback message.void
writeDataToFile(FileFormat theFile)
Write the change of data to the given file.
-
-
-
Constructor Detail
-
HDFView
public HDFView(String root)
Constructs HDFView with a given root directory, where the HDFView is installed, and opens the given files in the viewer.- Parameters:
root
- the directory where the HDFView is installed.
-
-
Method Detail
-
openMainWindow
public org.eclipse.swt.widgets.Shell openMainWindow(List<File> flist, int width, int height, int x, int y)
Creates HDFView with a given size, and opens the given files in the viewer.- Parameters:
flist
- a list of files to open.width
- the width of the app in pixelsheight
- the height of the app in pixelsx
- the coord x of the app in pixelsy
- the coord y of the app in pixels- Returns:
- the newly-created HDFView Shell
-
runMainWindow
public void runMainWindow()
-
getListOfTreeViews
public static final List<String> getListOfTreeViews()
- Returns:
- a list of treeview implementations.
-
getListOfImageViews
public static final List<String> getListOfImageViews()
- Returns:
- a list of imageview implementations.
-
getListOfTableViews
public static final List<?> getListOfTableViews()
- Returns:
- a list of tableview implementations.
-
getListOfMetaDataViews
public static final List<?> getListOfMetaDataViews()
- Returns:
- a list of metaDataview implementations.
-
getListOfPaletteViews
public static final List<?> getListOfPaletteViews()
- Returns:
- a list of paletteview implementations.
-
getTreeView
public hdf.view.TreeView.TreeView getTreeView()
- Specified by:
getTreeView
in interfacehdf.view.DataView.DataViewManager
-
getUrlBar
public org.eclipse.swt.widgets.Combo getUrlBar()
-
showStatus
public void showStatus(String msg)
Display feedback message.- Specified by:
showStatus
in interfacehdf.view.DataView.DataViewManager
- Parameters:
msg
- the message to display.
-
showError
public void showError(String errMsg)
Display error message- Specified by:
showError
in interfacehdf.view.DataView.DataViewManager
- Parameters:
errMsg
- the error message to display
-
showMetaData
public void showMetaData(HObject obj)
-
closeFile
public void closeFile(FileFormat theFile)
-
writeDataToFile
public void writeDataToFile(FileFormat theFile)
Write the change of data to the given file.- Parameters:
theFile
- The file to be updated.
-
addDataView
public void addDataView(hdf.view.DataView.DataView dataView)
- Specified by:
addDataView
in interfacehdf.view.DataView.DataViewManager
-
removeDataView
public void removeDataView(hdf.view.DataView.DataView dataView)
- Specified by:
removeDataView
in interfacehdf.view.DataView.DataViewManager
-
getDataView
public hdf.view.DataView.DataView getDataView(HObject dataObject)
- Specified by:
getDataView
in interfacehdf.view.DataView.DataViewManager
-
setTestState
public void setTestState(boolean testing)
Set the testing state that determines if HDFView is being executed for GUI testing.- Parameters:
testing
- Provides SWTBot native dialog compatibility workarounds if set to true.
-
getTestState
public boolean getTestState()
-
main
public static void main(String[] args)
The starting point of this application.Usage: java(w) -Dhdf.hdf5lib.H5.hdf5lib="your HDF5 library path" -Dhdf.hdflib.HDFLibrary.hdflib="your HDF4 library path" -root "the directory where the HDFView is installed" [filename] "the file to open"
- Parameters:
args
- the command line arguments
-
-