|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.marvin.space.GraphicComponent
chemaxon.marvin.space.monitor.Monitor
chemaxon.marvin.space.monitor.PositionMonitor
public class PositionMonitor
Monitors a specific location in the space and has a control that can change the coordinates of the monitored elements with a transformation. The specific location is the center of the transformation.
| Field Summary | |
|---|---|
protected float[] |
position
|
| 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 | |
|---|---|
PositionMonitor()
Creates a new instance of PositionMonitor |
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class chemaxon.marvin.space.monitor.Monitor |
|---|
clear, getSelectedElements, hasControl, hasInvisibleItem, hasTransparentPart, isFull, isVisible, onRemoveGraphicComponent, pickedIndicator, receiveNotificationOnCoordinateChange, receiveNotificationOnInvisibility, receiveNotificationOnVisibility, refersTo, unSelect |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected float[] position
| Constructor Detail |
|---|
public PositionMonitor()
| Method Detail |
|---|
public void selectItem(ComponentElement item)
selectItem in class Monitorpublic void selectItem(GraphicComponent gc)
public GraphicComponent getComponent()
public void refresh()
public void getCoordinates(float[] c)
getCoordinates in class GraphicComponentc - allocated array where coordinates will be put
public void getCoordinates(ComponentElement item,
float[] c)
getCoordinates in class GraphicComponentitem - specific part of the componentc - allocated array where coordinates will be putpublic int maximumItemCount()
maximumItemCount in class Monitorpublic int getPosition()
public void setPosition(float x,
float y,
float z)
public void setPosition(float[] position)
public boolean isVisible(ComponentElement item)
isVisible in class GraphicComponentitem - part of the component
public void draw()
draw in class GraphicComponentpublic void draw2DPart()
draw2DPart in class GraphicComponentpublic boolean has2DPart()
has2DPart in class GraphicComponentpublic 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 GraphicComponentx - window coordinate of the mousey - window coordinate of the mouse
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||