|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.marvin.space.GraphicComponent
chemaxon.marvin.space.MacroMoleculeComponent
public class MacroMoleculeComponent
MacroMoleculeComponent is a visualizer of complex structures. It can individually display and handle protein chains, ligands, water and ions.
| Nested Class Summary | |
|---|---|
static interface |
MacroMoleculeComponent.MoleculeVisualizer
|
| Field Summary | |
|---|---|
static int |
B_FACTOR_MODE
|
protected static int |
COMPONENT_TYPE_ATOM
|
protected static int |
COMPONENT_TYPE_BOND
|
protected static int |
COMPONENT_TYPE_MOLECULE
|
protected static int |
COMPONENT_TYPE_RESIDUE
|
protected boolean |
initialised
|
static int |
RAINBOW_MODE
|
| Fields inherited from class chemaxon.marvin.space.GraphicComponent |
|---|
active, associatedComponents, boundingBox, color, COMPONENT_TYPE_ENTIRE, drawProperties, drawType, gl, glu, graphicCell, irm, modifiesOrigin, motionMode, mousex, mousey, name, pickedItem, RENDERING_QUALITY_HIGH, RENDERING_QUALITY_LOW, RENDERING_QUALITY_MEDIUM, renderingQuality, rm, uoid, visible |
| Constructor Summary | |
|---|---|
protected |
MacroMoleculeComponent()
Creates a new instance of MacroMoleculeComponent |
|
MacroMoleculeComponent(MacroMolecule mol)
Creates a new instance of MacroMoleculeComponent |
| Method Summary | |
|---|---|
void |
draw()
Draws the MacroMolecule as letting its visualizers draw its parts. |
void |
draw2DPart()
Draws the 2D parts of its visualizers. |
protected void |
drawSelection(int mode)
Draws the component in the given mode (usually in selection mode). |
void |
drawTransparentPart()
Draws the transparent parts of its visualizers. |
void |
exclusiveSelection()
Sets the previously picked but unprocessed element to be selected, and sets every other parts not to be selected. |
void |
extendSelection()
Sets the previously picked but unprocessed element to be selected, and leaves other parts as they are. |
void |
fadeSelected()
The selected visualizers will be hidden. |
void |
fadeUnselected()
The unselected visualizers will be hidden. |
chemaxon.marvin.space.util.Palette |
getBFactorPalette()
Returns the palette that is used when the coloring mode of the component is b-factor coloring. |
MacroMoleculeComponent.MoleculeVisualizer |
getComponent(int cIdx)
Returns its visualizer with the given index. |
ComponentElement |
getComponentElement()
Returns the previously picked but unprocessed ComponentElement or the whole component as a ComponentElement, if no picking happened. |
ComponentElement |
getComponentElement(MacroMoleculeComponent.MoleculeVisualizer mv)
Returns the visualizer as a ComponentElement. |
java.util.Iterator |
getComponentIterator()
Returns the Iterator of its visualizers. |
java.util.ArrayList |
getComponents()
Returns its visualizers. |
void |
getCoordinates(ComponentElement element,
float[] c)
Sets the coordinates of the given ComponentElement in the given array. |
java.lang.String |
getDescription(ComponentElement element)
Returns the short description of the given element. |
ComponentElement[] |
getLabelInformation(java.lang.String labelType)
Collects the label information of the visualizers. |
MacroMolecule |
getMacroMolecule()
Returns the MacroMolecule this component visualizes. |
Molecule |
getMolecule()
Returns the Molecule representation of the MacroMolecule. |
chemaxon.marvin.space.util.Palette |
getRainbowPalette()
Returns the color palette that is used when the coloring mode of the component is rainbow coloring. |
chemaxon.marvin.space.UsableObject |
getUsableObject(chemaxon.marvin.space.UOID id)
Returns the component that the given UOID identifies. |
chemaxon.marvin.space.UOID |
getUsableObjectId(MacroMoleculeComponent.MoleculeVisualizer mv)
|
boolean |
has2DPart()
Returns true if any of its visualizers have 2D part. |
boolean |
hasSelectedElements()
Returns true if any of its visualizers have any selected part. |
boolean |
hasTransparentPart()
Returns true if any of its visualizers have transparent part. |
void |
hideSelected()
The selected visualizers will be hidden. |
void |
hideUnselected()
The unselected visualizers will be hidden. |
void |
invertSelection()
Sets the previously picked but unprocessed element to be selected if it was not set and vice versa. |
boolean |
isControllable(java.lang.String type)
Returns whether controling by the given type of controller is allowed to the component. |
boolean |
isVisible()
Returns true if any of its visualizers is visible. |
boolean |
isVisible(ComponentElement element)
Returns true if the gien ComponentElement is visible. |
void |
onRemoveGraphicComponent()
|
void |
rotate(float[] vector,
float[] center)
Rotates its selected ligand by changing its coordinates, and not just the view. |
void |
select()
Sets all visualizers to be selected. |
void |
selectComponentElementsInside(BoundingBox bb)
Visualizers lying in the given box will be selected. |
void |
setDrawProperty(java.lang.String propertyName,
java.lang.String propertyValue)
Sets a draw property. |
void |
setDrawProperty(java.lang.String propertyName,
java.lang.String propertyValue,
MacroMoleculeComponent.MoleculeVisualizer mmv)
Sets the given draw property to the given visualizer. |
void |
setGL(javax.media.opengl.GL gl,
javax.media.opengl.glu.GLU glu)
Sets GL in all of its visualizers. |
void |
setProgressBar(chemaxon.marvin.space.ProgressBarInterface progressBar)
|
void |
setVisible(boolean state)
Sets all of the visualizers to visible/invisible. |
void |
showFaded()
The faded visualizers will be fully visible again. |
protected double |
touchObject(int hits)
Returns the z coordinate of the component being nearest to the viewing point. |
void |
translate(float[] vector)
Translates its selected ligand by changing its coordinates, and not just the view. |
void |
unSelect()
Sets all parts of all visualizers not to be selected. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final int COMPONENT_TYPE_ATOM
protected static final int COMPONENT_TYPE_BOND
protected static final int COMPONENT_TYPE_MOLECULE
protected static final int COMPONENT_TYPE_RESIDUE
protected boolean initialised
public static final int RAINBOW_MODE
public static final int B_FACTOR_MODE
| Constructor Detail |
|---|
protected MacroMoleculeComponent()
public MacroMoleculeComponent(MacroMolecule mol)
| Method Detail |
|---|
public void onRemoveGraphicComponent()
onRemoveGraphicComponent in class GraphicComponentpublic void setProgressBar(chemaxon.marvin.space.ProgressBarInterface progressBar)
setProgressBar in class GraphicComponentpublic Molecule getMolecule()
Molecule representation of the MacroMolecule.
For example it can be necessary at copying molecules.
Note that information about molecule parts such as chains, ligands, water, ions, etc will be lost.
To have a more complex representation see {#getMacroMolecule()}.
Moleculepublic MacroMolecule getMacroMolecule()
MacroMolecule this component visualizes. It stores the information
about chains, ligands, water, ions, etc.
To get it in simple Molecule representation see {#getMolecule()}.
public void draw()
draw in class GraphicComponentpublic boolean has2DPart()
has2DPart in class GraphicComponentpublic void draw2DPart()
draw2DPart in class GraphicComponentpublic boolean hasTransparentPart()
hasTransparentPart in class GraphicComponentpublic void drawTransparentPart()
drawTransparentPart in class GraphicComponentpublic chemaxon.marvin.space.util.Palette getRainbowPalette()
Palette with properly set colors, minimum and maximum valuespublic chemaxon.marvin.space.util.Palette getBFactorPalette()
Palette with properly set colors, minimum and maximum valuespublic java.util.Iterator getComponentIterator()
public java.util.ArrayList getComponents()
public MacroMoleculeComponent.MoleculeVisualizer getComponent(int cIdx)
public void setGL(javax.media.opengl.GL gl,
javax.media.opengl.glu.GLU glu)
setGL in class GraphicComponentgl - Interface to OpenGLglu - Interface to OpenGLprotected void drawSelection(int mode)
drawSelection in class GraphicComponentmode - GL_RENDER or GL_SELECT
public void getCoordinates(ComponentElement element,
float[] c)
getCoordinates in class GraphicComponentelement - specific part of the componentc - allocated array where coordinates will be putpublic ComponentElement getComponentElement()
getComponentElement in class GraphicComponentpublic ComponentElement getComponentElement(MacroMoleculeComponent.MoleculeVisualizer mv)
ComponentElement. This is useful
for the visualizers themselves thence they can figure out their index inside
the macromolecule.
mv - visualizer of the macromolecule
COMPONENT_TYPE_MOLECULE type ComponentElementpublic chemaxon.marvin.space.UOID getUsableObjectId(MacroMoleculeComponent.MoleculeVisualizer mv)
public chemaxon.marvin.space.UsableObject getUsableObject(chemaxon.marvin.space.UOID id)
GraphicComponent
getUsableObject in class GraphicComponentid - identifier of the component or a part of the component
public java.lang.String getDescription(ComponentElement element)
getDescription in class GraphicComponentelement - specific part of the component
Stringpublic ComponentElement[] getLabelInformation(java.lang.String labelType)
getLabelInformation in class GraphicComponentlabelType -
public boolean isVisible()
isVisible in interface chemaxon.marvin.space.UsableObjectisVisible in class GraphicComponentpublic boolean isVisible(ComponentElement element)
isVisible in class GraphicComponentelement - part of the component
public void setVisible(boolean state)
setVisible in interface chemaxon.marvin.space.UsableObjectsetVisible in class GraphicComponentstate - of visibilitypublic void showFaded()
showFaded in class GraphicComponentpublic void hideSelected()
hideSelected in class GraphicComponentpublic void hideUnselected()
hideUnselected in class GraphicComponentpublic void fadeSelected()
fadeSelected in class GraphicComponentpublic void fadeUnselected()
fadeUnselected in class GraphicComponentpublic void exclusiveSelection()
exclusiveSelection in class GraphicComponentpublic void extendSelection()
extendSelection in class GraphicComponentpublic void invertSelection()
invertSelection in class GraphicComponentpublic void select()
unSelect().
select in interface chemaxon.marvin.space.UsableObjectselect in class GraphicComponentpublic void unSelect()
unSelect in interface chemaxon.marvin.space.UsableObjectunSelect in class GraphicComponentpublic void selectComponentElementsInside(BoundingBox bb)
selectComponentElementsInside in class GraphicComponentbb - given box represented by a BoundingBoxpublic boolean hasSelectedElements()
hasSelectedElements in class GraphicComponentprotected double touchObject(int hits)
touchObject in class GraphicComponenthits - Number of hits at the previous hit.
public boolean isControllable(java.lang.String type)
isControllable in class GraphicComponenttype - "Shift", "Rotate", "Resize"
public void translate(float[] vector)
translate in class GraphicComponentvector - The translation vector.
public void rotate(float[] vector,
float[] center)
rotate in class GraphicComponentvector - Measurement of the rotation around the 3 axis, x, y, z.center - Center of the rotation.
public void setDrawProperty(java.lang.String propertyName,
java.lang.String propertyValue)
draw property.
setDrawProperty in interface chemaxon.marvin.space.UsableObjectsetDrawProperty in class GraphicComponentpropertyName - identifier of the draw propertypropertyValue - value of the draw property as a String
public void setDrawProperty(java.lang.String propertyName,
java.lang.String propertyValue,
MacroMoleculeComponent.MoleculeVisualizer mmv)
propertyName - Name of the property to pass.propertyValue - Value of the property to pass.mmv - Visualizer of a certain part of the MacroMolecule
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||