org.jplot2d.element
Interface TextComponent
-
- All Superinterfaces:
- Element, PComponent
- All Known Subinterfaces:
- CoordinateAnnotation, CoordinateAnnotationEx, SymbolAnnotation, SymbolAnnotationEx, Title, TitleEx
- All Known Implementing Classes:
- CoordinateAnnotationImpl, SymbolAnnotationImpl, TitleImpl
public interface TextComponent extends PComponent
A component who represent a text string. The text string can be a math element.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description HAligngetHAlign()java.lang.StringgetText()Returns the text string.VAligngetVAlign()voidsetHAlign(HAlign hAlign)Set the horizontal alignment.voidsetText(java.lang.String text)Defines the single line of text to be displayed.voidsetVAlign(VAlign vAlign)Set the vertical alignment.-
Methods inherited from interface org.jplot2d.element.PComponent
getBounds, getColor, getEffectiveFont, getFontName, getFontScale, getFontSize, getFontStyle, getLocation, getPaperTransform, getParent, getSelectableBounds, getSize, getZOrder, isCacheable, isSelectable, isVisible, setCacheable, setColor, setFont, setFontName, setFontScale, setFontSize, setFontStyle, setSelectable, setVisible, setZOrder
-
Methods inherited from interface org.jplot2d.element.Element
getEnvironment, getId
-
-
-
-
Method Detail
-
getText
java.lang.String getText()
Returns the text string.- Returns:
- a String
-
setText
void setText(java.lang.String text)
Defines the single line of text to be displayed. The string can be in TeX-like syntax. A pair of "$" mark into math mode and out math mode. In math mode, Greek letter can be inputed as \alpha, \beta, etc. Superscripts (up high) and subscripts (down low) can be inputed by using "^" and "_". Notice that ^ and _ apply only to the next single character. If you want several things to be superscripted or subscripted, just enclose them in braces. eg: "plain text $x_\alpha^{2y}$".- Parameters:
text-
-
getHAlign
HAlign getHAlign()
- Returns:
- the horizontal alignment.
-
setHAlign
void setHAlign(HAlign hAlign)
Set the horizontal alignment. The alignment can be LEFT, CENTER, or RIGHT. eg, LEFT means the title is on the left of the base point.- Parameters:
hAlign- the horizontal alignment.
-
getVAlign
VAlign getVAlign()
- Returns:
- the vertical alignment or null if not set.
-
setVAlign
void setVAlign(VAlign vAlign)
Set the vertical alignment. The alignment can be TOP, MIDDLE, or BOTTOM. eg, TOP means the title is on the top of the base point- Parameters:
vAlign- the vertical alignment.
-
-
DMelt 3.0 © DataMelt by jWork.ORG