apollo.gui.detailviewers.sequencealigner.DNAPanel
Class DNAMultiSequenceAlignerPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by apollo.gui.detailviewers.sequencealigner.MultiSequenceAlignerPanel
                      extended by apollo.gui.detailviewers.sequencealigner.DNAPanel.DNAMultiSequenceAlignerPanel
All Implemented Interfaces:
AnnotationChangeListener, BaseScrollable, ControlledObjectI, FeatureSelectionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class DNAMultiSequenceAlignerPanel
extends MultiSequenceAlignerPanel

The main class for the DNA view.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class apollo.gui.detailviewers.sequencealigner.MultiSequenceAlignerPanel
colorIndex, colorList
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DNAMultiSequenceAlignerPanel(GuiCurationState curationState, Strand strand)
          Constructor
 
Method Summary
 boolean annotationFilter(SeqFeatureI f)
          I don't think this is used in any way...
 void clearAnnotations()
          removes all the annotations from the annotation list and the annotation panel
 void clearResults()
          removes all of the results from the results list and the result panel
 void flipOrientation()
          Flipping the orientation will not work, more work is needed to implement...
 AbstractScrollablePanel getAddressComponent()
          Gets the address bar (shows the base numbers you are looking at)
 MultiTierPanel getAminoAcidPanel()
           
 MultiComparator getAnnotationComparator()
          Gets the comparator used to order annotations
 MultiFilter getAnnotationFilter()
          Gets the filter used to decide which annotations to display
 MultiTierPanelHeaderTable getAnnotationHeader()
          Gets the header for the annotation panel
 javax.swing.JScrollPane getAnnotationPane()
          Gets the JScrollPane which holds the Annotation Panel
 MultiTierPanel getAnnotationPanel()
          Gets the Annotation Panel
 java.util.List<SeqFeatureI> getAnnotations()
          Gets the list of annotations.
 Controller getController()
          Gets the Controller for the object
 java.lang.Object getControllerWindow()
          Shouldnt this return Window - would we ever want a non-window?
 ReadingFrame getFrame()
          Gets the frame that is currently being viewed
 javax.swing.JMenu getMenu()
          Gets the Menu object
 Overview getOverview()
          Gets the overview object for the panel
 MultiTierPanel getReferencePanel()
          Gets the reference panel (the one in between the annotation and result)
 SequenceI getReferenceSequence(Strand s, ReadingFrame rf)
          Creates a Sequence object which can be used as a reference for the given strand/frame pair
 MultiComparator getResultComparator()
          Gets the comparator used to order results
 MultiFilter getResultFilter()
          Gets the filter used to decide which results to display
 MultiTierPanelHeaderTable getResultHeader()
          Gets the header for the result panel
 MultiTierPanel getResultPanel()
          Gets the Result Panel
 java.util.List<SeqFeatureI> getResults()
          Gets the list of results.
 javax.swing.JScrollBar getScrollBar()
          Gets the main horizontal scrollbar for the window
 Strand getStrand()
          Gets the strand of the annotations currently being viewed
 java.lang.String getType()
          Gets the type
 int getVisibleBase()
          Gets the base pair position for the all the bases visible on the left side of the viewable window
 int getVisibleBaseCount()
          Gets the number of bases that are visable on a single row
 boolean handleFeatureSelectionEvent(FeatureSelectionEvent evt)
           
 void init()
          Creates all of the components and lays everything out
static DNAMultiSequenceAlignerPanel makeAligner(GuiCurationState curationState, int strand)
          Factory method for creating DNA Panels
 boolean needsAutoRemoval()
          If getControllerWindow is non null, and needsAutoRemoval is true then Controller will automatically remove the ControlledObjectI as a listener when its ControllerWindow is closing.
 void propertyChange(java.beans.PropertyChangeEvent evt)
           
 void reformat()
           
 void reformatReferenceHeader()
          updates the header for the reference panel
 boolean resultFilter(SeqFeatureI f)
          I don't think this is used in any way...
 void scrollToBase(int basePair)
          Scrolls the left edge of the view of this panel to a specific base pair
 void setAnnotations(java.util.List<SeqFeatureI> annotations)
          Sets the annotations (no side effects)
 void setController(Controller controller)
          Sets the Controller for the object
 void setResults(java.util.List<SeqFeatureI> results)
          Sets the results (no side effects)
 void setStrand(Strand s)
          Sets the currently selected strand (no side effects)
 void switchAnnotations()
          Changes the view to look at the annotations on the opposite strand
 void validate()
           
 
