public class ObservableTreeModel extends DefaultTreeModel implements IJcrTreeModel, IObservable, org.apache.wicket.model.IDetachable
JcrTreeModel
instead to register TreeModelListener
s.
Each instance of this class should be registered separately. Hence this class does not override Object.equals(java.lang.Object)
nor Object.hashCode()
.Modifier and Type | Class and Description |
---|---|
class |
ObservableTreeModel.ObservableTreeModelEvent |
class |
ObservableTreeModel.TranslationEvent |
Modifier and Type | Field and Description |
---|---|
protected IJcrTreeNode |
root |
asksAllowsChildren, listenerList
Constructor and Description |
---|
ObservableTreeModel(IJcrTreeNode rootModel) |
Modifier and Type | Method and Description |
---|---|
void |
addTreeModelListener(TreeModelListener l) |
void |
detach() |
TreePath |
lookup(JcrNodeModel nodeModel) |
void |
removeTreeModelListener(TreeModelListener l) |
void |
setObservationContext(IObservationContext<? extends IObservable> context)
Before observation is started on the observable, an observation context is injected by
the observer registry.
|
void |
setTreeState(org.apache.wicket.extensions.markup.html.tree.DefaultTreeState state) |
void |
startObservation()
When the first
IObserver of this observable is registered with the observer
registry, observation is started. |
void |
stopObservation()
When the last
IObserver unregisters, observation is stopped. |
asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, setAsksAllowsChildren, setRoot, valueForPathChanged
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, valueForPathChanged
equals, hashCode
protected final IJcrTreeNode root
public ObservableTreeModel(IJcrTreeNode rootModel)
public void setTreeState(org.apache.wicket.extensions.markup.html.tree.DefaultTreeState state)
public TreePath lookup(JcrNodeModel nodeModel)
lookup
in interface IJcrTreeModel
public void detach()
detach
in interface org.apache.wicket.model.IDetachable
public void setObservationContext(IObservationContext<? extends IObservable> context)
IObservable
setObservationContext
in interface IObservable
public void startObservation()
IObservable
IObserver
of this observable is registered with the observer
registry, observation is started. Implementations must notify observers until observation
is stopped.
An implementation should register listeners with external data sources, when appropriate. It is possible for an observable to register as an observer for another observable.
startObservation
in interface IObservable
public void stopObservation()
IObservable
IObserver
unregisters, observation is stopped. Any listeners
or observers registered by the observable must be unregistered by the implementation.stopObservation
in interface IObservable
public void addTreeModelListener(TreeModelListener l)
addTreeModelListener
in interface TreeModel
addTreeModelListener
in class DefaultTreeModel
public void removeTreeModelListener(TreeModelListener l)
removeTreeModelListener
in interface TreeModel
removeTreeModelListener
in class DefaultTreeModel
Copyright © 2007–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.