public class ChangeCursorHandler extends Handler
NoAnchor, NorthEastAnchor, NorthWestAnchor, SouthEastAnchor, SouthWestAnchor| Constructor and Description |
|---|
ChangeCursorHandler(Model model,
DrawingPalette view) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
completeAnchor(java.awt.Point pt,
int modifiers,
Element elt)
Complete the mouse interaction as started by dragType.
|
boolean |
move(java.awt.Point pt,
int modifiers,
java.util.Optional<Element> element,
int anchor)
Movement of cursor detected without the mouse button being pressed.
|
boolean |
start(java.awt.Point pt,
int modifiers,
java.util.Optional<Element> elt)
Initiate action by pressing mouse at point with, potentially, a selected element.
|
boolean |
startAnchor(java.awt.Point start,
int modifiers,
Element elt,
int result)
Start the mouse interaction as started by dragType.
|
complete, drag, dragAnchor, getNext, isInterested, paint, setNextpublic ChangeCursorHandler(Model model, DrawingPalette view)
public boolean start(java.awt.Point pt,
int modifiers,
java.util.Optional<Element> elt)
IActionInterfacestart in interface IActionInterfacestart in class Handlerpt - starting an element action at this mouse locationmodifiers - keyboard modifiers in effectelt - optional element in playpublic boolean move(java.awt.Point pt,
int modifiers,
java.util.Optional<Element> element,
int anchor)
IActionInterfaceElement is the optional element over which the point is moving. If it is present then there are two options:
When element is not present, then cursor is moving over some place in which no element intersects.
In all cases, modifiers reflects whether shift or control is down.
move in interface IActionInterfacemove in class Handlerpt - mouse locationmodifiers - keyboard modifiers in effectelement - optional element in playanchor - which anchor is affectedpublic boolean startAnchor(java.awt.Point start,
int modifiers,
Element elt,
int result)
IActionInterfacestartAnchor in interface IActionInterfacestartAnchor in class Handlerstart - start an anchor at this mouse locationmodifiers - keyboard modifiers in effectelt - affected elementresult - initiating anchor index positionpublic boolean completeAnchor(java.awt.Point pt,
int modifiers,
Element elt)
IActionInterfacecompleteAnchor in interface IActionInterfacecompleteAnchor in class Handlerpt - ending an anchor action at this mouse locationmodifiers - keyboard modifiers in effectelt - affected element