@PublicAPI public class PharmacophorePoint extends GraphicComponent implements chemaxon.marvin.space.UsableObject
PharmacophorePoint
serves mere visualisation purposes.
The graphical representation in the MarvinSpace canvas is a translucent sphere.Modifier and Type | Field and Description |
---|---|
static int |
ACCEPTOR_TYPE |
static int |
ANIONIC_TYPE |
static int |
AROMATIC_TYPE |
static int |
CATIONIC_TYPE |
static float |
DEFAULT_RADIUS |
static int |
DONOR_TYPE |
static java.lang.String[] |
DRAW_TYPES |
static int |
EXCLUDED_TYPE |
static int |
HYDROPHOBIC_TYPE |
protected boolean |
needRecreateBall |
protected boolean |
needRecreateDisplayList |
static int |
UNKONWN_TYPE |
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 |
---|
PharmacophorePoint()
Creates a new instance of
PharmacophorePoint . |
PharmacophorePoint(ComponentElement ce)
Creates a
PharmacophorePoint at the position of the given ComponentElement
getting the coordinates by getCoordinates() . |
PharmacophorePoint(double x,
double y,
double z)
Creates a PharmacophorePoint at the given position.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanup() |
void |
draw()
Draws the entire 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 PharmacophorePoint.
|
void |
getCoordinates(ComponentElement item,
float[] c)
Gets the position of the pharmacophore point.
|
java.lang.String |
getDescription()
Returns textual description.
|
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 PharmacophorePoint in angstroms.
|
boolean |
hasTransparentPart()
Checks is component has transparent part.
|
void |
initDraw()
Initializes all internal data structure needed for drawing the component.
|
boolean |
isAcceptor()
Checks if actual pharmacophore type includes
ACCEPTOR_TYPE . |
boolean |
isAnionic()
Check if actual pharmacophore type includes
ANIONIC_TYPE . |
boolean |
isAromatic()
Checks if actual pharmacophore type includes
AROMATIC_TYPE . |
boolean |
isCationic()
Check if actual pharmacophore type includes
CATIONIC_TYPE . |
boolean |
isControllable(java.lang.String type)
Returns whether controling by the given type of controller is allowed to the component.
|
boolean |
isDonor()
Checks if actual pharmacophore type includes
DONOR_TYPE . |
boolean |
isExcluded()
Check if actual pharmacophore type is
EXCLUDED_TYPE . |
boolean |
isHighlighted()
Returns true if the component is highlighted.
|
boolean |
isHydrophobic()
Checks if actual pharmacophore type includes
HYDROPHOBIC_TYPE . |
protected void |
pickObject(int offset,
double[] maxZ,
float[] modelview)
Sets
GraphicComponent.pickedItem to the
pharmacophore point. |
void |
resize(double x,
double y,
double z)
Resizes the component according to given factors.
|
void |
select()
Sets the component to be selected.
|
void |
setAcceptor(boolean flag)
Sets or clears the acceptor property of the PharmacophorePoint.
|
void |
setAnionic(boolean flag)
Sets or clears the anionic property of the PharmacophorePoint.
|
void |
setAromatic(boolean flag)
Sets or clears the aromatic property of the PharmacophorePoint.
|
void |
setCationic(boolean flag)
Sets or clears the cationic property of the PharmacophorePoint.
|
void |
setDonor(boolean flag)
Sets or clears the donor property of the PharmacophorePoint.
|
void |
setDrawProperty(java.lang.String propertyName,
java.lang.String propertyValue)
Sets drawing properties specific to
PharmacophoreSphere . |
void |
setDrawType(java.lang.String type)
Sets current drawing type.
|
void |
setExcluded(boolean flag)
Sets or clears the excluded property of the PharmacophorePoint.
|
void |
setHighlighted(boolean flag)
Sets the highlighted state of the pharmacophore point.
|
void |
setHydrophobic(boolean flag)
Sets or clears the hydrophobic property of the PharmacophorePoint.
|
void |
setPosition(double x,
double y,
double z)
Sets the position of the PharmacophorePoint.
|
void |
setRadius(float r)
Sets the radius of the PharmaCophorePoint.
|
void |
setRenderingQuality(int quality)
Sets the rendering quality, see
GraphicComponent.RENDERING_QUALITY_HIGH 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 given 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, onRemoveGraphicComponent, projectVector, receiveNotificationOnCoordinateChange, receiveNotificationOnInvisibility, receiveNotificationOnSelection, receiveNotificationOnUnSelection, receiveNotificationOnVisibility, removeAssociation, rotate, rotate, rotate, select, selectComponentElementsInside, setColor, setColor, setColor, setColor, setDrawProperties, setGL, setMotionMode, setName, setProgressBar, setRotateMatrix, setVisible, showFaded, storeDrawProperty, touchObject, unSelect
public static final float DEFAULT_RADIUS
public static final java.lang.String[] DRAW_TYPES
public static final int UNKONWN_TYPE
public static final int ACCEPTOR_TYPE
public static final int DONOR_TYPE
public static final int ANIONIC_TYPE
public static final int CATIONIC_TYPE
public static final int HYDROPHOBIC_TYPE
public static final int AROMATIC_TYPE
public static final int EXCLUDED_TYPE
protected boolean needRecreateBall
protected boolean needRecreateDisplayList
public PharmacophorePoint()
PharmacophorePoint
. It will be placed at the origo
by default, its position can be set by setPosition()
.public PharmacophorePoint(ComponentElement ce)
PharmacophorePoint
at the position of the given ComponentElement
getting the coordinates by getCoordinates()
.
Radius is set to by default
.ce
- a visible component around which the pharmacophore sphere is placedpublic PharmacophorePoint(double x, double y, double z)
by default
.x
- first coordinate of the pharmacophore point to createy
- second coordinate of the pharmacophore point to createz
- third coordinate of the pharmacophore point to createpublic void setPosition(double x, double y, double z)
public void getCoordinates(ComponentElement item, float[] c)
getCoordinates
in class GraphicComponent
item
- not usedc
- coordinates of the pharmacophore point are stored in this
array, it has to be pre-allocated by the caller of this
methodpublic 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(float r)
r
- radius in angstromspublic 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)
flag
- highligth indicatorpublic void translate(float[] v)
translate
in class GraphicComponent
v
- 3D translation vectorpublic void resize(double x, double y, double z)
resize
in class GraphicComponent
x
- ignoredy
- size increment/decrementz
- ignoredpublic boolean isControllable(java.lang.String type)
isControllable
in class GraphicComponent
type
- control event type, Shift
and Resize
are interpreted by this componenttype
is either Shift
or Resize
public boolean hasTransparentPart()
GraphicComponent.hasTransparentPart()
.hasTransparentPart
in class GraphicComponent
DRAW_TYPE_FILLED
.public void drawTransparentPart()
PharmacophorePoint
has no subpart, thus the whole component
is either transparent or opaque.drawTransparentPart
in class GraphicComponent
public void draw()
draw
in class GraphicComponent
public void initDraw()
draw()
.protected void pickObject(int offset, double[] maxZ, float[] modelview)
GraphicComponent.pickedItem
to the
pharmacophore point.pickObject
in class GraphicComponent
offset
- see GraphicComponent.pickObject(int,double[],float[])
maxZ
- see GraphicComponent.pickObject(int,double[],float[])
modelview
- see GraphicComponent.pickObject(int,double[],float[])
public void setDrawType(java.lang.String type)
type
- Solid, Mesh or Transparentpublic java.lang.String getDrawType()
public boolean isAcceptor()
ACCEPTOR_TYPE
.
Types are not exclusive, a PharmacophorePoint can have multiple types,
though certain combinations are senseless (like ANIONIC_TYPE
and CATIONIC_TYPE
at the same time).ACCEPTOR_TYPE
public void setAcceptor(boolean flag)
flag
- if true, current pharmacophore type will include ACCEPTOR_TYPE
otherwise it will not be an acceptorpublic boolean isDonor()
DONOR_TYPE
.
Types are not exclusive, a PharmacophorePoint can have multiple types.ADONOR_TYPE
public void setDonor(boolean flag)
flag
- if true, current pharmacophore type will include DONOR_TYPE
otherwise it will not be a donorpublic boolean isHydrophobic()
HYDROPHOBIC_TYPE
.
Types are not exclusive, a PharmacophorePoint can have multiple types.HYDROPHOBIC_TYPE
public void setHydrophobic(boolean flag)
flag
- if true, current pharmacophore type will include HYDROPHOBIC_TYPE
otherwise it will not be hydrophobicpublic boolean isAromatic()
AROMATIC_TYPE
.
Types are not exclusive, a PharmacophorePoint can have multiple types.AROMATIC_TYPE
public void setAromatic(boolean flag)
flag
- if true, current pharmacophore type will include AROMATIC_TYPE
otherwise it will not be aromaticpublic boolean isAnionic()
ANIONIC_TYPE
.
Types are not exclusive, a PharmacophorePoint can have multiple types.ANIONIC_TYPE
public void setAnionic(boolean flag)
flag
- if true, current pharmacophore type will include ANIONIC_TYPE
otherwise it will not be anionicpublic boolean isCationic()
CATIONIC_TYPE
.
Types are not exclusive, a PharmacophorePoint can have multiple types.CATIONIC_TYPE
public void setCationic(boolean flag)
flag
- if true, current pharmacophore type will include CATIONIC_TYPE
otherwise it will not be cationicpublic boolean isExcluded()
EXCLUDED_TYPE
. This can
be used to represent excluded volumes.EXCLUDED_TYPE
public void setExcluded(boolean flag)
flag
- if true, current pharmacophore type will be set to EXCLUDED_TYPE
otherwise it will not be an excluded volumepublic void setRenderingQuality(java.lang.String quality)
setRenderingQuality(int)
.quality
- Can be "High", "Medium", "Low".public void setRenderingQuality(int quality)
GraphicComponent.RENDERING_QUALITY_HIGH
constants.
Sets the precision (resolution) of the drawn sphere.setRenderingQuality
in class GraphicComponent
quality
- public void setDrawProperty(java.lang.String propertyName, java.lang.String propertyValue)
PharmacophoreSphere
.
Generic properties are processed by
GraphicComponent.setDrawProperty(String, String)
.String
String
String
String
String
String
String
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 cleanup()
cleanup
in class GraphicComponent