org.jplot2d.element
Interface AxisTitle
-
- All Superinterfaces:
- Element
- All Known Subinterfaces:
- AxisTitleEx
- All Known Implementing Classes:
- AxisTitleImpl
public interface AxisTitle extends Element
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 java.awt.ColorgetColor()Gets the foreground color of this component.java.awt.FontgetEffectiveFont()Returns the effective font of this axis title.java.lang.StringgetFontName()Returns the name of the font.floatgetFontScale()Returns the scale apply to parent's font size when font size is NaN.floatgetFontSize()Returns the Font size.intgetFontStyle()Returns the style of the font.java.lang.StringgetText()Returns the text string.booleanisVisible()Determines whether this title should be visible when its parent is visible.voidsetColor(java.awt.Color c)Sets the foreground color of this component.voidsetFont(java.awt.Font font)Sets the font name, style and size for this component.voidsetFontName(java.lang.String name)Apply the new font with the given namevoidsetFontScale(float scale)Sets the scale apply to parent's font size when font size is NaN.voidsetFontSize(float size)Sets a new size of the string.voidsetFontStyle(int style)Apply a new style to the font.voidsetText(java.lang.String text)Defines the single line of text to be displayed.voidsetVisible(boolean b)Shows or hides this title depending on the value of parameterb.-
Methods inherited from interface org.jplot2d.element.Element
getEnvironment, getId, getParent
-
-
-
-
Method Detail
-
isVisible
boolean isVisible()
Determines whether this title should be visible when its parent is visible. AxisTitle are initially visible.- Returns:
trueif the title is visible,falseotherwise- See Also:
setVisible(boolean)
-
setVisible
void setVisible(boolean b)
Shows or hides this title depending on the value of parameterb.- Parameters:
b- iftrue, shows this title; otherwise, hides this title- See Also:
isVisible()
-
getColor
java.awt.Color getColor()
Gets the foreground color of this component.- Returns:
- this component's foreground color; if this component does not have a foreground color, the foreground color of its parent is returned
- See Also:
setColor(java.awt.Color)
-
setColor
void setColor(java.awt.Color c)
Sets the foreground color of this component.- Parameters:
c- the color to become this component's foreground color; if this parameter isnullthen this component will inherit the foreground color of its parent- See Also:
getColor()
-
getFontName
java.lang.String getFontName()
Returns the name of the font.- Returns:
- the name of the font.
-
setFontName
void setFontName(java.lang.String name)
Apply the new font with the given name- Parameters:
name- the font name.
-
getFontStyle
int getFontStyle()
Returns the style of the font. The style can be PLAIN, BOLD, ITALIC, or BOLD+ITALIC.- Returns:
- the style of the font
- See Also:
Font
-
setFontStyle
void setFontStyle(int style)
Apply a new style to the font. The style can be PLAIN, BOLD, ITALIC, or BOLD+ITALIC.- Parameters:
style- the style to apply- See Also:
Font
-
getFontSize
float getFontSize()
Returns the Font size.- Returns:
- the font size.
-
setFontSize
void setFontSize(float size)
Sets a new size of the string.- Parameters:
size- the new size of the font.
-
getFontScale
float getFontScale()
Returns the scale apply to parent's font size when font size is NaN.- Returns:
- the font scale.
-
setFontScale
void setFontScale(float scale)
Sets the scale apply to parent's font size when font size is NaN.- Parameters:
scale- the scale
-
getEffectiveFont
java.awt.Font getEffectiveFont()
Returns the effective font of this axis title.- Returns:
- the effective font of this axis title
-
setFont
void setFont(java.awt.Font font)
Sets the font name, style and size for this component.- Parameters:
font- the desiredFontfor this component
-
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-
-
-
DMelt 3.0 © DataMelt by jWork.ORG