public class TextComponent extends Component
| Constructor and Description |
|---|
TextComponent() |
| Modifier and Type | Method and Description |
|---|---|
void |
draw(RenderContext context)
Draws this component in specified
RenderContext. |
java.lang.String |
getFontName()
Gets the name of the font that should be used to draw the component's text.
|
java.lang.Double |
getFontSize()
Gets the size of the font that should be used to draw the component's text.
|
java.util.EnumSet<FontStyle> |
getFontStyle()
Gets the style of the font that should be used to draw the component's text.
|
TextStyleHint |
getStyleHint()
Gets a value indicating which attribute values this component should inherit
from current Theme if its local text appearance properties are not set.
|
java.lang.String |
getText()
Gets the text that should be drawn inside this component.
|
Brush |
getTextBrush()
Gets the Brush that should be used to draw the component's text.
|
void |
measure(double maxWidth,
double maxHeight,
RenderContext context)
Measures the desired size of this component.
|
void |
setFontName(java.lang.String value)
Sets the name of the font that should be used to draw the component's text.
|
void |
setFontSize(java.lang.Double value)
Sets the size of the font that should be used to draw the component's text.
|
void |
setFontStyle(java.util.EnumSet<FontStyle> value)
Sets the style of the font that should be used to draw the component's text.
|
void |
setStyleHint(TextStyleHint value)
Sets a value indicating which attribute values this component should inherit
from current Theme if its local text appearance properties are not set.
|
void |
setText(java.lang.String value)
Sets the text that should be drawn inside this component.
|
void |
setTextBrush(Brush value)
Sets the Brush that should be used to draw the component's text.
|
add, arrange, associateJComponent, createController, dissociateJComponent, effectiveMeasuredHeight, effectiveMeasuredWidth, getActualHeight, getActualWidth, getDesiredHeight, getDesiredWidth, getGridColumn, getGridRow, getHeight, getHitTestVisibility, getHorizontalAlignment, getMargin, getParent, getRectInParent, getToolTip, getVerticalAlignment, getVisibility, getWidth, getXInParent, getYInParent, hitTest, invalidate, invalidate, invalidate, invalidateLayout, invalidateLayout, localToRoot, rootToLocal, setActualHeight, setActualWidth, setDesiredHeight, setDesiredWidth, setGridColumn, setGridRow, setHeight, setHitTestVisibility, setHorizontalAlignment, setMargin, setParent, setToolTip, setVerticalAlignment, setVisibility, setWidth, setXInParent, setYInParent, visitpublic void measure(double maxWidth,
double maxHeight,
RenderContext context)
measure in class ComponentmaxWidth - The maximum width provided by parent component.maxHeight - The maximum height provided by parent component.context - A RenderContext instance.public void draw(RenderContext context)
RenderContext.draw in class Componentcontext - A RenderContext instance.public java.lang.String getText()
public void setText(java.lang.String value)
public java.lang.String getFontName()
public void setFontName(java.lang.String value)
public java.lang.Double getFontSize()
public void setFontSize(java.lang.Double value)
public java.util.EnumSet<FontStyle> getFontStyle()
public void setFontStyle(java.util.EnumSet<FontStyle> value)
public Brush getTextBrush()
public void setTextBrush(Brush value)
public TextStyleHint getStyleHint()
public void setStyleHint(TextStyleHint value)