public class TextLabelWidget extends Widget
| Constructor and Description |
|---|
TextLabelWidget(LayoutManager layoutManager,
Size size) |
TextLabelWidget(LayoutManager layoutManager,
Size size,
TextOrientationType orientation) |
TextLabelWidget(LayoutManager layoutManager,
String title,
Size size,
TextOrientationType orientation) |
| Modifier and Type | Method and Description |
|---|---|
void |
doOnDraw(android.graphics.Canvas canvas,
android.graphics.RectF widgetRect)
Do not call this method directly.
|
android.graphics.Paint |
getLabelPaint() |
TextOrientationType |
getOrientation() |
String |
getText() |
boolean |
isAutoPackEnabled() |
protected void |
onMetricsChanged(Size olds,
Size news)
Can be overridden by subclasses to respond to resizing events.
|
void |
onPostInit()
Can be overridden by subclasses to handle any final resizing etc.
|
void |
pack()
Sets the dimensions of the widget to exactly contain the text contents
|
void |
setAutoPackEnabled(boolean autoPackEnabled) |
void |
setLabelPaint(android.graphics.Paint labelPaint) |
void |
setOrientation(TextOrientationType orientation) |
void |
setText(String text) |
containsPoint, draw, drawBackground, drawBorder, getAnchor, getAnchorCoordinates, getAnchorCoordinates, getAnchorOffset, getBackgroundPaint, getBorderPaint, getElementCoordinates, getHeightMetric, getHeightPix, getMarginatedRect, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddedRect, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPositionMetrics, getSize, getWidgetDimensions, getWidthMetric, getWidthPix, isClippingEnabled, isVisible, layout, position, position, refreshLayout, setAnchor, setBackgroundPaint, setBorderPaint, setClippingEnabled, setHeight, setHeight, setMarginBottom, setMarginLeft, setMarginRight, setMargins, setMarginTop, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPositionMetrics, setSize, setVisible, setWidth, setWidthpublic TextLabelWidget(LayoutManager layoutManager, Size size)
public TextLabelWidget(LayoutManager layoutManager, String title, Size size, TextOrientationType orientation)
public TextLabelWidget(LayoutManager layoutManager, Size size, TextOrientationType orientation)
protected void onMetricsChanged(Size olds, Size news)
WidgetonMetricsChanged in class Widgetpublic void onPostInit()
WidgetonPostInit in class Widgetpublic void pack()
public void doOnDraw(android.graphics.Canvas canvas,
android.graphics.RectF widgetRect)
public android.graphics.Paint getLabelPaint()
public void setLabelPaint(android.graphics.Paint labelPaint)
public TextOrientationType getOrientation()
public void setOrientation(TextOrientationType orientation)
public boolean isAutoPackEnabled()
public void setAutoPackEnabled(boolean autoPackEnabled)
public void setText(String text)
public String getText()