|
|||||||||
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(chemaxon.struc.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<MacroMoleculeComponent.MoleculeVisualizer> |
getComponentIterator()
Returns the Iterator of its visualizers. |
java.util.ArrayList<MacroMoleculeComponent.MoleculeVisualizer> |
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. |
chemaxon.struc.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.GL2 gl,
javax.media.opengl.glu.GLU glu)
Sets GL2 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(chemaxon.struc.MacroMolecule mol)
Method Detail |
---|
public void onRemoveGraphicComponent()
onRemoveGraphicComponent
in class GraphicComponent
public void setProgressBar(chemaxon.marvin.space.ProgressBarInterface progressBar)
setProgressBar
in class GraphicComponent
public 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()}.
Molecule
public chemaxon.struc.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 GraphicComponent
public boolean has2DPart()
has2DPart
in class GraphicComponent
public void draw2DPart()
draw2DPart
in class GraphicComponent
public boolean hasTransparentPart()
hasTransparentPart
in class GraphicComponent
public void drawTransparentPart()
drawTransparentPart
in class GraphicComponent
public 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<MacroMoleculeComponent.MoleculeVisualizer> getComponentIterator()
public java.util.ArrayList<MacroMoleculeComponent.MoleculeVisualizer> getComponents()
public MacroMoleculeComponent.MoleculeVisualizer getComponent(int cIdx)
public void setGL(javax.media.opengl.GL2 gl, javax.media.opengl.glu.GLU glu)
setGL
in class GraphicComponent
gl
- Interface to OpenGLglu
- Interface to OpenGLprotected void drawSelection(int mode)
drawSelection
in class GraphicComponent
mode
- GL_RENDER or GL_SELECTpublic void getCoordinates(ComponentElement element, float[] c)
getCoordinates
in class GraphicComponent
element
- specific part of the componentc
- allocated array where coordinates will be putpublic ComponentElement getComponentElement()
getComponentElement
in class GraphicComponent
public 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 ComponentElement
public chemaxon.marvin.space.UOID getUsableObjectId(MacroMoleculeComponent.MoleculeVisualizer mv)
public chemaxon.marvin.space.UsableObject getUsableObject(chemaxon.marvin.space.UOID id)
GraphicComponent
getUsableObject
in class GraphicComponent
id
- identifier of the component or a part of the component
public java.lang.String getDescription(ComponentElement element)
getDescription
in class GraphicComponent
element
- specific part of the component
String
public ComponentElement[] getLabelInformation(java.lang.String labelType)
getLabelInformation
in class GraphicComponent
labelType
-
public boolean isVisible()
isVisible
in interface chemaxon.marvin.space.UsableObject
isVisible
in class GraphicComponent
public boolean isVisible(ComponentElement element)
isVisible
in class GraphicComponent
element
- part of the component
public void setVisible(boolean state)
setVisible
in interface chemaxon.marvin.space.UsableObject
setVisible
in class GraphicComponent
state
- of visibilitypublic void showFaded()
showFaded
in class GraphicComponent
public void hideSelected()
hideSelected
in class GraphicComponent
public void hideUnselected()
hideUnselected
in class GraphicComponent
public void fadeSelected()
fadeSelected
in class GraphicComponent
public void fadeUnselected()
fadeUnselected
in class GraphicComponent
public void exclusiveSelection()
exclusiveSelection
in class GraphicComponent
public void extendSelection()
extendSelection
in class GraphicComponent
public void invertSelection()
invertSelection
in class GraphicComponent
public void select()
unSelect()
.
select
in interface chemaxon.marvin.space.UsableObject
select
in class GraphicComponent
public void unSelect()
unSelect
in interface chemaxon.marvin.space.UsableObject
unSelect
in class GraphicComponent
public void selectComponentElementsInside(BoundingBox bb)
selectComponentElementsInside
in class GraphicComponent
bb
- given box represented by a BoundingBox
public boolean hasSelectedElements()
hasSelectedElements
in class GraphicComponent
protected double touchObject(int hits)
touchObject
in class GraphicComponent
hits
- Number of hits at the previous hit.
public boolean isControllable(java.lang.String type)
isControllable
in class GraphicComponent
type
- "Shift", "Rotate", "Resize"
public void translate(float[] vector)
translate
in class GraphicComponent
vector
- The translation vector.public void rotate(float[] vector, float[] center)
rotate
in class GraphicComponent
vector
- 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.UsableObject
setDrawProperty
in class GraphicComponent
propertyName
- 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 |