|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.palo.api.ext.favoriteviews.FavoriteViewTreeNode
public class FavoriteViewTreeNode
FavoriteViewTreeNode
is a specialized tree which stores the
favorite views structure of a Connection
.
You can use the favorite view tree to add FavoriteView
or
FavoriteViewsFolder
objects. While favorite views are the leafs of
the tree and thus may not have children, favorite views folders can be added
to the tree and can have children (either folders or favorite views).
The root of the favorite view tree is always a
FavoriteViewsFolder
.
Example of a favorite view tree (to the left, the name of the element is
given, followed by its type in square brackets):
RootFolder [FavoriteViewsFolder]
|
|--- My Favorite View 1 [FavoriteView]
|--- Another Folder [FavoriteViewsFolder]
| |
| |--- My second view [FavoriteView]
| |--- My third view [FavoriteView]
|
|--- My fourth view [FavoriteView]
A complete favorite view tree can be loaded from a Connection
via the loadFavoriteViews method, which will return the root node of
the tree.
The tree can also be saved in a connection by using the
storeFavoriteViews method, which expects the root node of a favorite
views tree, so that it can be saved.
Constructor Summary | |
---|---|
FavoriteViewTreeNode(FavoriteViewObject userObject)
Creates a new FavoriteViewTreeNode with the given user
object. |
Method Summary | |
---|---|
void |
addChild(FavoriteViewTreeNode child)
Adds a child at the end of the list of children of this node. |
boolean |
equals(java.lang.Object obj)
Two FavoriteViewTreeNodes are considered equal if their user object is equal. |
FavoriteViewTreeNode |
getChildAt(int index)
Returns the child at the specified index. |
int |
getChildCount()
Returns the number of children of this node. |
FavoriteViewTreeNode[] |
getChildren()
Returns all children of this node. |
FavoriteViewTreeNode |
getParent()
Returns the parent of this node. |
FavoriteViewObject |
getUserObject()
Returns the user object for this tree node. |
boolean |
hasChildren()
Returns true if this node has children and false otherwise. |
int |
hashCode()
Two FavoriteViewTreeNodes are considered equal if their user object is equal. |
int |
indexOfChild(FavoriteViewTreeNode child)
Returns the index of the specified child or -1 if it is not a child of this node. |
void |
insertChild(int index,
FavoriteViewTreeNode child)
Inserts a child at the given index into the list of children of this node. |
void |
removeChild(FavoriteViewTreeNode child)
Removes the specified child from the list of children and sets the child's parent to null. |
void |
removeChildren()
Removes all children from this node and sets their parent to null. |
void |
setParent(FavoriteViewTreeNode parent)
Sets a new parent for this node. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FavoriteViewTreeNode(FavoriteViewObject userObject)
FavoriteViewTreeNode
with the given user
object. The user object can either be a favorite view or a favorite
view folder and represents the data of this node.
userObject
- the user object for this node.Method Detail |
---|
public FavoriteViewObject getUserObject()
FavoriteView
or a FavoriteViewsFolder
.
public void setParent(FavoriteViewTreeNode parent)
parent
- the new parent for this node.public FavoriteViewTreeNode getParent()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public void addChild(FavoriteViewTreeNode child)
child
- the node to be added to the list of children.public void insertChild(int index, FavoriteViewTreeNode child)
index
- the position at which the new child is going to be inserted.child
- the child node to be inserted into the list of children.public void removeChild(FavoriteViewTreeNode child)
child
- the child to be removed from this node.public void removeChildren()
public int indexOfChild(FavoriteViewTreeNode child)
child
- the child node of which the index is to be retieved.
public FavoriteViewTreeNode[] getChildren()
public int getChildCount()
public FavoriteViewTreeNode getChildAt(int index)
index
- the index of the child which is to be retrieved.
public boolean hasChildren()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |