|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.sree.viewer.RepositoryTreeModel
public class RepositoryTreeModel
Repository tree model is used as a tree model to show repository entries. It won't load all the entries but load entries on demand.
| Nested Class Summary | |
|---|---|
protected class |
RepositoryTreeModel.EntryCache
Entry cache. |
| Field Summary | |
|---|---|
protected RepositoryTreeModel.EntryCache |
cache
|
protected RepletRepository |
engine
|
protected Vector |
listeners
|
protected Principal |
user
|
| Constructor Summary | |
|---|---|
RepositoryTreeModel(RepletRepository engine,
Principal user)
Create a repository tree model. |
|
| Method Summary | |
|---|---|
void |
addTreeModelListener(TreeModelListener listener)
Add a tree model listener. |
protected RepositoryEntry[] |
createRepositoryEntries(RepletFolderEntry entry)
Create the sub repository entries of a folder entry. |
boolean |
exists(TreePath path)
Check if a tree path exists. |
Object |
getChild(Object parent,
int index)
Get the child node of a parent node at an index. |
int |
getChildCount(Object parent)
Get the child node count of a parent node. |
int |
getIndexOfChild(Object parent,
Object child)
Get the index of a child node belongs to a parent node. |
Principal |
getPrincipal()
Get the principal of the repository tree model. |
protected RepositoryEntry[] |
getRepositoryEntries(RepositoryEntry entry)
Get the sub repository entries of a folder entry. |
Object |
getRoot()
Get the root node of the tree. |
TreePath |
getTreePath(RepositoryEntry entry)
Get the tree path of a repository entry. |
boolean |
isLeaf(Object node)
Check a node if is a leaf node. |
void |
refresh()
Refresh the repository tree model. |
void |
removeTreeModelListener(TreeModelListener listener)
Remove a tree model listener. |
void |
setPrincipal(Principal user)
Set the principal of the repository tree model. |
void |
valueForPathChanged(TreePath path,
Object val)
Notified when a node is changed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected RepletRepository engine
protected Principal user
protected Vector listeners
protected RepositoryTreeModel.EntryCache cache
| Constructor Detail |
|---|
public RepositoryTreeModel(RepletRepository engine,
Principal user)
| Method Detail |
|---|
public void setPrincipal(Principal user)
public Principal getPrincipal()
public Object getRoot()
getRoot in interface TreeModel
public Object getChild(Object parent,
int index)
getChild in interface TreeModelparent - the specified parent node.index - the specified index.
public int getChildCount(Object parent)
getChildCount in interface TreeModelparent - the specified parent node.
public boolean isLeaf(Object node)
isLeaf in interface TreeModelnode - the specified node.
public void valueForPathChanged(TreePath path,
Object val)
valueForPathChanged in interface TreeModelpath - the specified tree path identifies the node.val - the specified new value.
public int getIndexOfChild(Object parent,
Object child)
getIndexOfChild in interface TreeModelparent - the specified parent node.child - the specified child node.
public void addTreeModelListener(TreeModelListener listener)
addTreeModelListener in interface TreeModellistener - the specified tree model listenr.public void removeTreeModelListener(TreeModelListener listener)
removeTreeModelListener in interface TreeModellistener - the specified tree model listenr.public void refresh()
public TreePath getTreePath(RepositoryEntry entry)
entry - the specified repository entry.
public boolean exists(TreePath path)
path - the specified tree path.
protected RepositoryEntry[] createRepositoryEntries(RepletFolderEntry entry)
throws Exception
entry - the specified folder entry.
Exceptionprotected RepositoryEntry[] getRepositoryEntries(RepositoryEntry entry)
entry - the specified folder entry.
|
Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||