|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensourcephysics.display.Circle
org.opensourcephysics.display.MeasuredCircle
org.opensourcephysics.display.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()
|
|
InteractiveLabel(java.lang.String str)
|
Method Summary | |
void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws a representation of an object in a drawing panel. |
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)
Method Detail |
public void setXY(double _x, double _y)
Circle
setXY
in interface Interactive
setXY
in class Circle
_x
- _y
- 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()
public void setOffsetY(int offset)
offset
- intpublic int getOffsetY()
public void draw(DrawingPanel panel, java.awt.Graphics g)
Drawable
draw
in interface Drawable
draw
in class Circle
panel
- g
- 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 |