org::gel::mauve::gui::navigation::SearchResultPanel Class Reference

A Gui component that shows the results of a given query separated by genome. More...

Inheritance diagram for org::gel::mauve::gui::navigation::SearchResultPanel:

Inheritance graph
[legend]
Collaboration diagram for org::gel::mauve::gui::navigation::SearchResultPanel:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void addTreeModelListener (TreeModelListener listen)
 passes on listeners to real tree model

void displayFeatures (Object[] data)
 displays the data passed into the method

Object getChild (Object parent, int index)
 Finds the child of the given object.

int getChildCount (Object parent)
 Returns the number of children the object has.

int getIndexOfChild (Object parent, Object child)
 Returns the index of the child.

Object getRoot ()
 returns undisplayed root of the tree

JScrollPane getScrollPane ()
 returns a reference to the ScrollPane that contains this result_panel

Component getTreeCellRendererComponent (JTree tree, Object val, boolean selected, boolean expanded, boolean leaf, int row, boolean focus)
 facilitates painting of tree- converts feature to its name

boolean isLeaf (Object node)
 Returns true if the object is a leaf.

void removeTreeModelListener (TreeModelListener list)
 passes on listener removes to real tree model

 SearchResultPanel (Vector genomes, SequenceNavigator nav)
 Constructs new SearchResultPanel.

void valueChanged (TreeSelectionEvent event)
 When the selection in the tree changes, recenters mauve frame gui on selected feature.

void valueForPathChanged (TreePath path, Object val)
 Passes on events to real tree model.

void waitForResults ()
 sets display to reflect a search is being performed


Static Public Member Functions

String getDisplayText (Feature feat)
 returns a string including the feature's name and location


Static Public Attributes

final String MATCHLESS = "No features found. . ."
 represents genome with no found features

final Icon MINUS_ICON = SignedIcon.getSignedIcon (false)
 icon shown if a genome did not contain results

final String NO_RESULTS = "No results to display. . ."
 String representing no results.

final Icon PLUS_ICON = SignedIcon.getSignedIcon (true)
 icon shown if a genome contained results


Protected Member Functions

void initGUI ()
 initializes gui components

void resetData (Object[] data)
 Resets the display to include the new data.


Protected Attributes

Hashtable genome_data
 contains all the data the tree should display

Object[] genome_indexes
 contains genomes mapped to their index

DefaultTreeModel model
 model that represents the data to be displayed

SequenceNavigator navigator
 reference to SequenceNavigator this panel is associated with

DefaultTreeCellRenderer renderer
 renders each value in the tree

int result_state
 represents display state - if there are no results, value is 0, 1 if there is 1 result, any number higher than 1 means multiple results

DefaultMutableTreeNode root
 reference to root node of tree

JScrollPane scroller
 allows results to be scrolled through

boolean searching
 true when a search is in progress, false otherwise

JTree tree
 Tree that contains search results (features).


Static Protected Attributes

final String ROOT = "Root"
 represents "dummy" root node of tree

final String SEARCHING = "Searching. . ."
 represents tree while searching


Detailed Description

A Gui component that shows the results of a given query separated by genome.

Each result represents a feature that matched the search constraints. If a result is selected, the Genome sequence is scrolled to that feature

Author:
rissman

Definition at line 51 of file SearchResultPanel.java.


Constructor & Destructor Documentation

org::gel::mauve::gui::navigation::SearchResultPanel::SearchResultPanel Vector  genomes,
SequenceNavigator  nav
[inline]
 

Constructs new SearchResultPanel.

Parameters:
genomes The genomes that the mauve frame displays
nav The SequenceNavigator it belongs to

Definition at line 143 of file SearchResultPanel.java.

References genome_data, genome_indexes, and initGUI().


Member Function Documentation

void org::gel::mauve::gui::navigation::SearchResultPanel::addTreeModelListener TreeModelListener  listen  )  [inline]
 

passes on listeners to real tree model

Definition at line 329 of file SearchResultPanel.java.

void org::gel::mauve::gui::navigation::SearchResultPanel::displayFeatures Object[]  data  )  [inline]
 

displays the data passed into the method

Parameters:
data An array of linked lists. Each list should start with a genome object, followed by all the Features to display in that genome

