|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jaxodraw.gui.handle.AbstractJaxoHandle
public abstract class AbstractJaxoHandle
An abstract class for handles.
| Field Summary | |
|---|---|
static Color |
DEFAULT_COLOR
The default color of a handle: JaxoColor.RED. |
static Color |
DEFAULT_FILL_COLOR
The default fill color of a handle: JaxoColor.GRAYSCALE150. |
static Color |
DEFAULT_SECONDARY_COLOR
The default secondary color of a handle: JaxoColor.NAVY_BLUE. |
static int |
DEFAULT_SIZE
The default size of a handle. |
static Stroke |
DEFAULT_STROKE
The default stroke for a handle. |
| Constructor Summary | |
|---|---|
AbstractJaxoHandle()
|
|
| Method Summary | |
|---|---|
Rectangle |
getBounds(int x,
int y)
Return an enclosing Rectangle that completely contains this handle at the given position. |
Color |
getColor()
Returns the color of this handle. |
Color |
getFillColor()
Returns the fill color of this handle. |
Color |
getSecondaryColor()
Returns the secondary color of this handle. |
int |
getSize()
The handle size. |
Stroke |
getStroke()
Returns the stroke of this handle. |
void |
paint(JaxoGraphics2D g2,
int x,
int y)
Paints an unmarked handle at (x, y). |
void |
paint(JaxoGraphics2D g2,
int x,
int y,
boolean marked)
Paints a handle at (x, y). |
void |
paint(JaxoGraphics2D g2,
int x,
int y,
boolean marked,
boolean secondary)
Paint the handle at a given position. |
abstract void |
paint(JaxoGraphics2D g2,
int x,
int y,
boolean marked,
Color handleColor)
Paints the handle to the given graphics context. |
void |
paintSecondary(JaxoGraphics2D g2,
int x,
int y)
Paints an unmarked handle in secondary color at (x, y). |
void |
paintSecondary(JaxoGraphics2D g2,
int x,
int y,
boolean marked)
Paints a handle in secondary color at (x, y). |
void |
setColor(Color c)
Sets the color of this handle. |
void |
setFillColor(Color c)
Sets the fill color of this fhandle. |
void |
setSecondaryColor(Color c)
Sets the secondary color of this handle. |
void |
setSize(int value)
Sets the handle size. |
void |
setStroke(Stroke newStroke)
Sets the stroke of this handle. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.jaxodraw.object.JaxoHandle |
|---|
contains |
| Field Detail |
|---|
public static final int DEFAULT_SIZE
public static final Stroke DEFAULT_STROKE
public static final Color DEFAULT_COLOR
public static final Color DEFAULT_SECONDARY_COLOR
public static final Color DEFAULT_FILL_COLOR
| Constructor Detail |
|---|
public AbstractJaxoHandle()
| Method Detail |
|---|
public final Color getColor()
public final void setColor(Color c)
c - The color of this handle.public final Color getFillColor()
public final void setFillColor(Color c)
c - The color to be set as fill color.public final Color getSecondaryColor()
public final void setSecondaryColor(Color c)
c - The secondary color of this handle.public final int getSize()
public void setSize(int value)
value - The new size.public final Stroke getStroke()
public final void setStroke(Stroke newStroke)
newStroke - The stroke property of thishandle.
public void paint(JaxoGraphics2D g2,
int x,
int y)
g2 - The graphics context to paint to.x - The x position of the handle.y - The y position of the handle.
public void paint(JaxoGraphics2D g2,
int x,
int y,
boolean marked)
g2 - The graphics context to paint to.x - The x position of the handle.y - The y position of the handle.marked - True if the handle should be marked (selected).
public void paint(JaxoGraphics2D g2,
int x,
int y,
boolean marked,
boolean secondary)
paint in interface JaxoHandleg2 - The graphics context to paint to.x - The x position of the handle.y - The y position of the handle.marked - True if the handle should be painted as marked.
A marked handle is one that has been selected, eg for an edit operation.secondary - True if this is a secondary handle. A secondary handle
is one that cannot be selected in the current context.
public void paintSecondary(JaxoGraphics2D g2,
int x,
int y)
g2 - The graphics context to paint to.x - The x position of the handle.y - The y position of the handle.
public void paintSecondary(JaxoGraphics2D g2,
int x,
int y,
boolean marked)
g2 - The graphics context to paint to.x - The x position of the handle.y - The y position of the handle.marked - True if the handle should be marked (selected).
public abstract void paint(JaxoGraphics2D g2,
int x,
int y,
boolean marked,
Color handleColor)
g2 - The graphics context to paint to.x - The x position of the handle.y - The y position of the handle.marked - True if the handle should be marked (selected).handleColor - The color of the handle.
public Rectangle getBounds(int x,
int y)
getSize() around the handle point.
getBounds in interface JaxoHandlex - the x position of this handle.y - the x position of this handle.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||