public interface TreeView
TreeView defines APIs for opening a file and displaying the file structure in a tree structure.
TreeView uses folders and leaf nodes to represent groups and data objects in the file. You can expand or collapse folders to navigate data objects in the file.
From the TreeView, you can open the data content or metadata of the selected object. You can select object(s) to delete or add new objects to the file.
Modifier and Type | Method and Description |
---|---|
void |
addObject(HObject newObject,
Group parentGroup)
Adds a new data object to the file.
|
void |
closeFile(FileFormat file)
close a file
|
TreeNode |
findTreeNode(HObject obj) |
List<FileFormat> |
getCurrentFiles() |
HObject |
getCurrentObject() |
FileFormat |
getSelectedFile()
Gets the selected the file.
|
List<?> |
getSelectedObjects()
Gets a list of selected objects in the tree.
|
JTree |
getTree()
Returns the JTree which holds the file structure.
|
FileFormat |
openFile(String filename,
int accessID)
Opens a file and retrieves the file structure of the file.
|
FileFormat |
reopenFile(FileFormat theFile) |
void |
saveFile(FileFormat file)
save a file
|
DataView |
showDataContent(HObject dataObject)
Display the content of a data object.
|
MetaDataView |
showMetaData(HObject dataObject)
Displays the meta data of a data object.
|
FileFormat openFile(String filename, int accessID) throws Exception
Subclasses must implement this function to take appropriate steps to open a file.
filename
- the name of the file to open.accessID
- identifier for the file access. Valid value of accessID is:
Exception
- if a failure occurredFileFormat reopenFile(FileFormat theFile) throws Exception
Exception
void closeFile(FileFormat file) throws Exception
file
- the file to closeException
- if a failure occurredvoid saveFile(FileFormat file) throws Exception
file
- the file to saveException
- if a failure occurredFileFormat getSelectedFile()
List<?> getSelectedObjects()
HObject getCurrentObject()
DataView showDataContent(HObject dataObject) throws Exception
dataObject
- the data objectException
- if a failure occurredMetaDataView showMetaData(HObject dataObject) throws Exception
dataObject
- the data objectException
- if a failure occurredvoid addObject(HObject newObject, Group parentGroup) throws Exception
newObject
- the new object to add.parentGroup
- the parent group the object is to add to.Exception
- if an exception occurs while adding a new data object to the fileJTree getTree()
List<FileFormat> getCurrentFiles()
TreeNode findTreeNode(HObject obj)
obj
- the object to findCopyright © 2017. All Rights Reserved.