public class IlvActivityGraphicMoveInteractor extends IlvGanttSheetInteractor
IlvGanttSelectInteractor
.Modifier and Type | Field and Description |
---|---|
static int |
AUTO_DETECT
Identifies that the activity movement axis, either horizontal or vertical, will be
determined automatically when the user starts dragging the mouse.
|
static int |
BOTH
Identifies that activity movement is allowed on both the horizontal and vertical
axes.
|
static int |
HORIZONTAL
Identifies that activity movement is allowed on the horizontal axis.
|
static int |
VERTICAL
Identifies that activity movement is allowed on the vertical axis.
|
Constructor and Description |
---|
IlvActivityGraphicMoveInteractor(IlvGanttSelectInteractor inter)
Creates a new
IlvActivityGraphicMoveInteractor object. |
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 called when the interactor
is attached to the specified manager view.
|
protected void |
detach()
This method is called when the interactor
is detached from the specified manager view.
|
void |
drawGhost(Graphics g)
Draws the ghost.
|
Cursor |
getCursor()
Returns the cursor used for edition.
|
int |
getMovementAxis()
Returns the movement axis along which the user is allowed to drag activities when
the interactor is attached to an
IlvScheduleChart . |
void |
init()
Initializes the interactor.
|
boolean |
isMovementDetectionEnabled()
Deprecated.
Beginning with Rogue Wave JViews 7.5, use
getMovementAxis() ==
AUTO_DETECT instead. |
boolean |
isSnapGhostToRowsEnabled()
Returns whether ghost graphics are snapped to the nearest row when the
mouse is dragged vertically and the
IlvGanttSelectInteractor
that created this interactor is in Ghost Move mode. |
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.
|
void |
setMovementAxis(int axis)
Sets the movement axis along which the user is allowed to drag activities when the
interactor is attached to an
IlvScheduleChart . |
void |
setMovementDetectionEnabled(boolean detect)
Deprecated.
Beginning with Rogue Wave JViews 7.5, use
setMovementAxis(detect ?
AUTO_DETECT : BOTH) instead. |
void |
setSnapGhostToRowsEnabled(boolean enable)
Sets whether ghost graphics are snapped to the nearest row when the
mouse is dragged vertically and the
IlvGanttSelectInteractor
that created this interactor is in Ghost Move mode. |
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 static final int BOTH
HORIZONTAL
,
VERTICAL
,
AUTO_DETECT
,
getMovementAxis()
,
setMovementAxis(int)
,
Constant Field Valuespublic static final int HORIZONTAL
BOTH
,
VERTICAL
,
AUTO_DETECT
,
getMovementAxis()
,
setMovementAxis(int)
,
Constant Field Valuespublic static final int VERTICAL
HORIZONTAL
,
BOTH
,
AUTO_DETECT
,
getMovementAxis()
,
setMovementAxis(int)
,
Constant Field Valuespublic static final int AUTO_DETECT
VERTICAL
,
HORIZONTAL
,
BOTH
,
getMovementAxis()
,
setMovementAxis(int)
,
Constant Field Valuespublic IlvActivityGraphicMoveInteractor(IlvGanttSelectInteractor inter)
IlvActivityGraphicMoveInteractor
object. An
IlvActivityGraphicMoveInteractor
is usually created
by the method getMoveSelectionInteractor
of
IlvGanttSelectInteractor
.inter
- the IlvGanttSelectInteractor
that creates the interactor.IlvGanttSelectInteractor.getMoveSelectionInteractor()
public void init()
public int getMovementAxis()
IlvScheduleChart
. This value is ignored when
the interactor is attached to an IlvGanttChart
because only horizontal
movement along the time axis is allowed. The value will be one of BOTH
,
HORIZONTAL
, VERTICAL
, or AUTO_DETECT
. The default value
is BOTH
.setMovementAxis(int)
public void setMovementAxis(int axis)
IlvScheduleChart
. This value is ignored when the
interactor is attached to an IlvGanttChart
because only horizontal
movement along the time axis is allowed.axis
- The movement axis. The value must be one of BOTH
,
HORIZONTAL
, VERTICAL
, or AUTO_DETECT
.getMovementAxis()
@Deprecated public boolean isMovementDetectionEnabled()
getMovementAxis() ==
AUTO_DETECT
instead.true
, the
interactor detects the most favorite mouse movement, either horizontally
or vertically. The default value is false
.IlvGanttSelectInteractor.isMovementDetectionEnabled()
,
IlvGanttSelectInteractor.setMovementDetectionEnabled(boolean)
@Deprecated public void setMovementDetectionEnabled(boolean detect)
setMovementAxis(detect ?
AUTO_DETECT : BOTH)
instead.true
, the
interactor detects the most favorite mouse movement, either horizontally
or vertically. If set to false
, movement is allowed along both the
horizontal and vertical axes.detect
- The state of the movement detection.IlvGanttSelectInteractor.isMovementDetectionEnabled()
,
IlvGanttSelectInteractor.setMovementDetectionEnabled(boolean)
public boolean isSnapGhostToRowsEnabled()
IlvGanttSelectInteractor
that created this interactor is in Ghost Move mode. If
false
, ghost graphics smoothly track vertical mouse movement,
just as they do horizontal mouse movement. The default value is
true
.setSnapGhostToRowsEnabled(boolean)
public void setSnapGhostToRowsEnabled(boolean enable)
IlvGanttSelectInteractor
that created this interactor is in Ghost Move mode. If
false
, ghost graphics smoothly track vertical mouse movement,
just as they do horizontal mouse movement.enable
- Enable or disable ghost graphics to snap to rows.isSnapGhostToRowsEnabled()
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 Cursor getCursor()
Cursor
.public void setCursor(Cursor cursor)
cursor
- The Cursor
.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 void processKeyEvent(KeyEvent e)
Esc
is pressed then
the interaction will be aborted.processKeyEvent
in class IlvManagerViewInteractor
e
- The KeyEvent
abort()
public void abort()
Esc
key
to abort the current interaction.public void drawGhost(Graphics g)
drawGhost
in class IlvManagerViewInteractor
g
- The graphics context.IlvManagerViewInteractor.handleExpose(java.awt.Graphics)
,
IlvManagerViewInteractor.setXORGhost(boolean)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.