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 IlpInteractionContext
public IlpPoint getPosition()
null
until a complete gesture has been recognized.getPosition
in interface IlpInteractionContext
setPosition(ilog.cpl.graphic.IlpPoint)
public void setPosition(IlpPoint position)
setPosition
in interface IlpInteractionContext
position
- The location where the gesture ended.getPosition()
public int getInitialModifiersEx()
MouseEvent.MOUSE_PRESSED
).getInitialModifiersEx
in interface IlpInteractionContext
setInitialModifiersEx(int)
public void setInitialModifiersEx(int modifiersEx)
MouseEvent.MOUSE_PRESSED
).setInitialModifiersEx
in interface IlpInteractionContext
modifiersEx
- The modifiers to be stored.getInitialModifiersEx()
public void reset()
position
to null
reset
in interface IlpInteractionContext
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.