|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Cursor
jview.CanvasCursor
jview.CrossCursor
jview.DragCursor
jview.ZoomCursor
jview.MarkCursor
public class MarkCursor
A cursor-like application that supplies a cross-hair above the entire
drawable area of a JShapeCanvas. If persitant marking is enabled
with the CrossCursor.KEY_PERSISTENT key, then clicking on the canvas adds a
cross-hair on the location clicked to the shape canvas.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class jview.CrossCursor |
|---|
CrossCursor.Draw |
| Field Summary | |
|---|---|
private static String |
CLEARACTION
The label on the action for saving current zoom. |
private Action |
clearcanvas
An action for printing the current underlying canvas. |
private static String |
CURSOR
The name for cursor objects added to the underlying canvas. |
private static double |
DEFOFFSET
The maximal quadratic offset for erasing in normalized space. |
private static boolean |
DEFSINGLEPERSIST
The default single persistance behaviour. |
static String |
KEY_OFFSET
The maximal quadratic offset for erasing in normalized space. |
static String |
KEY_SINGLEPERSIST
If true, only a single persistent is active. |
private Map<Point2D,Object[]> |
permanent
A mapping of permanently added crosses and corrdinates. |
| Fields inherited from class jview.ZoomCursor |
|---|
DEFCURSORNAME, KEY_ALLOWSHIFT, KEY_ALLOWWHEEL, KEY_SHIFTFACTOR, KEY_WHEELZOOM, RETRACE, REVERT |
| Fields inherited from class jview.DragCursor |
|---|
KEY_ANGLESIZE, KEY_SHOWANGLE, KEY_SHOWDELTAX, KEY_SHOWDELTAY, KEY_SHOWDISTANCE, KEY_SHOWSTART |
| Fields inherited from class jview.CrossCursor |
|---|
cursorcolor, KEY_ALLOWDRAG, KEY_PERSISTENT, KEY_SHOWCOORDINATE, KEY_XSHIFT, KEY_YSHIFT, lastcenter, lastposition, xformat, yformat |
| Fields inherited from class jview.CanvasCursor |
|---|
canvas, DEFCURSORCOLOR, KEY_COORDINATES, KEY_CURSORCOLOR, KEY_CURSORNAME, KEY_CURSORSIZE, NORMALIZED, NORMALIZEDACTION, SCREEN, SCREENACTION, USER, USERACTION |
| Fields inherited from class java.awt.Cursor |
|---|
CROSSHAIR_CURSOR, CUSTOM_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, MOVE_CURSOR, N_RESIZE_CURSOR, name, NE_RESIZE_CURSOR, NW_RESIZE_CURSOR, predefined, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Constructor Summary | |
|---|---|
MarkCursor(PropertySupplying prop)
Constructs a new cross cursor from properties. |
|
| Method Summary | |
|---|---|
void |
enableCanvas(JNormalizedCanvas root)
Assigns the JShapeCanvas to the cursor. |
Action |
getClearAction()
Returns the action that saves the underlying component. |
void |
init()
Initializes the zoom cursor. |
void |
mouseClicked(MouseEvent me)
If persistent storage is enabled via the CrossCursor.KEY_PERSISTENT key,
clicking of the mouse adds a cross-shape to the underlying canvas or
removes it if it happens close to a priorly added cross-shape. |
void |
setComposedProperties(PropertySupplying info)
Compose with a PropertySupplying as we need subclassing Cursor. |
| Methods inherited from class jview.ZoomCursor |
|---|
dragSelect, getActions, getRetraceAction, getRevertAction, mouseDragged, mousePressed, mouseReleased, mouseWheelMoved, zoomFactor |
| Methods inherited from class jview.DragCursor |
|---|
clearOnRepaint, mouseEntered |
| Methods inherited from class jview.CrossCursor |
|---|
drawCross, drawPosition, getCoordinateLabel, getCoordinates, getCoordinatesPair, mouseExited, mouseMoved, setCoordinateFormat, setCoordinateLabel |
| Methods inherited from class jview.CanvasCursor |
|---|
disableCanvas, getComposedProperties, getCursorName, getCursorShape, getCustomized, getNormalizedAction, getScreenAction, getUserAction, isConsider, isMe, isWithin, repaintCanvas, setCursorName, setCursorShape |
| Methods inherited from class java.awt.Cursor |
|---|
getDefaultCursor, getName, getPredefinedCursor, getSystemCustomCursor, getType, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String KEY_SINGLEPERSIST
public static final String KEY_OFFSET
private static final boolean DEFSINGLEPERSIST
private static final double DEFOFFSET
private static final String CLEARACTION
private static final String CURSOR
private Map<Point2D,Object[]> permanent
private Action clearcanvas
| Constructor Detail |
|---|
public MarkCursor(PropertySupplying prop)
JShapeCanvas manually.
| Method Detail |
|---|
public void init()
init in interface Initializableinit in class ZoomCursorpublic void setComposedProperties(PropertySupplying info)
PropertySupplying as we need subclassing Cursor.
setComposedProperties in interface PropertyAwaresetComposedProperties in class ZoomCursorpublic Action getClearAction()
public void mouseClicked(MouseEvent me)
CrossCursor.KEY_PERSISTENT key,
clicking of the mouse adds a cross-shape to the underlying canvas or
removes it if it happens close to a priorly added cross-shape.
mouseClicked in interface MouseListenermouseClicked in class ZoomCursorpublic void enableCanvas(JNormalizedCanvas root)
JShapeCanvas to the cursor. This method must always
be called prior to activation of the cursor, i.e. adding it as a
mouse listener.
enableCanvas in class CanvasCursor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||