jview
Class SelectCursor
java.lang.Object
java.awt.Cursor
jview.CanvasCursor
jview.CrossCursor
jview.DragCursor
jview.SelectCursor
- All Implemented Interfaces:
- MouseListener, MouseMotionListener, Serializable, EventListener, MouseInputListener, Initializable, PropertyAware, PropertyComposed
public class SelectCursor
- extends DragCursor
An extension to a cross cursor that allows selecting objects within a drawn
rectangle. As objects are only recognizable in JNormalizedCanvas,
this cursor only work on these Components
- See Also:
- Serialized Form
| Fields inherited from class jview.CrossCursor |
cursorcolor, KEY_ALLOWDRAG, KEY_PERSISTENT, KEY_SHOWCOORDINATE, KEY_SINGLEPERSIST, 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 |
| Methods inherited from class jview.CanvasCursor |
disableCanvas, enableCanvas, getActions, getComposedProperties, getCursorName, getCursorShape, getCustomized, getNormalizedAction, getScreenAction, getUserAction, isConsider, isMe, isWithin, repaintCanvas, setCursorName, setCursorShape |
KEY_WORKON
public static final String KEY_WORKON
- Defines on which kind of object we work.
- See Also:
- Constant Field Values
DEFWORKON
private static final String DEFWORKON
- The default zooming amount per whhel rotation.
workon
private Class<? extends Centerable> workon
- We work on this enum.
SelectCursor
public SelectCursor(PropertySupplying prop)
- Creates a new zoom cursor. Dragging is always enabled, even if overruled
in properties.
setComposedProperties
public void setComposedProperties(PropertySupplying prop)
- Compose with a
PropertySupplying as we need subclassing Cursor.
- Specified by:
setComposedProperties in interface PropertyAware- Overrides:
setComposedProperties in class DragCursor
init
public void init()
- Initializes the zoom cursor. Here, the pop-up menu and the undo-zoom
list is generated.
- Specified by:
init in interface Initializable- Overrides:
init in class CanvasCursor
mouseClicked
public void mouseClicked(MouseEvent me)
- Clicking with the mouse selects only a single object, the one that is
closest to the mouse-click point.
dragSelect
protected void dragSelect(Rectangle zoomselect,
int ignore)
- This method now converts the selected screen rectangle into viewport
coordinates to allow retracing. We store the normalized zoom in the
zoom list
- Specified by:
dragSelect in class DragCursor
- Parameters:
zoomselect - The on-screen Rectangle of the drag, not normalized.ignore - The extended modifiers of the mouse event on drag end.