com.androidplot.ui.widget
Class TextLabelWidget

java.lang.Object
  extended by com.androidplot.ui.widget.Widget
      extended by com.androidplot.ui.widget.TextLabelWidget
All Implemented Interfaces:
BoxModelable, Resizable

public class TextLabelWidget
extends Widget


Constructor Summary
TextLabelWidget(LayoutManager layoutManager, SizeMetrics sizeMetrics)
           
TextLabelWidget(LayoutManager layoutManager, SizeMetrics sizeMetrics, TextOrientationType orientation)
           
TextLabelWidget(LayoutManager layoutManager, String title, SizeMetrics sizeMetrics, TextOrientationType orientation)
           
 
Method Summary
 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()
           
 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)
           
 
Methods inherited from class com.androidplot.ui.widget.Widget
containsPoint, draw, getAnchor, getAnchorCoordinates, getAnchorCoordinates, getAnchorOffset, getBackgroundPaint, getBorderPaint, getElementCoordinates, getHeightMetric, getHeightPix, getMarginatedRect, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddedRect, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPositionMetrics, 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, setWidth
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextLabelWidget

public TextLabelWidget(LayoutManager layoutManager,
                       SizeMetrics sizeMetrics)

TextLabelWidget

public TextLabelWidget(LayoutManager layoutManager,
                       String title,
                       SizeMetrics sizeMetrics,
                       TextOrientationType orientation)

TextLabelWidget

public TextLabelWidget(LayoutManager layoutManager,
                       SizeMetrics sizeMetrics,
                       TextOrientationType orientation)
Method Detail

onPostInit

public void onPostInit()
Description copied from class: Widget
Can be overridden by subclasses to handle any final resizing etc. that can only be done after XML configuration etc. has completed.

Overrides:
onPostInit in class Widget

pack

public void pack()
Sets the dimensions of the widget to exactly contain the text contents


doOnDraw

public void doOnDraw(android.graphics.Canvas canvas,
                     android.graphics.RectF widgetRect)
Do not call this method directly. It is indirectly invoked every time a plot is redrawn.

Parameters:
canvas - The Canvas to draw onto
widgetRect - the size and coordinates of this widget

getLabelPaint

public android.graphics.Paint getLabelPaint()

setLabelPaint

public void setLabelPaint(android.graphics.Paint labelPaint)

getOrientation

public TextOrientationType getOrientation()

setOrientation

public void setOrientation(TextOrientationType orientation)

isAutoPackEnabled

public boolean isAutoPackEnabled()

setAutoPackEnabled

public void setAutoPackEnabled(boolean autoPackEnabled)

setText

public void setText(String text)

getText

public String getText()


Copyright © 2010-2013 androidplot.com. All Rights Reserved.