|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.geom.Point2D
java.awt.Point
com.xinapse.multisliceimage.roi.Handle
public abstract class Handle
A Class representing an ROI Handle, used for changing the shape of an ROI.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.geom.Point2D |
|---|
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float |
| Field Summary | |
|---|---|
static int |
SIZE_LARGE
The size of Handles (in screen pixels) when they are drawn large. |
static int |
SIZE_SMALL
The size of Handles (in screen pixels) when they are drawn small. |
| Fields inherited from class java.awt.Point |
|---|
x, y |
| Constructor Summary | |
|---|---|
Handle(int x,
int y,
int size)
Creates a new Handle at the location (x,y) with the given size in screen pixels. |
|
| Method Summary | |
|---|---|
void |
draw(java.awt.Graphics g)
Draws this Handle using the given Graphics context. |
static java.awt.Color |
getBorderColor()
Returns the Color with which ROI Handle borders are to be drawn. |
static java.awt.Color |
getColor()
Returns the Color with which ROI Handles are to be drawn. |
int |
getSize()
Returns the size of this ROI in screen pixels. |
static int |
getSize(int separation)
Returns a suitable size of Handle for drawing an ROI of the given size. |
static int |
getSize(int objectWidth,
int objectHeight)
Returns a suitable size of Handle for drawing an ROI of the given width and height. |
boolean |
pointOver(java.awt.Point point)
Returns true if the specified point is over this handle; false otherwise. |
static void |
setBorderColor(java.awt.Color c)
Sets the Color with which ROI Handle borders are to be drawn. |
static void |
setColor(java.awt.Color c)
Sets the Color with which ROI Handles are to be drawn. |
void |
setSize(int size)
Sets the size of this ROI in screen pixels. |
abstract java.lang.String |
toString()
Returns a java.lang.String describing this Handle. |
| Methods inherited from class java.awt.Point |
|---|
equals, getLocation, getX, getY, move, setLocation, setLocation, setLocation, translate |
| Methods inherited from class java.awt.geom.Point2D |
|---|
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocation |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int SIZE_SMALL
public static final int SIZE_LARGE
| Constructor Detail |
|---|
public Handle(int x,
int y,
int size)
x - the x location of the Handle in screen coords.y - the y location of the Handle in screen coords.size - the size of the Handle in screen pixels.| Method Detail |
|---|
public final void setSize(int size)
size - the new size of this ROI in screen pixels.public final int getSize()
public boolean pointOver(java.awt.Point point)
public void draw(java.awt.Graphics g)
g - the Graphics object on which the drawing operation is to be peformed.
public static int getSize(int objectWidth,
int objectHeight)
objectWidth - the width of the ROI to which this handle is to be attached
in screen pixels.objectHeight - the height of the ROI to which this handle is to be attached
in screen pixels.
public static int getSize(int separation)
separation - the distance in screen pixels bewtween adjacent vertices of an ROI.
public static java.awt.Color getColor()
public static java.awt.Color getBorderColor()
public static void setColor(java.awt.Color c)
c - the new Color with which ROI Handles are to be drawn.public static void setBorderColor(java.awt.Color c)
c - the new Color with which ROI Handle borders are to be drawn.public abstract java.lang.String toString()
toString in class java.awt.Point
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||