|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.display.TextLine org.opensourcephysics.display.DrawableTextLine
public class DrawableTextLine
DrawableTextLine draws short Strings with subscripts and superscripts.
Nested Class Summary | |
---|---|
protected static class |
DrawableTextLine.DrawableTextLineLoader
A class to save and load InteractiveArrow in an XMLControl. |
Field Summary | |
---|---|
protected boolean |
pixelXY
|
Fields inherited from class org.opensourcephysics.display.TextLine |
---|
ALGEBRAIC, ascent, background, CENTER, color, descent, font, fontname, fontsize, fontstyle, height, justification, leading, LEFT, lg, list, maxAscent, maxDescent, parse, RIGHT, SCIENTIFIC, script_fraction, sub_offset, sup_offset, text, width |
Constructor Summary | |
---|---|
DrawableTextLine(java.lang.String text,
double x,
double y)
Constructs a DrawableTextLine with the given text and location. |
Method Summary | |
---|---|
void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws the TextLine. |
static XML.ObjectLoader |
getLoader()
Gets the XML object loader for this class. |
double |
getX()
Gets the x coordinate. |
double |
getY()
Gets the y coordinate. |
void |
setPixelXY(boolean enable)
Sets the pixelPosition flag. |
void |
setTheta(double theta)
Sets the angle. |
void |
setX(double x)
Sets the x cooridinate. |
void |
setY(double y)
Sets the y cooridinate. |
Methods inherited from class org.opensourcephysics.display.TextLine |
---|
charWidth, copyState, copyState, drawText, drawText, getAscent, getBackground, getColor, getDescent, getFM, getFont, getFontName, getFontSize, getFontStyle, getHeight, getJustification, getLeading, getMaxAscent, getMaxDescent, getScriptFont, getStringBounds, getText, getWidth, isNull, log10, parseDouble, parseDouble, parseDouble, parseText, setBackground, setColor, setFont, setFontName, setFontSize, setFontStyle, setJustification, setText |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean pixelXY
Constructor Detail |
---|
public DrawableTextLine(java.lang.String text, double x, double y)
text
- Stringx
- doubley
- doubleMethod Detail |
---|
public void setPixelXY(boolean enable)
enable
- booleanpublic void setX(double x)
x
- doublepublic void setTheta(double theta)
theta
- doublepublic double getX()
public void setY(double y)
y
- doublepublic double getY()
public void draw(DrawingPanel panel, java.awt.Graphics g)
draw
in interface Drawable
panel
- DrawingPanelg
- Graphicspublic static XML.ObjectLoader getLoader()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |