public class IlvHyperEdgePinConnectorEdition extends IlvObjectInteractor
IlvHyperEdgePinConnector
.
The interactor allows you to select individual pins and to move them along
the border of the related object.Constructor and Description |
---|
IlvHyperEdgePinConnectorEdition()
Creates the interactor.
|
Modifier and Type | Method and Description |
---|---|
Cursor |
getDragCursor()
Returns the cursor used for dragging.
|
Cursor |
getPinCursor()
Returns the cursor used when the pointer is on a pin but
not dragging.
|
protected boolean |
handleButtonDown(IlvHyperEdgePinConnectorSelection s,
MouseEvent event,
IlvObjectInteractorContext context)
Handles
MOUSE_PRESSED events. |
protected boolean |
handleButtonDragged(IlvHyperEdgePinConnectorSelection s,
MouseEvent event,
IlvObjectInteractorContext context)
Handles
MOUSE_DRAGGED events. |
protected boolean |
handleButtonUp(IlvHyperEdgePinConnectorSelection s,
MouseEvent event,
IlvObjectInteractorContext context)
Handles
MOUSE_RELEASED events. |
static boolean |
isPinDraggingAllowed()
Returns whether it is allowed to drag a selected pin.
|
static boolean |
isPinDraggingRestrictedToNodeBorder()
Returns whether the movement of pins is restricted so that pins always
stay at the border of the node.
|
void |
onEnter(IlvGraphic sel,
IlvObjectInteractorContext context)
Called when the selection is entered.
|
void |
onExit(IlvGraphic sel,
IlvObjectInteractorContext context)
Called when the selection is exited.
|
boolean |
processEvent(IlvGraphic obj,
AWTEvent event,
IlvObjectInteractorContext context)
Processes the events.
|
void |
setDragCursor(Cursor cursor)
Sets the cursor used for dragging.
|
void |
setPinCursor(Cursor cursor)
Sets the cursor used when the pointer is on a pin but
not dragging.
|
static void |
setPinDraggingAllowed(boolean flag)
Sets whether it is allowed to drag a selected pin.
|
static void |
setPinDraggingRestrictedToNodeBorder(boolean flag)
Allows to restrict the movement of pins so that pins always stay at
the border of the node.
|
Get, handleExpose, Put
public IlvHyperEdgePinConnectorEdition()
public Cursor getDragCursor()
public void setDragCursor(Cursor cursor)
public Cursor getPinCursor()
public void setPinCursor(Cursor cursor)
public boolean processEvent(IlvGraphic obj, AWTEvent event, IlvObjectInteractorContext context)
handleButtonDown
for a MOUSE_PRESSED event,
handleButtonUp
for a MOUSE_RELEASED event, or
handleButtonDragged
for a MOUSE_DRAGGED event.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.handleButtonDown(ilog.views.hypergraph.edgeconnector.IlvHyperEdgePinConnectorSelection, java.awt.event.MouseEvent, ilog.views.IlvObjectInteractorContext)
,
handleButtonUp(ilog.views.hypergraph.edgeconnector.IlvHyperEdgePinConnectorSelection, java.awt.event.MouseEvent, ilog.views.IlvObjectInteractorContext)
,
handleButtonDragged(ilog.views.hypergraph.edgeconnector.IlvHyperEdgePinConnectorSelection, java.awt.event.MouseEvent, ilog.views.IlvObjectInteractorContext)
protected boolean handleButtonDown(IlvHyperEdgePinConnectorSelection s, MouseEvent event, IlvObjectInteractorContext context)
MOUSE_PRESSED
events.true
if the event has been processed,
false
otherwise.protected boolean handleButtonDragged(IlvHyperEdgePinConnectorSelection s, MouseEvent event, IlvObjectInteractorContext context)
MOUSE_DRAGGED
events.true
if the event has been processed,
false
otherwise.protected boolean handleButtonUp(IlvHyperEdgePinConnectorSelection s, MouseEvent event, IlvObjectInteractorContext context)
MOUSE_RELEASED
events.true
if the event has been processed,
false
otherwise.public static void setPinDraggingRestrictedToNodeBorder(boolean flag)
isPinDraggingRestrictedToNodeBorder()
public static boolean isPinDraggingRestrictedToNodeBorder()
public static void setPinDraggingAllowed(boolean flag)
IlvMakeHyperEdgePinConnectorInteractor
, but only whether
pin dragging is allowed while the normal select interactor is used.isPinDraggingAllowed()
public static boolean isPinDraggingAllowed()
setPinDraggingAllowed(boolean)
public void onEnter(IlvGraphic sel, IlvObjectInteractorContext context)
IlvSelection.onEnter(ilog.views.IlvObjectInteractorContext)
).
The selection is entered if the select interactor moves the mouse over
the selection so that mouse events are dispatched to the object interactor
of this selection.
onEnter
in class IlvObjectInteractor
sel
- The selection object.context
- The context for the object interactor.IlvSelection.onEnter(ilog.views.IlvObjectInteractorContext)
public void onExit(IlvGraphic sel, IlvObjectInteractorContext context)
IlvSelection.onExit(ilog.views.IlvObjectInteractorContext)
).
The selection is exited if the select interactor moves the mouse to
a blanc area of the view, or to another selection so that mouse events
are not anymore dispatched to the object interactor of this selection.
onExit
in class IlvObjectInteractor
sel
- The selection object.context
- The context for the object interactor.IlvSelection.onExit(ilog.views.IlvObjectInteractorContext)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.