Drawable, Interactive, Measurablepublic class InteractiveLabel extends MeasuredCircle implements Interactive
| Modifier and Type | Field | Description |
|---|---|---|
static int |
CENTER_LOCATION |
|
int |
connection_location |
|
protected java.awt.Font |
font |
|
protected java.lang.String |
fontname |
|
protected int |
fontsize |
|
protected int |
fontstyle |
|
protected java.lang.String |
text |
|
static int |
TOP_CENTER_LOCATION |
|
static int |
TOP_LEFT_LOCATION |
| Constructor | Description |
|---|---|
InteractiveLabel() |
Constructor InteractiveLabel
|
InteractiveLabel(java.lang.String str) |
Constructor InteractiveLabel
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
draw(DrawingPanel panel,
java.awt.Graphics g) |
Draws the circle.
|
Interactive |
findInteractive(DrawingPanel panel,
int xpix,
int ypix) |
|
int |
getOffsetX() |
Gets the label's offset in the x direction.
|
int |
getOffsetY() |
Gets the label's offset in the y direction.
|
boolean |
isEnabled() |
Gets the mouse interaction enabled property.
|
boolean |
isInside(DrawingPanel panel,
int xpix,
int ypix) |
Checks to see if this object is enabled and if the pixel coordinates are inside the drawable.
|
void |
resetBoxSize() |
|
void |
setConnectionPoint(int location) |
Sets the location of the connection point.
|
void |
setEnabled(boolean enabled) |
Enables mouse interactions
|
void |
setOffsetX(int offset) |
Sets the label's offset in the x direction.
|
void |
setOffsetY(int offset) |
Sets the label's offset in the y direction.
|
void |
setText(java.lang.String _text) |
|
void |
setText(java.lang.String _text,
double _x,
double _y) |
|
void |
setXY(double _x,
double _y) |
Sets the x and y coordinates.
|
getX, getY, setX, setYgetXMax, getXMin, getYMax, getYMin, isMeasuredgetLoader, getXMax, getXMin, getYMax, getYMin, isMeasured, setMeasuredpublic static final int TOP_LEFT_LOCATION
public static final int CENTER_LOCATION
public static final int TOP_CENTER_LOCATION
public int connection_location
protected java.lang.String text
protected java.awt.Font font
protected java.lang.String fontname
protected int fontsize
protected int fontstyle
public InteractiveLabel()
public InteractiveLabel(java.lang.String str)
str - public void setXY(double _x,
double _y)
CirclesetXY in interface InteractivesetXY in class Circlepublic void setText(java.lang.String _text)
public void setText(java.lang.String _text,
double _x,
double _y)
public void resetBoxSize()
public void setConnectionPoint(int location)
location - intpublic void setOffsetX(int offset)
offset - intpublic int getOffsetX()
offset - intpublic void setOffsetY(int offset)
offset - intpublic int getOffsetY()
offset - intpublic void draw(DrawingPanel panel, java.awt.Graphics g)
Circlepublic Interactive findInteractive(DrawingPanel panel, int xpix, int ypix)
findInteractive in interface Interactivepublic boolean isInside(DrawingPanel panel, int xpix, int ypix)
panel - xpix - ypix - public void setEnabled(boolean enabled)
setEnabled in interface Interactiveenabled - booleanpublic boolean isEnabled()
isEnabled in interface Interactive