-
- All Implemented Interfaces:
-
com.androidplot.ui.BoxModelable
,com.androidplot.ui.Resizable
public class TextLabelWidget extends Widget
-
-
Field Summary
Fields Modifier and Type Field Description private String
text
private Paint
labelPaint
private TextOrientation
orientation
private boolean
autoPackEnabled
-
Constructor Summary
Constructors Constructor Description TextLabelWidget(LayoutManager layoutManager, Size size)
TextLabelWidget(LayoutManager layoutManager, String title, Size size, TextOrientation orientation)
TextLabelWidget(LayoutManager layoutManager, Size size, TextOrientation orientation)
-
Method Summary
Modifier and Type Method Description String
getText()
void
setText(String text)
Paint
getLabelPaint()
void
setLabelPaint(Paint labelPaint)
TextOrientation
getOrientation()
void
setOrientation(TextOrientation orientation)
void
setAutoPackEnabled(boolean autoPackEnabled)
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
doOnDraw(Canvas canvas, RectF widgetRect)
Do not call this method directly. boolean
isAutoPackEnabled()
-
Methods inherited from class com.androidplot.ui.widget.Widget
calculateCoordinates, containsPoint, draw, getAnchor, getAnchorCoordinates, getAnchorCoordinates, getAnchorOffset, getBackgroundPaint, getBorderPaint, getHeightMetric, getHeightPix, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMarginatedRect, getPaddedRect, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPositionMetrics, getRotation, getSize, getWidgetDimensions, getWidthMetric, getWidthPix, isClippingEnabled, isVisible, layout, position, position, refreshLayout, setAnchor, setBackgroundPaint, setBorderPaint, setClippingEnabled, setHeight, setHeight, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMargins, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPositionMetrics, setRotation, setSize, setVisible, setWidth, setWidth
-
Methods inherited from class com.androidplot.ui.BoxModelable
getMarginatedRect, getPaddedRect, setMarginBottom
-
Methods inherited from class com.androidplot.ui.Resizable
layout
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
TextLabelWidget
TextLabelWidget(LayoutManager layoutManager, Size size)
-
TextLabelWidget
TextLabelWidget(LayoutManager layoutManager, String title, Size size, TextOrientation orientation)
-
TextLabelWidget
TextLabelWidget(LayoutManager layoutManager, Size size, TextOrientation orientation)
-
-
Method Detail
-
getLabelPaint
Paint getLabelPaint()
-
setLabelPaint
void setLabelPaint(Paint labelPaint)
-
getOrientation
TextOrientation getOrientation()
-
setOrientation
void setOrientation(TextOrientation orientation)
-
setAutoPackEnabled
void setAutoPackEnabled(boolean autoPackEnabled)
-
onPostInit
void onPostInit()
Can be overridden by subclasses to handle any final resizing etc. thatcan only be done after XML configuration etc. has completed.
-
pack
void pack()
Sets the dimensions of the widget to exactly contain the text contents
-
doOnDraw
void doOnDraw(Canvas canvas, RectF widgetRect)
Do not call this method directly. It is indirectly invoked every time a plot isredrawn.
- Parameters:
canvas
- The Canvas to draw ontowidgetRect
- the size and coordinates of this widget
-
isAutoPackEnabled
boolean isAutoPackEnabled()
-
-
-
-