public class IlpDefaultInteractionContext extends Object implements IlpInteractionContext
IlpInteractionContext.
Describes the context of user interactions.
An interaction context is used to store contextual information
about the events that an IlpGraphicController
delegates to an IlpInteractor. It is dedicated to a view.IlpInteractionContext,
IlpGraphicController,
IlpInteractor,
IlpAbstractInteractor| Constructor and Description |
|---|
IlpDefaultInteractionContext(IlpGraphicView view)
Constructs an interaction context dedicated to a view.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getInitialModifiersEx()
Returns the modifiersEx of the event that started the interaction
(usually
MouseEvent.MOUSE_PRESSED). |
IlpPoint |
getPosition()
Returns the location where a gesture ended, in view coordinates.
|
IlpGraphicView |
getView()
Returns the graphic view.
|
void |
reset()
Resets the context as follows:
Sets
position to null
|
void |
setInitialModifiersEx(int modifiersEx)
Sets the modifiersEx of the event that started the interaction
(usually
MouseEvent.MOUSE_PRESSED). |
void |
setPosition(IlpPoint position)
Sets the location where a gesture ended, in view coordinates.
|
public IlpDefaultInteractionContext(IlpGraphicView view)
view - The view this context is dedicated to.IllegalArgumentException - if the given view is null.public IlpGraphicView getView()
getView in interface IlpInteractionContextpublic IlpPoint getPosition()
null until a complete gesture has been recognized.getPosition in interface IlpInteractionContextsetPosition(ilog.cpl.graphic.IlpPoint)public void setPosition(IlpPoint position)
setPosition in interface IlpInteractionContextposition - The location where the gesture ended.getPosition()public int getInitialModifiersEx()
MouseEvent.MOUSE_PRESSED).getInitialModifiersEx in interface IlpInteractionContextsetInitialModifiersEx(int)public void setInitialModifiersEx(int modifiersEx)
MouseEvent.MOUSE_PRESSED).setInitialModifiersEx in interface IlpInteractionContextmodifiersEx - The modifiers to be stored.getInitialModifiersEx()public void reset()
position to nullreset in interface IlpInteractionContext© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.