public class CollectSnapResultsEventArgs extends InputModeEventArgs
CollectSnapResults
event.
Event handlers can use the addSnapResult(SnapResult) method to add snapping results for the current move
operation.
EMPTY| Constructor and Description |
|---|
CollectSnapResultsEventArgs(IInputModeContext context,
PointD originalLocation,
PointD newLocation,
double snapDistance,
Collection<SnapResult> snapResults)
Creates a new instance of the event arguments using the provided values for initialization.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSnapResult(SnapResult snapResult)
Adds a
SnapResult to the collection of snap results. |
PointD |
getDelta()
Gets the vector by which the mouse has been moved since initialization of the snapping process.
|
PointD |
getNewLocation()
Gets the new (current) location of the mouse that is going to be manipulated by the snapping process.
|
PointD |
getOriginalLocation()
Gets the original location of the mouse at the beginning of the gesture.
|
double |
getSnapDistance()
The zoom invariant snap distance.
|
getContextpublic CollectSnapResultsEventArgs(IInputModeContext context, PointD originalLocation, PointD newLocation, double snapDistance, Collection<SnapResult> snapResults)
context - The context for which the event is queried.originalLocation - The original location of the mouse at the beginning of the gesture.newLocation - The new (current) location of the mouse.snapDistance - The zoom invariant snap distance.snapResults - The collection to store the snap results in.public void addSnapResult(SnapResult snapResult)
SnapResult to the collection of snap results.
null values will be discarded.
snapResult - The result to add.public final PointD getDelta()
public final PointD getNewLocation()
public final PointD getOriginalLocation()
public final double getSnapDistance()