All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.as400.vaccess.VIFSDirectory
java.lang.Object
|
+----com.ibm.as400.vaccess.VIFSDirectory
- public class VIFSDirectory
- extends Object
- implements VNode, VIFSConstants, Serializable
The VIFSDirectory class defines the representation of a
directory in the integrated file system of an AS/400 for use
in various models and panes in this package.
You must explicitly call load() to load the information from
the AS/400.
Most errors are reported as ErrorEvents rather than
throwing exceptions. Users should listen for ErrorEvents
in order to diagnose and recover from error conditions.
VIFSDirectory objects generate the following events:
- ErrorEvent
- PropertyChangeEvent
- VObjectEvent
- WorkingEvent
- See Also:
- IFSFile
-
INCLUDE_BOTH
- Constant for including both files and directories.
-
INCLUDE_DIRECTORIES
- Constant for including directories only.
-
INCLUDE_FILES
- Constant for including files only.
-
VIFSDirectory()
- Constructs a VIFSDirectory object.
-
VIFSDirectory(AS400, String)
- Constructs a VIFSDirectory object.
-
VIFSDirectory(IFSFile)
- Constructs a VIFSDirectory object.
-
VIFSDirectory(VNode, IFSFile)
- Constructs a VIFSDirectory object.
-
addErrorListener(ErrorListener)
- Adds a listener to be notified when an error occurs.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a listener to be notified when the value of any
bound property changes.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds a listener to be notified when the value of any
constrained property changes.
-
addVObjectListener(VObjectListener)
- Adds a listener to be notified when a VObject is changed,
created, or deleted.
-
addWorkingListener(WorkingListener)
- Adds a listener to be notified when work starts and stops
on potentially long-running operations.
-
children()
- Returns the children of the node.
-
getActions()
- Returns the list of actions that can be performed.
-
getAllowsChildren()
- Indiciates if the node allows children.
-
getChildAt(int)
- Returns the child node at the specified index.
-
getChildCount()
- Returns the number of children.
-
getDefaultAction()
- Returns the default action.
-
getDetailsChildAt(int)
- Returns the child for the details at the specified index.
-
getDetailsChildCount()
- Returns the number of children for the details.
-
getDetailsColumnModel()
- Returns the table column model to use in the details
when representing the children.
-
getDetailsIndex(VObject)
- Returns the index of the specified child for the details.
-
getFilter()
- Returns the filter which determines which files and directories
are included as children.
-
getIcon(int, boolean)
- Returns the icon.
-
getInclude()
- Indicates if files, directories, or both are contained in the
list of details children.
-
getIndex(TreeNode)
- Returns the index of the specified child.
-
getName()
- Returns the directory name.
-
getParent()
- Returns the parent node.
-
getParentDirectory()
- Returns the parent directory name.
-
getPath()
- Returns the fully qualified path name of the file.
-
getPattern()
- Returns the pattern that all file and directory names must match
to be included as children.
-
getPropertiesPane()
- Returns the properties pane.
-
getPropertyValue(Object)
- Returns a property value.
-
getSystem()
- Returns the AS/400 on which the file resides.
-
getText()
- Returns the text.
-
isLeaf()
- Indicates if the node is a leaf.
-
isSortable()
- Indicates if the details children are sortable.
-
load()
- Loads information about the object from the AS/400.
-
removeErrorListener(ErrorListener)
- Removes an error listener.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes a property change listener.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes a vetoable change listener.
-
removeVObjectListener(VObjectListener)
- Removes a VObjectListener.
-
removeWorkingListener(WorkingListener)
- Removes a working listener.
-
setFilter(IFSFileFilter)
- Sets the filter which determines which files and directories
are included as children.
-
setInclude(int)
- Sets whether files, directories, or both are contained in the
list of details children.
-
setPath(String)
- Sets the fully qualified path name of the file.
-
setPattern(String)
- Sets the pattern that all file and directory names must match
to be included as children.
-
setSystem(AS400)
- Sets the AS/400 system on which the file resides.
-
sortDetailsChildren(Object[], boolean[])
- Sorts the children for the details.
-
toString()
- Returns the string representation.
INCLUDE_FILES
public static final int INCLUDE_FILES
- Constant for including files only.
INCLUDE_DIRECTORIES
public static final int INCLUDE_DIRECTORIES
- Constant for including directories only.
INCLUDE_BOTH
public static final int INCLUDE_BOTH
- Constant for including both files and directories.
VIFSDirectory
public VIFSDirectory()
- Constructs a VIFSDirectory object.
VIFSDirectory
public VIFSDirectory(IFSFile directory)
- Constructs a VIFSDirectory object.
- Parameters:
- directory - The directory.
VIFSDirectory
public VIFSDirectory(VNode parent,
IFSFile directory)
- Constructs a VIFSDirectory object.
- Parameters:
- parent - The parent.
- directory - The directory.
VIFSDirectory
public VIFSDirectory(AS400 system,
String path)
- Constructs a VIFSDirectory object.
- Parameters:
- system - The AS/400 on which the file resides.
- path - The fully qualified path name of the file.
addErrorListener
public void addErrorListener(ErrorListener listener)
- Adds a listener to be notified when an error occurs.
- Parameters:
- listener - The listener.
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
- Adds a listener to be notified when the value of any
bound property changes.
- Parameters:
- listener - The listener.
addVetoableChangeListener
public void addVetoableChangeListener(VetoableChangeListener listener)
- Adds a listener to be notified when the value of any
constrained property changes.
- Parameters:
- listener - The listener.
addVObjectListener
public void addVObjectListener(VObjectListener listener)
- Adds a listener to be notified when a VObject is changed,
created, or deleted.
- Parameters:
- listener - The listener.
addWorkingListener
public void addWorkingListener(WorkingListener listener)
- Adds a listener to be notified when work starts and stops
on potentially long-running operations.
- Parameters:
- listener - The listener.
children
public synchronized Enumeration children()
- Returns the children of the node.
The children are the subdirectories.
- Returns:
- The children.
getActions
public VAction[] getActions()
- Returns the list of actions that can be performed.
- create file
- create directory
- rename
- delete
- Returns:
- The actions.
getAllowsChildren
public boolean getAllowsChildren()
- Indiciates if the node allows children.
- Returns:
- Always true.
getChildAt
public synchronized TreeNode getChildAt(int index)
- Returns the child node at the specified index.
- Parameters:
- index - The index.
- Returns:
- The child node, or null if the
index is not valid.
getChildCount
public synchronized int getChildCount()
- Returns the number of children.
This is the number of subdirectories.
- Returns:
- The number of children.
getDefaultAction
public VAction getDefaultAction()
- Returns the default action.
- Returns:
- Always null. There is no default action.
getDetailsChildAt
public synchronized VObject getDetailsChildAt(int index)
- Returns the child for the details at the specified index.
- Parameters:
- index - The index.
- Returns:
- The child, or null if the index is not
valid.
getDetailsChildCount
public synchronized int getDetailsChildCount()
- Returns the number of children for the details.
This is the number of subdirectories and files.
- Returns:
- The number of children for the details.
getDetailsColumnModel
public TableColumnModel getDetailsColumnModel()
- Returns the table column model to use in the details
when representing the children. This column model
describes the details values for the children.
- Returns:
- The details column model.
getDetailsIndex
public synchronized int getDetailsIndex(VObject detailsChild)
- Returns the index of the specified child for the details.
- Parameters:
- detailsChild - The details child.
- Returns:
- The index, or -1 if the child is not found
in the details.
getFilter
public IFSFileFilter getFilter()
- Returns the filter which determines which files and directories
are included as children.
- Returns:
- The filter which determines which files are included
as children, or null to include all files and
directories.
getIcon
public Icon getIcon(int size,
boolean open)
- Returns the icon.
- Parameters:
- size - The icon size, either 16 or 32. If any other
value is given, then return a default.
- open - true for the open icon; false for the closed
icon.
- Returns:
- The icon.
getInclude
public int getInclude()
- Indicates if files, directories, or both are contained in the
list of details children.
- Returns:
- One of the constants: INCLUDE_FILES, INCLUDE_DIRECTORIES,
or INCLUDE_BOTH.
getIndex
public synchronized int getIndex(TreeNode child)
- Returns the index of the specified child.
- Parameters:
- child - The child.
- Returns:
- The index.
getName
public String getName()
- Returns the directory name.
- Returns:
- The directory name.
- See Also:
- getName
getParent
public TreeNode getParent()
- Returns the parent node.
- Returns:
- The parent node, or null if there is no parent.
getParentDirectory
public String getParentDirectory()
- Returns the parent directory name.
- Returns:
- The parent directory name.
- See Also:
- getParent
getPattern
public String getPattern()
- Returns the pattern that all file and directory names must match
to be included as children. The pattern is defined in terms
of * and ?.
- Returns:
- The pattern that all file and directory names must match
to be included as children, or null to include all files
and directories.
getPath
public String getPath()
- Returns the fully qualified path name of the file.
- Returns:
- The fully qualified path name of the file.
- See Also:
- getPath
getPropertiesPane
public VPropertiesPane getPropertiesPane()
- Returns the properties pane.
- Returns:
- The properties pane.
getPropertyValue
public synchronized Object getPropertyValue(Object propertyIdentifier)
- Returns a property value.
- Parameters:
- propertyIdentifier - The property identifier. The choices are
- NAME_PROPERTY
- DESCRIPTION_PROPERTY
- SIZE_PROPERTY
- MODIFIED_PROPERTY
- ATTRIBUTES_PROPERTY
- Returns:
- The property value, or null if the
property identifier is not recognized.
getSystem
public AS400 getSystem()
- Returns the AS/400 on which the file resides.
- Returns:
- The AS/400 on which the file resides.
- See Also:
- getSystem
getText
public String getText()
- Returns the text. This is the name of the directory.
- Returns:
- The text which is the name of the directory.
isLeaf
public boolean isLeaf()
- Indicates if the node is a leaf.
- Parameters:
- true - if the node if a leaf; false otherwise.
isSortable
public boolean isSortable()
- Indicates if the details children are sortable.
- Returns:
- Always true.
load
public void load()
- Loads information about the object from the AS/400.
removeErrorListener
public void removeErrorListener(ErrorListener listener)
- Removes an error listener.
- Parameters:
- listener - The listener.
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
- Removes a property change listener.
- Parameters:
- listener - The listener.
removeVetoableChangeListener
public void removeVetoableChangeListener(VetoableChangeListener listener)
- Removes a vetoable change listener.
- Parameters:
- listener - The listener.
removeVObjectListener
public void removeVObjectListener(VObjectListener listener)
- Removes a VObjectListener.
- Parameters:
- listener - The listener.
removeWorkingListener
public void removeWorkingListener(WorkingListener listener)
- Removes a working listener.
- Parameters:
- listener - The listener.
setFilter
public void setFilter(IFSFileFilter filter) throws PropertyVetoException
- Sets the filter which determines which files and directories
are included as children.
- Parameters:
- filter - The filter which determines which files are included
as children, or null to include all files and
directories.
- Throws: PropertyVetoException
- If the change is vetoed.
setInclude
public void setInclude(int include) throws PropertyVetoException
- Sets whether files, directories, or both are contained in the
list of details children.
- Parameters:
- include - One of the constants: INCLUDE_FILES,
INCLUDE_DIRECTORIES, or INCLUDE_BOTH.
- Throws: PropertyVetoException
- If the change is vetoed.
setPath
public void setPath(String path) throws PropertyVetoException
- Sets the fully qualified path name of the file.
- Parameters:
- path - The fully qualified path name of the file.
- Throws: PropertyVetoException
- If the change is vetoed.
- See Also:
- setPath
setPattern
public void setPattern(String pattern) throws PropertyVetoException
- Sets the pattern that all file and directory names must match
to be included as children. The pattern is defined in terms
of * and ?. The default is to include all files and directories.
- Parameters:
- pattern - The pattern that all file and directory names
must match to be included as children, or null
to include all files and directories.
- Throws: PropertyVetoException
- If the change is vetoed.
setSystem
public void setSystem(AS400 system) throws PropertyVetoException
- Sets the AS/400 system on which the file resides.
- Parameters:
- system - The AS/400 system on which the file resides.
- Throws: PropertyVetoException
- If the change is vetoed.
- See Also:
- setSystem
sortDetailsChildren
public synchronized void sortDetailsChildren(Object propertyIdentifiers[],
boolean orders[])
- Sorts the children for the details.
- Parameters:
- propertyIdentifiers - The property identifiers. If any of
the property identifiers are null, it
means to sort using the string
representation of the object.
- orders - The sort orders for each property
identifier, true for ascending order,
false for descending order.
toString
public String toString()
- Returns the string representation. This is the name of the directory.
- Returns:
- The string representation of the directory.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index