org.chorem.vradi.ui.thesaurus.helpers
Class ThesaurusTreeHelper

java.lang.Object
  extended by jaxx.runtime.swing.nav.NavHelper<DefaultTreeModel,JTree,jaxx.runtime.swing.nav.tree.NavTreeBridge<N>,N>
      extended by jaxx.runtime.swing.nav.tree.NavTreeHelper<VradiTreeNode>
          extended by org.chorem.vradi.ui.tree.helpers.VradiTreeHelper<Thesaurus>
              extended by org.chorem.vradi.ui.thesaurus.helpers.ThesaurusTreeHelper
All Implemented Interfaces:
VradiEntitiesListener<Thesaurus>

public class ThesaurusTreeHelper
extends VradiTreeHelper<Thesaurus>

Navigation tree helpers.

Author:
sletellier
See Also:
NavTreeHelper

Field Summary
protected  boolean listening
           
protected  RootThesaurus rootThesaurus
           
protected  Thesaurus thesaurus
           
protected  VradiEntitiesListener<RootThesaurus> thesaurusVradiEntitiesListener
           
 
Fields inherited from class org.chorem.vradi.ui.tree.helpers.VradiTreeHelper
idsLoaded
 
Fields inherited from class jaxx.runtime.swing.nav.NavHelper
childLoadors, dataProvider, expandListener, selectionListener, treeModelListener
 
Constructor Summary
ThesaurusTreeHelper(VradiDataProvider dataProvider)
          Create helper with first nodes are the root thesaurus
ThesaurusTreeHelper(VradiDataProvider dataProvider, RootThesaurus rootThesaurus)
          Create helper with root thesaurus for root node
ThesaurusTreeHelper(VradiDataProvider dataProvider, Thesaurus thesaurus)
          Create helper with thesaurus for root node
 
Method Summary
 void createEntityNode(String wikittyId)
           
 TreeModel createTreeModel()
           
 void entitiesAdded(Set<Thesaurus> added)
           
 void entitiesRemoved(Set<String> removed)
           
protected  List<String> extractIds(List<Thesaurus> beans)
           
 VradiTreeNode findRootThesaurusNode(RootThesaurus rootThesaurus)
           
 VradiTreeNode findRootThesaurusNode(String rootThesaurusId)
           
protected  VradiTreeNode findThesaurusNode(String thesaurusId)
           
protected  VradiTreeNode findThesaurusNode(Thesaurus thesaurus)
           
protected  List<Thesaurus> getParentsPathThesaurus(Thesaurus thesaurus)
           
static RootThesaurus getRootThesaurus(VradiTreeNode node)
           
static Thesaurus getThesaurus(VradiTreeNode node)
           
protected  void init(VradiDataProvider dataProvider)
           
 void tryToSelect(Collection<Thesaurus> thesauruses)
          Try to select thesaurus pass in param
 void tryToSelect(List<String> thesaurusIds)
          Try to select thesaurus ids pass in param
 void tryToSelect(String id)
          Try to select thesaurus pass in param
 void tryToSelect(Thesaurus thesaurus)
          Try to select thesaurus pass in param
 void tryToUnselect(Collection<Thesaurus> thesauruses)
          Try to unselect thesaurus pass in param
 void tryToUnselect(List<String> thesaurusIds)
          Try to unselect thesaurus ids pass in param
 void tryToUnselect(String id)
          Try to unselect thesaurus pass in param
 void tryToUnselect(Thesaurus thesaurus)
          Try to unselect thesaurus pass in param
 
Methods inherited from class org.chorem.vradi.ui.tree.helpers.VradiTreeHelper
findNode, getDataProvider, getLoadedIds, getRootNode, getSelectedNode, isLoadedId, refresh, registerLoadedIds, removeEntities, selectNode, setUI
 
Methods inherited from class jaxx.runtime.swing.nav.tree.NavTreeHelper
addSelectionPath, addSelectionPaths, createModel, expandPath, getSelectedNodes, getSelectionModel, getTreeCellRenderer, isExpanded, removeSelectionPath, removeSelectionPaths, scrollPathToVisible, setSelectionPath
 
