edu.mssm.crover.domain2d
Class HelicalDomain

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--edu.mssm.crover.domain2d.PrintablePanel
                                |
                                +--edu.mssm.crover.domain2d.TwoEndsDomain
                                      |
                                      +--edu.mssm.crover.domain2d.TwoEndsDraggableDomain
                                            |
                                            +--edu.mssm.crover.domain2d.HelicalDomain
All Implemented Interfaces:
javax.accessibility.Accessible, CoolPrint, Domain2D, Drawing, java.awt.image.ImageObserver, java.awt.MenuContainer, java.util.Observer, java.io.Serializable

public class HelicalDomain
extends TwoEndsDraggableDomain

A helix secondary structure representation.

See Also:
HelixModel, Serialized Form

Field Summary
 boolean hideFirst
           
 boolean hideLast
           
static int LEFT_HANDED
           
static int RIGHT_HANDED
           
 
Fields inherited from class edu.mssm.crover.domain2d.TwoEndsDomain
delta_end, delta_start, end, first, last, position, quickDraw, rgf, rgra, rmf, solver, start
 
Fields inherited from class edu.mssm.crover.domain2d.PrintablePanel
SVG_ANCHOR_HREF_PROPERTY
 
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
HelicalDomain()
           
HelicalDomain(ResidueModelFactory rmf, ResidueGlyphFactory rgf, ResidueGlyphRenderingAttributes rgra)
           
 
Method Summary
 java.awt.Point centerOf(java.awt.Component comp)
           
 java.awt.Image getBackgroundImage()
           
 java.awt.geom.Point2D getDirection()
          gets the direction of the drawing of this loop.
 void hideFirst(boolean hs)
          Loop spacer adustements require that the last residue of the last domain and the first residue of the next domain not to be displayed/controlled by the other domains.
 void hideLast(boolean hs)
          see hideFirst.
 boolean isOptimizedDrawingEnabled()
           
 void layoutResidues()
          Layout the residues in the domain.
 void paintComponent(java.awt.Graphics g)
           
 void setDirection(java.awt.geom.Point2D direction)
          Domaind2D interface method to change the model direction.
 void setDragging(boolean state)
          Enable/disable the dragging of a domain.
 void setHelixModel(HelixModel hm)
           
 void setRange(BiologicalSequence seq, int start, int end)
          Instructs the domain to render the part of sequence seq made of the residues between start and end, extremities included.
 void setSpacer(java.awt.geom.Point2D spacer)
          This method has no effect on this implementation.
 
Methods inherited from class edu.mssm.crover.domain2d.TwoEndsDraggableDomain
dispose, setDBSDebug, setListener
 
Methods inherited from class edu.mssm.crover.domain2d.TwoEndsDomain
calculateDeltas, connectEnd, connectPosition, connectStart, finalize, firstResiduePos, getComp, getComponent, getId, getLocation, getSurface, getX, getY, lastResiduePos, paintBrushing, paintSelection, position, setId, setLocation, setLocation, suggestLocation, suggestLocation, syncLocation, update, useResidueModelFactory
 
Methods inherited from class edu.mssm.crover.domain2d.PrintablePanel
coolPrint, recurseSVGPrint, svgPrint
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.mssm.crover.domain2d.Drawing
getParent
 

Field Detail

LEFT_HANDED

public static final int LEFT_HANDED
See Also:
Constant Field Values

RIGHT_HANDED

public static final int RIGHT_HANDED
See Also:
Constant Field Values

hideFirst

public boolean hideFirst

hideLast

public boolean hideLast
Constructor Detail

HelicalDomain

public HelicalDomain()

HelicalDomain

public HelicalDomain(ResidueModelFactory rmf,
                     ResidueGlyphFactory rgf,
                     ResidueGlyphRenderingAttributes rgra)
Method Detail

setDragging

public void setDragging(boolean state)
Description copied from interface: Domain2D
Enable/disable the dragging of a domain. Most of the time this is a convenient method to access the DBS model and turn the dragging on/off.

See Also:
domain2d.DBSModel

getDirection

public java.awt.geom.Point2D getDirection()
gets the direction of the drawing of this loop. The point is to be understood as the extremity of a unary vector which origin is (0,0).


paintComponent

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

centerOf

public java.awt.Point centerOf(java.awt.Component comp)

getBackgroundImage

public java.awt.Image getBackgroundImage()

isOptimizedDrawingEnabled

public boolean isOptimizedDrawingEnabled()
Overrides:
isOptimizedDrawingEnabled in class TwoEndsDomain

setHelixModel

public void setHelixModel(HelixModel hm)

setRange

public void setRange(BiologicalSequence seq,
                     int start,
                     int end)
              throws InvalidRange
Description copied from interface: Domain2D
Instructs the domain to render the part of sequence seq made of the residues between start and end, extremities included.
Calling this method could be expensive as the number of residues may be altered and the layout recalculated. Implementors are advised to optimize their code to enable a dynamic adjustement of the range of the domain provided by the diagram editor (yet to be written). Interestingly, it has to be noted that this kind of dynamic adjustement is likely to translate the range over the sequence, add or remove a residue from the range. So some implementations can be choosen to accomodate these local changes that will reuse the previous layout and residues (from the previous invocation of setRange()).

InvalidRange

hideFirst

public void hideFirst(boolean hs)
Description copied from interface: Domain2D
Loop spacer adustements require that the last residue of the last domain and the first residue of the next domain not to be displayed/controlled by the other domains. To do so, the loop domain uses hideFirst and hideLast on its previous and follower domain.

Specified by:
hideFirst in interface Domain2D
Overrides:
hideFirst in class TwoEndsDomain

hideLast

public void hideLast(boolean hs)
Description copied from interface: Domain2D
see hideFirst.

Specified by:
hideLast in interface Domain2D
Overrides:
hideLast in class TwoEndsDomain

setSpacer

public void setSpacer(java.awt.geom.Point2D spacer)
This method has no effect on this implementation.


setDirection

public void setDirection(java.awt.geom.Point2D direction)
Domaind2D interface method to change the model direction.


layoutResidues

public void layoutResidues()
Description copied from interface: Domain2D
Layout the residues in the domain. Determine the size of the domain and set it. After this method has executed the positions of the first and last residue are know relatively to the domain position.

See Also:
Domain2D.firstResiduePos(), Domain2D.lastResiduePos()


Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.