|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.tree.AbstractTreeModel com.jidesoft.tree.DefaultTreeModelWrapper
public class DefaultTreeModelWrapper
The default implementation of TreeModelWrapper. It implements all methods on TreeModel
and TreeModelWrapper
.
Field Summary | |
---|---|
static int |
EVENT_TYPE_NODES_CHANGED
|
static int |
EVENT_TYPE_NODES_INSERTED
|
static int |
EVENT_TYPE_NODES_REMOVED
|
static int |
EVENT_TYPE_STRUCTURE_CHANGED
|
Fields inherited from class com.jidesoft.tree.AbstractTreeModel |
---|
listenerList |
Constructor Summary | |
---|---|
DefaultTreeModelWrapper()
Creates an empty DefaultTreeModelWrapper . |
|
DefaultTreeModelWrapper(TreeModel model)
Creates a DefaultTreeModelWrapper from for a tree model. |
Method Summary | |
---|---|
protected void |
clearAllListModelWrappers()
|
protected void |
clearListModelWrapper(Object node)
|
protected void |
configureListModelWrapper(ListModelWrapper wrapper,
Object node)
This is the method that will be called to configure the empty list model wrapper you created in createListModelWrapper(Object) . |
protected TreeModelEvent |
convertTreeModelEvent(TreeModelEvent e)
Deprecated. replaced by convertTreeModelEvent(javax.swing.event.TreeModelEvent, int) |
protected TreeModelEvent |
convertTreeModelEvent(TreeModelEvent e,
int eventType)
Converts the tree model event for the actual model to the event for this model. |
protected ListModelWrapper |
createListModelWrapper(Object node)
Creates an empty list model wrapper. |
TreeModel |
getActualModel()
Gets the actual tree model. |
Object |
getChild(Object parent,
int index)
Implementations of the method in TreeModel. |
int |
getChildCount(Object parent)
Implementations of the method in TreeModel. |
int |
getIndexOfChild(Object parent,
Object child)
Implementations of the method in TreeModel. |
protected ListModelWrapper |
getListModelWrapper(Object node)
Get the list model wrapper for the node. |
Object |
getRoot()
Implementations of the method in TreeModel. |
protected void |
initWrapper(Object node)
|
boolean |
isLeaf(Object node)
Implementations of the method in TreeModel. |
void |
setActualModel(TreeModel model)
Sets the actual tree model. |
protected void |
setListModelWrapper(Object node,
ListModelWrapper wrapper)
|
void |
treeNodesChanged(TreeModelEvent e)
Method for TreeModelListener. |
void |
treeNodesInserted(TreeModelEvent e)
Method for TreeModelListener. |
void |
treeNodesRemoved(TreeModelEvent e)
Method for TreeModelListener. |
void |
treeStructureChanged(TreeModelEvent e)
Method for TreeModelListener. |
void |
valueForPathChanged(TreePath path,
Object newValue)
Delegates to underlying tree model. |
Methods inherited from class com.jidesoft.tree.AbstractTreeModel |
---|
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, fireTreeStructureChanged, getPathToRoot, getPathToRoot, getTreeModelListeners, nodeChanged, nodesChanged, removeTreeModelListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int EVENT_TYPE_STRUCTURE_CHANGED
public static final int EVENT_TYPE_NODES_INSERTED
public static final int EVENT_TYPE_NODES_REMOVED
public static final int EVENT_TYPE_NODES_CHANGED
Constructor Detail |
---|
public DefaultTreeModelWrapper()
DefaultTreeModelWrapper
.
public DefaultTreeModelWrapper(TreeModel model)
model
- the original tree modelMethod Detail |
---|
public void setActualModel(TreeModel model)
setActualModel
in interface TreeModelWrapper
model
- the original tree modelpublic TreeModel getActualModel()
getActualModel
in interface TreeModelWrapper
public Object getRoot()
getRoot
in interface TreeModel
public int getIndexOfChild(Object parent, Object child)
getIndexOfChild
in interface TreeModel
public Object getChild(Object parent, int index)
getChild
in interface TreeModel
public int getChildCount(Object parent)
getChildCount
in interface TreeModel
public boolean isLeaf(Object node)
isLeaf
in interface TreeModel
protected ListModelWrapper getListModelWrapper(Object node)
node
- the tree node
setListModelWrapper(Object, com.jidesoft.list.ListModelWrapper)
protected void setListModelWrapper(Object node, ListModelWrapper wrapper)
protected void clearListModelWrapper(Object node)
protected void clearAllListModelWrappers()
protected void initWrapper(Object node)
protected ListModelWrapper createListModelWrapper(Object node)
FilterableTreeModel
overrides it to create an instance of FilterableListModel
. SortableTreeModel
overrides it to create an instance of SortableListModel
.
Default implementation of this method in this class simply returns a new instance of
DefaultListModelWrapper
.
node
- the tree node
protected void configureListModelWrapper(ListModelWrapper wrapper, Object node)
createListModelWrapper(Object)
. Subclass can override it to configure the list model. For example, FilterableTreeModel
uses this method to add filters that defined on FilterableTreeModel
to
FilterableListModel
and turn those filters on.
In default implementation on DefaultTreeModelWrapper
, this method is empty.
wrapper
- the wrapper to be configured.node
- the tree nodepublic void valueForPathChanged(TreePath path, Object newValue)
valueForPathChanged
in interface TreeModel
valueForPathChanged
in class AbstractTreeModel
path
- the tree pathnewValue
- the new valuepublic void treeNodesChanged(TreeModelEvent e)
treeNodesChanged
in interface TreeModelListener
e
- the TreeModelEventpublic void treeNodesInserted(TreeModelEvent e)
treeNodesInserted
in interface TreeModelListener
e
- the TreeModelEventpublic void treeNodesRemoved(TreeModelEvent e)
treeNodesRemoved
in interface TreeModelListener
e
- the TreeModelEventpublic void treeStructureChanged(TreeModelEvent e)
treeStructureChanged
in interface TreeModelListener
e
- the TreeModelEvent@Deprecated protected TreeModelEvent convertTreeModelEvent(TreeModelEvent e)
convertTreeModelEvent(javax.swing.event.TreeModelEvent, int)
e
- the TreeModelEvent
protected TreeModelEvent convertTreeModelEvent(TreeModelEvent e, int eventType)
e
- the TreeModelEventeventType
- the event type, EVENT_TYPE_NODES_INSERTED
, EVENT_TYPE_NODES_REMOVED
or EVENT_TYPE_NODES_CHANGED
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |