chemaxon.marvin.space.monitor
Class DistanceMonitor

java.lang.Object
  extended by chemaxon.marvin.space.GraphicComponent
      extended by chemaxon.marvin.space.monitor.Monitor
          extended by chemaxon.marvin.space.monitor.MeasurementMonitor
              extended by chemaxon.marvin.space.monitor.DistanceMonitor
All Implemented Interfaces:
chemaxon.marvin.space.UsableObject

public class DistanceMonitor
extends MeasurementMonitor

Monitor for measuring distance between 2 components. Component can be any GraphicComponent with a proper getCoordinates() function returning a vector.

Since:
Marvin 4.0.2
Version:
MarvinSpace 1.0
Author:
Judit Papp

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
DistanceMonitor()
          Creates a new instance of DistanceMonitor
 
Method Summary
 void draw()
          Draws solid line between the measured elements.
 int maximumItemCount()
          Returns 2 as distance can be measured between 2 elements.
 double measurement()
          Measures the distance.
 
Methods inherited from class chemaxon.marvin.space.monitor.MeasurementMonitor
getCoordinates, 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, draw2DPart, drawBoundingBox, drawCoordinateAxes, drawSelection, drawTransparentPart, exclusiveSelection, exclusiveSelection, extendSelection, extendSelection, fadeSelected, fadeUnselected, getAssociatedComponents, getBoundingBox, getBoundingSphereRadius, getCell, getColor, getComponentElement, getDrawProperties, getDrawProperty, getGraphicComponent, getId, 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, setDrawProperties, setDrawProperty, setGL, setMotionMode, setName, setProgressBar, setRenderingQuality, setRotateMatrix, setVisible, showFaded, storeDrawProperty, toString, touchObject, translate, unSelect
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DistanceMonitor

public DistanceMonitor()
Creates a new instance of DistanceMonitor

Method Detail

maximumItemCount

public int maximumItemCount()
Returns 2 as distance can be measured between 2 elements.

Specified by:
maximumItemCount in class Monitor

measurement

public double measurement()
Measures the distance.

Specified by:
measurement in class MeasurementMonitor
Returns:
the distance in angstroms

draw

public void draw()
Draws solid line between the measured elements.

Overrides:
draw in class GraphicComponent