Methods inherited from class apollo.gui.detailviewers.sequencealigner.MultiSequenceAlignerPanel
addAnnotations, addEditRegion, addFeatureToPanel, addResults, canHandleSelection, cleanUp, filter, getAnnotations, getColorArray, getCurationState, getIndicatorColor, getMenuBar, getResults, getResults, getSelection, getThis, getTransOrOneLevelAnn, handleAnnotationChangeEvent, makeAligner, makeMenu, nextAnnotation, noExternalSelection, prevAnnotation, reformatAnnotationPanel, reformatReferencePanel, reformatResultPanel, setCurationState, setIndicatorColor, setNoExternalSelection, setSelection, sort, sortAnnotations, sortResults, switchResults, updateEditRegion, updateTitle
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DNAMultiSequenceAlignerPanel

public DNAMultiSequenceAlignerPanel(GuiCurationState curationState,
                                    Strand strand)
Constructor

Parameters:
curationState -
strand -
Method Detail

makeAligner

public static DNAMultiSequenceAlignerPanel makeAligner(GuiCurationState curationState,
                                                       int strand)
Factory method for creating DNA Panels

Parameters:
curationState -
strand -
Returns:

getAnnotationPanel

public MultiTierPanel getAnnotationPanel()
Description copied from class: MultiSequenceAlignerPanel
Gets the Annotation Panel

Specified by:
getAnnotationPanel in class MultiSequenceAlignerPanel

getResultPanel

public MultiTierPanel getResultPanel()
Description copied from class: MultiSequenceAlignerPanel
Gets the Result Panel

Specified by:
getResultPanel in class MultiSequenceAlignerPanel

getType

public java.lang.String getType()
Description copied from class: MultiSequenceAlignerPanel
Gets the type

Specified by:
getType in class MultiSequenceAlignerPanel

getStrand

public Strand getStrand()
Description copied from class: MultiSequenceAlignerPanel
Gets the strand of the annotations currently being viewed

Specified by:
getStrand in class MultiSequenceAlignerPanel

getFrame

public ReadingFrame getFrame()
Description copied from class: MultiSequenceAlignerPanel
Gets the frame that is currently being viewed

Specified by:
getFrame in class MultiSequenceAlignerPanel

getMenu

public javax.swing.JMenu getMenu()
Description copied from class: MultiSequenceAlignerPanel
Gets the Menu object

Specified by:
getMenu in class MultiSequenceAlignerPanel

getAnnotations

public java.util.List<SeqFeatureI> getAnnotations()
Description copied from class: MultiSequenceAlignerPanel
Gets the list of annotations. This list is used to determine if an annotation is already added to the panel. TODO redesign use of annotations, probably a better way to do this.

Specified by:
getAnnotations in class MultiSequenceAlignerPanel

setAnnotations

public void setAnnotations(java.util.List<SeqFeatureI> annotations)
Description copied from class: MultiSequenceAlignerPanel
Sets the annotations (no side effects)

Specified by:
setAnnotations in class MultiSequenceAlignerPanel

getResults

public java.util.List<SeqFeatureI> getResults()
Description copied from class: MultiSequenceAlignerPanel
Gets the list of results. This list is used to determine if a result is already added to the panel. TODO redesign use of results, probably a better way to do this.

Specified by:
getResults in class MultiSequenceAlignerPanel

setResults

public void setResults(java.util.List<SeqFeatureI> results)
Description copied from class: MultiSequenceAlignerPanel
Sets the results (no side effects)

Specified by:
setResults in class MultiSequenceAlignerPanel

init

public void init()
Description copied from class: MultiSequenceAlignerPanel
Creates all of the components and lays everything out

Specified by:
init in class MultiSequenceAlignerPanel

validate

public void validate()
Overrides:
validate in class java.awt.Container

handleFeatureSelectionEvent

public boolean handleFeatureSelectionEvent(FeatureSelectionEvent evt)

getController

public Controller getController()
Description copied from interface: ControlledObjectI
Gets the Controller for the object


getControllerWindow

public java.lang.Object getControllerWindow()
Description copied from interface: ControlledObjectI
Shouldnt this return Window - would we ever want a non-window?


needsAutoRemoval

public boolean needsAutoRemoval()
Description copied from interface: ControlledObjectI
If getControllerWindow is non null, and needsAutoRemoval is true then Controller will automatically remove the ControlledObjectI as a listener when its ControllerWindow is closing. If getControllerWindow is null needsAutoRemoval is meaningless. Rename this removeAsListenerOnWindowClose?


setController

public void setController(Controller controller)
Description copied from interface: ControlledObjectI
Sets the Controller for the object


reformat

public void reformat()

reformatReferenceHeader

public void reformatReferenceHeader()
Description copied from class: MultiSequenceAlignerPanel
updates the header for the reference panel

Specified by:
reformatReferenceHeader in class MultiSequenceAlignerPanel

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)

getVisibleBase

public int getVisibleBase()
Gets the base pair position for the all the bases visible on the left side of the viewable window


getVisibleBaseCount

public int getVisibleBaseCount()
Gets the number of bases that are visable on a single row


