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 ContentProvider
provider
protected TreeItem
root
-
Constructor Summary
Constructors Constructor Description TreeModelImpl()
TreeModelImpl(ContentProvider provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TreeItem
find(String path)
Find the item at the given path.TreeItem
find(Path path)
LikeTreeModel.find(String)
but the path is expressed as aPath
object.TreeItem
findAndReveal(String path)
Find and item given it's path and expand parents if needed.TreeItem
findAndReveal(Path path)
LikeTreeModel.findAndReveal(String)
but the path is expressed as aPath
object.ContentProvider
getContentProvider()
Gets the content provider used by this tree.Object
getInput()
Gets the current input of the tree.TreeItem
getRoot()
Get the tree root item, or null if tree has no input.boolean
hasInput()
void
setContentProvider(ContentProvider provider)
Sets the content provider to be used by this tree.void
setInput(Object input)
Sets the input data.
-
-
-
Field Detail
-
provider
protected ContentProvider provider
-
root
protected TreeItem root
-
-
Constructor Detail
-
TreeModelImpl
public TreeModelImpl()
-
TreeModelImpl
public TreeModelImpl(ContentProvider provider)
-
-
Method Detail
-
getContentProvider
public ContentProvider getContentProvider()
Description copied from interface:TreeModel
Gets the content provider used by this tree.- Specified by:
getContentProvider
in interfaceTreeModel
-
setContentProvider
public void setContentProvider(ContentProvider provider)
Description copied from interface:TreeModel
Sets the content provider to be used by this tree.- Specified by:
setContentProvider
in interfaceTreeModel
-
setInput
public void setInput(Object input)
Description copied from interface:TreeModel
Sets the input data.
-
getRoot
public TreeItem getRoot()
Description copied from interface:TreeModel
Get the tree root item, or null if tree has no input.
-
findAndReveal
public TreeItem findAndReveal(String path)
Description copied from interface:TreeModel
Find 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:
findAndReveal
in interfaceTreeModel
- Parameters:
path
- the path to search- Returns:
- the item or null if none
-
find
public TreeItem find(String path)
Description copied from interface:TreeModel
Find 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:TreeModel
LikeTreeModel.findAndReveal(String)
but the path is expressed as aPath
object.- Specified by:
findAndReveal
in interfaceTreeModel
- See Also:
TreeModel.findAndReveal(String)
-
find
public TreeItem find(Path path)
Description copied from interface:TreeModel
LikeTreeModel.find(String)
but the path is expressed as aPath
object.- Specified by:
find
in interfaceTreeModel
- See Also:
TreeModel.find(String)
-
getInput
public Object getInput()
Description copied from interface:TreeModel
Gets the current input of the tree.
-
hasInput
public boolean hasInput()
-
-