|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjaxx.runtime.swing.navigation.AbstractNavigationModel<E>
E - the type of nodes in modeljaxx.runtime.swing.tree.
@Deprecated public abstract class AbstractNavigationModel<E extends NavigationNode<E>>
Model of the tree used for a navigation tree. It is composed of E
nodes.
| Field Summary | |
|---|---|
protected boolean |
adjustingValue
Deprecated. if sets to true will not fires any event (this is a convinient
state when we are building the tree to avoid reload of nodes) |
protected TreeModel |
delegate
Deprecated. the delegate model |
protected String |
pathSeparator
Deprecated. The path separator used to build the NavigationNode.getFullPath(). |
| Constructor Summary | |
|---|---|
AbstractNavigationModel(TreeModel delegate,
String pathSeparator,
JAXXContext context)
Deprecated. |
|
| Method Summary | |
|---|---|
void |
addTreeModelListener(TreeModelListener l)
Deprecated. Adds a listener for the TreeModelEvent posted after the tree
changes. |
E |
findNode(E root,
String path)
Deprecated. Search from a given root node a node named by his fully path (concatenation of nodes NavigationTreeNode.path valued separated
by NavigationModel.getPathSeparator(). |
E |
findNode(E root,
String path,
Pattern regex)
Deprecated. Apply first the regex pattern to obtain the searched node. |
E |
findNode(E root,
String path,
String regex)
Deprecated. Apply first the regex pattern to obtain the searched node. |
E |
findNode(String path)
Deprecated. Search from the root node a node named by his fully path (concatenation of nodes NavigationTreeNode.path valued separated by dot. |
E |
findNode(String path,
Pattern regex)
Deprecated. Apply first the regex pattern to obtain the searched node. |
E |
findNode(String path,
String regex)
Deprecated. Apply first the regex pattern to obtain the searched node fi the given regex is not null. |
Object |
getBean(E node)
Deprecated. Obtain the associated bean value from context corresponding to node |
Object |
getBean(String navigationPath)
Deprecated. Obtain the associated bean value from context corresponding to node from given navigation path. |
Object |
getChild(Object parent,
int index)
Deprecated. Returns the child of parent at index index in
the parent's child array. |
int |
getChildCount(Object parent)
Deprecated. Returns the number of children of parent. |
JAXXContext |
getContext()
Deprecated. |
TreeModel |
getDelegate()
Deprecated. |
int |
getIndexOfChild(Object parent,
Object child)
Deprecated. Returns the index of child in parent. |
String |
getPathSeparator()
Deprecated. |
E |
getRoot()
Deprecated. |
boolean |
isAdjustingValue()
Deprecated. |
boolean |
isLeaf(Object node)
Deprecated. Returns true if node is a leaf. |
void |
nodeChanged(E node)
Deprecated. |
protected void |
reload(E node)
Deprecated. |
protected void |
reload(E node,
boolean deep)
Deprecated. |
void |
removeTreeModelListener(TreeModelListener l)
Deprecated. Removes a listener previously added with addTreeModelListener. |
void |
setAdjustingValue(boolean adjustingValue)
Deprecated. Sets the new internal state adjustingValue. |
void |
valueForPathChanged(TreePath path,
Object newValue)
Deprecated. Messaged when the user has altered the value for the item identified by path to newValue. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jaxx.runtime.swing.navigation.NavigationModel |
|---|
getPathToRoot, nodeChanged, nodeStructureChanged, removeNodeFromParent, setRoot |
| Field Detail |
|---|
protected final TreeModel delegate
protected final String pathSeparator
NavigationNode.getFullPath().
NavigationNode.getNodePath(),
NavigationNode.getFullPath()protected boolean adjustingValue
true will not fires any event (this is a convinient
state when we are building the tree to avoid reload of nodes)
| Constructor Detail |
|---|
public AbstractNavigationModel(TreeModel delegate,
String pathSeparator,
JAXXContext context)
| Method Detail |
|---|
public boolean isAdjustingValue()
isAdjustingValue in interface NavigationModel<E extends NavigationNode<E>>true if no event should be firedpublic void setAdjustingValue(boolean adjustingValue)
NavigationModeladjustingValue.
If the value is true, no more event will be fired, otherwise
will not block events firing.
setAdjustingValue in interface NavigationModel<E extends NavigationNode<E>>adjustingValue - the new value of valueAdjusting statepublic JAXXContext getContext()
getContext in interface NavigationModel<E extends NavigationNode<E>>public TreeModel getDelegate()
public final String getPathSeparator()
getPathSeparator in interface NavigationModel<E extends NavigationNode<E>>public final E getRoot()
getRoot in interface NavigationModel<E extends NavigationNode<E>>public final Object getBean(String navigationPath)
NavigationModel
getBean in interface NavigationModel<E extends NavigationNode<E>>navigationPath - the current context path of the node
public final Object getBean(E node)
NavigationModel
getBean in interface NavigationModel<E extends NavigationNode<E>>node - the current node
public final E findNode(String path)
NavigationModelNavigationTreeNode.path valued separated by dot.
Example :
$root.child1.leaf1
findNode in interface NavigationModel<E extends NavigationNode<E>>path - the fully path of the searched node.
null if not find.
public final E findNode(String path,
String regex)
NavigationModelregex is not null.
Search then from the root node a node named by his fully path
(concatenation of nodes NavigationTreeNode.path valued separated
by NavigationModel.getPathSeparator().
Example :
$root.child1.leaf1
findNode in interface NavigationModel<E extends NavigationNode<E>>path - the fully path of the searched node.regex - a optional regex to apply to path before searching
null if not found.
public final E findNode(String path,
Pattern regex)
NavigationModelNavigationTreeNode.path valued separated
by NavigationModel.getPathSeparator().
Example :
$root.child1.leaf1
findNode in interface NavigationModel<E extends NavigationNode<E>>path - the fully path of the searched node.regex - a optional regex to apply to path before searching
null if not found.
public final E findNode(E root,
String path)
NavigationModelNavigationTreeNode.path valued separated
by NavigationModel.getPathSeparator().
findNode in interface NavigationModel<E extends NavigationNode<E>>root - root node to be usedpath - the fully path of the searched node.
null if not found.
public final E findNode(E root,
String path,
String regex)
NavigationModelNavigationTreeNode.path valued separated
by NavigationModel.getPathSeparator().
findNode in interface NavigationModel<E extends NavigationNode<E>>root - root node to be usedpath - the fully path of the searched node.regex - a previous regex to apply to path : must have a matches
null if not found.
public final E findNode(E root,
String path,
Pattern regex)
NavigationModelNavigationTreeNode.path valued separated
by NavigationModel.getPathSeparator().
findNode in interface NavigationModel<E extends NavigationNode<E>>root - root node to be usedpath - the fully path of the searched node.regex - a previous regex to apply to path : must have a matches
null if not found.public final void nodeChanged(E node)
nodeChanged in interface NavigationModel<E extends NavigationNode<E>>protected final void reload(E node)
protected final void reload(E node,
boolean deep)
public final Object getChild(Object parent,
int index)
NavigationModelparent at index index in
the parent's child array. parent must be a node previously
obtained from this data source. This should not return null
if index is a valid index for parent (that is
index >= 0 && index < getChildCount(parent)).
getChild in interface NavigationModel<E extends NavigationNode<E>>parent - a node in the tree, obtained from this data sourceindex - index of the node
parent at index indexpublic final int getChildCount(Object parent)
NavigationModelparent. Returns 0 if the
node is a leaf or if it has no children. parent must be a
node previously obtained from this data source.
getChildCount in interface NavigationModel<E extends NavigationNode<E>>parent - a node in the tree, obtained from this data source
parentpublic final boolean isLeaf(Object node)
NavigationModeltrue if node is a leaf. It is possible
for this method to return false even if node
has no children. A directory in a filesystem, for example, may contain no
files; the node representing the directory is not a leaf, but it also has
no children.
isLeaf in interface NavigationModel<E extends NavigationNode<E>>node - a node in the tree, obtained from this data source
node is a leaf
public final void valueForPathChanged(TreePath path,
Object newValue)
NavigationModelpath to newValue. If newValue
signifies a truly new value the model should post a
treeNodesChanged event.
valueForPathChanged in interface NavigationModel<E extends NavigationNode<E>>path - path to the node that the user has alterednewValue - the new value from the TreeCellEditor
public final int getIndexOfChild(Object parent,
Object child)
NavigationModelparent or
child is null, returns -1. If either
parent or child don't belong to this tree
model, returns -1.
getIndexOfChild in interface NavigationModel<E extends NavigationNode<E>>parent - a node in the tree, obtained from this data sourcechild - the node we are interested in
child or parent are null
or don't belong to this tree modelpublic final void addTreeModelListener(TreeModelListener l)
NavigationModelTreeModelEvent posted after the tree
changes.
addTreeModelListener in interface NavigationModel<E extends NavigationNode<E>>l - the listener to addNavigationModel.removeTreeModelListener(javax.swing.event.TreeModelListener)public final void removeTreeModelListener(TreeModelListener l)
NavigationModeladdTreeModelListener.
removeTreeModelListener in interface NavigationModel<E extends NavigationNode<E>>l - the listener to removeNavigationModel.addTreeModelListener(javax.swing.event.TreeModelListener)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||