@PublicAPI public class PharmacophoreArrow extends GraphicComponent implements chemaxon.marvin.space.UsableObject
PharmacophoreArrow
provides an extension of
PharmacophorePoint
to represent pharmacophores by introducing
directionality. The direction, the length and the thickness of the arrow
can be changed.Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
DRAW_TYPES |
active, associatedComponents, boundingBox, 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 and Description |
---|
PharmacophoreArrow()
Creates a new instance of
PharmacophoreArrow . |
PharmacophoreArrow(ComponentElement ce)
Creates a
PharmacophoreArrow at the position of the given
ComponentElement getting the coordinates by getCoordinates() . |
PharmacophoreArrow(double x,
double y,
double z)
Creates a
PharmacophoreArrow at the given position. |
Modifier and Type | Method and Description |
---|---|
void |
cleanup() |
void |
draw()
Draws the component if it is opaque.
|
void |
drawTransparentPart()
Draws transparent parts of the component if there is any.
|
java.awt.Color |
getColor()
Returns the color of the component.
|
void |
getCoordinates(ComponentElement item,
float[] c)
Gets the position of the component.
|
java.lang.String |
getDescription()
Returns a descriptive text.
|
java.lang.String |
getDrawType()
Returns the name of the drawing type.
|
java.lang.String |
getName()
Returns the name of the component.
|
double |
getRadius()
Returns the radius of the arrow.
|
boolean |
hasTransparentPart()
|
void |
initDraw() |
boolean |
isControllable(java.lang.String type)
Returns whether controling by the given type of controller is allowed to the component.
|
boolean |
isHighlighted()
Returns true if the component is highlighted.
|
void |
onRemoveGraphicComponent() |
protected void |
pickObject(int offset,
double[] maxZ,
float[] modelview)
Sets
GraphicComponent.pickedItem to be the picked part of the component. |
void |
resize(double x,
double y,
double z)
Resizes the component according to the given factors in each direction.
|
void |
rotate(float[] v,
float[] center)
Rotates the component around the 3 axis, x, y, z, and given center.
|
void |
select()
Sets the component to be selected.
|
void |
setDrawProperty(java.lang.String propertyName,
java.lang.String propertyValue)
Sets a
draw property . |
void |
setDrawType(java.lang.String type)
Sets current drawing type.
|
void |
setHighlighted(boolean flag)
Sets the component to be highlighted.
|
void |
setPosition(double x,
double y,
double z)
Sets the position of the
PharmacophoreArrow . |
void |
setRadius(double r)
Sets the radius of the arrow.
|
void |
setRenderingQuality(int quality)
Sets the rendering quality, see
RENDERING_* constants. |
void |
setRenderingQuality(java.lang.String quality)
Sets the rendering quality and calls
setRenderingQuality(int) . |
java.lang.String |
toString() |
void |
translate(float[] v)
Translates the component with the parameter as a translation vector.
|
void |
unSelect()
Sets the component to be unselected.
|
addDrawProperties, associate, draw2DPart, drawBoundingBox, drawCoordinateAxes, drawSelection, exclusiveSelection, exclusiveSelection, extendSelection, extendSelection, fadeSelected, fadeUnselected, getAssociatedComponents, getBoundingBox, getBoundingSphereRadius, getCell, getComponentElement, getCoordinates, getDescription, getDrawProperties, getDrawProperty, getGraphicComponent, getId, getLabelInformation, getLabelInformation, getRenderingQuality, getUsableObject, getZCoordinateTo2DPart, glColor, has2DPart, hasSelectedElements, hideSelected, hideUnselected, invertSelection, invertSelection, isGraphicComponent, isSelected, isSelected, isVisible, isVisible, locateObject, notifyCoordinateChange, notifyInvisibility, notifySelection, notifyUnSelection, notifyVisibility, projectVector, receiveNotificationOnCoordinateChange, receiveNotificationOnInvisibility, receiveNotificationOnSelection, receiveNotificationOnUnSelection, receiveNotificationOnVisibility, removeAssociation, rotate, rotate, select, selectComponentElementsInside, setColor, setColor, setColor, setColor, setDrawProperties, setGL, setMotionMode, setName, setProgressBar, setRotateMatrix, setVisible, showFaded, storeDrawProperty, touchObject, unSelect
public PharmacophoreArrow()
PharmacophoreArrow
. It will be placed at the origin
by default, its position can be set by setPosition()
.public PharmacophoreArrow(ComponentElement ce)
PharmacophoreArrow
at the position of the given
ComponentElement
getting the coordinates by getCoordinates()
.ce
- reference to a component to get the coordinatespublic PharmacophoreArrow(double x, double y, double z)
PharmacophoreArrow
at the given position.x
- coordinatey
- coordinatez
- coordinatepublic void onRemoveGraphicComponent()
onRemoveGraphicComponent
in class GraphicComponent
public void setPosition(double x, double y, double z)
PharmacophoreArrow
.x
- first coordinatey
- second coordinatez
- third coordinatepublic void getCoordinates(ComponentElement item, float[] c)
getCoordinates
in class GraphicComponent
item
- ignored here (since PharmacophoreArrow
is not
subdivided further into smaller constituting elements)c
- output parameter to store 3 coordinates (must be allocated by caller)public java.lang.String getDescription()
getDescription
in class GraphicComponent
public java.lang.String getName()
GraphicComponent
getName
in interface chemaxon.marvin.space.UsableObject
getName
in class GraphicComponent
getClass.getName()
by default.public java.lang.String toString()
toString
in interface chemaxon.marvin.space.UsableObject
toString
in class GraphicComponent
public double getRadius()
public void setRadius(double r)
public java.awt.Color getColor()
getColor
in interface chemaxon.marvin.space.UsableObject
getColor
in class GraphicComponent
public void select()
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 boolean isHighlighted()
public void setHighlighted(boolean flag)
public void translate(float[] v)
translate
in class GraphicComponent
v
- The translation vector.public void rotate(float[] v, float[] center)
rotate
in class GraphicComponent
v
- Measurement of the rotation around the 3 axis, x, y, z.center
- Center of the rotation.public void resize(double x, double y, double z)
resize
in class GraphicComponent
public boolean isControllable(java.lang.String type)
isControllable
in class GraphicComponent
type
- "Shift", "Rotate", "Resize"public boolean hasTransparentPart()
GraphicComponent.hasTransparentPart()
.
Returns true if the drawing type is not DRAW_TYPE_FILLED
.hasTransparentPart
in class GraphicComponent
public void drawTransparentPart()
drawTransparentPart
in class GraphicComponent
public void draw()
draw
in class GraphicComponent
public void initDraw()
protected void pickObject(int offset, double[] maxZ, float[] modelview)
GraphicComponent
GraphicComponent.pickedItem
to be the picked part of the component.pickObject
in class GraphicComponent
offset
- Integer used in the name stack to identify the part of the component.maxZ
- Stores the z coordinate of the part with maximum z coordinate in the actual picking.
It has to be set if the part with the current offset has greater z coordinate than the stored one.
Example to compute: int aIdx = GeomCalc.newVector( picked.x(), picked.y(), picked.z() );
GeomCalc.multVectorWithMatrix(aIdx, modelview);
z coordinate: maxZ[0] = GeomCalc.getZ(aIdx)
modelview
- Is to compute the proper z coordinate.public void cleanup()
cleanup
in class GraphicComponent
public void setDrawType(java.lang.String type)
type
- Solid, Mesh or Transparentpublic java.lang.String getDrawType()
public void setRenderingQuality(java.lang.String quality)
setRenderingQuality(int)
.quality
- Can be "High", "Medium", "Low".public void setRenderingQuality(int quality)
RENDERING_*
constants.
Sets the precision of the drawn arrow.setRenderingQuality
in class GraphicComponent
quality
- 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