Definition at line 200 of file SearchResultPanel.java.

References genome_data, genome_indexes, getChild(), getChildCount(), org::gel::mauve::gui::SequenceNavigator::reloadGUI(), resetData(), result_state, root, ROOT, searching, and tree.

Referenced by org::gel::mauve::gui::SequenceNavigator::goToFeatureByName(), and org::gel::mauve::gui::SequenceNavigator::showResultTree().

Object org::gel::mauve::gui::navigation::SearchResultPanel::getChild Object  parent,
int  index
[inline]
 

Finds the child of the given object.

Parameters:
parent The object whose child should be found
index The index of the desired child
Returns:
An object representing the child node

Definition at line 342 of file SearchResultPanel.java.

Referenced by displayFeatures().

int org::gel::mauve::gui::navigation::SearchResultPanel::getChildCount Object  parent  )  [inline]
 

Returns the number of children the object has.

Parameters:
parent The object representing the parent
Returns:
The number of children associated with the parent

Definition at line 370 of file SearchResultPanel.java.

Referenced by displayFeatures().

String org::gel::mauve::gui::navigation::SearchResultPanel::getDisplayText Feature  feat  )  [inline, static]
 

returns a string including the feature's name and location

Parameters:
feat The feature whose information should be displayed
Returns:
The display string for this feature

Definition at line 286 of file SearchResultPanel.java.

int org::gel::mauve::gui::navigation::SearchResultPanel::getIndexOfChild Object  parent,
Object  child
[inline]
 

Returns the index of the child.

Parameters:
parent The parent of the child in question
child The child whose index is desired
Returns:
The index of the child

Definition at line 397 of file SearchResultPanel.java.

Object org::gel::mauve::gui::navigation::SearchResultPanel::getRoot  )  [inline]
 

returns undisplayed root of the tree

Returns:
An object representing the tree root

Definition at line 430 of file SearchResultPanel.java.

JScrollPane org::gel::mauve::gui::navigation::SearchResultPanel::getScrollPane  )  [inline]
 

returns a reference to the ScrollPane that contains this result_panel

Returns:

Definition at line 189 of file SearchResultPanel.java.

References scroller.

Referenced by org::gel::mauve::gui::SequenceNavigator::initGUI().

Component org::gel::mauve::gui::navigation::SearchResultPanel::getTreeCellRendererComponent JTree  tree,
Object  val,
boolean  selected,
boolean  expanded,
boolean  leaf,
int  row,
boolean  focus
[inline]
 

facilitates painting of tree- converts feature to its name

Definition at line 316 of file SearchResultPanel.java.

void org::gel::mauve::gui::navigation::SearchResultPanel::initGUI  )  [inline, protected]
 

initializes gui components

Definition at line 159 of file SearchResultPanel.java.

References MINUS_ICON, PLUS_ICON, ROOT, root, scroller, and tree.

Referenced by SearchResultPanel().

boolean org::gel::mauve::gui::navigation::SearchResultPanel::isLeaf Object  node  )  [inline]
 

Returns true if the object is a leaf.

Parameters:
node The object in question
Returns:
True if the object has no children, false otherwise

Definition at line 441 of file SearchResultPanel.java.

void org::gel::mauve::gui::navigation::SearchResultPanel::removeTreeModelListener TreeModelListener  list  )  [inline]
 

passes on listener removes to real tree model

Definition at line 451 of file SearchResultPanel.java.

void org::gel::mauve::gui::navigation::SearchResultPanel::resetData Object[]  data  )  [inline, protected]
 

Resets the display to include the new data.

Parameters:
data The data that should be added. Each array index is a linked list containing first the genome it is for, then all the features to display for that sequence

Definition at line 259 of file SearchResultPanel.java.

Referenced by displayFeatures().

void org::gel::mauve::gui::navigation::SearchResultPanel::valueChanged TreeSelectionEvent  event  )  [inline]
 

When the selection in the tree changes, recenters mauve frame gui on selected feature.

Definition at line 305 of file SearchResultPanel.java.

void org::gel::mauve::gui::navigation::SearchResultPanel::valueForPathChanged TreePath  path,
Object  val
[inline]
 

Passes on events to real tree model.

Definition at line 458 of file SearchResultPanel.java.

