public class IlvSelectInteractorMoveSelection extends IlvMoveRectangleInteractor
IlvSelectInteractor
to move
selected objects.Constructor and Description |
---|
IlvSelectInteractorMoveSelection(IlvSelectInteractor inter)
Creates a new
IlvSelectInteractorMoveSelection referring to
an IlvSelectInteractor . |
Modifier and Type | Method and Description |
---|---|
protected void |
attach(IlvManagerView v)
Called when the interactor
is attached to the manager view.
|
protected void |
detach()
Called when the interactor
is detached from the view.
|
void |
drawGhost(Graphics g)
Draws a ghost while the selected objects are being moved.
|
double |
getMaximumScrollDistance()
Returns the maximal distance of scroll operations when the mouse moves
outside the manager view.
|
int |
getScrollTiming()
Returns the timing of repetitive scroll operations when the mouse moves
outside
the manager view.
|
IlvSelectInteractor |
getSelectInteractor()
Returns the associated
IlvSelectInteractor . |
protected IlvRect |
getSelectionBoundingBox(IlvGraphic obj,
IlvTransformer t)
This method is invoked by
setSelectionRect() and is intended
to return the bounding box of a given object. |
boolean |
isOpaqueMode()
Returns an indication of whether the interactor is in Opaque
mode or not.
|
boolean |
isProgressiveScroll()
Returns whether progressive scrolling is enabled.
|
boolean |
isXORGhost()
Returns the ghost drawing mode.
|
protected boolean |
objectIsMovable(IlvGraphic object)
Deprecated.
Beginning with Rogue Wave JViews 6.0 you should instead
filter the return of the
IlvSelectInteractor.getSelectedMovingObjects(ilog.views.IlvManager) method using a IlvFilteredGraphicEnumeration . |
protected void |
rectangleDragged(AWTEvent event,
double dx,
double dy)
Called each time the selection is dragged.
|
protected void |
snapRectangleToGrid(IlvRect rectangle)
This method is called to snap the given rectangle to the
IlvManagerView grid. |
protected void |
translateSelections(double dx,
double dy)
This method is called to translate selected objects.
|
protected boolean |
trigger(AWTEvent event,
double dx,
double dy)
Called when the user releases the mouse button.
|
dragscroll, getCursor, getLineStyle, getMoveThreshold, getRectangle, handleButtonDown, handleButtonDragged, handleButtonUp, isDragging, isGridMode, processMouseEvent, processMouseMotionEvent, setCursor, setGridMode, setLineStyle, setMoveThreshold, setOpaqueMode, setRectangle
adjustPointIfOutsideView, doAutoScroll, setMaximumScrollDistance, setProgressiveScroll, setScrollTiming, startDraggingScrollTimer, stopDraggingScrollTimer
addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, allowEnsureVisible, allowEnsureVisible, disableEvents, drawGhost, enableEvents, ensureVisible, ensureVisible, getManager, getManagerView, getTransformer, handleExpose, processEvent, processFocusEvent, processKeyEvent, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, setXORGhost
public IlvSelectInteractorMoveSelection(IlvSelectInteractor inter)
IlvSelectInteractorMoveSelection
referring to
an IlvSelectInteractor
.inter
- The associated IlvSelectInteractor
.getSelectInteractor()
public boolean isOpaqueMode()
This method is overridden in this class to return
the opaque move selection mode of the associated
IlvSelectInteractor
.
isOpaqueMode
in class IlvMoveRectangleInteractor
IlvSelectInteractor.isOpaqueMove()
,
IlvMoveRectangleInteractor.setOpaqueMode(boolean)
public final boolean isXORGhost()
IlvSelectInteractor
. It also
forces the XOR mode when the method isOpaqueMode()
returns
false
.isXORGhost
in class IlvMoveRectangleInteractor
true
if the drawing needs to be performed in
XOR
mode, false
otherwise.IlvManagerViewInteractor.setXORGhost(boolean)
,
IlvManagerViewInteractor.handleExpose(java.awt.Graphics)
,
IlvManagerViewInteractor.drawGhost(java.awt.Graphics)
public int getScrollTiming()
getScrollTiming
in class IlvAbstractScrollInteractor
IlvAbstractScrollInteractor.setScrollTiming(int)
public double getMaximumScrollDistance()
getMaximumScrollDistance
in class IlvAbstractScrollInteractor
IlvAbstractScrollInteractor.setMaximumScrollDistance(double)
public boolean isProgressiveScroll()
isProgressiveScroll
in class IlvAbstractScrollInteractor
IlvAbstractScrollInteractor.setProgressiveScroll(boolean)
public IlvSelectInteractor getSelectInteractor()
IlvSelectInteractor
.protected void snapRectangleToGrid(IlvRect rectangle)
IlvManagerView
grid. By default it calls
IlvManagerView.snapToGrid(IlvPoint)
to snap the
top left corner of the rectangle to the grid. This method
can be redefined to snap the rectangle differently (like
snapping the center of it instead of the top left corner).
The dimensions of the rectangle must not be changed by
this method; it can only modify the x and y attributes.snapRectangleToGrid
in class IlvMoveRectangleInteractor
rectangle
- the rectangle to be snappedprotected IlvRect getSelectionBoundingBox(IlvGraphic obj, IlvTransformer t)
setSelectionRect()
and is intended
to return the bounding box of a given object.obj
- The moveable selected object.t
- The current drawing transformer.protected void attach(IlvManagerView v)
attach
in class IlvMoveRectangleInteractor
v
- The manager view.detach()
protected void detach()
detach
in class IlvMoveRectangleInteractor
attach(ilog.views.IlvManagerView)
@Deprecated protected boolean objectIsMovable(IlvGraphic object)
IlvSelectInteractor.getSelectedMovingObjects(ilog.views.IlvManager)
method using a IlvFilteredGraphicEnumeration
.true
,
meaning that all the selected objects for which
IlvManager.isMovable(IlvGraphic)
returns
true
will be moved.
You may override it to select the objects that
will be moved.object
- The object to test.public void drawGhost(Graphics g)
drawGhost
in class IlvMoveRectangleInteractor
g
- The Graphics.IlvManagerViewInteractor.handleExpose(java.awt.Graphics)
,
IlvManagerViewInteractor.setXORGhost(boolean)
protected boolean trigger(AWTEvent event, double dx, double dy)
IlvSelectInteractor
is not in opaqueMove,
this method will call translateSelections
to perform
the selection translation.trigger
in class IlvMoveRectangleInteractor
event
- The event that launches the method.dx
- The x translation of the rectangle.dy
- The y translation of the rectangle.translateSelections(double, double)
protected void rectangleDragged(AWTEvent event, double dx, double dy)
IlvSelectInteractor
is in opaqueMove,
this method will call translateSelections
to perform
the selection translation.rectangleDragged
in class IlvMoveRectangleInteractor
event
- The event that launches the method.dx
- The x translation of the rectangle.dy
- The y translation of the rectangle.translateSelections(double, double)
protected void translateSelections(double dx, double dy)
IlvManager.translateObjects(ilog.views.IlvGraphicEnumeration, double, double, ilog.views.IlvTransformer)
method on the manager
and pass the selected objects obtained with
IlvSelectInteractor.getSelectedMovingObjects(ilog.views.IlvManager)
.
This manager is obtained by calling the method
IlvSelectInteractor.getMoveSelectionManager()
on the the associated
IlvSelectInteractor
(see getSelectInteractor()
).dx
- The x translation of the rectangle.dy
- The y translation of the rectangle.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.