org::gel::mauve::gui::SequenceNavigator Class Reference

A gui that allows a user to search genome features by annotation. More...

Inheritance diagram for org::gel::mauve::gui::SequenceNavigator:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

void actionPerformed (final ActionEvent e)
 action listener for buttons on this panel

void addNavigationPanel (NavigationPanel pane)
 adds a newly constructed navigation panel to the gui

void adjustZoom (Feature feat)
 Adjust zoom so desired feature is a decent size and is all viewable.

void displayFeature (Feature feat, Genome genome)
 Centers the view on a specific feature of a genome.

void dispose ()
Vector getGenomeKeys ()
 Gets all the feature keys present in any of the sequences.

int getValidCount ()
 Finds out if the data entered into the input panels is valid, and how many valid constraints are possible.

void goToFeatureByName ()
 A wizard style simplified feature searcher that allows the user to find a feature by name and highlights the first feature in the mauve gui that matches the desired name.

void goToPosition (long position, Genome chosen)
 Centers view on a specific sequence position.

void keyPressed (KeyEvent e)
 dummy method - implemented as part of key listener interface

void keyReleased (KeyEvent e)
 dummy method - implemented as part of key listener interface

void keyTyped (KeyEvent e)
 converts enters typed into the input panels to action events representing a user desire to perform search

void loadGenomeList ()
 loads list of genomes user is viewing and should be able to search

void makeConstraintVisible (NavigationPanel panel)
 scrolls the gui to a specific part of the list of constraints

void reloadGUI ()
 necessary to call for some reason whenever adding or removing NavigationPanels-- automatically called from addNavigationPanel and removeNavigationPanel

void removeNavigationPanel (NavigationPanel pane)
 removes unwanted navigation panel from gui

void reset ()
 resets search so only one navigation panel is present

 SequenceNavigator (Component parent, RearrangementPanel rrpanel, BaseViewerModel dataModel)
 SequenceNavigator (MauveFrame frame)
 Creates new GenomeNavigator.

boolean shouldClear ()
 determines whether current results should be cleared

void showNavigator ()
 Shows the navigator so a user may select a genome and a position to go to within the genome.

void showResultTree (final Genome[] nomes, final String[][] data)
 Performs the final narrowing down of features to those that match the given constraints, and displays a tree of matching features.


Static Public Member Functions

void expandIfNecessary (JScrollPane pane, Dimension size)
 Expands the frame holding the gui as much as necessary without allowing it to increase over the maximum programmatically allowable size.

void goToPosition (long position, Genome chosen, RearrangementPanel rrpanel)
 Centers view on a specific sequence position.

void goToSeqPos (Component parentComponent, BaseViewerModel dataModel, RearrangementPanel rrpanel)
 A simple wizard style routine that allows a user to choose a numeric sequence position from a specific sequence to navigate to, and performs navigation.


Static Public Attributes

int MAX_HEIGHT = 400
 sets maximum height programmatically given to the frame

int MAX_WIDTH = 850
 sets maximum height and width programmatically given to the frame.


Protected Member Functions

void doNavigation ()
 converts user input to features to display and centers view on first matching feature

void moveFromBehind ()
 finds the best place on screen to place the frame- takes into account size of mauve frame


Protected Attributes

WindowAdapter adapt
JButton add
AncestorListener ancestListener
 if there is no frame containing the alignment, so when it is removed, this SequenceNavigator can be closed

JButton cancel
JCheckBox clear
 if checked, previous search results are cleared when a new search is performed

BaseViewerModel data_model
 The data model being displayed and navigated.

JFrame frame
 parent frame containing this panel

Vector genome_choices
 availabe genome sequences to search

JComboBox genomes
 list of genomes with searchable features

JPanel nav_panel_holder
 panel that contains all NavPanels

LinkedList nav_panels
 each NavPanel in the list represents a constraint on the current search

JScrollPane nav_scroll
 allows constraints to be scrolled through

Component parent_component
 The parent component of the panel, if it disappears, so will the panel.

JButton reset
 when pressed, resets search to one constraint with no values entered

SearchResultPanel result_pane
 panel that shows results

JScrollPane result_scroller
 allows results to be scrolled through

RearrangementPanel rrpanel
 The panel displaying data under navigation.

JButton search
 when pressed, a search is performed

LinkedList window_listeners