Methods inherited from class jaxx.runtime.swing.nav.NavHelper
checkModel, getBridge, getChild, getChildLoador, getChildLoadors, getModel, getNode, getSelectedIds, getUI, insertNode, insertNode, loadAllNodes, moveNode, populateNode, refreshNode, removeNode, selectNode, selectNodes, selectParentNode, setDataProvider, setUI, setUI, setUI, setUI, unSelectNode, unSelectNodes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rootThesaurus

protected RootThesaurus rootThesaurus

thesaurus

protected Thesaurus thesaurus

listening

protected boolean listening

thesaurusVradiEntitiesListener

protected VradiEntitiesListener<RootThesaurus> thesaurusVradiEntitiesListener
Constructor Detail

ThesaurusTreeHelper

public ThesaurusTreeHelper(VradiDataProvider dataProvider)
Create helper with first nodes are the root thesaurus

Parameters:
dataProvider - data provider

ThesaurusTreeHelper

public ThesaurusTreeHelper(VradiDataProvider dataProvider,
                           RootThesaurus rootThesaurus)
Create helper with root thesaurus for root node

Parameters:
dataProvider - data provider
rootThesaurus - root thesaurus for root node

ThesaurusTreeHelper

public ThesaurusTreeHelper(VradiDataProvider dataProvider,
                           Thesaurus thesaurus)
Create helper with thesaurus for root node

Parameters:
dataProvider - data provider
thesaurus - thesaurus for root node
Method Detail

init

protected void init(VradiDataProvider dataProvider)

createTreeModel

public TreeModel createTreeModel()

tryToSelect

public void tryToSelect(String id)
Try to select thesaurus pass in param

Parameters:
id - of thesaurus to select

tryToSelect

public void tryToSelect(Thesaurus thesaurus)
Try to select thesaurus pass in param

Parameters:
thesaurus - to select

tryToSelect

public void tryToSelect(List<String> thesaurusIds)
Try to select thesaurus ids pass in param

Parameters:
thesaurusIds - list of thesaurus ids to select

tryToSelect

public void tryToSelect(Collection<Thesaurus> thesauruses)
Try to select thesaurus pass in param

Parameters:
thesauruses - list of thesaurus to select

tryToUnselect

public void tryToUnselect(String id)
Try to unselect thesaurus pass in param

Parameters:
id - of thesaurus to unselect

tryToUnselect

public void tryToUnselect(Thesaurus thesaurus)
Try to unselect thesaurus pass in param

Parameters:
thesaurus - to unselect

tryToUnselect

public void tryToUnselect(List<String> thesaurusIds)
Try to unselect thesaurus ids pass in param

Parameters:
thesaurusIds - list of thesaurus ids to select

tryToUnselect

public void tryToUnselect(Collection<Thesaurus> thesauruses)
Try to unselect thesaurus pass in param

Parameters:
thesauruses - list of thesaurus to unselect

findRootThesaurusNode

public VradiTreeNode findRootThesaurusNode(String rootThesaurusId)

findRootThesaurusNode

public VradiTreeNode findRootThesaurusNode(RootThesaurus rootThesaurus)

findThesaurusNode

protected VradiTreeNode findThesaurusNode(String thesaurusId)

findThesaurusNode

protected VradiTreeNode findThesaurusNode(Thesaurus thesaurus)

getParentsPathThesaurus

protected List<Thesaurus> getParentsPathThesaurus(Thesaurus thesaurus)

extractIds

protected List<String> extractIds(List<Thesaurus> beans)

getRootThesaurus

public static RootThesaurus getRootThesaurus(VradiTreeNode node)

getThesaurus

public static Thesaurus getThesaurus(VradiTreeNode node)

createEntityNode

public void createEntityNode(String wikittyId)
Specified by:
createEntityNode in class VradiTreeHelper<Thesaurus>

entitiesAdded

public void entitiesAdded(Set<Thesaurus> added)
Specified by:
entitiesAdded in interface VradiEntitiesListener<Thesaurus>
Overrides:
entitiesAdded in class VradiTreeHelper<Thesaurus>

entitiesRemoved

public void entitiesRemoved(Set<String> removed)
Specified by:
entitiesRemoved in interface VradiEntitiesListener<Thesaurus>
Overrides:
entitiesRemoved in class VradiTreeHelper<Thesaurus>


Copyright © 2009-2011 CodeLutin. All Rights Reserved.