public class IlvActivityGraphicDuplicateInteractor extends IlvGanttSheetInteractor
IlvGanttSelectInteractor
to
duplicate the selected reservation in the Gantt sheet.Constructor and Description |
---|
IlvActivityGraphicDuplicateInteractor(IlvSelectInteractor inter)
Creates a new
IlvActivityGraphicDuplicateInteractor . |
Modifier and Type | Method and Description |
---|---|
void |
abort()
This function is called when the user presses the
Esc key
to abort the current interaction. |
protected void |
attach(IlvManagerView v)
This method is invoked when the interactor is attached to the specified
manager view.
|
protected void |
detach()
This method is called when the interactor is detached from its current
manager view.
|
protected void |
doDuplicate(double dx,
double dy)
This method is called to duplicate selected activity graphics.
|
void |
drawGhost(Graphics g)
Draws the ghost.
|
Cursor |
getCursor()
Returns the cursor used for edition.
|
IlvSelectInteractor |
getSelectInteractor()
Returns the selection interactor from which this interactor
was launched.
|
void |
init()
Initializes the interactor.
|
protected void |
processKeyEvent(KeyEvent e)
Processes the key events.
|
protected void |
processMouseEvent(MouseEvent event)
Processes mouse events.
|
protected void |
processMouseMotionEvent(MouseEvent event)
Processes mouse motion events.
|
void |
setCursor(Cursor cursor)
Changes the cursor used for edition.
|
protected boolean |
trigger(AWTEvent event,
double dx,
double dy)
This method is called when the user releases the mouse button.
|
getGanttModel, getGanttSheet
addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, allowEnsureVisible, allowEnsureVisible, disableEvents, drawGhost, enableEvents, ensureVisible, ensureVisible, getManager, getManagerView, getTransformer, handleExpose, isXORGhost, processEvent, processFocusEvent, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, setXORGhost
public IlvActivityGraphicDuplicateInteractor(IlvSelectInteractor inter)
IlvActivityGraphicDuplicateInteractor
. An
IlvActivityGraphicDuplicateInteractor
is created by
the method getMoveSelectionInteractor
of
IlvGanttSelectInteractor
.inter
- the IlvGanttSelectInteractor
creating the interactor.IlvGanttSelectInteractor.getMoveSelectionInteractor()
public void init()
protected void attach(IlvManagerView v)
attach
in class IlvManagerViewInteractor
v
- The manager view.IlvManagerViewInteractor.detach()
protected void detach()
detach
in class IlvManagerViewInteractor
IlvManagerViewInteractor.attach(ilog.views.IlvManagerView)
public IlvSelectInteractor getSelectInteractor()
IlvSelectInteractor
.public Cursor getCursor()
Cursor
used for edition.public void setCursor(Cursor cursor)
cursor
- The Cursor
.protected void processKeyEvent(KeyEvent e)
Esc
is pressed then
the interaction will be aborted.processKeyEvent
in class IlvManagerViewInteractor
e
- The event.abort()
public void abort()
Esc
key
to abort the current interaction.protected void processMouseEvent(MouseEvent event)
processMouseEvent
in class IlvManagerViewInteractor
event
- The MouseEvent
.IlvManagerViewInteractor.addMouseListener(java.awt.event.MouseListener)
protected void processMouseMotionEvent(MouseEvent event)
processMouseMotionEvent
in class IlvManagerViewInteractor
event
- The MouseEvent
.IlvManagerViewInteractor.addMouseMotionListener(java.awt.event.MouseMotionListener)
protected boolean trigger(AWTEvent event, double dx, double dy)
event
- the event that launches the method.dx
- the x translation of the rectangle.dy
- the y translation of the rectangle.True
if the event was used.protected void doDuplicate(double dx, double dy)
dx
- the x translation of the rectangle.dy
- the y translation of the rectangle.public void drawGhost(Graphics g)
drawGhost
in class IlvManagerViewInteractor
g
- The graphics context.
Its current color is already set to the view's default ghost
color, see IlvManagerView.getDefaultGhostColor()
.
Also, in XOR ghost drawing mode, the graphics context is already
set to XOR mode, with the view's default XOR color, see
IlvManagerView.getDefaultXORColor()
.IlvManagerViewInteractor.handleExpose(java.awt.Graphics)
,
IlvManagerViewInteractor.setXORGhost(boolean)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.