Package org.opensourcephysics.display
Class TitleText
java.lang.Object
org.opensourcephysics.display.TextLine
org.opensourcephysics.display.DrawableTextLine
org.opensourcephysics.display.TitleText
- All Implemented Interfaces:
- Drawable
A text line that is offset relative to a drawing panel's display area.
- Version:
- 1.0
- Author:
- Wolfgang Christian
- 
Nested Class SummaryNested classes/interfaces inherited from class org.opensourcephysics.display.DrawableTextLineDrawableTextLine.DrawableTextLineLoader
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class org.opensourcephysics.display.DrawableTextLinepixelXYFields inherited from class org.opensourcephysics.display.TextLineALGEBRAIC, ascent, background, color, descent, font, fontname, fontsize, fontstyle, height, justification, leading, lg, list, maxAscent, maxDescent, parse, SCIENTIFIC, script_fraction, sub_offset, sup_offset, text, trTL, width
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiddraw(DrawingPanel panel, Graphics g) Draws the TextLine offset from the location.voidSets the font used to display the text.voidsetLocation(int location) Sets the location of the text relative to a display area edgevoidsetOffsets(int xoff, int yoff) Sets the x and y offsets.voidSets the text to be displayed.Methods inherited from class org.opensourcephysics.display.DrawableTextLinegetLoader, getX, getY, setPixelXY, setTheta, setX, setYMethods inherited from class org.opensourcephysics.display.TextLinecharWidth, copyState, copyState, drawRotatedText, drawText, drawText, drawTextImageRotated, 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, setJustificationMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensourcephysics.display.DrawableisInteractive
- 
Field Details- 
CENTERpublic static final int CENTER- See Also:
 
- 
BOTTOMpublic static final int BOTTOM- See Also:
 
- 
LEFTpublic static final int LEFT- See Also:
 
- 
TOPpublic static final int TOP- See Also:
 
- 
RIGHTpublic static final int RIGHT- See Also:
 
- 
CUSTOMpublic static final int CUSTOM- See Also:
 
 
- 
- 
Constructor Details- 
TitleTextTitleText draws a TextLine relative to a drawing panel's edge.- Parameters:
- text- String
 
 
- 
- 
Method Details- 
setOffsetspublic void setOffsets(int xoff, int yoff) Sets the x and y offsets.- Parameters:
- xoff- double
- yoff- double
 
- 
setLocationpublic void setLocation(int location) Sets the location of the text relative to a display area edge- Parameters:
- location- int
 
- 
setFontSets the font used to display the text.
- 
setTextSets the text to be displayed.
- 
drawDraws the TextLine offset from the location.- Specified by:
- drawin interface- Drawable
- Overrides:
- drawin class- DrawableTextLine
- Parameters:
- panel- DrawingPanel
- g- Graphics
 
 
-