public class IlpDefaultViewInteractionContext extends IlpDefaultInteractionContext implements IlpViewInteractionContext
IlpViewInteractionContext
A view interaction context is used to store contextual information
about the events that occur over a graphic view.IlpViewInteractionContext
,
IlpGraphicView
Constructor and Description |
---|
IlpDefaultViewInteractionContext(IlpGraphicView view)
Constructs an interaction context dedicated to a view.
|
Modifier and Type | Method and Description |
---|---|
void |
addGraphic(IlpGraphic graphic)
Adds a graphic to the collection of graphics
involved in a gesture.
|
void |
addRepresentationObject(IlpRepresentationObject object)
Adds a representation object to the collection of representation objects
involved in a gesture.
|
Collection<IlpGraphic> |
getGraphics()
Returns the collection of
IlpGraphic s involved in
a gesture. |
IlpObjectInteractionContext |
getObjectContext()
Returns the object interaction context used when the event management
is delegated to an object interactor.
|
Collection<IlpRepresentationObject> |
getRepresentationObjects()
Returns the collection of
IlpRepresentationObject s
involved in a gesture. |
boolean |
removeGraphic(IlpGraphic graphic)
Removes a graphic from the collection of graphics
involved in a gesture.
|
boolean |
removeRepresentationObject(IlpRepresentationObject object)
Removes a representation object from the collection of representation
objects involved in a gesture.
|
void |
reset()
Redefined here to reset the collection of representation objects
and graphics involved in the gesture.
|
void |
setObjectContext(IlpObjectInteractionContext objectContext)
Sets the object interaction context used when the event management
is delegated to an object interactor.
|
getInitialModifiersEx, getPosition, getView, setInitialModifiersEx, setPosition
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInitialModifiersEx, getPosition, getView, setInitialModifiersEx, setPosition
public IlpDefaultViewInteractionContext(IlpGraphicView view)
view
- The view this context is dedicated to.IllegalArgumentException
- if the given view is null
.public Collection<IlpRepresentationObject> getRepresentationObjects()
IlpRepresentationObject
s
involved in a gesture. The collection may be empty.public void addRepresentationObject(IlpRepresentationObject object)
addRepresentationObject
in interface IlpViewInteractionContext
object
- The representation object to be added.IllegalArgumentException
- if the given representation object
is null
.getRepresentationObjects()
,
removeRepresentationObject(ilog.cpl.model.IlpRepresentationObject)
public boolean removeRepresentationObject(IlpRepresentationObject object)
removeRepresentationObject
in interface IlpViewInteractionContext
object
- The representation object to be removed.true
if the given representation object has
been removed.getRepresentationObjects()
,
addRepresentationObject(ilog.cpl.model.IlpRepresentationObject)
public Collection<IlpGraphic> getGraphics()
IlpGraphic
s involved in
a gesture. The collection may be empty.getGraphics
in interface IlpViewInteractionContext
addGraphic(ilog.cpl.graphic.IlpGraphic)
,
removeGraphic(ilog.cpl.graphic.IlpGraphic)
public void addGraphic(IlpGraphic graphic)
addGraphic
in interface IlpViewInteractionContext
graphic
- The graphic to be added.IllegalArgumentException
- if the given graphic
is null
.getGraphics()
,
removeGraphic(ilog.cpl.graphic.IlpGraphic)
public boolean removeGraphic(IlpGraphic graphic)
removeGraphic
in interface IlpViewInteractionContext
graphic
- The graphic to be removed.true
if the given graphic has been removed.getGraphics()
,
addGraphic(ilog.cpl.graphic.IlpGraphic)
public IlpObjectInteractionContext getObjectContext()
null
.getObjectContext
in interface IlpViewInteractionContext
setObjectContext(ilog.cpl.interactor.IlpObjectInteractionContext)
public void setObjectContext(IlpObjectInteractionContext objectContext)
setObjectContext
in interface IlpViewInteractionContext
objectContext
- The object interaction context used to delegate
the event management. May be null
.getObjectContext()
public void reset()
reset
in interface IlpInteractionContext
reset
in class IlpDefaultInteractionContext
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.