Package com.androidplot.ui.widget
Class TextLabelWidget
-
- All Implemented Interfaces:
-
com.androidplot.ui.BoxModelable,com.androidplot.ui.Resizable
public class TextLabelWidget extends Widget
-
-
Field Summary
Fields Modifier and Type Field Description public Stringtextpublic PaintlabelPaintpublic TextOrientationorientationpublic PaintborderPaintpublic PaintbackgroundPaintpublic Sizesizepublic DisplayDimensionswidgetDimensionspublic booleanisVisiblepublic PositionMetricspositionMetricspublic Widget.Rotationrotation
-
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 StringgetText()voidsetText(@Nullable() String text)PaintgetLabelPaint()voidsetLabelPaint(@NonNull() Paint labelPaint)TextOrientationgetOrientation()voidsetOrientation(@NonNull() TextOrientation orientation)voidonPostInit()Can be overridden by subclasses to handle any final resizing etc. voidpack()Sets the dimensions of the widget to exactly contain the text contents voiddoOnDraw(@NonNull() Canvas canvas, @NonNull() RectF widgetRect)Do not call this method directly. booleanisAutoPackEnabled()voidsetAutoPackEnabled(boolean autoPackEnabled)-
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
@NonNull() Paint getLabelPaint()
-
setLabelPaint
void setLabelPaint(@NonNull() Paint labelPaint)
-
getOrientation
@NonNull() TextOrientation getOrientation()
-
setOrientation
void setOrientation(@NonNull() TextOrientation orientation)
-
onPostInit
void onPostInit()
Can be overridden by subclasses to handle any final resizing etc. that can 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(@NonNull() Canvas canvas, @NonNull() RectF widgetRect)
Do not call this method directly. It is indirectly invoked every time a plot is redrawn.
- Parameters:
canvas- The Canvas to draw ontowidgetRect- the size and coordinates of this widget
-
isAutoPackEnabled
boolean isAutoPackEnabled()
-
setAutoPackEnabled
void setAutoPackEnabled(boolean autoPackEnabled)
-
-
-
-