Object
hdf.view.HDFView
- All Implemented Interfaces:
DataViewManager
public class HDFView extends Object implements 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
Modifier and Type Method Description voidaddDataView(DataView dataView)Data content is displayed, add the dataview to the main windowsvoidcloseFile(FileFormat theFile)DataViewgetDataView(HObject dataObject)Returns DataView that contains the specified data object.static List<String>getListOfImageViews()static List<?>getListOfMetaDataViews()static List<?>getListOfPaletteViews()static List<?>getListOfTableViews()static List<String>getListOfTreeViews()booleangetTestState()TreeViewgetTreeView()org.eclipse.swt.widgets.CombogetUrlBar()static voidmain(String[] args)The starting point of this application.org.eclipse.swt.widgets.ShellopenMainWindow(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.voidremoveDataView(DataView dataView)Data content is closed, remove the dataview from the main windowvoidrunMainWindow()voidsetTestState(boolean testing)Set the testing state that determines if HDFView is being executed for GUI testing.voidshowError(String errMsg)Display error messagevoidshowMetaData(HObject obj)voidshowStatus(String msg)Display feedback message.voidwriteDataToFile(FileFormat theFile)Write the change of data to the given file.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
HDFView
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 Details
-
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
-
getListOfTreeViews
- Returns:
- a list of treeview implementations.
-
getListOfImageViews
- Returns:
- a list of imageview implementations.
-
getListOfTableViews
- Returns:
- a list of tableview implementations.
-
getListOfMetaDataViews
- Returns:
- a list of metaDataview implementations.
-
getListOfPaletteViews
- Returns:
- a list of paletteview implementations.
-
getTreeView
- Specified by:
getTreeViewin interfaceDataViewManager- Returns:
- the current TreeView
-
getUrlBar
-
showStatus
Display feedback message.- Specified by:
showStatusin interfaceDataViewManager- Parameters:
msg- the message to display.
-
showError
Display error message- Specified by:
showErrorin interfaceDataViewManager- Parameters:
errMsg- the error message to display
-
showMetaData
-
closeFile
-
writeDataToFile
Write the change of data to the given file.- Parameters:
theFile- The file to be updated.
-
addDataView
Description copied from interface:DataViewManagerData content is displayed, add the dataview to the main windows- Specified by:
addDataViewin interfaceDataViewManager- Parameters:
dataView- the dataView whose presence in the main view is to be added.
-
removeDataView
Description copied from interface:DataViewManagerData content is closed, remove the dataview from the main window- Specified by:
removeDataViewin interfaceDataViewManager- Parameters:
dataView- the dataView whose presence in the main view is to be removed.
-
getDataView
Description copied from interface:DataViewManagerReturns DataView that contains the specified data object. It is useful to avoid redundant display of data object that is opened already.- Specified by:
getDataViewin interfaceDataViewManager- Parameters:
dataObject- the object whose presence in the main view is to be tested.- Returns:
- DataView contains the specified data object, null if the data object is not displayed.
-
setTestState
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
-
main
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
-