Package chemaxon.marvin.space
Class GraphicComponent
java.lang.Object
chemaxon.marvin.space.GraphicComponent
- All Implemented Interfaces:
chemaxon.marvin.space.UsableObject
- Direct Known Subclasses:
MacroMoleculeComponent
,MolecularSurfaceComponent
,MoleculeComponent
,Monitor
,PharmacophoreArrow
,PharmacophorePoint
,SurfaceComponent
@PublicAPI
public abstract class GraphicComponent
extends Object
implements chemaxon.marvin.space.UsableObject
GraphicComponents are the basic objects what MarvinSpace can visualize and handle.
A component is displayed in a GraphicCell, its view is transformed by the cell.
Important concepts related to GraphicComponents:
- selection
Each component can either be in selected or in unselected state. By the selection of components various settings can be restricted, for example changing of color can be restricted to specific components. Components can also be shown/hidden/deleted separately by the use of selection. - draw property
Each component receives every properties set inGraphicScene
, and must handle those that are releated to itself. For example if draw quality (one of the draw properties) is changed by the user toHigh
, every component in the scene receives a "Quality" "H" property pair. Each component can ignore it or change its visualization settings appropriately, e.g. increasing the number of triangles displayed. - bounding box
Setting the camera position and locating components is easier if the bounding box of components is defined, seeBoundingBox
. - associated components
Association provides a strong dependency relationship between components. If a component depends on an other, e.g. a molecular surface depends on the related molecule, they can be associated with each other. This relationship can be used arbitrarily, but there is a predefined behaviour. When a component is deleted, every dependant components will also be deleted. When a component is selected/unselected, shown/hidden or its coordinates change it will notify every associated components about this action. - picking
Picking refers to the selection of a component or a part of a component with the mouse. TheGraphicComponent
class provides basic mechanisms for its derived classes to implement picking. By default, aGraphicComponent
can indicate whether it was picked or not.
- Since:
- Marvin 4.0.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
Is this component selected or not.protected ArrayList
Strores components that depend on this component.protected BoundingBox
The smallest box containing the graphic component.protected float[]
protected static final int
Indicates if the entire component is selected by picking.protected Properties
Common drawing related properties that affect allthree quality modes
.protected int
The actual drawing type of the component.protected javax.media.opengl.GL2
must be accessible in derived classesprotected javax.media.opengl.glu.GLU
protected GraphicCell
which cell of the scene is this component displayed inprotected int
Inverse of the Rotation matrix represented by a GeomCalc matrix.protected boolean
Tells whether this component modifies the transformation center of the cell or not.protected int
Indicates if the component is in standing or in moving mode.protected int
Mouse position in picking mode.protected int
Mouse position in picking mode.protected String
protected ComponentElement
Identifies the most recently selected elementstatic final int
Highest though slowest drawing quality indicator.static final int
Lowest but fastest drawing quality indicator.static final int
Medium drawing quality indicator.protected int
The actual rendering quality.protected int
Rotation matrix as a GeomCalc matrix.protected chemaxon.marvin.space.UOID
internal index of the componentprotected boolean
Indicates if component is visible or hidden. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDrawProperties
(Properties drawProperties) Forces the component to set all drawing property stored in drawProperties, and leaves the old settings which are not overidden.void
The given component will depend on this component.void
cleanup()
void
draw()
Draws the coordinate system of the component.void
A component which draws (partly) in plane should overwrite this method.protected void
Vizualises the bounding box.protected void
Draws the local coordinate axes, the origin is the transformation centerprotected void
drawSelection
(int mode) Draws the component in the given mode (usually in selection mode), the rendering mode is for checking.void
A component having transparent parts should override this method, drawing the transparent parts here.void
Sets the previously picked but unprocessed element to be selected, and sets every other parts not to be selected.void
exclusiveSelection
(ComponentElement element) Sets the the given part of the component to be selected, and sets every other parts not to be selected.void
Sets the previously picked but unprocessed element to be selected, and leaves other parts as they are.void
extendSelection
(ComponentElement element) Sets the the given part of the component to be selected, and leaves other parts as they are.void
A descendant should overwrite this method to have its selection became faded.void
A descendant should overwrite this method to have all but its selection became faded.Returns anIterator
that can enumerate the components associated to (depending on) this component.Returns the smallest box containing the graphic component.double
Returns the radius of the bounding sphere of the component.getCell()
Returns the container cell of the component.getColor()
Returns the constant color of the component.Returns the previously picked but unprocessed ComponentElement or the whole component as a ComponentElement, if no picking happened.void
getCoordinates
(float[] c) Gets the coordinates of the previously picked but not yet processed part if there is any in the given preallocated array.void
getCoordinates
(ComponentElement element, float[] c) Gets the coordinates of the given ComponentElement in the given preallocated array.Returs the short description of the component or of the previously picked but not yet processed part if there is any or the description of the whole component.getDescription
(ComponentElement element) Returs the short description of the given part of the component.Returns the set draw properties of the component.getDrawProperty
(String propertyName) Returns the value of a draw property.chemaxon.marvin.space.UOID
getId()
Returns the id of the component.getLabelInformation
(String labeltype) getLabelInformation
(String labeltype, boolean onlyOnHeavyAtoms) Labels will be created associated to this GraphicComponent if the component supports the given labeltype, and returns arbitrary numbers of ComponentElements with correct coordinates and description to create a label.getName()
Returns the name of the component.int
Returns the actual rendering quality of the component.chemaxon.marvin.space.UsableObject
getUsableObject
(chemaxon.marvin.space.UOID id) Returns the component that the given UOID identifies.float
Returns a third, z coordinate in order to display 2D parts in proper order.protected void
glColor()
Sets the default/constant color of the component for drawing.boolean
Returns true, if the component resets the projection matrix in its draw method, so that the component is drawn in plane.boolean
Tells whether the component has some selected parts.boolean
Returns true if a component has transparent part to draw.void
If the component is selected it will become hidden.void
If the component is unselected it will become hidden.void
Sets the previously picked but unprocessed element to be selected if it was not set and vice versa.void
invertSelection
(ComponentElement element) Sets the the given part of the component to be selected if it was not set and vice versa.boolean
isControllable
(String type) A component must return true if it allows itself to be controlled by the given type controller.boolean
boolean
Tells whether the component is being selected or not.boolean
isSelected
(ComponentElement element) Tells whether a part of the component is selected.boolean
Returns true if this component is allowed to be drawn.boolean
isVisible
(ComponentElement element) Returns true if the specified part of the component is allowed to be drawn.double
locateObject
(int x, int y) Picking action at x, y coordinates, returns the z coordinate of the nearest picked item, or -1.void
Notifies the associated components of changing coodinates.void
Notifies the associated components of being invisible.void
Notifies the associated components of being selected.void
Notifies the associated components of being unselected.void
Notifies the associated components of being visible.void
protected void
pickObject
(int offset, double[] maxZ, float[] modelview) SetspickedItem
to be the picked part of the component.void
projectVector
(float[] vector3) Projects a vector from the scene to the viewport.void
Notifies the current object that the coordinates of the given component have been changed.void
Notifies the current object that the given component is not visible.void
Notifies the current object that the given component became selected.void
Notifies the current object that the given component became unselected.void
Notifies the current object that the given component became visible.void
Removes the dependency of the given component from this component.void
resize
(double x, double y, double z) Resizes the component according to the given factors in each directions.void
rotate
(float[] v, float[] center) Rotates the component by changing its coordinates, and not just the view.void
rotate
(float[] p, float[] v, float[] center) Rotates the given p point by changing its coordinates.void
rotate
(int p, float[] v, float[] center) Rotates the given p point by changing its coordinates.void
select()
Sets the component to be selected.void
select
(ComponentElement element) Sets the specific part of the component to be selected.void
The component will be selected if it is inside the given box.void
setColor
(float[] color) Sets the constant color of the component.void
setColor
(float r, float g, float b) Sets the constant color of the component.void
setColor
(int r, int g, int b) Sets the constant color of the component.void
Sets the constant color of the component.void
setDrawProperties
(Properties drawProperties) Forces the component to set all drawing property stored in drawProperties, and loose every old setting.void
setDrawProperty
(String propertyName, String propertyValue) This is the gate of draw properties from outside to the component.void
setGL
(javax.media.opengl.GL2 gl, javax.media.opengl.glu.GLU glu) Sets the GL2 rendering environment.void
setMotionMode
(int mode) Sets the motion state of the component.void
Sets the name of the component.void
setProgressBar
(chemaxon.marvin.space.ProgressBarInterface progressBar) void
setRenderingQuality
(int quality) Sets the rendering quality.void
setRotateMatrix
(float[] rotateMatrix) Sets the rotation matrix in order to get the proper mapping of a vector to the viewing plane.void
setVisible
(boolean state) Indicates whether the component will appear on the graphic scene at the next draw or not.void
A descendant should overwrite this method to have its faded part become visible.protected void
storeDrawProperty
(String propertyName, String propertyValue) Stores the given property.toString()
protected double
touchObject
(int hits) Returns the z coordinate of the nearest component.void
translate
(float[] v) Translates the component by changing its coordinates, and not just the view.void
unSelect()
Sets the component not to be selected.void
unSelect
(ComponentElement element) Sets the specific part of the component not to be selected.
-
Field Details
-
RENDERING_QUALITY_LOW
public static final int RENDERING_QUALITY_LOWLowest but fastest drawing quality indicator.- See Also:
-
RENDERING_QUALITY_MEDIUM
public static final int RENDERING_QUALITY_MEDIUMMedium drawing quality indicator.- See Also:
-
RENDERING_QUALITY_HIGH
public static final int RENDERING_QUALITY_HIGHHighest though slowest drawing quality indicator.- See Also:
-
COMPONENT_TYPE_ENTIRE
protected static final int COMPONENT_TYPE_ENTIREIndicates if the entire component is selected by picking. Required by subclasses which implement custom picking/selection procedures.- See Also:
-
graphicCell
which cell of the scene is this component displayed in -
uoid
protected chemaxon.marvin.space.UOID uoidinternal index of the component -
name
-
color
protected float[] color -
associatedComponents
Strores components that depend on this component. E.g. they will be deleted when this component is deleted. -
gl
protected javax.media.opengl.GL2 glmust be accessible in derived classes -
glu
protected javax.media.opengl.glu.GLU glu -
visible
protected boolean visibleIndicates if component is visible or hidden. -
renderingQuality
protected int renderingQualityThe actual rendering quality. It can be low, medium or high. The default is medium. -
drawType
protected int drawTypeThe actual drawing type of the component. Usually various draw types are available for aGraphicComponent
. -
drawProperties
Common drawing related properties that affect allthree quality modes
. These properties are handled in a uniform way coming through theGraphicScene
API. Properties are set bysetDrawProperty(String propertyName, String propertyValue)
. All properties are delivered to every components and it is the responsibility of the particularGraphicComponent
to pick relevant properties to be processed. -
modifiesOrigin
protected boolean modifiesOriginTells whether this component modifies the transformation center of the cell or not. Most components modify the transformation center when they are added to the cell. Exceptions are for examplemonitors
andsurfaces
. -
boundingBox
The smallest box containing the graphic component. In the simplest case the transformation center of the cell containing theGraphicComponent
is the center of the bounding box. -
rm
protected int rmRotation matrix as a GeomCalc matrix. It is used during picking. -
irm
protected int irmInverse of the Rotation matrix represented by a GeomCalc matrix. It is used during picking. -
active
protected boolean activeIs this component selected or not. -
pickedItem
Identifies the most recently selected element -
mousex
protected int mousexMouse position in picking mode. Derived classes may use it (e.g.Monitor
andLabel
). -
mousey
protected int mouseyMouse position in picking mode. Derived classes may use it (e.g.Monitor
andLabel
). -
motionMode
protected int motionModeIndicates if the component is in standing or in moving mode. TheGraphicComponent
may behave differently in the different motion modes.
-
-
Constructor Details
-
GraphicComponent
protected GraphicComponent()Creates an empty object. This constructor is protected to prevent direct instantiation of base class, only derived classes can be instantiated.
-
-
Method Details
-
onRemoveGraphicComponent
public void onRemoveGraphicComponent() -
setProgressBar
public void setProgressBar(chemaxon.marvin.space.ProgressBarInterface progressBar) -
getId
public chemaxon.marvin.space.UOID getId()Returns the id of the component. This id contains internal cell and component indices. The id can be changed by client and internal mechanisms inGraphicCell
may also alter its value. Thus to preserve a component for later use, store the component itself rather than its Id.- Specified by:
getId
in interfacechemaxon.marvin.space.UsableObject
- Returns:
- id of the component
-
isGraphicComponent
public boolean isGraphicComponent()- Specified by:
isGraphicComponent
in interfacechemaxon.marvin.space.UsableObject
-
getGraphicComponent
- Specified by:
getGraphicComponent
in interfacechemaxon.marvin.space.UsableObject
-
getName
Returns the name of the component.- Specified by:
getName
in interfacechemaxon.marvin.space.UsableObject
- Returns:
- name that is
getClass.getName()
by default.
-
toString
-
setName
Sets the name of the component.- Specified by:
setName
in interfacechemaxon.marvin.space.UsableObject
-
getColor
Returns the constant color of the component.- Specified by:
getColor
in interfacechemaxon.marvin.space.UsableObject
-
setColor
Sets the constant color of the component.- Specified by:
setColor
in interfacechemaxon.marvin.space.UsableObject
-
setColor
public void setColor(float[] color) Sets the constant color of the component. -
setColor
public void setColor(int r, int g, int b) Sets the constant color of the component. -
setColor
public void setColor(float r, float g, float b) Sets the constant color of the component. -
getCell
Returns the container cell of the component.- Returns:
- container cell
-
getAssociatedComponents
Returns anIterator
that can enumerate the components associated to (depending on) this component.- Returns:
- Iterator pointing to the first element
-
associate
The given component will depend on this component.- Parameters:
gc
- associated component
-
removeAssociation
Removes the dependency of the given component from this component.- Parameters:
gc
- component will no longer depend of this component
-
receiveNotificationOnSelection
Notifies the current object that the given component became selected.- Parameters:
gc
- selected component
-
receiveNotificationOnUnSelection
Notifies the current object that the given component became unselected.- Parameters:
gc
- unselected component
-
receiveNotificationOnVisibility
Notifies the current object that the given component became visible.- Parameters:
gc
- visible component
-
receiveNotificationOnInvisibility
Notifies the current object that the given component is not visible.- Parameters:
gc
- invisible component
-
receiveNotificationOnCoordinateChange
Notifies the current object that the coordinates of the given component have been changed.- Parameters:
gc
- component changing coordinates
-
notifySelection
public void notifySelection()Notifies the associated components of being selected. -
notifyUnSelection
public void notifyUnSelection()Notifies the associated components of being unselected. -
notifyVisibility
public void notifyVisibility()Notifies the associated components of being visible. -
notifyInvisibility
public void notifyInvisibility()Notifies the associated components of being invisible. -
notifyCoordinateChange
public void notifyCoordinateChange()Notifies the associated components of changing coodinates. -
setMotionMode
public void setMotionMode(int mode) Sets the motion state of the component.- Parameters:
mode
- eitherGraphicScene.MODE_STANDING
orGraphicScene.MODE_MOVING
-
setGL
public void setGL(javax.media.opengl.GL2 gl, javax.media.opengl.glu.GLU glu) Sets the GL2 rendering environment. Without this being set the component cannot draw itself.- Parameters:
gl
- Interface to OpenGLglu
- Interface to OpenGL
-
setRenderingQuality
public void setRenderingQuality(int quality) Sets the rendering quality.- Parameters:
quality
- rendering quality, seeRENDERING_*
constants
-
storeDrawProperty
Stores the given property. It is called from overridensetDrawProperty
functions.- Parameters:
propertyName
- identifier of the draw propertypropertyValue
- value of the draw property as aString
-
setDrawProperty
This is the gate of draw properties from outside to the component. A component processes the draw property only if it can identify it, but every component will get it. Every subclasses must call thestoreDrawProperty()
in the overriden setDrawProperty function if it identifies the property.- Specified by:
setDrawProperty
in interfacechemaxon.marvin.space.UsableObject
- Parameters:
propertyName
- identifier of the draw propertypropertyValue
- value of the draw property as aString
- Throws:
Exception
-
getDrawProperty
Returns the value of a draw property.- Returns:
- value of the draw property as
String
-
getDrawProperties
Returns the set draw properties of the component.- Returns:
- collection of previously set draw properties
-
setDrawProperties
Forces the component to set all drawing property stored in drawProperties, and loose every old setting.- Parameters:
drawProperties
- collection of draw properties to set- Throws:
Exception
-
addDrawProperties
Forces the component to set all drawing property stored in drawProperties, and leaves the old settings which are not overidden.- Parameters:
drawProperties
- collection of draw properties to set- Throws:
Exception
-
setRotateMatrix
public void setRotateMatrix(float[] rotateMatrix) Sets the rotation matrix in order to get the proper mapping of a vector to the viewing plane.- Parameters:
rotateMatrix
- float array having 16 elements representing a 4 by 4 rotation matrix
-
projectVector
public void projectVector(float[] vector3) Projects a vector from the scene to the viewport.- Parameters:
vector3
- preallocated array containing 3 float coordinates
-
draw
public void draw()Draws the coordinate system of the component. It can be called by GraphicScene when it is time for drawing, and everything is set properly. This function is not public, becaue it cannot be ensured that in the moment of calling from outside we are int the Jogl rendering thread, and everything is set properly (buffers, viewport, matrices, and so on). -
glColor
protected void glColor()Sets the default/constant color of the component for drawing. -
drawCoordinateAxes
protected void drawCoordinateAxes()Draws the local coordinate axes, the origin is the transformation center -
drawBoundingBox
protected void drawBoundingBox()Vizualises the bounding box. -
drawSelection
protected void drawSelection(int mode) Draws the component in the given mode (usually in selection mode), the rendering mode is for checking.- Parameters:
mode
-GL_RENDER
orGL_SELECT
-
isVisible
public boolean isVisible()Returns true if this component is allowed to be drawn.- Specified by:
isVisible
in interfacechemaxon.marvin.space.UsableObject
- Returns:
- visibility of the component
-
isVisible
Returns true if the specified part of the component is allowed to be drawn.- Parameters:
element
- part of the component- Returns:
- visibility of the part of the component
-
setVisible
public void setVisible(boolean state) Indicates whether the component will appear on the graphic scene at the next draw or not.- Specified by:
setVisible
in interfacechemaxon.marvin.space.UsableObject
- Parameters:
state
- of visibility
-
hideSelected
public void hideSelected()If the component is selected it will become hidden. -
hideUnselected
public void hideUnselected()If the component is unselected it will become hidden. -
showFaded
public void showFaded()A descendant should overwrite this method to have its faded part become visible. -
fadeSelected
public void fadeSelected()A descendant should overwrite this method to have its selection became faded. -
fadeUnselected
public void fadeUnselected()A descendant should overwrite this method to have all but its selection became faded. -
hasTransparentPart
public boolean hasTransparentPart()Returns true if a component has transparent part to draw. If this is true,drawTransparentPart()
will be called during draw. Components with transparent parts should overload this function and return true, and overload thedrawTransparentPart()
method. This is necessary because for the correct display, opaque components have to be drawn first, and transparents after them.- Returns:
- will the component draw with transparency
-
drawTransparentPart
public void drawTransparentPart()A component having transparent parts should override this method, drawing the transparent parts here. Antialiased lines and transparent filled polygons are considered transparent. To draw transparent objects enable GL_BLEND. -
has2DPart
public boolean has2DPart()Returns true, if the component resets the projection matrix in its draw method, so that the component is drawn in plane. These components are drawn after the rest.- Returns:
- will the component draw in plane
-
draw2DPart
public void draw2DPart()A component which draws (partly) in plane should overwrite this method. -
getZCoordinateTo2DPart
public float getZCoordinateTo2DPart()Returns a third, z coordinate in order to display 2D parts in proper order.- Returns:
- a pseudo 'z' cordinate
-
translate
public void translate(float[] v) Translates the component by changing its coordinates, and not just the view. This function is usually called by a translation monitor, if and only if the component returns true to the {#isControllable("Shift")} call. This funcion translates the bounding box, and notifies the associated components (e.g. the translation monitor) about the change. It does not change any coordinates of the component itself.- Parameters:
v
- The translation vector.
-
rotate
public void rotate(float[] v, float[] center) Rotates the component by changing its coordinates, and not just the view.- Parameters:
v
- Measurement of the rotation around the 3 axis, x, y, z.center
- Center of the rotation.
-
rotate
public void rotate(float[] p, float[] v, float[] center) Rotates the given p point by changing its coordinates.- Parameters:
p
- A point/vector to rotate.v
- Measurement of the rotation around the 3 axis, x, y, z.center
- Center of the rotation.
-
rotate
public void rotate(int p, float[] v, float[] center) Rotates the given p point by changing its coordinates.- Parameters:
p
- A point/vector to rotate given as a GeomCalc vector.v
- Measurement of the rotation around the 3 axis, x, y, z.center
- Center of the rotation.
-
resize
public void resize(double x, double y, double z) Resizes the component according to the given factors in each directions. -
isControllable
A component must return true if it allows itself to be controlled by the given type controller.- Parameters:
type
- "Shift", "Rotate", "Resize"- Returns:
- is the component aloowed to be controlled or not
-
getBoundingBox
Returns the smallest box containing the graphic component.- Returns:
- BoundingBox
-
getBoundingSphereRadius
public double getBoundingSphereRadius()Returns the radius of the bounding sphere of the component.- Returns:
- radius in Angstroms
-
getRenderingQuality
public int getRenderingQuality()Returns the actual rendering quality of the component. -
getCoordinates
public void getCoordinates(float[] c) Gets the coordinates of the previously picked but not yet processed part if there is any in the given preallocated array.- Parameters:
c
- allocated array where coordinates will be put
-
getCoordinates
Gets the coordinates of the given ComponentElement in the given preallocated array.- Parameters:
element
- specific part of the componentc
- allocated array where coordinates will be put
-
getDescription
Returs the short description of the component or of the previously picked but not yet processed part if there is any or the description of the whole component.- Returns:
- short description as
String
-
getDescription
Returs the short description of the given part of the component.- Parameters:
element
- specific part of the component- Returns:
- short description as
String
-
getLabelInformation
Labels will be created associated to this GraphicComponent if the component supports the given labeltype, and returns arbitrary numbers of ComponentElements with correct coordinates and description to create a label.- Parameters:
onlyOnHeavyAtoms
- label info needed only for heavy atoms.- Returns:
- array of ComponentElements to create labels to
-
getLabelInformation
-
getComponentElement
Returns the previously picked but unprocessed ComponentElement or the whole component as a ComponentElement, if no picking happened.- Returns:
- picked part of the component
-
getUsableObject
public chemaxon.marvin.space.UsableObject getUsableObject(chemaxon.marvin.space.UOID id) Returns the component that the given UOID identifies.- Parameters:
id
- identifier of the component or a part of the component- Returns:
- the component or the specific part of the component
-
locateObject
public double locateObject(int x, int y) Picking action at x, y coordinates, returns the z coordinate of the nearest picked item, or -1.- Parameters:
x
- window coordinate of the mousey
- window coordinate of the mouse- Returns:
- z coordinate of the nearest picked object
-
touchObject
protected double touchObject(int hits) Returns the z coordinate of the nearest component. This is exactly the component having the maximum z coordinate, because we are looking down the negative z axis.- Parameters:
hits
- Number of hits at the previous hit.- Returns:
- z coordinate of the nearest picked object
-
pickObject
protected void pickObject(int offset, double[] maxZ, float[] modelview) SetspickedItem
to be the picked part of the component.- Parameters:
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.
-
isSelected
public boolean isSelected()Tells whether the component is being selected or not.- Specified by:
isSelected
in interfacechemaxon.marvin.space.UsableObject
- Returns:
- selection state of the component
-
isSelected
Tells whether a part of the component is selected. By default, works the same asisSelected()
.- Parameters:
element
- specific part of the component- Returns:
- selection state of the element
-
hasSelectedElements
public boolean hasSelectedElements()Tells whether the component has some selected parts. By default, works the same asisSelected()
- Returns:
- is any part of the component selected
-
select
public void select()Sets the component to be selected. See alsounSelect()
.- Specified by:
select
in interfacechemaxon.marvin.space.UsableObject
-
select
Sets the specific part of the component to be selected. Note, that the whole component can also be selected with this, and this is the default behaviour as well.- Parameters:
element
- specific part of the component
-
selectComponentElementsInside
The component will be selected if it is inside the given box.- Parameters:
bb
- given box represented by aBoundingBox
-
unSelect
public void unSelect()Sets the component not to be selected.- Specified by:
unSelect
in interfacechemaxon.marvin.space.UsableObject
-
unSelect
Sets the specific part of the component not to be selected. Note, that the whole component can also be unselected with this, and this is the default behaviour as well.- Parameters:
element
- specific part of the component
-
invertSelection
public void invertSelection()Sets the previously picked but unprocessed element to be selected if it was not set and vice versa. -
invertSelection
Sets the the given part of the component to be selected if it was not set and vice versa. By default it works the same as invertSelection().- Parameters:
element
- specific part of the component
-
extendSelection
public void extendSelection()Sets the previously picked but unprocessed element to be selected, and leaves other parts as they are. -
extendSelection
Sets the the given part of the component to be selected, and leaves other parts as they are. By default it works the same as select().- Parameters:
element
- specific part of the component
-
exclusiveSelection
public void exclusiveSelection()Sets the previously picked but unprocessed element to be selected, and sets every other parts not to be selected. -
exclusiveSelection
Sets the the given part of the component to be selected, and sets every other parts not to be selected. By default it works the same asselect()
.- Parameters:
element
- specific part of the component
-
cleanup
public void cleanup()
-