scrollToBase

public void scrollToBase(int basePair)
Scrolls the left edge of the view of this panel to a specific base pair


switchAnnotations

public void switchAnnotations()
Description copied from class: MultiSequenceAlignerPanel
Changes the view to look at the annotations on the opposite strand

Overrides:
switchAnnotations in class MultiSequenceAlignerPanel

flipOrientation

public void flipOrientation()
Description copied from class: MultiSequenceAlignerPanel
Flipping the orientation will not work, more work is needed to implement...

Overrides:
flipOrientation in class MultiSequenceAlignerPanel

getOverview

public Overview getOverview()
Description copied from class: MultiSequenceAlignerPanel
Gets the overview object for the panel

Specified by:
getOverview in class MultiSequenceAlignerPanel
Returns:

getScrollBar

public javax.swing.JScrollBar getScrollBar()
Description copied from class: MultiSequenceAlignerPanel
Gets the main horizontal scrollbar for the window

Specified by:
getScrollBar in class MultiSequenceAlignerPanel
Returns:

getReferencePanel

public MultiTierPanel getReferencePanel()
Description copied from class: MultiSequenceAlignerPanel
Gets the reference panel (the one in between the annotation and result)

Specified by:
getReferencePanel in class MultiSequenceAlignerPanel

getAminoAcidPanel

public MultiTierPanel getAminoAcidPanel()

setStrand

public void setStrand(Strand s)
Description copied from class: MultiSequenceAlignerPanel
Sets the currently selected strand (no side effects)

Specified by:
setStrand in class MultiSequenceAlignerPanel

getAnnotationHeader

public MultiTierPanelHeaderTable getAnnotationHeader()
Description copied from class: MultiSequenceAlignerPanel
Gets the header for the annotation panel

Specified by:
getAnnotationHeader in class MultiSequenceAlignerPanel

getAnnotationPane

public javax.swing.JScrollPane getAnnotationPane()
Description copied from class: MultiSequenceAlignerPanel
Gets the JScrollPane which holds the Annotation Panel

Specified by:
getAnnotationPane in class MultiSequenceAlignerPanel

getResultHeader

public MultiTierPanelHeaderTable getResultHeader()
Description copied from class: MultiSequenceAlignerPanel
Gets the header for the result panel

Specified by:
getResultHeader in class MultiSequenceAlignerPanel

getReferenceSequence

public SequenceI getReferenceSequence(Strand s,
                                      ReadingFrame rf)
Description copied from class: MultiSequenceAlignerPanel
Creates a Sequence object which can be used as a reference for the given strand/frame pair

Specified by:
getReferenceSequence in class MultiSequenceAlignerPanel
Parameters:
s - the strand
rf - the frame
Returns:
a reference sequence

annotationFilter

public boolean annotationFilter(SeqFeatureI f)
Description copied from class: MultiSequenceAlignerPanel
I don't think this is used in any way... should probably remove

Specified by:
annotationFilter in class MultiSequenceAlignerPanel

resultFilter

public boolean resultFilter(SeqFeatureI f)
Description copied from class: MultiSequenceAlignerPanel
I don't think this is used in any way... should probably remove

Specified by:
resultFilter in class MultiSequenceAlignerPanel

getAnnotationComparator

public MultiComparator getAnnotationComparator()
Description copied from class: MultiSequenceAlignerPanel
Gets the comparator used to order annotations

Specified by:
getAnnotationComparator in class MultiSequenceAlignerPanel

getResultComparator

public MultiComparator getResultComparator()
Description copied from class: MultiSequenceAlignerPanel
Gets the comparator used to order results

Specified by:
getResultComparator in class MultiSequenceAlignerPanel

clearResults

public void clearResults()
Description copied from class: MultiSequenceAlignerPanel
removes all of the results from the results list and the result panel

Specified by:
clearResults in class MultiSequenceAlignerPanel

getAnnotationFilter

public MultiFilter getAnnotationFilter()
Description copied from class: MultiSequenceAlignerPanel
Gets the filter used to decide which annotations to display

Specified by:
getAnnotationFilter in class MultiSequenceAlignerPanel

getResultFilter

public MultiFilter getResultFilter()
Description copied from class: MultiSequenceAlignerPanel
Gets the filter used to decide which results to display

Specified by:
getResultFilter in class MultiSequenceAlignerPanel

clearAnnotations

public void clearAnnotations()
Description copied from class: MultiSequenceAlignerPanel
removes all the annotations from the annotation list and the annotation panel

Specified by:
clearAnnotations in class MultiSequenceAlignerPanel

getAddressComponent

public AbstractScrollablePanel getAddressComponent()
Description copied from class: MultiSequenceAlignerPanel
Gets the address bar (shows the base numbers you are looking at)

Specified by:
getAddressComponent in class MultiSequenceAlignerPanel
Returns: