apollo.gui.detailviewers.sequencealigner
Class BaseEditorPanel

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.SeqAlignPanel
                      extended by apollo.gui.detailviewers.sequencealigner.BaseEditorPanel
All Implemented Interfaces:
BaseScrollable, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.Scrollable

public class BaseEditorPanel
extends SeqAlignPanel

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class apollo.gui.detailviewers.sequencealigner.SeqAlignPanel
SeqAlignPanel.AutoscrollThread, SeqAlignPanel.ScrollMouseListener
 
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
protected  AnnotationEditor annotationEditor
           
protected  BaseFineEditor baseFineEditor
           
protected  javax.swing.JMenuItem createExonMenuItem
           
protected  javax.swing.JMenuItem deleteExonMenuItem
           
protected  javax.swing.JMenuItem deletionMenuItem
           
protected  javax.swing.JMenuItem findSequenceMenuItem
           
protected  SequenceI[] frame
           
protected  java.util.Vector hitZones
           
protected  javax.swing.JMenuItem insertionMenuItem
           
protected  javax.swing.JLabel locationLabel
           
protected static org.apache.log4j.Logger logger
           
protected  javax.swing.JMenuItem makeIntronMenuItem
           
protected  javax.swing.JMenuItem merge3PrimeMenuItem
           
protected  javax.swing.JMenuItem merge5PrimeMenuItem
           
protected  javax.swing.JMenuItem noAdjustmentMenuItem
           
protected  int padAmt
           
protected  javax.swing.JLabel relativeLocationLabel
           
protected  javax.swing.JPopupMenu rightClickMenu
           
protected  int selectBeginPos
           
protected  int selectCurrentPos
           
 SeqFeatureI selectedFeature
           
protected  int selectedTier
           
protected  java.awt.Color selectionBoxColor
           
static int SEQ_SELECT_DRAG
           
protected  java.awt.Color seqSelectColor
           
protected  javax.swing.JMenuItem sequenceMenuItem
           
protected  javax.swing.JMenu sequencingErrorSubMenu
           
protected  javax.swing.JMenuItem set3PrimeMenuItem
           
protected  javax.swing.JMenuItem set5PrimeMenuItem
           
protected  boolean showHitZones
           
protected  int[] splices
           
protected  javax.swing.JMenuItem startTranslationMenuItem
           
protected  javax.swing.JMenuItem substitutionMenuItem
           
protected  java.util.Vector translatedHitZones
           
protected  javax.swing.JMenuItem translationSlipMenuItem
           
protected  javax.swing.JMenuItem translationStutterMenuItem
           
 
Fields inherited from class apollo.gui.detailviewers.sequencealigner.SeqAlignPanel
cols, END_BOUNDARY, EXON, highestBase, horizontalMode, INTRON, lowestBase, NO_BOUNDARY, NO_TYPE, reverseStrand, rowMargin, sequences, START_BOUNDARY, START_CODON, STOP_CODON, stripeWidth
 
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
BaseEditorPanel(GuiCurationState curationState, BaseFineEditor baseFineEditor, boolean reverseStrand, int lowestBase, int highestBase, SeqFeatureI annotFeatureSet)
          Need lowestBase for offset of sequence
 
Method Summary
 int addFeature(SeqFeatureI feature)
          Adds feature to an existing SeqWrapper if it doesnt overlap with it, otherwise creates a new SeqWrapper for it,
 int addResult(SeqFeatureI result)
          Adds a result to this panel so that it can be displayed.
 int addResults(java.util.Set<SeqFeatureI> results)
          Adds all results in a set to this panel so that they can be displayed.
 int attachAnnot(AnnotatedFeatureI annot)
          can be transcript or 1 level annot
 void attachTranscripts(java.util.Vector transcripts)
          Expects a vector of Transcripts or 1 level annots.
protected  void changeEnd(SeqFeatureI feature, int base_offset, int limit_5prime, int limit_3prime)
           
protected  void changeStart(SeqFeatureI feature, int base_offset, int limit_5prime, int limit_3prime)
           
protected  void createRightClickMenu()
           
 void detachTranscript(Transcript trans)
           
 void displayRightClickMenu(int xLoc, int yLoc)
           
 void formatRightClickMenu()
           
 java.awt.Color[][] getColorArray()
          The inner array is an array of 2 colors, for alternating exon colors.
 int getRowMargin()
          FIXME: Returns the row margin property value, whatever that is...
 SeqFeatureI getSelectedFeature()
           
 int getSelectedTier()
           
 java.awt.Color getSelectionBoxColor()
           
 java.awt.Color getSeqSelectColor()
           
 boolean getShowHitZones()
           
 java.util.Vector getTranslatedHitZones(int frame)
           
protected  boolean isSequencingErrorPosition(int dnapos)
           
protected  boolean notTooSmall(int start_pos, int end_pos)
           
 int selectHighPos()
           
 int selectLowPos()
           
 void setHitZones(java.util.Vector hitZones)
           
 void setShowHitZones(boolean showHitZones)
           
 void setTranslatedHitZones(java.util.Vector hitZones, int frame)
           
protected  void showFindDialog()
           
protected  void showGoToDialog()
           
 
Methods inherited from class apollo.gui.detailviewers.sequencealigner.SeqAlignPanel
addAlignFeature, addNotify, addTier, attachFeatureToSequence, attachRendererToTier, basePairToPos, clear, createGraphics, getBackgroundColor1, getBackgroundColor2, getBoundaryType, getCharAt, getCharHeight, getCharWidth, getColForPixelPosition, getColForPosition, getColumnCount, getExonRangeIndex, getExonRangeIndex, getFeatureAtIndex, getFeatureAtPosition, getFeatureCount, getFeatureForPixelPosition, getFeatureForPixelPosition, getFeatureSetAtPosition, getFeaturesInRange, getHighestBase, getLowestBase, getPixelLocForColAndRow, getPixelLocForPosition, getPosRectangleForPixels, getPreferredScrollableViewportSize, getRangeAtPosition, getRangeIndex, getRectangleForCharPosition, getRectangleForTierPosition, getRendererAt, getReverseStrand, getRowCount, getRowForPixelPosition, getRowForPosition, getRowHeight, getRowWidth, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSequenceCount, getSequenceForTier, getSeqWrapperForTier, getStripeWidth, getTierCount, getTierForFeature, getTierForPixelPosition, getTypeAtPosition, getVisibleBase, getVisibleBaseCount, haltThread, handleAutoscroll, moveSequence, padPerChar, paint, posToBasePair, posToResidue, reformat, removeFeature, repaint, repaint, residueToBasePair, residueToPos, scrollToBase, scrollToFeature, scrollToPosition, scrollToRow, setAutoscroll, setHorizontalMode, setReverseStrand, setStripeWidth, setVisibilityForSequence, validate, validateTree
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, 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
 
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, 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
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger

SEQ_SELECT_DRAG

public static final int SEQ_SELECT_DRAG
See Also:
Constant Field Values

padAmt

protected int padAmt

selectedFeature

public SeqFeatureI selectedFeature

selectedTier

protected int selectedTier

annotationEditor

protected AnnotationEditor annotationEditor

baseFineEditor

protected BaseFineEditor baseFineEditor

locationLabel

protected javax.swing.JLabel locationLabel

relativeLocationLabel

protected javax.swing.JLabel relativeLocationLabel

rightClickMenu

protected javax.swing.JPopupMenu rightClickMenu

makeIntronMenuItem

protected javax.swing.JMenuItem makeIntronMenuItem

createExonMenuItem

protected javax.swing.JMenuItem createExonMenuItem

merge5PrimeMenuItem

protected javax.swing.JMenuItem merge5PrimeMenuItem

merge3PrimeMenuItem

protected javax.swing.JMenuItem merge3PrimeMenuItem

set5PrimeMenuItem

protected javax.swing.JMenuItem set5PrimeMenuItem

set3PrimeMenuItem

protected javax.swing.JMenuItem set3PrimeMenuItem

deleteExonMenuItem

protected javax.swing.JMenuItem deleteExonMenuItem

startTranslationMenuItem

protected javax.swing.JMenuItem startTranslationMenuItem

translationSlipMenuItem

protected javax.swing.JMenuItem translationSlipMenuItem

translationStutterMenuItem

protected javax.swing.JMenuItem translationStutterMenuItem

insertionMenuItem

protected javax.swing.JMenuItem insertionMenuItem

deletionMenuItem

protected javax.swing.JMenuItem deletionMenuItem

substitutionMenuItem

protected javax.swing.JMenuItem substitutionMenuItem

noAdjustmentMenuItem

