com.androidplot.xy
Class RectRegion

java.lang.Object
  extended by com.androidplot.xy.RectRegion

public class RectRegion
extends Object

RectRegion is just a rectangle with additional methods for determining intersections with other RectRegion instances.


Constructor Summary
RectRegion(Number minX, Number maxX, Number minY, Number maxY)
           
RectRegion(Number minX, Number maxX, Number minY, Number maxY, String label)
           
 
Method Summary
 boolean containsDomainValue(Number value)
           
 boolean containsPoint(android.graphics.PointF point)
           
 boolean containsRangeValue(Number value)
           
 boolean containsValue(Number x, Number y)
           
 String getLabel()
           
 Number getMaxX()
           
 Number getMaxY()
           
 Number getMinX()
           
 Number getMinY()
           
 android.graphics.RectF getRectF(android.graphics.RectF plotRect, Number visMinX, Number visMaxX, Number visMinY, Number visMaxY)
           
 boolean intersects(Number minX, Number maxX, Number minY, Number maxY)
          Tests whether this region intersects the region defined by params.
 boolean intersects(android.graphics.RectF region, Number visMinX, Number visMaxX, Number visMinY, Number visMaxY)
           
 boolean intersects(RectRegion region)
           
static List<RectRegion> regionsWithin(List<RectRegion> regions, Number minX, Number maxX, Number minY, Number maxY)
          Returns a list of XYRegions that either completely or partially intersect the area defined by params.
 void setLabel(String label)
           
 void setMaxX(Number maxX)
           
 void setMaxY(Number maxY)
           
 void setMinX(double minX)
           
 void setMinY(Number minY)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RectRegion

public RectRegion(Number minX,
                  Number maxX,
                  Number minY,
                  Number maxY,
                  String label)
Parameters:
minX -
maxX -
minY -
maxY -

RectRegion

public RectRegion(Number minX,
                  Number maxX,
                  Number minY,
                  Number maxY)
Method Detail

containsPoint

public boolean containsPoint(android.graphics.PointF point)

containsValue

public boolean containsValue(Number x,
                             Number y)

containsDomainValue

public boolean containsDomainValue(Number value)

containsRangeValue

public boolean containsRangeValue(Number value)

intersects

public boolean intersects(RectRegion region)

intersects

public boolean intersects(Number minX,
                          Number maxX,
                          Number minY,
                          Number maxY)
Tests whether this region intersects the region defined by params. Use null to represent infinity. Negative and positive infinity is implied by the boundary edge, ie. a maxX of null equals positive infinity while a minX of null equals negative infinity.

Parameters:
minX -
maxX -
minY -
maxY -
Returns:

intersects

public boolean intersects(android.graphics.RectF region,
                          Number visMinX,
                          Number visMaxX,
                          Number visMinY,
                          Number visMaxY)

getRectF

public android.graphics.RectF getRectF(android.graphics.RectF plotRect,
                                       Number visMinX,
                                       Number visMaxX,
                                       Number visMinY,
                                       Number visMaxY)

regionsWithin

public static List<RectRegion> regionsWithin(List<RectRegion> regions,
                                             Number minX,
                                             Number maxX,
                                             Number minY,
                                             Number maxY)
Returns a list of XYRegions that either completely or partially intersect the area defined by params. A null value for any parameter represents infinity / no boundary.

Parameters:
regions - The list of regions to search through
minX -
maxX -
minY -
maxY -
Returns:

getMinX

public Number getMinX()

setMinX

public void setMinX(double minX)

getMaxX

public Number getMaxX()

setMaxX

public void setMaxX(Number maxX)

getMinY

public Number getMinY()

setMinY

public void setMinY(Number minY)

getMaxY

public Number getMaxY()

setMaxY

public void setMaxY(Number maxY)

getLabel

public String getLabel()

setLabel

public void setLabel(String label)


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