Static Package Functions

 [static initializer]
 initializes hashtable and hashset inherited from NavigationConstants


Private Member Functions

void initGUI ()
 Does initial gui initialization.

void makeBottomPanel (JPanel holder)
 initializes bottom part of left side of gui

void makeFrame ()
 sets up the frame that contains this SequenceNavigation panel and its subcomponents


Private Attributes

Boolean current_search = Boolean.FALSE
 mechanism for only doing one gui operation at a time/locking


Detailed Description

A gui that allows a user to search genome features by annotation.

Allows multiple constraints. Results are shown in a tree, and selecting the feature in the tree scrolls to that position in the genome. Results can be added to previous search results, or previous results can be cleared.

Author:
rissman

Definition at line 45 of file SequenceNavigator.java.


Constructor & Destructor Documentation

org::gel::mauve::gui::SequenceNavigator::SequenceNavigator MauveFrame  frame  )  [inline]
 

Creates new GenomeNavigator.

Parameters:
frame the MauveFrame this navigator should be associated with

Definition at line 169 of file SequenceNavigator.java.

References data_model, org::gel::mauve::gui::MauveFrame::getModel(), org::gel::mauve::gui::MauveFrame::getRearrangementPanel(), initGUI(), nav_panels, and parent_component.

org::gel::mauve::gui::SequenceNavigator::SequenceNavigator Component  parent,
RearrangementPanel  rrpanel,
BaseViewerModel  dataModel
[inline]
 

Definition at line 177 of file SequenceNavigator.java.

References data_model, initGUI(), nav_panels, and parent_component.


Member Function Documentation

org::gel::mauve::gui::SequenceNavigator::[static initializer]  )  [inline, static, package]
 

initializes hashtable and hashset inherited from NavigationConstants

void org::gel::mauve::gui::SequenceNavigator::actionPerformed final ActionEvent  e  )  [inline]
 

action listener for buttons on this panel

Parameters:
e If the source of the action is the search button, checks for valid input and performs search If the source is the cancel button, hides the Navigator If the source is the add button, adds a panel for the use to enter a new constraint in If the source is reset, removes all the input panel except the first

Definition at line 398 of file SequenceNavigator.java.

References add, current_search, doNavigation(), reset(), and search.

Referenced by keyTyped().

void org::gel::mauve::gui::SequenceNavigator::addNavigationPanel NavigationPanel  pane  )  [inline]
 

adds a newly constructed navigation panel to the gui

Definition at line 350 of file SequenceNavigator.java.

References nav_panel_holder, nav_panels, and reloadGUI().

Referenced by org::gel::mauve::gui::navigation::NavigationPanel::initGUI().

void org::gel::mauve::gui::SequenceNavigator::adjustZoom Feature  feat  )  [inline]
 

Adjust zoom so desired feature is a decent size and is all viewable.

Parameters:
feat 

Definition at line 662 of file SequenceNavigator.java.

void org::gel::mauve::gui::SequenceNavigator::displayFeature Feature  feat,
Genome  genome
[inline]
 

Centers the view on a specific feature of a genome.

Parameters:
feat The feature to center on
genome The genome containing the feature

Definition at line 647 of file SequenceNavigator.java.

Referenced by goToFeatureByName().

void org::gel::mauve::gui::SequenceNavigator::dispose  )  [inline]
 

Definition at line 737 of file SequenceNavigator.java.

Referenced by org::gel::mauve::gui::MauveFrame::thisWindowClosing().

void org::gel::mauve::gui::SequenceNavigator::doNavigation  )  [inline, protected]
 

converts user input to features to display and centers view on first matching feature

Definition at line 610 of file SequenceNavigator.java.

References getValidCount(), nav_panels, result_pane, showResultTree(), and org::gel::mauve::gui::navigation::SearchResultPanel::waitForResults().

Referenced by actionPerformed().

void org::gel::mauve::gui::SequenceNavigator::expandIfNecessary JScrollPane  pane,
Dimension  size
[inline, static]
 

Expands the frame holding the gui as much as necessary without allowing it to increase over the maximum programmatically allowable size.

Parameters:
pane Holds the component that might need more size
size The size of the frame before the resize

Definition at line 456 of file SequenceNavigator.java.

Referenced by reloadGUI().

Vector org::gel::mauve::gui::SequenceNavigator::getGenomeKeys  )  [inline]
 

Gets all the feature keys present in any of the sequences.

Returns:
A vector of strings representing all the fields in all the currently viewed sequences

Definition at line 728 of file SequenceNavigator.java.

Referenced by org::gel::mauve::gui::navigation::NavigationPanel::setNavigationChoices().

int org::gel::mauve::gui::SequenceNavigator::getValidCount  )  [inline]
 

Finds out if the data entered into the input panels is valid, and how many valid constraints are possible.

Input is considered valid if there are no breaks in input; if all fields are filled in. Will allow empty constraints at the bottom

Returns:
The number of valid constraints

Definition at line 506 of file SequenceNavigator.java.

References org::gel::mauve::gui::navigation::NavigationPanel::dataValid(), and nav_panels.

Referenced by doNavigation().

void org::gel::mauve::gui::SequenceNavigator::goToFeatureByName  )  [inline]
 

A wizard style simplified feature searcher that allows the user to find a feature by name and highlights the first feature in the mauve gui that matches the desired name.

Definition at line 567 of file SequenceNavigator.java.

References data_model, displayFeature(), org::gel::mauve::gui::navigation::SearchResultPanel::displayFeatures(), org::gel::mauve::Genome::length, parent_component, and result_pane.

Referenced by org::gel::mauve::gui::MauveFrame::actionPerformed().

void org::gel::mauve::gui::SequenceNavigator::goToPosition long  position,
Genome  chosen
[inline]
 

Centers view on a specific sequence position.

Parameters:
position the position to center on
chosen the genome to find the position in

Definition at line 718 of file SequenceNavigator.java.

void org::gel::mauve::gui::SequenceNavigator::goToPosition long  position,
Genome  chosen,
RearrangementPanel  rrpanel
[inline, static]
 

Centers view on a specific sequence position.

Parameters:
position the position to center on
chosen the genome to find the position in
mf the mauve frame containing the p

Definition at line 700 of file SequenceNavigator.java.

References org::gel::mauve::gui::sequence::RRSequencePanel::goTo(), org::gel::mauve::gui::sequence::RRSequencePanel::isForGenome(), and org::gel::mauve::gui::RearrangementPanel::newPanels.

Referenced by goToSeqPos().

void org::gel::mauve::gui::SequenceNavigator::goToSeqPos Component  parentComponent,
BaseViewerModel  dataModel,
RearrangementPanel  rrpanel
[inline, static]
 

A simple wizard style routine that allows a user to choose a numeric sequence position from a specific sequence to navigate to, and performs navigation.

Parameters:
parentComponent The parent in the GUI heirarchy
dataModel A viewer data model containing sequence data of interest
rrpanel The rearrangement panel to adjust when the user selects a seq coordinate

Definition at line 537 of file SequenceNavigator.java.

References goToPosition().

void org::gel::mauve::gui::SequenceNavigator::initGUI  )  [inline, private]
 

Does initial gui initialization.

Definition at line 191 of file SequenceNavigator.java.

References org::gel::mauve::gui::navigation::SearchResultPanel::getScrollPane(), loadGenomeList(), makeBottomPanel(), makeFrame(), moveFromBehind(), nav_panel_holder, nav_scroll, reloadGUI(), result_pane, and result_scroller.

Referenced by SequenceNavigator().

void org::gel::mauve::gui::SequenceNavigator::keyPressed KeyEvent  e  )  [inline]
 

dummy method - implemented as part of key listener interface

Definition at line 469 of file SequenceNavigator.java.

void org::gel::mauve::gui::SequenceNavigator::keyReleased KeyEvent  e  )  [inline]
 

dummy method - implemented as part of key listener interface

Definition at line 475 of file SequenceNavigator.java.

void org::gel::mauve::gui::SequenceNavigator::keyTyped KeyEvent  e  )  [inline]
 

converts enters typed into the input panels to action events representing a user desire to perform search

Definition at line 482 of file SequenceNavigator.java.

References actionPerformed(), and search.

void org::gel::mauve::gui::SequenceNavigator::loadGenomeList  )  [inline]
 

loads list of genomes user is viewing and should be able to search

Definition at line 330 of file SequenceNavigator.java.

References data_model, and result_pane.

Referenced by initGUI().

void org::gel::mauve::gui::SequenceNavigator::makeBottomPanel JPanel  holder  )  [inline, private]
 

