@PublicAPI public abstract class MeasurementMonitor extends Monitor
Monitor
that measures something on its elements. The measured value is supposed
to be drawn as a Label
by selecting this monitor as
the selected item of the label.Modifier and Type | Field and Description |
---|---|
protected Label |
label |
protected java.lang.String |
measure |
protected double |
measurement |
protected double[] |
textPosWindow |
control, mode, selectedItemCoordinates, selectedItems, selectionPointer
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
Modifier | Constructor and Description |
---|---|
protected |
MeasurementMonitor()
Creates a new instance of MeasureMonitor
|
Modifier and Type | Method and Description |
---|---|
void |
getCoordinates(ComponentElement item,
float[] c)
Returns the centroid of the selected elements.
|
void |
getCoordinates(float[] c)
Returns the centroid of the selected elements.
|
java.lang.String |
getDescription()
Returns the measurement as a description.
|
java.lang.String |
getDescription(ComponentElement element)
Returns the measurement as a description.
|
protected byte[] |
getMonitorColor() |
abstract double |
measurement()
Returns the measurement measured by the monitor as a double.
|
void |
receiveNotificationOnCoordinateChange(GraphicComponent gc)
Gets notification from its selected components if their coordinates have been
changed.
|
void |
refresh()
Deletes the position and the value of the measurement to recount.
|
void |
selectItem(ComponentElement item)
Puts the item to the selection and clears its description.
|
void |
setLabel(Label label)
Sets the Label of the monitor that is to display the measurement.
|
clear, getSelectedElements, hasControl, hasInvisibleItem, hasTransparentPart, isFull, isVisible, maximumItemCount, onRemoveGraphicComponent, pickedIndicator, receiveNotificationOnInvisibility, receiveNotificationOnVisibility, refersTo, unSelect
addDrawProperties, associate, cleanup, draw, 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
protected double measurement
protected double[] textPosWindow
protected java.lang.String measure
protected Label label
protected MeasurementMonitor()
public void setLabel(Label label)
label
- public void selectItem(ComponentElement item)
selectItem
in class Monitor
item
- item to selectpublic void receiveNotificationOnCoordinateChange(GraphicComponent gc)
receiveNotificationOnCoordinateChange
in class Monitor
gc
- component changing coordinatespublic abstract double measurement()
public void getCoordinates(float[] c)
getCoordinates
in class GraphicComponent
c
- allocated array where coordinates will be putpublic void getCoordinates(ComponentElement item, float[] c)
getCoordinates
in class GraphicComponent
item
- specific part of the componentc
- allocated array where coordinates will be putpublic java.lang.String getDescription()
getDescription
in class GraphicComponent
String
public java.lang.String getDescription(ComponentElement element)
getDescription
in class GraphicComponent
element
- specific part of the componentString
public void refresh()
protected byte[] getMonitorColor()