@PublicAPI public class PositionMonitor extends Monitor
Modifier and Type | Field and Description |
---|---|
protected float[] |
position |
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
Constructor and Description |
---|
PositionMonitor()
Creates a new instance of PositionMonitor
|
Modifier and Type | Method and Description |
---|---|
void |
control(int z)
Causes the monitor's controll to take action with 1 parameter.
|
void |
control(int x,
int y)
Causes the monitor's controll to take action with 2 parameters.
|
void |
draw()
Draws nothing.
|
void |
draw2DPart()
Draws the Control of the PositionMonitor.
|
GraphicComponent |
getComponent()
Returns the GraphicComponent of the only selected item.
|
Control |
getControl()
Returns the control of this monitor.
|
void |
getCoordinates(ComponentElement item,
float[] c)
Returns the coordinates of the selected item.
|
void |
getCoordinates(float[] c)
Returns the coordinates of the selected item.
|
int |
getPosition()
Returns the monitor's position.
|
boolean |
has2DPart()
Returns true, because the Control is always drawn in plane.
|
boolean |
isVisible(ComponentElement item)
Returns true, because a PositionMonitor cannot be hidden.
|
double |
locateObject(int x,
int y)
Pickes the control in x, y position.
|
int |
maximumItemCount()
Returns 1, because this is the maximun number of selected elements.
|
void |
refresh()
The monitor refreshes its coordinates from the selected item's coordinates.
|
void |
selectItem(ComponentElement item)
Parameter item will be the selected item of the monitor.
|
void |
selectItem(GraphicComponent gc)
The given component will be the selected item of the monitor.
|
void |
setControl(Control control)
Sets the control of the monitor, and the center of the control to the center of the monitor.
|
void |
setPosition(float[] position)
Sets the monitor's position
|
void |
setPosition(float x,
float y,
float z)
Sets the monitor's position
|
clear, getSelectedElements, hasControl, hasInvisibleItem, hasTransparentPart, isFull, isVisible, onRemoveGraphicComponent, pickedIndicator, receiveNotificationOnCoordinateChange, receiveNotificationOnInvisibility, receiveNotificationOnVisibility, refersTo, unSelect
addDrawProperties, associate, cleanup, drawBoundingBox, drawCoordinateAxes, drawSelection, drawTransparentPart, exclusiveSelection, exclusiveSelection, extendSelection, extendSelection, fadeSelected, fadeUnselected, getAssociatedComponents, getBoundingBox, getBoundingSphereRadius, getCell, getColor, getComponentElement, getDescription, getDescription, getDrawProperties, getDrawProperty, getGraphicComponent, getId, getLabelInformation, getLabelInformation, getName, getRenderingQuality, getUsableObject, getZCoordinateTo2DPart, glColor, hasSelectedElements, hideSelected, hideUnselected, invertSelection, invertSelection, isControllable, isGraphicComponent, isSelected, isSelected, 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
public PositionMonitor()
public void selectItem(ComponentElement item)
selectItem
in class Monitor
public void selectItem(GraphicComponent gc)
public GraphicComponent getComponent()
public void refresh()
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 int maximumItemCount()
maximumItemCount
in class Monitor
public int getPosition()
public void setPosition(float x, float y, float z)
public void setPosition(float[] position)
public boolean isVisible(ComponentElement item)
isVisible
in class GraphicComponent
item
- part of the componentpublic void draw()
draw
in class GraphicComponent
public void draw2DPart()
draw2DPart
in class GraphicComponent
public boolean has2DPart()
has2DPart
in class GraphicComponent
public Control getControl()
public void setControl(Control control)
public void control(int x, int y)
public void control(int z)
public double locateObject(int x, int y)
locateObject
in class GraphicComponent
x
- window coordinate of the mousey
- window coordinate of the mouse