public interface IActionInterface
Each selected element in the GUI will have four "anchor" squares at the four corners of the bounding box that defines the element. For example:
In handling events, there may be a need to paint directly into the Graphics object being controlled, which
is why the paint(Graphics) is provided.| Modifier and Type | Field and Description |
|---|---|
static int |
NoAnchor |
static int |
NorthEastAnchor |
static int |
NorthWestAnchor |
static int |
SouthEastAnchor |
static int |
SouthWestAnchor |
| Modifier and Type | Method and Description |
|---|---|
boolean |
complete(java.awt.Point pt,
int modifiers,
java.util.Optional<Element> element)
Complete the mouse interaction.
|
boolean |
completeAnchor(java.awt.Point pt,
int modifiers,
Element element)
Complete the mouse interaction as started by dragType.
|
boolean |
drag(java.awt.Point start,
int modifiers,
java.util.Optional<Element> element,
java.awt.Point current)
Act on the mouse drag.
|
boolean |
dragAnchor(java.awt.Point start,
int modifiers,
Element element,
java.awt.Point current)
Act on the anchor with mouse down.
|
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.
|
void |
paint(java.awt.Graphics g)
Provide the capability for any of these controllers to paint into the Graphics object they are controlling.
|
boolean |
start(java.awt.Point pt,
int modifiers,
java.util.Optional<Element> element)
Initiate action by pressing mouse at point with, potentially, a selected element.
|
boolean |
startAnchor(java.awt.Point pt,
int modifiers,
Element element,
int anchor)
Start the mouse interaction as started by dragType.
|
static final int NorthWestAnchor
static final int NorthEastAnchor
static final int SouthEastAnchor
static final int SouthWestAnchor
static final int NoAnchor
boolean move(java.awt.Point pt,
int modifiers,
java.util.Optional<Element> element,
int anchor)
Element 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.
pt - mouse locationmodifiers - keyboard modifiers in effectelement - optional element in playanchor - which anchor is affectedboolean start(java.awt.Point pt,
int modifiers,
java.util.Optional<Element> element)
pt - starting an element action at this mouse locationmodifiers - keyboard modifiers in effectelement - optional element in playboolean drag(java.awt.Point start,
int modifiers,
java.util.Optional<Element> element,
java.awt.Point current)
start - original starting mouse location of this drag actionmodifiers - keyboard modifiers in effectelement - optional element in playcurrent - current mouse locationboolean complete(java.awt.Point pt,
int modifiers,
java.util.Optional<Element> element)
pt - ending mouse location of this mouse actionmodifiers - keyboard modifiers in effectelement - optional element in playboolean startAnchor(java.awt.Point pt,
int modifiers,
Element element,
int anchor)
pt - start an anchor at this mouse locationmodifiers - keyboard modifiers in effectelement - affected elementanchor - initiating anchor index positionboolean dragAnchor(java.awt.Point start,
int modifiers,
Element element,
java.awt.Point current)
start - mouse location where action startedmodifiers - keyboard modifiers in effectelement - affected elementcurrent - current mouse locationboolean completeAnchor(java.awt.Point pt,
int modifiers,
Element element)
pt - ending an anchor action at this mouse locationmodifiers - keyboard modifiers in effectelement - affected elementvoid paint(java.awt.Graphics g)
g - Graphics object being controlled.