public class SelectHandler extends Handler
NoAnchor, NorthEastAnchor, NorthWestAnchor, SouthEastAnchor, SouthWestAnchor| Constructor and Description |
|---|
SelectHandler(Model model,
DrawingPalette view) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
complete(java.awt.Point pt,
int modifiers,
java.util.Optional<Element> elt)
React to completion (i.e., mouseRelease) by selecting all elements within the user Selection
|
boolean |
drag(java.awt.Point ignore,
int modifiers,
java.util.Optional<Element> elt,
java.awt.Point current)
Process drag events by extending the user selection, repainting to show the region
Updated to allow moving selected objects if there is a
baseElt present. |
boolean |
move(java.awt.Point pt,
int modifiers,
java.util.Optional<Element> element,
int anchor)
Takes on responsibility of changing cursor into a MoveCursor when over any element.
|
void |
paint(java.awt.Graphics g)
Take responsibility for showing user's selection rectangle.
|
boolean |
start(java.awt.Point start,
int modifiers,
java.util.Optional<Element> elt)
Select upon press, if over an element.
|
completeAnchor, dragAnchor, getNext, isInterested, setNext, startAnchorpublic SelectHandler(Model model, DrawingPalette view)
public boolean move(java.awt.Point pt,
int modifiers,
java.util.Optional<Element> element,
int anchor)
move in interface IActionInterfacemove in class Handlerpt - mouse locationmodifiers - keyboard modifiers in effectelement - optional element in playanchor - which anchor is affectedpublic boolean start(java.awt.Point start,
int modifiers,
java.util.Optional<Element> elt)
start in interface IActionInterfacestart in class Handlerstart - starting an element action at this mouse locationmodifiers - keyboard modifiers in effectelt - optional element in playpublic boolean complete(java.awt.Point pt,
int modifiers,
java.util.Optional<Element> elt)
complete in interface IActionInterfacecomplete in class Handlerpt - ending mouse location of this mouse actionmodifiers - keyboard modifiers in effectelt - optional element in playpublic boolean drag(java.awt.Point ignore,
int modifiers,
java.util.Optional<Element> elt,
java.awt.Point current)
baseElt present.drag in interface IActionInterfacedrag in class Handlerignore - original starting mouse location of this drag actionmodifiers - keyboard modifiers in effectelt - optional element in playcurrent - current mouse locationpublic void paint(java.awt.Graphics g)
paint in interface IActionInterfacepaint in class Handlerg - Graphics context into which to draw whatever is necessary based on the tool