initializes bottom part of left side of gui

Parameters:
holder The panel in which to put the bottom component

Definition at line 271 of file SequenceNavigator.java.

References add, clear, reset, and search.

Referenced by initGUI().

void org::gel::mauve::gui::SequenceNavigator::makeConstraintVisible NavigationPanel  panel  )  [inline]
 

scrolls the gui to a specific part of the list of constraints

Parameters:
panel The NavigationPanel that should be visible on screen

Definition at line 494 of file SequenceNavigator.java.

References nav_scroll.

Referenced by org::gel::mauve::gui::navigation::NavigationPanel::dataValid().

void org::gel::mauve::gui::SequenceNavigator::makeFrame  )  [inline, private]
 

sets up the frame that contains this SequenceNavigation panel and its subcomponents

Definition at line 237 of file SequenceNavigator.java.

References adapt, ancestListener, parent_component, and window_listeners.

Referenced by initGUI().

void org::gel::mauve::gui::SequenceNavigator::moveFromBehind  )  [inline, protected]
 

finds the best place on screen to place the frame- takes into account size of mauve frame

Definition at line 303 of file SequenceNavigator.java.

References parent_component.

Referenced by initGUI().

void org::gel::mauve::gui::SequenceNavigator::reloadGUI  )  [inline]
 

necessary to call for some reason whenever adding or removing NavigationPanels-- automatically called from addNavigationPanel and removeNavigationPanel

Definition at line 436 of file SequenceNavigator.java.

References expandIfNecessary(), MAX_HEIGHT, MAX_WIDTH, nav_scroll, and result_scroller.

Referenced by addNavigationPanel(), org::gel::mauve::gui::navigation::SearchResultPanel::displayFeatures(), initGUI(), and removeNavigationPanel().

void org::gel::mauve::gui::SequenceNavigator::removeNavigationPanel NavigationPanel  pane  )  [inline]
 

removes unwanted navigation panel from gui

Definition at line 361 of file SequenceNavigator.java.

References nav_panel_holder, nav_panels, and reloadGUI().

Referenced by org::gel::mauve::gui::navigation::NavigationPanel::actionPerformed(), and reset().

void org::gel::mauve::gui::SequenceNavigator::reset  )  [inline]
 

resets search so only one navigation panel is present

Definition at line 372 of file SequenceNavigator.java.

References nav_panels, and removeNavigationPanel().

Referenced by actionPerformed().

boolean org::gel::mauve::gui::SequenceNavigator::shouldClear  )  [inline]
 

determines whether current results should be cleared

Returns:
True if they should, false otherwise

Definition at line 343 of file SequenceNavigator.java.

References clear.

void org::gel::mauve::gui::SequenceNavigator::showNavigator  )  [inline]
 

Shows the navigator so a user may select a genome and a position to go to within the genome.

Definition at line 383 of file SequenceNavigator.java.

Referenced by org::gel::mauve::gui::MauveFrame::actionPerformed().

void org::gel::mauve::gui::SequenceNavigator::showResultTree final Genome[]  nomes,
final  Stringdata[][]
[inline]
 

Performs the final narrowing down of features to those that match the given constraints, and displays a tree of matching features.

Parameters:
nomes The genomes the data is from
data A two dimensional array; contains the constraints to search by

Definition at line 633 of file SequenceNavigator.java.

References org::gel::mauve::gui::navigation::SearchResultPanel::displayFeatures(), and result_pane.

Referenced by doNavigation().


Member Data Documentation

WindowAdapter org::gel::mauve::gui::SequenceNavigator::adapt [protected]
 

Definition at line 106 of file SequenceNavigator.java.

Referenced by makeFrame().

JButton org::gel::mauve::gui::SequenceNavigator::add [protected]
 

Definition at line 74 of file SequenceNavigator.java.

Referenced by actionPerformed(), and makeBottomPanel().

AncestorListener org::gel::mauve::gui::SequenceNavigator::ancestListener [protected]
 

if there is no frame containing the alignment, so when it is removed, this SequenceNavigator can be closed

Definition at line 112 of file SequenceNavigator.java.

Referenced by makeFrame().

JButton org::gel::mauve::gui::SequenceNavigator::cancel [protected]
 

Definition at line 73 of file SequenceNavigator.java.

