'STRAP:multiple sequence alignments '

charite.christo.protein
Class Protein3d

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 charite.christo.ChPanel
                      extended by charite.christo.protein.Protein3d
All Implemented Interfaces:
ChRunnable, Disposable, PaintHook, ProcessEv, TooltipProvider, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.Scrollable

public class Protein3d
extends ChPanel
implements Disposable, ChRunnable, TooltipProvider, ProcessEv, PaintHook

HELP PACKAGE:charite.christo.strap. The simple 3D-viewer visualizes the C-alpha trace of one or several proteins as a polygon. The advantage over the full featured view options also available in Strap is, that it opens without delay and uses only very little memory. Helices may be drawn in red and sheets in yellow.
Mouse Actions:

Picking amino acids: Amino acids can be picked by clicking the C-alpha atom. A tool-panel will appear which acts on the picked protein.

List of proteins: The toggle "List of proteins" can be activated to show a list of all proteins in this view. Each protein in the list comes with a color-chooser.

Color-chooser: The color chooser is shown if CB:"List proteins" is activated. Four color-schemes are available. JCOMPONENT:Protein3d#docuColorChooser() With the CTRL key the color of all proteins can be changed at once.

Adding proteins to the 3D-view: Proteins are added by WIKI:Drag_and_drop (See STRING:ChConstants#MOVIE_Drag_protein_to_3D ).

See Also:
Serialized Form

Nested Class Summary
static class Protein3d.PView
           
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
static java.lang.String ID_DISPOSED
           
static java.lang.String ID_PROTEIN_VIEWER
           
static java.lang.String KEY_BIO_MOLECULES
           
static java.lang.String KEY_INITIALLY_SHOW
           
static java.lang.String KEY_INTERPRET_AFTER_LOADING
           
static java.lang.String KEY_MSG_NO_PROTEIN
           
static java.lang.String SPIN
           
 
Fields inherited from class charite.christo.ChPanel
KEY_REPRESENT_COMPONENT
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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 charite.christo.Disposable
NONE
 
Fields inherited from interface charite.christo.ChRunnable
APPEND, COLUMN_TITLE, DOWNLOAD_FINISHED, GET_PANEL, ICON, INTERPRET_LINE, IS_DRAG4XY, ITEM_TEXT, MODIFY_RENDERER_COMPONENT, PROGRESS, REPAINT_CURSOR, SAY_DOWNLOADING, SET_ICON_IMAGE, SET_TREE_VALUE, SHOW_IN_FRAME, TAB_TEXT, TIP_TEXT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Protein3d()
           
 
Method Summary
 void addOrRemoveButton(int pos, javax.swing.JComponent b, int where)
           
 void addProteins(Protein... pp0)
           
 void afterAddProteins(Protein... pp)
           
static java.awt.Color chain2color(int i)
           
 void dispose()
           
static javax.swing.JComponent docuColorChooser()
           
 boolean eachProteinInDifferentColor(boolean asChain, boolean testOnly)
           
 void enableDisable()
           
 Protein getProteinAtMouse()
           
 Protein[] getProteins()
           
 int getResidueIndexAtMouse()
           
 Matrix3D getRotationAndTranslationOfView()
           
 java.lang.String getToolTipText(java.awt.event.MouseEvent ev)
           
 Protein3d.PView getView(Protein prot)
           
 void highlightAminoAcid(float[] xyz)
           
 void highlightAminoAcid(Protein p, int idx)
           
 boolean isNucleotideChainVisible(HeteroCompound ha)
           
 boolean isPreview()
           
 boolean isProteinShown(Protein p)
           
 void paintChildren(java.awt.Graphics g)
           
 void paintComponent(java.awt.Graphics g)
           
 boolean paintHook(javax.swing.JComponent component, java.awt.Graphics g, boolean after)
           
 void processEv(java.awt.AWTEvent ev)
           
 java.lang.String provideTip(java.lang.Object objOrEv)
           
 void removeProtein(Protein p)
           
 java.lang.Object run(java.lang.String id, java.lang.Object arg)
           
 void setHideDistantDNS(boolean b)
           
 void showListOfHeterosAndNucleotides(Protein p)
           
 
Methods inherited from class charite.christo.ChPanel
cp, getDndDateien, getMaximumSize, getPreferredScrollableViewportSize, getPreferredSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getToolTipLocation, getWhenPainted, invalidate, isAlreadyPainted, isEnabled, isShowing, isValidateRoot, paint, processEvent, removeAll
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY_INITIALLY_SHOW

public static final java.lang.String KEY_INITIALLY_SHOW
See Also:
Constant Field Values

KEY_BIO_MOLECULES

public static final java.lang.String KEY_BIO_MOLECULES
See Also:
Constant Field Values

KEY_INTERPRET_AFTER_LOADING

public static final java.lang.String KEY_INTERPRET_AFTER_LOADING
See Also:
Constant Field Values

ID_DISPOSED

public static final java.lang.String ID_DISPOSED
See Also:
Constant Field Values

ID_PROTEIN_VIEWER

public static final java.lang.String ID_PROTEIN_VIEWER
See Also:
Constant Field Values

SPIN

public static final java.lang.String SPIN
See Also:
Constant Field Values

KEY_MSG_NO_PROTEIN

public static final java.lang.String KEY_MSG_NO_PROTEIN
See Also:
Constant Field Values
Constructor Detail

Protein3d

public Protein3d()
Method Detail

isPreview

public boolean isPreview()

dispose

public void dispose()
Specified by:
dispose in interface Disposable

getProteins

public Protein[] getProteins()

addProteins

public void addProteins(Protein... pp0)

afterAddProteins

public void afterAddProteins(Protein... pp)

removeProtein

public void removeProtein(Protein p)

isProteinShown

public boolean isProteinShown(Protein p)

eachProteinInDifferentColor

public boolean eachProteinInDifferentColor(boolean asChain,
                                           boolean testOnly)

getRotationAndTranslationOfView

public Matrix3D getRotationAndTranslationOfView()

run

public java.lang.Object run(java.lang.String id,
                            java.lang.Object arg)
Specified by:
run in interface ChRunnable

isNucleotideChainVisible

public boolean isNucleotideChainVisible(HeteroCompound ha)

showListOfHeterosAndNucleotides

public void showListOfHeterosAndNucleotides(Protein p)

paintComponent

public void paintComponent(java.awt.Graphics g)
Overrides:
paintComponent in class ChPanel

paintChildren

public void paintChildren(java.awt.Graphics g)
Overrides:
paintChildren in class ChPanel

paintHook

public boolean paintHook(javax.swing.JComponent component,
                         java.awt.Graphics g,
                         boolean after)
Specified by:
paintHook in interface PaintHook
after - This method is called once before and once after super.paintComponent.
Returns:
means do not call super.paintComponent

getToolTipText

public java.lang.String getToolTipText(java.awt.event.MouseEvent ev)
Overrides:
getToolTipText in class ChPanel

provideTip

public java.lang.String provideTip(java.lang.Object objOrEv)
Specified by:
provideTip in interface TooltipProvider

enableDisable

public void enableDisable()

addOrRemoveButton

public void addOrRemoveButton(int pos,
                              javax.swing.JComponent b,
                              int where)

setHideDistantDNS

public void setHideDistantDNS(boolean b)

processEv

public void processEv(java.awt.AWTEvent ev)
Specified by:
processEv in interface ProcessEv
See Also:
EvAdapter

getProteinAtMouse

public Protein getProteinAtMouse()

getResidueIndexAtMouse

public int getResidueIndexAtMouse()

highlightAminoAcid

public void highlightAminoAcid(Protein p,
                               int idx)

highlightAminoAcid

public void highlightAminoAcid(float[] xyz)

chain2color

public static java.awt.Color chain2color(int i)

docuColorChooser

public static javax.swing.JComponent docuColorChooser()

getView

public Protein3d.PView getView(Protein prot)

'STRAP:multiple sequence alignments '

'The most important classes are StrapAlign, Protein and StrapEvent.'