|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.livescribe.penlet.RegionCollection
public final class RegionCollection
The RegionCollection class enables the manipulation of your
regions on a page associated with the application.
| Method Summary | |
|---|---|
Region |
addBitmapRegion(Shape shape,
Region region,
int cellWidth,
int cellHeight)
Adds a Bitmap region to the current page. |
Region |
addRegion(Shape shape,
Region region)
Adds a region to this collection and maps the given physical shape to the added region. |
Region |
addRegion(Shape shape,
Region region,
boolean storeStrokes)
Deprecated. Use addRegion(Shape, Region). |
boolean |
getBitmapRegionCellState(Region region,
int cellX,
int cellY)
Gets the state of a cell in the bitmap region (true = on, false = off) Note that this function will fail if the region is not referring to a bitmap region. |
Rectangle |
getBoundingBox(Region region)
Gets the bounding box of the Region. |
Region |
getFirstRegion(int areaId)
Gets the first Region for the area identifier passed. |
Shape |
getShape(Region region)
Lets the user obtain a Shape object that corresponds to the
region stored by the system. |
boolean |
isOverlappingExistingArea(Shape shape)
Deprecated. use isOverlappingExistingRegion(Shape) |
boolean |
isOverlappingExistingRegion(Shape shape)
Checks whether the supplied Shape object overlaps any region
present in this collection. |
void |
removeAllRegions()
Removes all the regions. |
boolean |
removeRegion(Region region)
Removes the region from the collection. |
void |
setBitmapRegionCellState(Region region,
int cellX,
int cellY,
boolean state)
Paints a grid cell to the state (true = on, false = off). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public Region addRegion(Shape shape,
Region region)
Z-order and
instance ID of the region may be modified.
When a region is registered, it becomes possible to receive different events occurring within that region. For example, a region-enter event will be generated if the user taps within the shape defining the new region.
This returns a reference to the given Region object.
shape - map this physical shape to the regionregion - the region to be added.
public Region addRegion(Shape shape,
Region region,
boolean storeStrokes)
addRegion(Shape, Region).
storeStrokes parameter. Note that
the region object may have its Z-order and instance ID modified.
shape - the physical shape to map to the regionregion - the region to be addedstoreStrokes - whether to store strokes in this region,
ignored
public Region addBitmapRegion(Shape shape,
Region region,
int cellWidth,
int cellHeight)
Bitmap region to the current page. A bitmap region is
a specific type of region that allows the user to paint the cells on and
off.
shape - represented by a Shape object.region - the region to be added.cellWidth - the width in Anoto units of the cellscellHeight - the height in Anoto units of the cells strokes made
inside the area.
Scale
public void setBitmapRegionCellState(Region region,
int cellX,
int cellY,
boolean state)
region - unique identifier for the region to paintcellX - cell index in horizontal directioncellY - cell index in vertical directionstate - the state to paint on/off
public boolean getBitmapRegionCellState(Region region,
int cellX,
int cellY)
region - unique identifier for the area to paintcellX - cell index in horizontal directioncellY - cell index in vertical direction
public boolean removeRegion(Region region)
region - region to be removed from the collection.
true if region was found and removed,
false otherwisepublic void removeAllRegions()
public Shape getShape(Region region)
Shape object that corresponds to the
region stored by the system.
region - the region instance
Shape object that represent the area that was
copied. Returns null if no shape was connected to the region
provided.public Rectangle getBoundingBox(Region region)
Region. Note that this is
faster than first retrieving the shape and then getting the bounding box
region - region whose associated shape's bounding box should be got.
null if a shape is not
associated with the regionpublic boolean isOverlappingExistingRegion(Shape shape)
Shape object overlaps any region
present in this collection.
shape - the Shape to be checked for overlap.
public boolean isOverlappingExistingArea(Shape shape)
isOverlappingExistingRegion(Shape)
Shape object overlaps any region
present in this collection.
shape - the Shape to be checked for overlap.
public Region getFirstRegion(int areaId)
Region for the area identifier passed.
areaId - the application identifier for the region.
null of none bound.
|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||