public class Text extends ScaleElement
filling, outline, RelativeCoordinates, RelativeStroke| Constructor and Description |
|---|
Text()
Initializes a new instance of the
Text class. |
| Modifier and Type | Method and Description |
|---|---|
void |
draw(RenderContext context)
Draws this component in specified
RenderContext. |
LayoutAlignment |
getAlignment()
Gets the horizontal alignment of the text.
|
java.lang.String |
getContent()
Gets the displayed text content.
|
java.lang.String |
getFontFamily()
Gets the font family of the text.
|
Length |
getFontSize()
Gets the font size of the text.
|
FontStyle |
getFontStyle()
Gets the font style of the text.
|
java.awt.Color |
getForeground()
Gets the color of the text.
|
LayoutAlignment |
getLineAlignment()
Gets the vertical alignment of the text.
|
boolean |
hitTestObj(java.awt.geom.Point2D p)
Checks whether the specified point lies within the visual element.
|
void |
measure(double maxWidth,
double maxHeight,
RenderContext context)
Measures the desired size of this component.
|
void |
setAlignment(LayoutAlignment value)
Sets the horizontal alignment of the text.
|
void |
setContent(java.lang.String value)
Sets the displayed text content.
|
void |
setFontFamily(java.lang.String value)
Sets the font family of the text.
|
void |
setFontSize(Length value)
Sets the font size of the text.
|
void |
setFontStyle(FontStyle value)
Sets the font style of the text.
|
void |
setForeground(java.awt.Color value)
Sets the color of the text.
|
void |
setLineAlignment(LayoutAlignment value)
Sets the vertical alignment of the text.
|
addScaleElementListener, hitTest, onClicked, removeScaleElementListenerarrangeaddVisualElementListener, getEffectiveFill, getFill, getMargin, getName, getStroke, onInvalidated, onPostpaint, onPrepaint, onQueryAmbientPropertyValue, removeVisualElementListener, setFill, setMargin, setName, setStroke, toStringadd, associateJComponent, createController, dissociateJComponent, effectiveMeasuredHeight, effectiveMeasuredWidth, getActualHeight, getActualWidth, getDesiredHeight, getDesiredWidth, getGridColumn, getGridRow, getHeight, getHitTestVisibility, getHorizontalAlignment, getParent, getRectInParent, getToolTip, getVerticalAlignment, getVisibility, getWidth, getXInParent, getYInParent, invalidate, invalidate, invalidate, invalidateLayout, invalidateLayout, localToRoot, rootToLocal, setActualHeight, setActualWidth, setDesiredHeight, setDesiredWidth, setGridColumn, setGridRow, setHeight, setHitTestVisibility, setHorizontalAlignment, setParent, setToolTip, setVerticalAlignment, setVisibility, setWidth, setXInParent, setYInParent, visitpublic Text()
Text class.public boolean hitTestObj(java.awt.geom.Point2D p)
VisualElementhitTestObj in class VisualElementContainerpublic void measure(double maxWidth,
double maxHeight,
RenderContext context)
VisualElementmeasure in class VisualElementContainermaxWidth - 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 VisualElementContainercontext - A RenderContext instance.public java.lang.String getFontFamily()
public void setFontFamily(java.lang.String value)
public Length getFontSize()
public void setFontSize(Length value)
public FontStyle getFontStyle()
public void setFontStyle(FontStyle value)
public java.lang.String getContent()
public void setContent(java.lang.String value)
public java.awt.Color getForeground()
public void setForeground(java.awt.Color value)
public LayoutAlignment getAlignment()
public void setAlignment(LayoutAlignment value)
public LayoutAlignment getLineAlignment()
public void setLineAlignment(LayoutAlignment value)