|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.display.Circle org.opensourcephysics.display.MeasuredCircle org.opensourcephysics.display.InteractiveLabel
public class InteractiveLabel
Field Summary | |
---|---|
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
|
Fields inherited from class org.opensourcephysics.display.Circle |
---|
color, pixRadius, x, y |
Constructor Summary | |
---|---|
InteractiveLabel()
Constructor InteractiveLabel |
|
InteractiveLabel(java.lang.String str)
Constructor InteractiveLabel |
Method Summary | |
---|---|
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. |
Methods inherited from class org.opensourcephysics.display.MeasuredCircle |
---|
getLoader, getXMax, getXMin, getYMax, getYMin, isMeasured, setMeasured |
Methods inherited from class org.opensourcephysics.display.Circle |
---|
getX, getY, setX, setY, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.opensourcephysics.display.Interactive |
---|
getX, getY, setX, setY |
Methods inherited from interface org.opensourcephysics.display.Measurable |
---|
getXMax, getXMin, getYMax, getYMin, isMeasured |
Field Detail |
---|
public 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
Constructor Detail |
---|
public InteractiveLabel()
public InteractiveLabel(java.lang.String str)
str
- Method Detail |
---|
public void setXY(double _x, double _y)
Circle
setXY
in interface Interactive
setXY
in class Circle
public 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)
Circle
draw
in interface Drawable
draw
in class Circle
public Interactive findInteractive(DrawingPanel panel, int xpix, int ypix)
findInteractive
in interface Interactive
public boolean isInside(DrawingPanel panel, int xpix, int ypix)
panel
- xpix
- ypix
-
public void setEnabled(boolean enabled)
setEnabled
in interface Interactive
enabled
- booleanpublic boolean isEnabled()
isEnabled
in interface Interactive
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |