Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webengine.ui.tree
Class TreeModelImpl

java.lang.Object
  extended by 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

Constructor Summary
TreeModelImpl()
           
TreeModelImpl(ContentProvider provider)
           
 
Method Summary
 TreeItem find(Path path)
          Like TreeModel.find(Path) but the path is expressed as a Path object.
 TreeItem find(String path)
          Find the item at the given path.
 TreeItem findAndReveal(Path path)
          Like TreeModel.findAndReveal(Path) but the path is expressed as a Path object.
 TreeItem findAndReveal(String path)
          Find and item given it's path and expand parents if needed.
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface TreeModel

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 interface TreeModel

setInput

public void setInput(Object input)
Description copied from interface: TreeModel
Sets the input data.

Specified by:
setInput in interface TreeModel
Parameters:
input - (may be null)

getRoot

public TreeItem getRoot()
Description copied from interface: TreeModel
Get the tree root item, or null if tree has no input.

Specified by:
getRoot in interface TreeModel
Returns:
the root

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 interface TreeModel
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.

Specified by:
find in interface TreeModel
Parameters:
path - the path to search
Returns:
the item at the given path or null if none

findAndReveal

public TreeItem findAndReveal(Path path)
Description copied from interface: TreeModel
Like TreeModel.findAndReveal(Path) but the path is expressed as a Path object.

Specified by:
findAndReveal in interface TreeModel
See Also:
TreeModel.findAndReveal(String)

find

public TreeItem find(Path path)
Description copied from interface: TreeModel
Like TreeModel.find(Path) but the path is expressed as a Path object.

Specified by:
find in interface TreeModel
See Also:
TreeModel.find(String)

getInput

public Object getInput()
Description copied from interface: TreeModel
Gets the current input of the tree.

Specified by:
getInput in interface TreeModel
Returns:
the tree input data. may be null.

hasInput

public boolean hasInput()

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.