|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
com.ibm.as400.vaccess.AS400TreePane
The AS400TreePane class represents a graphical user interface that presents a tree, where all information for the tree is gathered from the hierarchy of objects rooted at a server resource. You must explicitly call load() to load the information from the server.
Most errors are reported as ErrorEvents rather than throwing exceptions. Users should listen for ErrorEvents in order to diagnose and recover from error conditions.
AS400TreePane objects generate the following events:
The following example creates a tree pane filled with the contents of a directory in the integrated file system of a server.
// Set up the tree pane. AS400 system = new AS400 ("MySystem", "Userid", "Password"); VIFSDirectory directory = new VIFSDirectory (system, "/myDirectory"); AS400TreePane treePane = new AS400TreePane (directory); treePane.load ();
// Add the tree pane to a frame. JFrame frame = new JFrame ("My Window"); frame.getContentPane().add (treePane);
AS400TreeModel
,
Serialized FormNested Class Summary |
---|
Nested classes inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
AS400TreePane()
Deprecated. Constructs an AS400TreePane object. |
|
AS400TreePane(VNode root)
Deprecated. Constructs an AS400TreePane object. |
Method Summary | |
---|---|
void |
addErrorListener(ErrorListener listener)
Deprecated. Adds a listener to be notified when an error occurs. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Deprecated. Adds a listener to be notified when the value of any bound property changes. |
void |
addTreeSelectionListener(TreeSelectionListener listener)
Deprecated. Adds a listener to be notified when a tree selection occurs. |
void |
addVetoableChangeListener(VetoableChangeListener listener)
Deprecated. Adds a listener to be notified when the value of any constrained property changes. |
void |
collapse(VNode object)
Deprecated. Collapses the specified object. |
void |
expand(VNode object)
Deprecated. Expands the specified object. |
VActionContext |
getActionContext()
Deprecated. Returns the context in which actions will be performed. |
boolean |
getAllowActions()
Deprecated. Indicates if actions can be invoked on objects. |
boolean |
getConfirm()
Deprecated. Indicates if certain actions are confirmed with the user. |
TreeModel |
getModel()
Deprecated. Returns the model which contains the data for the tree. |
TreePath |
getPath(VNode object)
Deprecated. Returns the path from the root to get to this object in the tree hierarchy. |
VNode |
getRoot()
Deprecated. Returns the root, or the server resource, from which all information for the model is gathered. |
VNode |
getSelectedObject()
Deprecated. Returns the first selected object. |
VNode[] |
getSelectedObjects()
Deprecated. Returns the selected objects. |
TreeSelectionModel |
getSelectionModel()
Deprecated. Returns the selection model that is used to maintain selection state. |
boolean |
isCollapsed(VNode object)
Deprecated. Indicates if the object is currently collapsed. |
boolean |
isExpanded(VNode object)
Deprecated. Indicates if the object is currently expanded. |
boolean |
isSelected(VNode object)
Deprecated. Indicates if the object is selected. |
boolean |
isVisible(VNode object)
Deprecated. Indicates if the object is currently visible. |
void |
load()
Deprecated. Loads the information from the server. |
void |
makeVisible(VNode object)
Deprecated. Makes the object visible in the tree by expanding its parent objects as needed. |
void |
removeErrorListener(ErrorListener listener)
Deprecated. Removes an error listener. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Deprecated. Removes a property change listener. |
void |
removeTreeSelectionListener(TreeSelectionListener listener)
Deprecated. Removes a tree selection listener. |
void |
removeVetoableChangeListener(VetoableChangeListener listener)
Deprecated. Removes a vetoable change listener. |
void |
setAllowActions(boolean allowActions)
Deprecated. Sets whether actions are allowed. |
void |
setConfirm(boolean confirm)
Deprecated. Sets whether certain actions are confirmed with the user. |
void |
setRoot(VNode root)
Deprecated. Sets the root, or the server resource, from which all information for the model is gathered. |
void |
setSelectionModel(TreeSelectionModel selectionModel)
Deprecated. Sets the selection model that is used to maintain selection state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AS400TreePane()
public AS400TreePane(VNode root)
root
- The root, or the server resource, from which all information for the model is gathered.Method Detail |
public void addErrorListener(ErrorListener listener)
listener
- The listener.public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- The listener.public void addTreeSelectionListener(TreeSelectionListener listener)
listener
- The listener.public void addVetoableChangeListener(VetoableChangeListener listener)
listener
- The listener.public void collapse(VNode object)
object
- The object.public void expand(VNode object)
object
- The object.public VActionContext getActionContext()
public boolean getAllowActions()
public boolean getConfirm()
public TreeModel getModel()
public TreePath getPath(VNode object)
object
- The object.
public VNode getRoot()
public VNode getSelectedObject()
public VNode[] getSelectedObjects()
public TreeSelectionModel getSelectionModel()
public boolean isCollapsed(VNode object)
object
- The object.
public boolean isExpanded(VNode object)
object
- The object.
public boolean isSelected(VNode object)
object
- The object.
public boolean isVisible(VNode object)
object
- The object.
public void load()
public void makeVisible(VNode object)
object
- The object.public void removeErrorListener(ErrorListener listener)
listener
- The listener.public void removePropertyChangeListener(PropertyChangeListener listener)
listener
- The listener.public void removeTreeSelectionListener(TreeSelectionListener listener)
listener
- The listener.public void removeVetoableChangeListener(VetoableChangeListener listener)
listener
- The listener.public void setAllowActions(boolean allowActions)
The default is true.
allowActions
- true if actions are allowed; false otherwise.public void setConfirm(boolean confirm)
confirm
- true if certain actions are confirmed with the
user; false otherwise.public void setRoot(VNode root) throws PropertyVetoException
root
- The root, or the server resource, from which all information for the model is gathered.
PropertyVetoException
- If the change is vetoed.public void setSelectionModel(TreeSelectionModel selectionModel)
selectionModel
- The selection model, or null if selections
are not allowed.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |