apollo.gui.detailviewers.sequencealigner
Class MultiTierPanel

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.MultiTierPanel
All Implemented Interfaces:
BaseScrollable, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.Scrollable
Direct Known Subclasses:
HomogeneousPanel, ReferencePanel, ReferencePanel

public class MultiTierPanel
extends javax.swing.JPanel
implements javax.swing.Scrollable, BaseScrollable

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 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
MultiTierPanel(FeaturePlaceFinder.Type type)
           
 
Method Summary
 AbstractTierPanel addFeature(SeqFeatureI feature)
           
 AbstractTierPanel addPanel(AbstractTierPanel panel)
          Adds a new
 int basePairToTierPosition(int basePair)
          Converts from base pair to tier position
 boolean canAddFeature(SeqFeatureI feature)
           
 void clear()
           
 int getBaseHeight()
           
 int getBaseWidth()
           
 java.util.Collection<SeqFeatureI> getFeatures()
           
 int getHigh(SeqFeatureI sf)
           
 int getLow(SeqFeatureI sf)
           
 SeqFeatureI getNextFeature(int p)
          Given a pixel position return the next feature
 Orientation getOrientation()
           
 AbstractTierPanel getPanel(int i)
           
 java.util.List<AbstractTierPanel> getPanels()
           
 java.awt.Point getPixelForPosition(int p)
           
 int getPositionForPixel(java.awt.Point p)
           
 java.awt.Dimension getPreferredScrollableViewportSize()
          These Are the methods needed to implement the Scrollable interface.
 SeqFeatureI getPrevFeature(int p)
          Given a pixel position return the previous feature
 ReadingFrame getReadingFrame()
           
 SequenceI getReferenceSequence()
           
 BaseRendererI getRenderer()
           
 int getScrollableBlockIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)
           
 boolean getScrollableTracksViewportHeight()
           
 boolean getScrollableTracksViewportWidth()
           
 int getScrollableUnitIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)
           
 Strand getStrand()
           
 TierI getTier(int i)
           
 java.util.List<TierI> getTiers()
           
 SequenceType getType()
           
 int getVisibleBase()
           
 int getVisibleBaseCount()
           
 int numTiers()
           
 void paint(java.awt.Graphics g)
           
 int pixelPositionToTierPosition(int p)
          Converts from pixel position to tier position
 void reformat(boolean isRecursive)
          calculate size of components, calculate size of self, add components
 void removePanel(AbstractTierPanel panel)
           
 void removeTier(TierI tier)
           
 void scrollToBase(int pos)
           
 void scrollToPosition(int pos)
          position is pixel position
 void setOrientation(Orientation o)
           
 void setReadingFrame(ReadingFrame rf)
           
 void setReferenceSequence(SequenceI s)
           
 void setRenderer(BaseRendererI r)
           
 void setStrand(Strand s)
           
 void switchOrientation()
           
 void switchStrand()
           
 int tierForPixel(java.awt.Point p)
           
 int tierPositionToBasePair(int position)
          Converts from tier position to base pair
 int tierPositionToPixelPosition(int p)
          Converts from tier position to pixel position
 
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, 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, validate, 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

MultiTierPanel

public MultiTierPanel(FeaturePlaceFinder.Type type)
Method Detail

canAddFeature

public boolean canAddFeature(SeqFeatureI feature)

addFeature

public AbstractTierPanel addFeature(SeqFeatureI feature)

getFeatures

public java.util.Collection<SeqFeatureI> getFeatures()

addPanel

public AbstractTierPanel addPanel(AbstractTierPanel panel)
Adds a new

Parameters:
tier -
panel -
Returns:

getPanels

public java.util.List<AbstractTierPanel> getPanels()

getTiers

public java.util.List<TierI> getTiers()

removeTier

public void removeTier(TierI tier)

removePanel

public void removePanel(AbstractTierPanel panel)

numTiers

public int numTiers()

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class javax.swing.JComponent

reformat

public void reformat(boolean isRecursive)
calculate size of components, calculate size of self, add components


getTier

public TierI getTier(int i)

getPanel

public AbstractTierPanel getPanel(int i)

tierForPixel

public int tierForPixel(java.awt.Point p)

basePairToTierPosition

public int basePairToTierPosition(int basePair)
Converts from base pair to tier position


tierPositionToBasePair

public int tierPositionToBasePair(int position)
Converts from tier position to base pair


pixelPositionToTierPosition

public int pixelPositionToTierPosition(int p)
Converts from pixel position to tier position


tierPositionToPixelPosition

public int tierPositionToPixelPosition(int p)
Converts from tier position to pixel position


getStrand

public Strand getStrand()

getType

public SequenceType getType()

getPixelForPosition

public java.awt.Point getPixelForPosition(int p)

getPositionForPixel

public int getPositionForPixel(java.awt.Point p)

switchStrand

public void switchStrand()

setStrand

public void setStrand(Strand s)

getHigh

public int getHigh(SeqFeatureI sf)

getLow

public int getLow(SeqFeatureI sf)

getReferenceSequence

public SequenceI getReferenceSequence()

setReferenceSequence

public void setReferenceSequence(SequenceI s)

getReadingFrame

public ReadingFrame getReadingFrame()

setReadingFrame

public void setReadingFrame(ReadingFrame rf)

getOrientation

public Orientation getOrientation()

switchOrientation

public void switchOrientation()

setOrientation

public void setOrientation(Orientation o)

getRenderer

public BaseRendererI getRenderer()

setRenderer

public void setRenderer(BaseRendererI r)

clear

public void clear()

getBaseHeight

public int getBaseHeight()

getBaseWidth

public int getBaseWidth()

getNextFeature

public SeqFeatureI getNextFeature(int p)
Given a pixel position return the next feature


getPrevFeature

public SeqFeatureI getPrevFeature(int p)
Given a pixel position return the previous feature


getPreferredScrollableViewportSize

public java.awt.Dimension getPreferredScrollableViewportSize()
These Are the methods needed to implement the Scrollable interface.

Specified by:
getPreferredScrollableViewportSize in interface javax.swing.Scrollable
See Also:
Scrollable

getScrollableBlockIncrement

public int getScrollableBlockIncrement(java.awt.Rectangle visibleRect,
                                       int orientation,
                                       int direction)
Specified by:
getScrollableBlockIncrement in interface javax.swing.Scrollable

getScrollableTracksViewportHeight

public boolean getScrollableTracksViewportHeight()
Specified by:
getScrollableTracksViewportHeight in interface javax.swing.Scrollable

getScrollableTracksViewportWidth

public boolean getScrollableTracksViewportWidth()
Specified by:
getScrollableTracksViewportWidth in interface javax.swing.Scrollable

getScrollableUnitIncrement

public int getScrollableUnitIncrement(java.awt.Rectangle visibleRect,
                                      int orientation,
                                      int direction)
Specified by:
getScrollableUnitIncrement in interface javax.swing.Scrollable

getVisibleBase

public int getVisibleBase()
Specified by:
getVisibleBase in interface BaseScrollable

getVisibleBaseCount

public int getVisibleBaseCount()
Specified by:
getVisibleBaseCount in interface BaseScrollable

scrollToBase

public void scrollToBase(int pos)
Specified by:
scrollToBase in interface BaseScrollable

scrollToPosition

public void scrollToPosition(int pos)
position is pixel position