jaxx.runtime.swing.navigation
Class NavigationTreeHelper

java.lang.Object
  extended by jaxx.runtime.swing.navigation.NavigationTreeContextHelper
      extended by jaxx.runtime.swing.navigation.NavigationTreeHelper

public abstract class NavigationTreeHelper
extends NavigationTreeContextHelper

Helper object associated to a given navigation tree system. To helper is context safe (base on a NavigationTreeContextHelper.

Since:
1.7.2
Author:
chemit
See Also:
NavigationTreeModel

Field Summary
 
Fields inherited from class jaxx.runtime.swing.navigation.NavigationTreeContextHelper
handlerContextEntry, modelContextEntry, prefix, selectedBeansContextEntry, selectedNodesContextEntry, selectedPathsContextEntry, treeContextEntry, treeTableContextEntry
 
Constructor Summary
NavigationTreeHelper(String contextPrefix)
           
 
Method Summary
abstract  NavigationTreeHandler createTreeHandler(JAXXObject context)
          Create the tree handler.
abstract  NavigationModel createTreeModel(JAXXContext context)
          Create the model.
 NavigationTreeNode findNode(JAXXContext context, String path)
           
 NavigationTreeNode findNode(JAXXContext context, String path, Pattern regex)
           
 NavigationTreeNode findNode(JAXXContext context, String path, Pattern regex, String suffix)
           
 NavigationTreeNode findNode(JAXXContext context, String path, String regex)
           
 NavigationTreeNode findNode(JAXXContext context, String path, String regex, String suffix)
           
 Object getContextValue(JAXXContext context, String path)
           
 NavigationTreeNode getParentNode(NavigationTreeNode current, Class<?> beanClass)
          Obtain the first ancestor with the matching internalClass
 NavigationModel getSafeModel(JAXXContext context)
           
 JTree getSafeTree(JAXXContext context)
           
 NavigationTreeModel getSafeTreeModel(JAXXContext context)
          Deprecated. please use getSafeModel(JAXXContext), will be remove soon
 org.jdesktop.swingx.JXTreeTable getSafeTreeTable(JAXXContext context)
           
 void gotoChildNode(JAXXContext context, int childIndex)
          Sélection d'un fils du noeud selectionne dans l'arbre de navigation.
 void gotoParentNode(JAXXContext context)
          Sélection du parent du noeud selectionne dans l'arbre de navigation.
 void repaintNode(JAXXContext context, NavigationTreeNode node)
          Demande une opération de repaint sur un noeud de l'arbre de navigation.
 void repaintNode(JAXXContext context, NavigationTreeNode node, boolean deep)
          Demande une opération de repaint sur un noeud de l'arbre de navigation.
 void selectNode(JAXXContext context, NavigationTreeNode node)
          Sélection d'un noeud dans l'arbre de navigation.
 void selectNode(JAXXContext context, String path)
          Sélection d'un noeud dans l'arbre de navigation à partir de son path.
 
Methods inherited from class jaxx.runtime.swing.navigation.NavigationTreeContextHelper
getModel, getModelContextEntry, getPrefix, getSelectedBean, getSelectedBeanContextEntry, getSelectedBeans, getSelectedNode, getSelectedNodeContextEntry, getSelectedNodes, getSelectedPath, getSelectedPathContextEntry, getSelectedPaths, getTree, getTreeContextEntry, getTreeHandler, getTreeHandlerContextEntry, getTreeModel, getTreeTable, getTreeTableContextEntry, setModel, setSelectedBean, setSelectedBeans, setSelectedNode, setSelectedNodes, setSelectedPath, setSelectedPaths, setTree, setTreeHandler, setTreeModel, setTreeTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NavigationTreeHelper

public NavigationTreeHelper(String contextPrefix)
Method Detail

createTreeModel

public abstract NavigationModel createTreeModel(JAXXContext context)
Create the model.

Parameters:
context - the context to associate with fresh model
Returns:
the new model build with data from the given context

createTreeHandler

public abstract NavigationTreeHandler createTreeHandler(JAXXObject context)
Create the tree handler.

Parameters:
context - the context to associate with fresh handler
Returns:
the new handler

getContextValue

public Object getContextValue(JAXXContext context,
                              String path)
                       throws InvocationTargetException,
                              NoSuchMethodException,
                              IllegalAccessException
Throws:
InvocationTargetException
NoSuchMethodException
IllegalAccessException

findNode

public NavigationTreeNode findNode(JAXXContext context,
                                   String path)

findNode

public NavigationTreeNode findNode(JAXXContext context,
                                   String path,
                                   String regex)

findNode

public NavigationTreeNode findNode(JAXXContext context,
                                   String path,
                                   Pattern regex)

findNode

public NavigationTreeNode findNode(JAXXContext context,
                                   String path,
                                   String regex,
                                   String suffix)

findNode

public NavigationTreeNode findNode(JAXXContext context,
                                   String path,
                                   Pattern regex,
                                   String suffix)

selectNode

public void selectNode(JAXXContext context,
                       String path)
Sélection d'un noeud dans l'arbre de navigation à partir de son path.

Parameters:
context - le contexte applicatif
path - le path absolue du noeud dans l'arbre

selectNode

public void selectNode(JAXXContext context,
                       NavigationTreeNode node)
Sélection d'un noeud dans l'arbre de navigation.

Parameters:
context - le contexte applicatif
node - le noeud à sélectionner dans l'arbre

gotoParentNode

public void gotoParentNode(JAXXContext context)
Sélection du parent du noeud selectionne dans l'arbre de navigation.

Parameters:
context - le contexte applicatif

getParentNode

public NavigationTreeNode getParentNode(NavigationTreeNode current,
                                        Class<?> beanClass)
Obtain the first ancestor with the matching internalClass

Parameters:
current - the node to test
beanClass - the type of the internal class to seek of
Returns:
the first ancestor node with the matching class or null if not found

gotoChildNode

public void gotoChildNode(JAXXContext context,
                          int childIndex)
Sélection d'un fils du noeud selectionne dans l'arbre de navigation.

Parameters:
context - le contexte applicatif
childIndex - index du fils a selectionner

repaintNode

public void repaintNode(JAXXContext context,
                        NavigationTreeNode node)
Demande une opération de repaint sur un noeud de l'arbre de navigation. Note: La descendance du noeud n'est pas repainte.

Parameters:
context - le contexte applicatif
node - le noeud à repaindre

repaintNode

public void repaintNode(JAXXContext context,
                        NavigationTreeNode node,
                        boolean deep)
Demande une opération de repaint sur un noeud de l'arbre de navigation. Note: La descendance du noeud est repainte si le paramètre deep est à true.

Parameters:
context - le contexte applicatif
node - le noeud à repaindre
deep - un flag pour activer la repainte de la descendance du noeud

getSafeTreeModel

@Deprecated
public NavigationTreeModel getSafeTreeModel(JAXXContext context)
                                     throws NullPointerException
Deprecated. please use getSafeModel(JAXXContext), will be remove soon

Parameters:
context - where to find
Returns:
the tree model
Throws:
NullPointerException - if model is null

getSafeModel

public NavigationModel getSafeModel(JAXXContext context)
                             throws NullPointerException
Throws:
NullPointerException

getSafeTree

public JTree getSafeTree(JAXXContext context)
                  throws NullPointerException
Throws:
NullPointerException

getSafeTreeTable

public org.jdesktop.swingx.JXTreeTable getSafeTreeTable(JAXXContext context)
                                                 throws NullPointerException
Throws:
NullPointerException


Copyright © 2008-2010 CodeLutin. All Rights Reserved.