protected javax.swing.JMenuItem noAdjustmentMenuItem

sequencingErrorSubMenu

protected javax.swing.JMenu sequencingErrorSubMenu

findSequenceMenuItem

protected javax.swing.JMenuItem findSequenceMenuItem

sequenceMenuItem

protected javax.swing.JMenuItem sequenceMenuItem

seqSelectColor

protected java.awt.Color seqSelectColor

selectionBoxColor

protected java.awt.Color selectionBoxColor

frame

protected SequenceI[] frame

selectBeginPos

protected int selectBeginPos

selectCurrentPos

protected int selectCurrentPos

splices

protected int[] splices

hitZones

protected java.util.Vector hitZones

translatedHitZones

protected java.util.Vector translatedHitZones

showHitZones

protected boolean showHitZones
Constructor Detail

BaseEditorPanel

public BaseEditorPanel(GuiCurationState curationState,
                       BaseFineEditor baseFineEditor,
                       boolean reverseStrand,
                       int lowestBase,
                       int highestBase,
                       SeqFeatureI annotFeatureSet)
Need lowestBase for offset of sequence

Method Detail

setShowHitZones

public void setShowHitZones(boolean showHitZones)

getShowHitZones

public boolean getShowHitZones()

addResults

public int addResults(java.util.Set<SeqFeatureI> results)
Adds all results in a set to this panel so that they can be displayed.

Parameters:
Set - reults - each result should be !isAnnot
Returns:
int tier - the number of results added

setHitZones

public void setHitZones(java.util.Vector hitZones)

setTranslatedHitZones

public void setTranslatedHitZones(java.util.Vector hitZones,
                                  int frame)

getTranslatedHitZones

public java.util.Vector getTranslatedHitZones(int frame)

selectLowPos

public int selectLowPos()

selectHighPos

public int selectHighPos()

getRowMargin

public int getRowMargin()
Description copied from class: SeqAlignPanel
FIXME: Returns the row margin property value, whatever that is...

Overrides:
getRowMargin in class SeqAlignPanel
Returns:
the rowMargin property

getColorArray

public java.awt.Color[][] getColorArray()
The inner array is an array of 2 colors, for alternating exon colors. The "outer" array represents transcript coloring. Transcripts can have different exon coloring pairs(see SelectableDNARenderer's exonColorIndex and transcriptColorIndex). This now takes in 2 colors from Config edeFeatureColor. It no longer is setting up 4 colors for alternating transcripts as well as exons. Easy enough to reinstate if desired.


getSelectedFeature

public SeqFeatureI getSelectedFeature()

getSelectedTier

public int getSelectedTier()

addFeature

public int addFeature(SeqFeatureI feature)
Adds feature to an existing SeqWrapper if it doesnt overlap with it, otherwise creates a new SeqWrapper for it,

Returns:
The element number in sequences, which is synonomous with tier number

showFindDialog

protected void showFindDialog()

showGoToDialog

protected void showGoToDialog()

notTooSmall

protected boolean notTooSmall(int start_pos,
                              int end_pos)

changeStart

protected void changeStart(SeqFeatureI feature,
                           int base_offset,
                           int limit_5prime,
                           int limit_3prime)

changeEnd

protected void changeEnd(SeqFeatureI feature,
                         int base_offset,
                         int limit_5prime,
                         int limit_3prime)

createRightClickMenu

protected void createRightClickMenu()

formatRightClickMenu

public void formatRightClickMenu()

displayRightClickMenu

public void displayRightClickMenu(int xLoc,
                                  int yLoc)

detachTranscript

public void detachTranscript(Transcript trans)

attachAnnot

public int attachAnnot(AnnotatedFeatureI annot)
can be transcript or 1 level annot


addResult

public int addResult(SeqFeatureI result)
Adds a result to this panel so that it can be displayed.

Parameters:
SeqFeatureI - result - should be !isAnnot
Returns:
int tier - the tier on which the result was placed

attachTranscripts

public void attachTranscripts(java.util.Vector transcripts)
Expects a vector of Transcripts or 1 level annots. This also creates the 3 amino acid sequences. This method is essential for BaseEditorPanel initialization.


getSeqSelectColor

public java.awt.Color getSeqSelectColor()

getSelectionBoxColor

public java.awt.Color getSelectionBoxColor()

isSequencingErrorPosition

protected boolean isSequencingErrorPosition(int dnapos)