public class StrokeManager
extends java.lang.Object
| Constructor and Description |
|---|
StrokeManager()
The constructor for this class if no callback is desired
|
StrokeManager(UploadCallback callback)
The constructor for this class if callbacks post-upload are desired.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPoint(java.lang.String strokeName,
Point point)
Add a point to a stroke.
|
void |
addPoints(java.lang.String strokeName,
java.util.Set<Point> points)
Add a set of points to a stroke.
|
int |
countPoints()
Convenience function if you want to know how many points are currently in the StrokeManager
across all strokes.
|
int |
countStrokes()
Convenience function if you want to know how many strokes are currently in the StrokeManager.
|
void |
onFailure(java.lang.String strokeId,
java.util.Set<Point> points) |
void |
onSuccess(java.lang.String strokeId,
java.util.Set<Point> points) |
void |
removePoint(java.lang.String strokeName,
Point point)
Remove a point from a stroke.
|
void |
removePoints(java.lang.String strokeName,
java.util.Set<Point> points)
Remove points from a stroke.
|
void |
setStrokeColor(java.lang.String strokeName,
int r,
int g,
int b)
Set the color for a stroke.
|
void |
upload(java.lang.String group_name,
java.lang.String drawing_name)
This uploads the strokes and points that the StrokeManager knows about to the server.
|
public StrokeManager()
public StrokeManager(UploadCallback callback)
public void setStrokeColor(java.lang.String strokeName,
int r,
int g,
int b)
strokeName - r - g - b - public void addPoint(java.lang.String strokeName,
Point point)
strokeName - point - public void addPoints(java.lang.String strokeName,
java.util.Set<Point> points)
strokeName - points - public void removePoint(java.lang.String strokeName,
Point point)
strokeName - point - public void removePoints(java.lang.String strokeName,
java.util.Set<Point> points)
strokeName - points - public void upload(java.lang.String group_name,
java.lang.String drawing_name)
group_name - drawing_name - r - g - b - public int countStrokes()
public int countPoints()
public void onSuccess(java.lang.String strokeId,
java.util.Set<Point> points)
public void onFailure(java.lang.String strokeId,
java.util.Set<Point> points)