public class Anchor3D extends Overlay implements VtkPainter, java.lang.Runnable
Modifier and Type | Class and Description |
---|---|
static class |
Anchor3D.Anchor3DEvent |
static interface |
Anchor3D.Anchor3DPositionListener
Interface to listen Anchor3D position change
|
Overlay.OverlayPriority
Modifier and Type | Field and Description |
---|---|
static java.awt.Color |
DEFAULT_NORMAL_COLOR |
static int |
DEFAULT_RAY |
static java.awt.Color |
DEFAULT_SELECTED_COLOR |
ID_CANBEREMOVED, ID_CLASSNAME, ID_ID, ID_NAME, ID_OVERLAY, ID_PRIORITY, ID_READONLY, ID_RECEIVEKEYEVENTONHIDDEN, ID_RECEIVEMOUSEEVENTONHIDDEN, LOD_SMALL, LOD_TINY, PROPERTY_CANBEREMOVED, PROPERTY_NAME, PROPERTY_PERSISTENT, PROPERTY_PRIORITY, PROPERTY_READONLY, PROPERTY_RECEIVEKEYEVENTONHIDDEN, PROPERTY_RECEIVEMOUSEEVENTONHIDDEN
Constructor and Description |
---|
Anchor3D() |
Anchor3D(double x,
double y,
double z) |
Anchor3D(double x,
double y,
double z,
java.awt.Color color,
java.awt.Color selectedColor) |
Anchor3D(double x,
double y,
double z,
int ray) |
Anchor3D(double x,
double y,
double z,
int ray,
java.awt.Color color,
java.awt.Color selectedColor) |
Modifier and Type | Method and Description |
---|---|
void |
addPositionListener(Anchor3D.Anchor3DPositionListener listener) |
java.awt.Color |
getColor() |
Point3D |
getPosition()
Get anchor position
|
Point3D |
getPositionInternal()
Get anchor position (return the internal reference)
|
vtk.vtkProp[] |
getProps()
Returns the VTK actors for this painter.
|
int |
getRay() |
java.awt.Color |
getSelectedColor() |
double |
getX() |
double |
getY() |
double |
getZ() |
boolean |
isOver(IcyCanvas canvas,
Point3D imagePoint)
Returns
true if specified Point3D is over the anchor in the specified canvas |
boolean |
isSelected() |
boolean |
isVisible() |
void |
keyPressed(java.awt.event.KeyEvent e,
Point5D.Double imagePoint,
IcyCanvas canvas)
Key press event forwarded to the overlay.
|
void |
keyReleased(java.awt.event.KeyEvent e,
Point5D.Double imagePoint,
IcyCanvas canvas)
Key release event forwarded to the overlay.
|
boolean |
loadFromXML(org.w3c.dom.Node node)
LOAD
|
boolean |
loadPositionFromXML(org.w3c.dom.Node node) |
void |
mouseDrag(java.awt.event.MouseEvent e,
Point5D.Double imagePoint,
IcyCanvas canvas)
Mouse drag event forwarded to the overlay.
|
void |
mouseMove(java.awt.event.MouseEvent e,
Point5D.Double imagePoint,
IcyCanvas canvas)
Mouse move event forwarded to the overlay.
|
void |
mousePressed(java.awt.event.MouseEvent e,
Point5D.Double imagePoint,
IcyCanvas canvas)
Mouse press event forwarded to the overlay.
|
void |
mouseReleased(java.awt.event.MouseEvent e,
Point5D.Double imagePoint,
IcyCanvas canvas)
Mouse release event forwarded to the overlay.
|
void |
onChanged(CollapsibleEvent object)
fire changed event
|
void |
paint(java.awt.Graphics2D g,
Sequence sequence,
IcyCanvas canvas)
Paint method called to draw the overlay.
|
void |
paint(java.awt.Graphics2D g,
Sequence sequence,
IcyCanvas canvas,
boolean simplified) |
void |
removePositionListener(Anchor3D.Anchor3DPositionListener listener) |
void |
run() |
boolean |
savePositionToXML(org.w3c.dom.Node node) |
boolean |
saveToXML(org.w3c.dom.Node node)
SAVE
|
void |
setColor(java.awt.Color value)
Sets the color
|
void |
setPosition(double x,
double y,
double z)
Sets anchor position
|
void |
setPosition(Point3D p)
Sets anchor position
|
void |
setRay(int value)
Sets the ray
|
void |
setSelected(boolean value)
Sets the
selected state |
void |
setSelectedColor(java.awt.Color value)
Sets the
selected state color |
void |
setVisible(boolean value) |
void |
setX(double value)
Sets the X coordinate position
|
void |
setY(double value)
Sets the Y coordinate position
|
void |
setZ(double value)
Sets the Z coordinate position
|
void |
translate(double dx,
double dy,
double dz)
Performs a translation on the anchor position
|
addOverlayListener, attachTo, beginUpdate, changed, compareTo, createFromXML, detachFrom, endUpdate, getAttachedCanvas, getCanBeRemoved, getName, getOptionsPanel, getOverlayCount, getPriority, getReceiveKeyEventOnHidden, getReceiveMouseEventOnHidden, getSequences, isAttached, isFixed, isPersistent, isReadOnly, isUpdating, keyPressed, keyReleased, loadFromXML, loadOverlaysFromXML, mouseClick, mouseClick, mouseDrag, mouseEntered, mouseEntered, mouseExited, mouseExited, mouseMove, mousePressed, mouseReleased, mouseWheelMoved, mouseWheelMoved, painterChanged, propertyChanged, remove, removeOverlayListener, saveOverlaysToXML, setCanBeRemoved, setFixed, setName, setPersistent, setPriority, setReadOnly, setReceiveKeyEventOnHidden, setReceiveMouseEventOnHidden
public static final int DEFAULT_RAY
public static final java.awt.Color DEFAULT_NORMAL_COLOR
public static final java.awt.Color DEFAULT_SELECTED_COLOR
public Anchor3D(double x, double y, double z, int ray, java.awt.Color color, java.awt.Color selectedColor)
public Anchor3D(double x, double y, double z, java.awt.Color color, java.awt.Color selectedColor)
public Anchor3D(double x, double y, double z, int ray)
public Anchor3D(double x, double y, double z)
public Anchor3D()
public double getX()
public void setX(double value)
public double getY()
public void setY(double value)
public double getZ()
public void setZ(double value)
public Point3D getPositionInternal()
public Point3D getPosition()
public void setPosition(Point3D p)
public void setPosition(double x, double y, double z)
public void translate(double dx, double dy, double dz)
public int getRay()
public void setRay(int value)
public java.awt.Color getColor()
public void setColor(java.awt.Color value)
public java.awt.Color getSelectedColor()
selected
state colorpublic void setSelectedColor(java.awt.Color value)
selected
state colorpublic boolean isSelected()
selected
statepublic void setSelected(boolean value)
selected
statepublic boolean isVisible()
public void setVisible(boolean value)
value
- the visible to setpublic boolean isOver(IcyCanvas canvas, Point3D imagePoint)
true
if specified Point3D is over the anchor in the specified canvaspublic void onChanged(CollapsibleEvent object)
ChangeListener
onChanged
in interface ChangeListener
onChanged
in class Overlay
public void addPositionListener(Anchor3D.Anchor3DPositionListener listener)
public void removePositionListener(Anchor3D.Anchor3DPositionListener listener)
public vtk.vtkProp[] getProps()
VtkPainter
getProps
in interface VtkPainter
public void paint(java.awt.Graphics2D g, Sequence sequence, IcyCanvas canvas)
Overlay
public void paint(java.awt.Graphics2D g, Sequence sequence, IcyCanvas canvas, boolean simplified)
public void keyPressed(java.awt.event.KeyEvent e, Point5D.Double imagePoint, IcyCanvas canvas)
Overlay
keyPressed
in class Overlay
e
- key eventimagePoint
- mouse position (image coordinates)canvas
- icy canvaspublic void keyReleased(java.awt.event.KeyEvent e, Point5D.Double imagePoint, IcyCanvas canvas)
Overlay
keyReleased
in class Overlay
e
- key eventimagePoint
- mouse position (image coordinates)canvas
- icy canvaspublic void mousePressed(java.awt.event.MouseEvent e, Point5D.Double imagePoint, IcyCanvas canvas)
Overlay
mousePressed
in class Overlay
e
- mouse eventimagePoint
- mouse position (image coordinates)canvas
- icy canvaspublic void mouseReleased(java.awt.event.MouseEvent e, Point5D.Double imagePoint, IcyCanvas canvas)
Overlay
mouseReleased
in class Overlay
e
- mouse eventimagePoint
- mouse position (image coordinates)canvas
- icy canvaspublic void mouseDrag(java.awt.event.MouseEvent e, Point5D.Double imagePoint, IcyCanvas canvas)
Overlay
public void mouseMove(java.awt.event.MouseEvent e, Point5D.Double imagePoint, IcyCanvas canvas)
Overlay
public void run()
run
in interface java.lang.Runnable
public boolean loadPositionFromXML(org.w3c.dom.Node node)
public boolean savePositionToXML(org.w3c.dom.Node node)
public boolean loadFromXML(org.w3c.dom.Node node)
XMLPersistent
loadFromXML
in interface XMLPersistent
loadFromXML
in class Overlay
public boolean saveToXML(org.w3c.dom.Node node)
XMLPersistent
saveToXML
in interface XMLPersistent
saveToXML
in class Overlay