Package org.nuxeo.ecm.webengine.ui.tree
Class TreeModelImpl
- java.lang.Object
-
- org.nuxeo.ecm.webengine.ui.tree.TreeModelImpl
-
- All Implemented Interfaces:
Serializable,TreeModel
public class TreeModelImpl extends Object implements TreeModel
- Author:
- Bogdan Stefanescu
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentProviderproviderprotected TreeItemroot
-
Constructor Summary
Constructors Constructor Description TreeModelImpl()TreeModelImpl(ContentProvider provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TreeItemfind(String path)Find the item at the given path.TreeItemfind(Path path)LikeTreeModel.find(String)but the path is expressed as aPathobject.TreeItemfindAndReveal(String path)Find and item given it's path and expand parents if needed.TreeItemfindAndReveal(Path path)LikeTreeModel.findAndReveal(String)but the path is expressed as aPathobject.ContentProvidergetContentProvider()Gets the content provider used by this tree.ObjectgetInput()Gets the current input of the tree.TreeItemgetRoot()Get the tree root item, or null if tree has no input.booleanhasInput()voidsetContentProvider(ContentProvider provider)Sets the content provider to be used by this tree.voidsetInput(Object input)Sets the input data.
-
-
-
Field Detail
-
provider
protected ContentProvider provider
-
-
Constructor Detail
-
TreeModelImpl
public TreeModelImpl()
-
TreeModelImpl
public TreeModelImpl(ContentProvider provider)
-
-
Method Detail
-
getContentProvider
public ContentProvider getContentProvider()
Description copied from interface:TreeModelGets the content provider used by this tree.- Specified by:
getContentProviderin interfaceTreeModel
-
setContentProvider
public void setContentProvider(ContentProvider provider)
Description copied from interface:TreeModelSets the content provider to be used by this tree.- Specified by:
setContentProviderin interfaceTreeModel
-
setInput
public void setInput(Object input)
Description copied from interface:TreeModelSets the input data.
-
getRoot
public TreeItem getRoot()
Description copied from interface:TreeModelGet the tree root item, or null if tree has no input.
-
findAndReveal
public TreeItem findAndReveal(String path)
Description copied from interface:TreeModelFind and item given it's path and expand parents if needed. The returned item is not explicitly expanded so it may be collapsed or its children if any not yet loaded- Specified by:
findAndRevealin interfaceTreeModel- Parameters:
path- the path to search- Returns:
- the item or null if none
-
find
public TreeItem find(String path)
Description copied from interface:TreeModelFind the item at the given path. Only loaded items are searched. This operation will not load any extra item.
-
findAndReveal
public TreeItem findAndReveal(Path path)
Description copied from interface:TreeModelLikeTreeModel.findAndReveal(String)but the path is expressed as aPathobject.- Specified by:
findAndRevealin interfaceTreeModel- See Also:
TreeModel.findAndReveal(String)
-
find
public TreeItem find(Path path)
Description copied from interface:TreeModelLikeTreeModel.find(String)but the path is expressed as aPathobject.- Specified by:
findin interfaceTreeModel- See Also:
TreeModel.find(String)
-
getInput
public Object getInput()
Description copied from interface:TreeModelGets the current input of the tree.
-
hasInput
public boolean hasInput()
-
-