com.androidplot.ui.widget
Class Widget
java.lang.Object
com.androidplot.ui.widget.Widget
- All Implemented Interfaces:
- BoxModelable
- Direct Known Subclasses:
- EmptyWidget, TextLabelWidget, XYGraphWidget, XYLegendWidget
public abstract class Widget
- extends Object
- implements BoxModelable
Widget
public Widget(SizeMetric heightMetric,
SizeMetric widthMetric)
Widget
public Widget(SizeMetrics sizeMetrics)
containsPoint
public boolean containsPoint(android.graphics.PointF point)
- Determines whether or not point lies within this Widget.
- Parameters:
point
-
- Returns:
setSize
public void setSize(SizeMetrics sizeMetrics)
setWidth
public void setWidth(float width)
setWidth
public void setWidth(float width,
SizeLayoutType layoutType)
setHeight
public void setHeight(float height)
setHeight
public void setHeight(float height,
SizeLayoutType layoutType)
getWidthMetric
public SizeMetric getWidthMetric()
getHeightMetric
public SizeMetric getHeightMetric()
getWidthPix
public float getWidthPix(float size)
getHeightPix
public float getHeightPix(float size)
getMarginatedRect
public android.graphics.RectF getMarginatedRect(android.graphics.RectF widgetRect)
- Description copied from interface:
BoxModelable
- Returns a RectF instance describing the inner edge of the margin layer.
- Specified by:
getMarginatedRect
in interface BoxModelable
- Returns:
getPaddedRect
public android.graphics.RectF getPaddedRect(android.graphics.RectF widgetMarginRect)
- Description copied from interface:
BoxModelable
- Returns a RectF instance describing the inner edge of the padding layer.
- Specified by:
getPaddedRect
in interface BoxModelable
- Returns:
setMarginRight
public void setMarginRight(float marginRight)
- Specified by:
setMarginRight
in interface BoxModelable
setMargins
public void setMargins(float left,
float top,
float right,
float bottom)
- Specified by:
setMargins
in interface BoxModelable
setPadding
public void setPadding(float left,
float top,
float right,
float bottom)
- Specified by:
setPadding
in interface BoxModelable
getMarginTop
public float getMarginTop()
- Specified by:
getMarginTop
in interface BoxModelable
setMarginTop
public void setMarginTop(float marginTop)
- Specified by:
setMarginTop
in interface BoxModelable
getMarginBottom
public float getMarginBottom()
- Specified by:
getMarginBottom
in interface BoxModelable
getPaddingLeft
public float getPaddingLeft()
- Specified by:
getPaddingLeft
in interface BoxModelable
setPaddingLeft
public void setPaddingLeft(float paddingLeft)
- Specified by:
setPaddingLeft
in interface BoxModelable
getPaddingTop
public float getPaddingTop()
- Specified by:
getPaddingTop
in interface BoxModelable
setPaddingTop
public void setPaddingTop(float paddingTop)
- Specified by:
setPaddingTop
in interface BoxModelable
getPaddingRight
public float getPaddingRight()
- Specified by:
getPaddingRight
in interface BoxModelable
setPaddingRight
public void setPaddingRight(float paddingRight)
- Specified by:
setPaddingRight
in interface BoxModelable
getPaddingBottom
public float getPaddingBottom()
- Specified by:
getPaddingBottom
in interface BoxModelable
setPaddingBottom
public void setPaddingBottom(float paddingBottom)
- Specified by:
setPaddingBottom
in interface BoxModelable
setMarginBottom
public void setMarginBottom(float marginBottom)
getMarginLeft
public float getMarginLeft()
- Specified by:
getMarginLeft
in interface BoxModelable
setMarginLeft
public void setMarginLeft(float marginLeft)
- Specified by:
setMarginLeft
in interface BoxModelable
getMarginRight
public float getMarginRight()
- Specified by:
getMarginRight
in interface BoxModelable
draw
public void draw(android.graphics.Canvas canvas,
android.graphics.RectF widgetRect)
throws PlotRenderException
- Throws:
PlotRenderException
getBorderPaint
public android.graphics.Paint getBorderPaint()
setBorderPaint
public void setBorderPaint(android.graphics.Paint borderPaint)
getBackgroundPaint
public android.graphics.Paint getBackgroundPaint()
setBackgroundPaint
public void setBackgroundPaint(android.graphics.Paint backgroundPaint)
isClippingEnabled
public boolean isClippingEnabled()
setClippingEnabled
public void setClippingEnabled(boolean clippingEnabled)
getOutlineRect
public android.graphics.RectF getOutlineRect()
Copyright © 2011. All Rights Reserved.