All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.as400.vaccess.AS400ExplorerPane
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----com.sun.java.swing.JComponent
|
+----com.ibm.as400.vaccess.AS400ExplorerPane
- public class AS400ExplorerPane
- extends JComponent
- implements Serializable
The AS400ExplorerPane class represents a graphical user interface
that is useful for working with the hierarchy of objects rooted
at an AS/400 resource. The graphical user interface presents a
tree on the left side and the details of the selected resource
in the right side. You must explicitly call load() to load the
information from the AS/400.
AS400ExplorerPane objects generate the following events:
- ErrorEvent
- ListSelectionEvent
- PropertyChangeEvent
- TreeSelectionEvent
The following example creates an explorer pane filled with
the contents of a directory in the integrated file system
of an AS/400.
// Set up the explorer pane.
AS400 system = new AS400 ("MySystem", "Userid", "Password");
VIFSDirectory directory = new VIFSDirectory (system, "/myDirectory");
AS400ExplorerPane explorerPane = new AS400ExplorerPane (directory);
explorerPane.load ();
// Add the explorer pane to a frame.
JFrame frame = new JFrame ("My Window");
frame.getContentPane().add (explorerPane);
- See Also:
- AS400DetailsPane, AS400TreePane
-
AS400ExplorerPane()
- Constructs an AS400ExplorerPane object.
-
AS400ExplorerPane(VNode)
- Constructs an AS400ExplorerPane object.
-
addErrorListener(ErrorListener)
- Adds a listener to be notified when an error occurs.
-
addListSelectionListener(ListSelectionListener)
- Adds a listener to be notified when a list selection occurs in the details pane.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a listener to be notified when the value of any
bound property changes.
-
addTreeSelectionListener(TreeSelectionListener)
- Adds a listener to be notified when a tree selection occurs.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds a listener to be notified when the value of any
constrained property changes.
-
collapse(VNode)
- Collapses the specified object in the tree.
-
expand(VNode)
- Expands the specified object in the tree.
-
getActionContext()
- Returns the context in which actions will be performed.
-
getAllowActions()
- Indicates if actions can be invoked on objects.
-
getConfirm()
- Indicates if certain actions are confirmed with the user.
-
getDetailsColumnModel()
- Returns the column model that is used to maintain the columns
of the details.
-
getDetailsModel()
- Returns the details model.
-
getDetailsRoot()
- Returns the root of the details pane.
-
getDetailsSelectionModel()
- Returns the selection model that is used to maintain
selection state in the details.
-
getPath(VNode)
- Returns the path from the root to get to this object in the tree
hierarchy.
-
getRoot()
- Returns the root, or the AS/400 resource, from which all information for the model is gathered.
-
getSelectedObject()
- Returns the first selected object.
-
getSelectedObjects()
- Returns the selected objects.
-
getTreeModel()
- Returns the tree model.
-
getTreeSelectionModel()
- Returns the selection model that is used to maintain
selection state in the tree.
-
isCollapsed(VNode)
- Indicates if the object in the tree is currently collapsed.
-
isExpanded(VNode)
- Indicates if the object in the tree is currently expanded.
-
isSelected(VObject)
- Indicates if the object in the tree or the details is selected.
-
isVisible(VNode)
- Indicates if the object in the tree is currently visible in the tree.
-
load()
- Loads the objects from the AS/400.
-
makeVisible(VNode)
- Makes the object visible in the tree by expanding its
parent objects as needed.
-
removeErrorListener(ErrorListener)
- Removes an error listener.
-
removeListSelectionListener(ListSelectionListener)
- Removes a list selection listener.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes a property change listener.
-
removeTreeSelectionListener(TreeSelectionListener)
- Removes a tree selection listener.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes a vetoable change listener.
-
setAllowActions(boolean)
- Sets whether actions are allowed.
-
setConfirm(boolean)
- Sets whether certain actions are confirmed with the user.
-
setDetailsSelectionModel(ListSelectionModel)
- Sets the selection model that is used to maintain selection
state in the details.
-
setRoot(VNode)
- Sets the root, or the AS/400 resource, from which all information for the model is gathered.
-
setTreeSelectionModel(TreeSelectionModel)
- Sets the selection model that is used to maintain selection
state in the tree.
-
sort(Object[], boolean[])
- Sorts the contents.
AS400ExplorerPane
public AS400ExplorerPane()
- Constructs an AS400ExplorerPane object.
AS400ExplorerPane
public AS400ExplorerPane(VNode root)
- Constructs an AS400ExplorerPane object.
- Parameters:
- root - The root, or the AS/400 resource, from which all information for the model is gathered.
addErrorListener
public void addErrorListener(ErrorListener listener)
- Adds a listener to be notified when an error occurs.
- Parameters:
- listener - The listener.
addListSelectionListener
public void addListSelectionListener(ListSelectionListener listener)
- Adds a listener to be notified when a list selection occurs in the details pane.
- 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.
- Overrides:
- addPropertyChangeListener in class JComponent
addTreeSelectionListener
public void addTreeSelectionListener(TreeSelectionListener listener)
- Adds a listener to be notified when a tree selection occurs.
- 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.
- Overrides:
- addVetoableChangeListener in class JComponent
collapse
public void collapse(VNode object)
- Collapses the specified object in the tree.
- Parameters:
- object - The object in the tree.
expand
public void expand(VNode object)
- Expands the specified object in the tree.
- Parameters:
- object - The object in the tree.
getActionContext
public VActionContext getActionContext()
- Returns the context in which actions will be performed.
- Returns:
- The action context.
getAllowActions
public boolean getAllowActions()
- Indicates if actions can be invoked on objects.
- Returns:
- true if a actions can be invoked; false otherwise.
getConfirm
public boolean getConfirm()
- Indicates if certain actions are confirmed with the user.
- Returns:
- true if certain actions are confirmed with the user;
false otherwise.
getDetailsColumnModel
public TableColumnModel getDetailsColumnModel()
- Returns the column model that is used to maintain the columns
of the details. This provides the ability to programmatically
add and remove columns.
- Returns:
- The column model.
getDetailsModel
public TableModel getDetailsModel()
- Returns the details model.
- Returns:
- The details model.
getDetailsRoot
public VNode getDetailsRoot()
- Returns the root of the details pane.
- Returns:
- The root the details pane, or null
if there is none.
getDetailsSelectionModel
public ListSelectionModel getDetailsSelectionModel()
- Returns the selection model that is used to maintain
selection state in the details. This provides the ability
to programmatically select and deselect objects.
- Returns:
- The selection model, or null if selections are
not allowed.
getPath
public TreePath getPath(VNode object)
- Returns the path from the root to get to this object in the tree
hierarchy. The last element in the path will be this object.
- Parameters:
- object - The object.
- Returns:
- The path, or null if the object is not a valid
object.
getRoot
public VNode getRoot()
- Returns the root, or the AS/400 resource, from which all information for the model is gathered.
- Returns:
- The root, or the AS/400 resource, from which all information for the model is gathered. It will be null if none has been set.
getSelectedObject
public VObject getSelectedObject()
- Returns the first selected object. This is the first selected
object in the details pane. If no objects are selected in
the details pane, then this is the object selected in the
tree pane.
- Returns:
- The first selected object, or null if none are
selected.
getSelectedObjects
public VObject[] getSelectedObjects()
- Returns the selected objects. These are the selected
objects in the details pane. If no objects are selected in
the details pane, then this is the object selected in the
tree pane.
- Returns:
- The selected objects.
getTreeModel
public TreeModel getTreeModel()
- Returns the tree model.
- Returns:
- The tree model.
getTreeSelectionModel
public TreeSelectionModel getTreeSelectionModel()
- Returns the selection model that is used to maintain
selection state in the tree. This provides the ability to
programmatically select and deselect objects.
- Returns:
- The selection model, or null if selections are not
allowed.
isCollapsed
public boolean isCollapsed(VNode object)
- Indicates if the object in the tree is currently collapsed.
- Parameters:
- object - The object in the tree.
- Returns:
- true if the object is collapsed; false otherwise.
isExpanded
public boolean isExpanded(VNode object)
- Indicates if the object in the tree is currently expanded.
- Parameters:
- object - The object in the tree.
- Returns:
- true if the object is expanded; false otherwise.
isSelected
public boolean isSelected(VObject object)
- Indicates if the object in the tree or the details is selected.
- Parameters:
- object - The object in the tree or the details.
- Returns:
- true if the object is selected, false otherwise.
isVisible
public boolean isVisible(VNode object)
- Indicates if the object in the tree is currently visible in the tree.
- Parameters:
- object - The object in the tree.
- Returns:
- true if the object is visible; false otherwise.
load
public void load()
- Loads the objects from the AS/400.
makeVisible
public void makeVisible(VNode object)
- Makes the object visible in the tree by expanding its
parent objects as needed.
- Parameters:
- object - The object.
removeErrorListener
public void removeErrorListener(ErrorListener listener)
- Removes an error listener.
- Parameters:
- listener - The listener.
removeListSelectionListener
public void removeListSelectionListener(ListSelectionListener listener)
- Removes a list selection listener.
- Parameters:
- listener - The listener.
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
- Removes a property change listener.
- Parameters:
- listener - The listener.
- Overrides:
- removePropertyChangeListener in class JComponent
removeTreeSelectionListener
public void removeTreeSelectionListener(TreeSelectionListener listener)
- Removes a tree selection listener.
- Parameters:
- listener - The listener.
removeVetoableChangeListener
public void removeVetoableChangeListener(VetoableChangeListener listener)
- Removes a vetoable change listener.
- Parameters:
- listener - The listener.
- Overrides:
- removeVetoableChangeListener in class JComponent
setAllowActions
public void setAllowActions(boolean allowActions)
- Sets whether actions are allowed. The following are enabled only when
actions are allowed:
- pop-up menu on selected object in the tree and details
- double clicking on a object sets the root object in the details
The default is true.
- Parameters:
- allowActions - true if actions are allowed; false otherwise.
setConfirm
public void setConfirm(boolean confirm)
- Sets whether certain actions are confirmed with the user. The default
is true.
- Parameters:
- confirm - true if certain actions are confirmed with the
user; false otherwise.
setDetailsSelectionModel
public void setDetailsSelectionModel(ListSelectionModel selectionModel)
- Sets the selection model that is used to maintain selection
state in the details. This provides the ability to
programmatically select and deselect objects.
- Parameters:
- selectionModel - The selection model, or null if
selections are not allowed.
setRoot
public void setRoot(VNode root) throws PropertyVetoException
- Sets the root, or the AS/400 resource, from which all information for the model is gathered. It will not take effect until load() is done.
- Parameters:
- root - The root, or the AS/400 resource, from which all information for the model is gathered.
- Throws: PropertyVetoException
- It the change is vetoed.
setTreeSelectionModel
public void setTreeSelectionModel(TreeSelectionModel selectionModel)
- Sets the selection model that is used to maintain selection
state in the tree. This provides the ability to programmatically
select and deselect objects.
- Parameters:
- selectionModel - The selection model, or null if
selections are not allowed.
sort
public void sort(Object propertyIdentifiers[],
boolean orders[])
- Sorts the contents. The propertyIdentifer[0], orders[0] combination is used to do the sort. If the values are equal, propertyIdentifier[1], orders[1] is used to break the tie, and so forth.
- 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.
All Packages Class Hierarchy This Package Previous Next Index