public class IlvGroupInteractor extends IlvObjectInteractor
IlvGroupInteractor
is a subclass of
IlvObjectInteractor
that can be used to define user interactions
on a graphic element of a group.
This interactor handles all mouse and keyboard events sent to a graphic object. If the graphic object is contained in a group, the interactor sets a number of properties on this group.
You can attach behavior objects to the group to handle these properties and program how the group will react to user interactions.
The properties set on the group by the interactor are the following:
eventType
- the event type.
eventModifiers
- the event modifiers.
eventElement
- the name of the graphic element which
received the event.
eventX
- the X coordinate of the event.
eventY
- the Y coordinate of the event.
eventClickCount
- the click count.
eventType
- the event type.
eventModifiers
- the event modifiers.
eventElement
- the name of the graphic element which
received the event.
eventKeyText
- a string representing the event key code.
For example, you can define a prototype containing a rectangle and set a
IlvGroupInteractor
to that rectangle. You can then define a
trigger behavior which sets the target property x
to
eventX
. When you move the mouse over the rectangle, the whole
prototype will follow the horizontal position of the mouse.
IlvGraphicElement
,
IlvGroup
,
IlvBehavior
,
Serialized FormConstructor and Description |
---|
IlvGroupInteractor()
Creates a new
IlvGroupInteractor . |
Modifier and Type | Method and Description |
---|---|
boolean |
processEvent(IlvGraphic obj,
AWTEvent event,
IlvObjectInteractorContext context)
Processes the events.
|
Get, handleExpose, onEnter, onExit, Put
public boolean processEvent(IlvGraphic obj, AWTEvent event, IlvObjectInteractorContext context)
processEvent
in class IlvObjectInteractor
obj
- The graphic object.event
- The event to process.context
- The context in which the event occurred.true
if the event was handled
by this processEvent
invocation,
false
otherwise.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.