@PublicAPI public abstract class Monitor extends GraphicComponent
Monitor
is for "watching" something in the scene.
The direct subclasses are MeasurementMonitor
, PositionMonitor
and Label
.MeasurementMonitor
watches some objects, and measures something between them.PositionMonitor
is watching a location as a center of a transformation.Label
is watching an object and describes it.Modifier and Type | Field and Description |
---|---|
protected Control |
control |
protected int |
mode |
protected int[] |
selectedItemCoordinates |
protected ComponentElement[] |
selectedItems
Storage of the items of monitoring.
|
protected int |
selectionPointer
Points to the next empty space in selectedItems.
|
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 |
Monitor()
Creates a new instance of
Monitor . |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Deletes all items from selectedItems.
|
ComponentElement[] |
getSelectedElements()
Returns the set of the monitored items.
|
boolean |
hasControl()
Returns true if the monitor has a control.
|
boolean |
hasInvisibleItem()
Retruns true if any of the selected elements is hidden.
|
boolean |
hasTransparentPart()
In wire mode (now only this is available) monitors are drawn with blending enabled.
|
boolean |
isFull()
Returns true if the monitor is full and can measure.
|
boolean |
isVisible()
A monitor is visible if all of its selected components are visible,
and it is not hidden explicitly.
|
abstract int |
maximumItemCount()
Returns the number of items necessary for monitoring.
|
void |
onRemoveGraphicComponent() |
double |
pickedIndicator()
Monitors do not really have z coordinate, they are the nearer to us.
|
void |
receiveNotificationOnCoordinateChange(GraphicComponent gc)
Gets notification from its selected components if their coordinates have been
changed.
|
void |
receiveNotificationOnInvisibility(GraphicComponent gc)
If the component to that this monitor is assigned becomes hidden,
this monitor will also behave so.
|
void |
receiveNotificationOnVisibility(GraphicComponent gc)
If the component to that this monitor is assigned becomes visible,
this monitor will also behave so.
|
boolean |
refersTo(GraphicComponent component)
Retruns true if component is between the selected elements.
|
void |
selectItem(ComponentElement item)
Puts item to the selection.
|
void |
unSelect()
Sets the component not to be selected.
|
addDrawProperties, associate, cleanup, draw, draw2DPart, drawBoundingBox, drawCoordinateAxes, drawSelection, drawTransparentPart, exclusiveSelection, exclusiveSelection, extendSelection, extendSelection, fadeSelected, fadeUnselected, getAssociatedComponents, getBoundingBox, getBoundingSphereRadius, getCell, getColor, getComponentElement, getCoordinates, getCoordinates, getDescription, getDescription, 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 ComponentElement[] selectedItems
protected int[] selectedItemCoordinates
protected int selectionPointer
protected Control control
protected int mode
protected Monitor()
Monitor
. Initializes selectedItems with
a maximum item count, and becames a GraphicComponent which does not
modify the origin of the Cell it is in.public void onRemoveGraphicComponent()
onRemoveGraphicComponent
in class GraphicComponent
public abstract int maximumItemCount()
public ComponentElement[] getSelectedElements()
public void selectItem(ComponentElement item)
public void receiveNotificationOnCoordinateChange(GraphicComponent gc)
receiveNotificationOnCoordinateChange
in class GraphicComponent
gc
- component changing coordinatespublic void receiveNotificationOnVisibility(GraphicComponent gc)
receiveNotificationOnVisibility
in class GraphicComponent
gc
- public void receiveNotificationOnInvisibility(GraphicComponent gc)
receiveNotificationOnInvisibility
in class GraphicComponent
gc
- public boolean isFull()
public boolean hasControl()
public void clear()
public boolean isVisible()
isVisible
in interface chemaxon.marvin.space.UsableObject
isVisible
in class GraphicComponent
public boolean hasInvisibleItem()
public boolean refersTo(GraphicComponent component)
public void unSelect()
unSelect
in interface chemaxon.marvin.space.UsableObject
unSelect
in class GraphicComponent
public double pickedIndicator()
locateObject()
returns the same as pickedIndicator()
,
then we say that the monitor was picked.public boolean hasTransparentPart()
hasTransparentPart
in class GraphicComponent