void org::gel::mauve::gui::navigation::SearchResultPanel::waitForResults  )  [inline]
 

sets display to reflect a search is being performed

Definition at line 242 of file SearchResultPanel.java.

References root, and searching.

Referenced by org::gel::mauve::gui::SequenceNavigator::doNavigation().


Member Data Documentation

Hashtable org::gel::mauve::gui::navigation::SearchResultPanel::genome_data [protected]
 

contains all the data the tree should display

Definition at line 128 of file SearchResultPanel.java.

Referenced by displayFeatures(), and SearchResultPanel().

Object [] org::gel::mauve::gui::navigation::SearchResultPanel::genome_indexes [protected]
 

contains genomes mapped to their index

Definition at line 133 of file SearchResultPanel.java.

Referenced by displayFeatures(), and SearchResultPanel().

final String org::gel::mauve::gui::navigation::SearchResultPanel::MATCHLESS = "No features found. . ." [static]
 

represents genome with no found features

Definition at line 103 of file SearchResultPanel.java.

final Icon org::gel::mauve::gui::navigation::SearchResultPanel::MINUS_ICON = SignedIcon.getSignedIcon (false) [static]
 

icon shown if a genome did not contain results

Definition at line 123 of file SearchResultPanel.java.

Referenced by initGUI().

DefaultTreeModel org::gel::mauve::gui::navigation::SearchResultPanel::model [protected]
 

model that represents the data to be displayed

Definition at line 62 of file SearchResultPanel.java.

SequenceNavigator org::gel::mauve::gui::navigation::SearchResultPanel::navigator [protected]
 

reference to SequenceNavigator this panel is associated with

Definition at line 72 of file SearchResultPanel.java.

final String org::gel::mauve::gui::navigation::SearchResultPanel::NO_RESULTS = "No results to display. . ." [static]
 

String representing no results.

Definition at line 98 of file SearchResultPanel.java.

final Icon org::gel::mauve::gui::navigation::SearchResultPanel::PLUS_ICON = SignedIcon.getSignedIcon (true) [static]
 

icon shown if a genome contained results

Definition at line 118 of file SearchResultPanel.java.

Referenced by initGUI().

DefaultTreeCellRenderer org::gel::mauve::gui::navigation::SearchResultPanel::renderer [protected]
 

renders each value in the tree

Definition at line 67 of file SearchResultPanel.java.

int org::gel::mauve::gui::navigation::SearchResultPanel::result_state [protected]
 

represents display state - if there are no results, value is 0, 1 if there is 1 result, any number higher than 1 means multiple results

Definition at line 88 of file SearchResultPanel.java.

Referenced by displayFeatures().

final String org::gel::mauve::gui::navigation::SearchResultPanel::ROOT = "Root" [static, protected]
 

represents "dummy" root node of tree

Definition at line 113 of file SearchResultPanel.java.

Referenced by displayFeatures(), and initGUI().

DefaultMutableTreeNode org::gel::mauve::gui::navigation::SearchResultPanel::root [protected]
 

reference to root node of tree

Definition at line 77 of file SearchResultPanel.java.

Referenced by displayFeatures(), initGUI(), and waitForResults().

JScrollPane org::gel::mauve::gui::navigation::SearchResultPanel::scroller [protected]
 

allows results to be scrolled through

Definition at line 82 of file SearchResultPanel.java.

Referenced by getScrollPane(), and initGUI().

final String org::gel::mauve::gui::navigation::SearchResultPanel::SEARCHING = "Searching. . ." [static, protected]
 

represents tree while searching

Definition at line 108 of file SearchResultPanel.java.

boolean org::gel::mauve::gui::navigation::SearchResultPanel::searching [protected]
 

true when a search is in progress, false otherwise

Definition at line 93 of file SearchResultPanel.java.

Referenced by displayFeatures(), and waitForResults().

JTree org::gel::mauve::gui::navigation::SearchResultPanel::tree [protected]
 

Tree that contains search results (features).

Definition at line 57 of file SearchResultPanel.java.

Referenced by displayFeatures(), and initGUI().


The documentation for this class was generated from the following file:
Generated on Mon Aug 19 06:04:08 2013 for Mauve by doxygen 1.3.6