com.androidplot.ui.layout
Class LayoutManager

java.lang.Object
  extended by com.androidplot.util.ArrangeableHash<Widget,PositionMetrics>
      extended by com.androidplot.ui.layout.LayoutManager

public class LayoutManager
extends ArrangeableHash<Widget,PositionMetrics>


Constructor Summary
LayoutManager(android.view.View view)
           
 
Method Summary
 void disableAllMarkup()
           
 void draw(android.graphics.Canvas canvas, android.graphics.RectF plotDims)
           
static Point getAnchorCoordinates(float x, float y, float width, float height, AnchorPosition anchorPosition)
           
static Point getAnchorCoordinates(Point topLeft, Dimension size, AnchorPosition anchorPosition)
           
static Point getAnchorCoordinates(android.graphics.RectF widgetRect, AnchorPosition anchorPosition)
           
static Point getAnchorOffset(float width, float height, AnchorPosition anchorPosition)
           
 AnchorPosition getElementAnchor(Widget element)
           
 Point getElementCoordinates(float height, float width, android.graphics.RectF viewRect, PositionMetrics metrics)
           
 android.graphics.Paint getOutlinePaint()
           
 boolean isDrawAnchorsEnabled()
           
 boolean isDrawOutlinesEnabled()
           
 void position(Widget element, float x, XLayoutStyle xLayoutStyle, float y, YLayoutStyle yLayoutStyle)
           
 void position(Widget element, float x, XLayoutStyle xLayoutStyle, float y, YLayoutStyle yLayoutStyle, AnchorPosition anchor)
           
 void setDrawAnchorsEnabled(boolean drawAnchorsEnabled)
           
 void setDrawOutlinesEnabled(boolean drawOutlinesEnabled)
           
 boolean setElementAnchor(Widget element, AnchorPosition anchor)
           
 void setOutlinePaint(android.graphics.Paint outlinePaint)
           
 
Methods inherited from class com.androidplot.util.ArrangeableHash
addFirst, addLast, get, getKeysAsList, moveAbove, moveBeneath, moveDown, moveToBottom, moveToTop, moveUp, remove, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutManager

public LayoutManager(android.view.View view)
Method Detail

disableAllMarkup

public void disableAllMarkup()

getElementAnchor

public AnchorPosition getElementAnchor(Widget element)

setElementAnchor

public boolean setElementAnchor(Widget element,
                                AnchorPosition anchor)

getAnchorCoordinates

public static Point getAnchorCoordinates(android.graphics.RectF widgetRect,
                                         AnchorPosition anchorPosition)

getAnchorCoordinates

public static Point getAnchorCoordinates(Point topLeft,
                                         Dimension size,
                                         AnchorPosition anchorPosition)

getAnchorCoordinates

public static Point getAnchorCoordinates(float x,
                                         float y,
                                         float width,
                                         float height,
                                         AnchorPosition anchorPosition)

getAnchorOffset

public static Point getAnchorOffset(float width,
                                    float height,
                                    AnchorPosition anchorPosition)

getElementCoordinates

public Point getElementCoordinates(float height,
                                   float width,
                                   android.graphics.RectF viewRect,
                                   PositionMetrics metrics)

draw

public void draw(android.graphics.Canvas canvas,
                 android.graphics.RectF plotDims)
          throws PlotRenderException
Throws:
PlotRenderException

position

public void position(Widget element,
                     float x,
                     XLayoutStyle xLayoutStyle,
                     float y,
                     YLayoutStyle yLayoutStyle)
Parameters:
element - The Widget to position. Used for positioning both new and existing widgets.
x - X-Coordinate of the top left corner of element. When using RELATIVE, must be a value between 0 and 1.
xLayoutStyle - LayoutType to use when orienting this element's X-Coordinate.
y - Y-Coordinate of the top-left corner of element. When using RELATIVE, must be a value between 0 and 1.
yLayoutStyle - LayoutType to use when orienting this element's Y-Coordinate.

position

public void position(Widget element,
                     float x,
                     XLayoutStyle xLayoutStyle,
                     float y,
                     YLayoutStyle yLayoutStyle,
                     AnchorPosition anchor)

isDrawOutlinesEnabled

public boolean isDrawOutlinesEnabled()

setDrawOutlinesEnabled

public void setDrawOutlinesEnabled(boolean drawOutlinesEnabled)

getOutlinePaint

public android.graphics.Paint getOutlinePaint()

setOutlinePaint

public void setOutlinePaint(android.graphics.Paint outlinePaint)

isDrawAnchorsEnabled

public boolean isDrawAnchorsEnabled()

setDrawAnchorsEnabled

public void setDrawAnchorsEnabled(boolean drawAnchorsEnabled)


Copyright © 2011. All Rights Reserved.