Overview of built-in annotation editing
There are different user interface capabilities available when using built-in annotations. They are:
- Adding objects
- Editing the text in edit and Post-it objects
- Moving objects
- Resizing objects
- Deleting objects
See the sample DemoApp.java
in Samples\com\snowbound\samples\annapp
for code which demonstrates how to add built-in annotation event handling to your application.
Using Built-In Annotation Editing
This section describes how to add, edit, move, resize, and delete annotation objects.
Adding New Objects
To add a new object, set the graphic_id
parameter to one of the object numbers defined in Snow.SnowAnn
.
Type | Object | Value |
---|---|---|
public static final int |
SANN_FILLED_RECT |
= 1 |
public static final int |
SANN_HIGHLIGHT_RECT |
= 2 |
public static final int |
SANN_RECTANGLE |
= 3 |
public static final int |
SANN_LINE |
= 4 |
public static final int |
SANN_ELLIPSE |
= 5 |
public static final int |
SANN_FILLED_ELLIPSE |
= 6 |
public static final int |
SANN_FREEHAND |
= 7 |
public static final int |
SANN_BITMAP |
= 8 |
public static final int |
SANN_POSTIT |
= 9 |
public static final int |
SANN_POLYGON |
= 10 |
public static final int |
SANN_FILLED_POLYGON |
= 11 |
public static final int |
SANN_ARROW |
= 12 |
public static final int |
SANN_EDIT |
= 13 |
public static final int |
SANN_BUBBLE |
= 15 |
Creating Annotation Text and Objects
Object | Action or Result |
---|---|
Edit and Post-it | Drag the mouse to draw a rectangle to the desired size. An editable text box appears when the mouse is released. |
Most rectangles | Drag the mouse to draw a rectangle to the desired size. |
Polygons | Mouse click at the vertices of each point for the polygon. A small box is drawn at the first point. The polygon is finished when the last point is on this box. |
Moving Objects
To move an annotation object:
- Left-click on the object to display a pop-up window.
- Select move. A box is drawn around the object allowing you to position it elsewhere on the screen.
- Left-click again to position the object where you want it.
Resizing Objects
To resize an annotation object:
- Left-click on the object to display a pop-up window.
- Select resize. The object is highlighted and boxes on the corners and middle of the top, bottom, left, and right edges are drawn.
- Click and drag any of the boxes to resize the object.
Deleting Objects
To delete an annotation object:
- Left-click on the object to display a pop-up window.
- Select delete. The object is removed from the page and from the internal list of objects.
Have questions, corrections, or concerns about this topic? Please let us know!