|
||||||||||
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 org.opensourcephysics.display.TitleText
public class TitleText
A text line that is offset relative to a drawing panel's display area.
Field Summary | |
---|---|
static int |
BOTTOM
|
static int |
CENTER
|
static int |
CUSTOM
|
static int |
LEFT
|
static int |
RIGHT
|
static int |
TOP
|
Fields inherited from class org.opensourcephysics.display.TextLine |
---|
ALGEBRAIC, SCIENTIFIC |
Constructor Summary | |
---|---|
TitleText(java.lang.String text)
TitleText draws a TextLine relative to a drawing panel's edge. |
Method Summary | |
---|---|
void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws the TextLine offset from the location. |
void |
setFont(java.awt.Font font)
Sets the font used to display the text. |
void |
setLocation(int location)
Sets the location of the text relative to a display area edge |
void |
setOffsets(int xoff,
int yoff)
Sets the x and y offsets. |
void |
setText(java.lang.String text)
Sets the text to be displayed. |
Methods inherited from class org.opensourcephysics.display.DrawableTextLine |
---|
getLoader, getX, getY, setPixelXY, setTheta, setX, setY |
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, setFontName, setFontSize, setFontStyle, setJustification |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CENTER
public static final int BOTTOM
public static final int LEFT
public static final int TOP
public static final int RIGHT
public static final int CUSTOM
Constructor Detail |
---|
public TitleText(java.lang.String text)
text
- StringMethod Detail |
---|
public void setOffsets(int xoff, int yoff)
xoff
- doubleyoff
- doublepublic void setLocation(int location)
location
- intpublic void setFont(java.awt.Font font)
setFont
in class TextLine
font
- Fontpublic void setText(java.lang.String text)
setText
in class TextLine
text
- Stringpublic void draw(DrawingPanel panel, java.awt.Graphics g)
draw
in interface Drawable
draw
in class DrawableTextLine
panel
- DrawingPanelg
- Graphics
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |