public class

ConceptTreePanel

extends SearchableTreePanel
java.lang.Object
   ↳ java.awt.Component
     ↳ java.awt.Container
       ↳ javax.swing.JComponent
         ↳ javax.swing.JPanel
           ↳ org.mbari.swing.SearchableTreePanel
             ↳ vars.shared.ui.tree.ConceptTreePanel

Summary

[Expand]
Inherited Constants
From class javax.swing.JComponent
From class java.awt.Component
From interface java.awt.image.ImageObserver
[Expand]
Inherited Fields
From class javax.swing.JComponent
Public Constructors
ConceptTreePanel(KnowledgebaseDAOFactory knowledgebaseDAOFactory)
Constructor
Public Methods
String getNodeTextToSearch(DefaultMutableTreeNode node)
JPopupMenu getPopupMenu()
Returns the popupmenu that's been associated with this panel
boolean goToMatchingNode(String text, boolean useGlobSearch)
This overridden method does a database lookup for searches.
synchronized void openNode(Concept concept)
Loads the branch of a particular concept.
void refresh()
Refreshes the tree from data in the database (beawre you made need to purge the PersistenceCache first.
void refreshAndOpenNode(Concept concept)
Refreshes the tree from data in the database (beawre you made need to purge the PersistenceCache first.
void setJTree(JTree tree)
This overriden method adds a few needed listeners to the concept tree
void setPopupMenu(JPopupMenu popupMenu)
Sets a popupmenu to use with the JTree
[Expand]
Inherited Methods
From class org.mbari.swing.SearchableTreePanel
From class javax.swing.JPanel
From class javax.swing.JComponent
From class java.awt.Container
From class java.awt.Component
From class java.lang.Object
From interface java.awt.MenuContainer
From interface java.awt.image.ImageObserver
From interface javax.accessibility.Accessible

Public Constructors

public ConceptTreePanel (KnowledgebaseDAOFactory knowledgebaseDAOFactory)

Constructor

Public Methods

public String getNodeTextToSearch (DefaultMutableTreeNode node)

public JPopupMenu getPopupMenu ()

Returns the popupmenu that's been associated with this panel

public boolean goToMatchingNode (String text, boolean useGlobSearch)

This overridden method does a database lookup for searches. This is a woorkaround needed for lazy loading. This method will load the branches of all matches from the database.

public synchronized void openNode (Concept concept)

Loads the branch of a particular concept. This method does the following

  1. Walks from the concept up the tree to the root concept, storing the concepts in a list. (This is very fast)
  2. Starts walking from the root down (using lazyExpand), searching each childnode for a matching primary name (which was stored in the first step
  3. If a matching primary name is found this stops otherwise it opens the next level and searches for the next mathc in the list.

public void refresh ()

Refreshes the tree from data in the database (beawre you made need to purge the PersistenceCache first. This methods will open the root node.

public void refreshAndOpenNode (Concept concept)

Refreshes the tree from data in the database (beawre you made need to purge the PersistenceCache first. This methods will open the node containing the specified Concept.

Parameters
concept The concept to open in the tree

public void setJTree (JTree tree)

This overriden method adds a few needed listeners to the concept tree

public void setPopupMenu (JPopupMenu popupMenu)

Sets a popupmenu to use with the JTree