JCheckBox org::gel::mauve::gui::SequenceNavigator::clear [protected]
 

if checked, previous search results are cleared when a new search is performed

Definition at line 94 of file SequenceNavigator.java.

Referenced by makeBottomPanel(), and shouldClear().

Boolean org::gel::mauve::gui::SequenceNavigator::current_search = Boolean.FALSE [private]
 

mechanism for only doing one gui operation at a time/locking

Definition at line 161 of file SequenceNavigator.java.

Referenced by actionPerformed().

BaseViewerModel org::gel::mauve::gui::SequenceNavigator::data_model [protected]
 

The data model being displayed and navigated.

Definition at line 53 of file SequenceNavigator.java.

Referenced by goToFeatureByName(), loadGenomeList(), and SequenceNavigator().

JFrame org::gel::mauve::gui::SequenceNavigator::frame [protected]
 

parent frame containing this panel

Definition at line 57 of file SequenceNavigator.java.

Vector org::gel::mauve::gui::SequenceNavigator::genome_choices [protected]
 

availabe genome sequences to search

Definition at line 117 of file SequenceNavigator.java.

JComboBox org::gel::mauve::gui::SequenceNavigator::genomes [protected]
 

list of genomes with searchable features

Definition at line 62 of file SequenceNavigator.java.

int org::gel::mauve::gui::SequenceNavigator::MAX_HEIGHT = 400 [static]
 

sets maximum height programmatically given to the frame

Definition at line 122 of file SequenceNavigator.java.

Referenced by reloadGUI().

int org::gel::mauve::gui::SequenceNavigator::MAX_WIDTH = 850 [static]
 

sets maximum height and width programmatically given to the frame.

Definition at line 127 of file SequenceNavigator.java.

Referenced by reloadGUI().

JPanel org::gel::mauve::gui::SequenceNavigator::nav_panel_holder [protected]
 

panel that contains all NavPanels

Definition at line 84 of file SequenceNavigator.java.

Referenced by addNavigationPanel(), initGUI(), and removeNavigationPanel().

LinkedList org::gel::mauve::gui::SequenceNavigator::nav_panels [protected]
 

each NavPanel in the list represents a constraint on the current search

Definition at line 67 of file SequenceNavigator.java.

Referenced by addNavigationPanel(), doNavigation(), getValidCount(), removeNavigationPanel(), reset(), and SequenceNavigator().

JScrollPane org::gel::mauve::gui::SequenceNavigator::nav_scroll [protected]
 

allows constraints to be scrolled through

Definition at line 104 of file SequenceNavigator.java.

Referenced by initGUI(), makeConstraintVisible(), and reloadGUI().

Component org::gel::mauve::gui::SequenceNavigator::parent_component [protected]
 

The parent component of the panel, if it disappears, so will the panel.

Definition at line 51 of file SequenceNavigator.java.

Referenced by goToFeatureByName(), makeFrame(), moveFromBehind(), and SequenceNavigator().

JButton org::gel::mauve::gui::SequenceNavigator::reset [protected]
 

when pressed, resets search to one constraint with no values entered

Definition at line 79 of file SequenceNavigator.java.

Referenced by makeBottomPanel().

SearchResultPanel org::gel::mauve::gui::SequenceNavigator::result_pane [protected]
 

panel that shows results

Definition at line 89 of file SequenceNavigator.java.

Referenced by doNavigation(), goToFeatureByName(), initGUI(), loadGenomeList(), and showResultTree().

JScrollPane org::gel::mauve::gui::SequenceNavigator::result_scroller [protected]
 

allows results to be scrolled through

Definition at line 99 of file SequenceNavigator.java.

Referenced by initGUI(), and reloadGUI().

RearrangementPanel org::gel::mauve::gui::SequenceNavigator::rrpanel [protected]
 

The panel displaying data under navigation.

Definition at line 52 of file SequenceNavigator.java.

JButton org::gel::mauve::gui::SequenceNavigator::search [protected]
 

when pressed, a search is performed

Definition at line 72 of file SequenceNavigator.java.

Referenced by actionPerformed(), keyTyped(), and makeBottomPanel().

LinkedList org::gel::mauve::gui::SequenceNavigator::window_listeners [protected]
 

Definition at line 105 of file SequenceNavigator.java.

Referenced by makeFrame().


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