public class IlvActivityGraphicReshapeInteractor extends IlvGanttObjectInteractor
IlvActivityGraphicSelection
.
It reshapes an instance of
IlvActivityGraphic
.
More precisely, it
does not reshape the activity graphic directly, but changes
the start time and end time of the activity represented
by the activity graphic.
This interactor is used together with a
IlvGanttSelectInteractor
. It
becomes active when an IlvActivityGraphic
object is
selected by an IlvGanttSelectInteractor
object.
This interactor has two working modes: Opaque Reshape and Ghost Reshape.
IlvGanttSelectInteractor
object installed for the Gantt sheet. The default mode is
Opaque Reshape.Constructor and Description |
---|
IlvActivityGraphicReshapeInteractor()
Creates an instance of
IlvActivityGraphicReshapeInteractor . |
Modifier and Type | Method and Description |
---|---|
void |
abort(EventObject event)
This function is called when the user presses the
Esc key
to abort the current interaction. |
static void |
addActivityGraphicInteractorListener(IlvGanttSheet ganttSheet,
ActivityGraphicInteractorListener listener)
Adds the given listener subscribed for receiving reshape notifications.
|
protected void |
drawGhost()
Draws the activity while reshaping.
|
Cursor |
getCursor(int direction)
Returns the cursor used for editing.
|
protected boolean |
processEventImpl(IlvGraphic obj,
AWTEvent event,
IlvObjectInteractorContext context)
Processes user input events.
|
protected boolean |
processMouseDragged(MouseEvent event)
Processes mouse dragged events.
|
protected boolean |
processMouseMoved(MouseEvent event)
Processes mouse moved events.
|
protected boolean |
processMousePressed(MouseEvent event)
Processes mouse pressed events.
|
protected boolean |
processMouseReleased(MouseEvent event)
Processes mouse released events.
|
static void |
removeActivityGraphicInteractorListener(IlvGanttSheet ganttSheet,
ActivityGraphicInteractorListener listener)
Removes the given listener.
|
getGanttModel, getGanttSheet, processEvent
Get, handleExpose, onEnter, onExit, Put
public IlvActivityGraphicReshapeInteractor()
IlvActivityGraphicReshapeInteractor
.public static void addActivityGraphicInteractorListener(IlvGanttSheet ganttSheet, ActivityGraphicInteractorListener listener)
ganttSheet
- The implicated Gantt sheet.listener
- The listener.public static void removeActivityGraphicInteractorListener(IlvGanttSheet ganttSheet, ActivityGraphicInteractorListener listener)
ganttSheet
- The implicated Gantt sheet.listener
- The listener.public Cursor getCursor(int direction)
direction
- the direction of the reshaping.Cursor
.protected boolean processMousePressed(MouseEvent event)
event
- The MouseEvent
.True
if the event was used.protected boolean processMouseMoved(MouseEvent event)
event
- The MouseEvent
True
if the event was used.protected boolean processMouseDragged(MouseEvent event)
event
- The MouseEvent
.True
if the event was used.protected boolean processMouseReleased(MouseEvent event)
event
- The MouseEvent
.True
if the event was used.protected boolean processEventImpl(IlvGraphic obj, AWTEvent event, IlvObjectInteractorContext context)
processEventImpl
in class IlvGanttObjectInteractor
obj
- The graphic object that the user is interacting with.event
- The input event.context
- The interactor context.protected void drawGhost()
public void abort(EventObject event)
Esc
key
to abort the current interaction.event
- The triggering event.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.