Package chemaxon.marvin.space.monitor
Class AngleMonitor
- java.lang.Object
-
- chemaxon.marvin.space.GraphicComponent
-
- chemaxon.marvin.space.monitor.Monitor
-
- chemaxon.marvin.space.monitor.MeasurementMonitor
-
- chemaxon.marvin.space.monitor.AngleMonitor
-
- All Implemented Interfaces:
chemaxon.marvin.space.UsableObject
@PublicAPI public class AngleMonitor extends MeasurementMonitor
Monitor for measuring angle between 3 components, the first 2 determines a line, the second 2 another. The angle will be determined by the 2 lines. Component can be anyGraphicComponent
with a propergetCoordinates()
function returning a vector.- Since:
- Marvin 4.0.2
-
-
Field Summary
-
Fields inherited from class chemaxon.marvin.space.monitor.MeasurementMonitor
label, measure, measurement, textPosWindow
-
Fields inherited from class chemaxon.marvin.space.monitor.Monitor
control, mode, selectedItemCoordinates, selectedItems, selectionPointer
-
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
Constructors Constructor Description AngleMonitor()
Creates a new instance of AngleMonitor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
draw()
Draws the anglemonitor as lines between the components, and an arc between the lines.void
getCoordinates(float[] c)
Returns the centroid of the selected elements.int
maximumItemCount()
Returns 3 as the angle is measured between 3 elements.double
measurement()
Does the angle measurement.-
Methods inherited from class chemaxon.marvin.space.monitor.MeasurementMonitor
getCoordinates, getDescription, getDescription, getMonitorColor, receiveNotificationOnCoordinateChange, refresh, selectItem, setLabel
-
Methods inherited from class chemaxon.marvin.space.monitor.Monitor
clear, getSelectedElements, hasControl, hasInvisibleItem, hasTransparentPart, isFull, isVisible, onRemoveGraphicComponent, pickedIndicator, receiveNotificationOnInvisibility, receiveNotificationOnVisibility, refersTo, unSelect
-
Methods inherited from class chemaxon.marvin.space.GraphicComponent
addDrawProperties, associate, cleanup, draw2DPart, drawBoundingBox, drawCoordinateAxes, drawSelection, drawTransparentPart, exclusiveSelection, exclusiveSelection, extendSelection, extendSelection, fadeSelected, fadeUnselected, getAssociatedComponents, getBoundingBox, getBoundingSphereRadius, getCell, getColor, getComponentElement, getDrawProperties, getDrawProperty, getGraphicComponent, getId, getLabelInformation, getLabelInformation, getName, getRenderingQuality, getUsableObject, getZCoordinateTo2DPart, glColor, has2DPart, hasSelectedElements, hideSelected, hideUnselected, invertSelection, invertSelection, isControllable, isGraphicComponent, isSelected, isSelected, isVisible, locateObject, notifyCoordinateChange, notifyInvisibility, notifySelection, notifyUnSelection, notifyVisibility, pickObject, projectVector, receiveNotificationOnSelection, receiveNotificationOnUnSelection, removeAssociation, resize, rotate, rotate, rotate, select, select, selectComponentElementsInside, setColor, setColor, setColor, setColor, setDrawProperties, setDrawProperty, setGL, setMotionMode, setName, setProgressBar, setRenderingQuality, setRotateMatrix, setVisible, showFaded, storeDrawProperty, toString, touchObject, translate, unSelect
-
-
-
-
Method Detail
-
measurement
public double measurement()
Does the angle measurement.- Specified by:
measurement
in classMeasurementMonitor
- Returns:
- the angle in degrees
-
maximumItemCount
public int maximumItemCount()
Returns 3 as the angle is measured between 3 elements.- Specified by:
maximumItemCount
in classMonitor
-
getCoordinates
public void getCoordinates(float[] c)
Returns the centroid of the selected elements.- Overrides:
getCoordinates
in classMeasurementMonitor
- Parameters:
c
- allocated array where coordinates will be put
-
draw
public void draw()
Draws the anglemonitor as lines between the components, and an arc between the lines.- Overrides:
draw
in classGraphicComponent
-
-