public class IlvBPMNMakeSDMLinkInteractor extends IlvMakeSDMLinkInteractor
IlvBPMNMakeSDMLinkInteractor
lets you
create links by clicking in a BPMN diagram. In particular, it sets
properties used by the BPMN Style Sheet, according to the origin and
destination of the links. In addition, when you creates a link
from or to a Gateway, this interactor lets you specify the corner to
attach the link.Constructor and Description |
---|
IlvBPMNMakeSDMLinkInteractor(IlvBPMNFrame fmodeler)
Constructs an instance of
IlvBPMNMakeSDMLinkInteractor . |
IlvBPMNMakeSDMLinkInteractor(IlvBPMNModeler modeler)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
acceptDestination(IlvPoint p,
IlvGraphic toGraphic)
This method tests whether a node can be the destination of the link.
|
protected boolean |
acceptOrigin(IlvPoint p,
IlvGraphic fromNode)
This method tests whether a node can be the origin of the link.
|
protected void |
attach(IlvManagerView v)
Attaches the interactor to a given manager view.
|
IlvLinkImage |
createObject(IlvGraphic from,
IlvGraphic to,
IlvPoint[] points,
boolean oriented)
Implementation of
IlvLinkImageFactory . |
protected void |
detach()
Disconnect from the attached manager view.
|
protected void |
highlight(IlvGraphic graphic)
This implements does nothing.
|
protected void |
highlight(Object obj)
Highlights a node when moving over it.
|
protected void |
processMouseEvent(MouseEvent event)
Processes the mouse events.
|
protected void |
react(IlvPoint p)
Reacts to the mouse motion.
|
protected void |
reInitialize()
Reinitializes the internal status of the interactor.
|
protected void |
setLinkProperties(IlvSDMModel model,
Object link)
Sets the initial properties of the newly created link.
|
protected void |
unHighlight(IlvGraphic graphic)
This implementation does nothing.
|
protected void |
unHighlight(Object obj)
Unhighlights a graphic object when leaving it.
|
addPolyPoints, createObjectInOpaqueMode, getCompositeChild, getEngine, getFromObject, getLinkImageClass, getPrototypeModel, getPrototypeObject, getTag, getToObject, makePolyPoint, processKeyEvent, setPrototypeObject, setTag
accept, doIt, drawGhost, endOnDoubleClick, getFrom, getGrapher, getLinkClass, getLinkFactory, getTo, isGridMode, isOriented, isSelectionMode, isSelfLinkAllowed, numberOfPointsReached, setLinkFactory, setOriented, setSelectionMode, setSelfLinkAllowed
allowsMultiplePoints, allowsMultiplePoints, count, getBackground, getCursor, getForeground, getMinPointsDistance, getObjectFactory, getPoints, isAllowingMultiplePoints, isCreationInSubManagersAllowed, isGrapherMode, isOpaqueMode, isPermanent, isXORGhost, processMouseMotionEvent, setAllowingMultiplePoints, setBackground, setCreationInSubManagersAllowed, setCursor, setForeground, setGrapherMode, setGridMode, setMinPointsDistance, setObjectFactory, setOpaqueMode, setPermanent
addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, allowEnsureVisible, allowEnsureVisible, disableEvents, drawGhost, enableEvents, ensureVisible, ensureVisible, getManager, getManagerView, getTransformer, handleExpose, processEvent, processFocusEvent, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, setXORGhost
@Deprecated public IlvBPMNMakeSDMLinkInteractor(IlvBPMNModeler modeler)
IlvBPMNMakeSDMLinkInteractor
.modeler
- The BPMN Modeler application object.public IlvBPMNMakeSDMLinkInteractor(IlvBPMNFrame fmodeler)
IlvBPMNMakeSDMLinkInteractor
.fmodeler
- The BPMN Modeler application object.protected void attach(IlvManagerView v)
attach
in class IlvMakeSDMLinkInteractor
v
- The manager view.IlvMakePolyPointsInteractor.detach()
protected void detach()
detach
in class IlvMakeSDMLinkInteractor
IlvManagerViewInteractor.attach(ilog.views.IlvManagerView)
protected void setLinkProperties(IlvSDMModel model, Object link)
setLinkProperties
in class IlvMakeSDMLinkInteractor
model
- The data model of the SDM engine.link
- The link that has just been created by this interactor.protected boolean acceptOrigin(IlvPoint p, IlvGraphic fromNode)
acceptOrigin
in class IlvMakeSDMLinkInteractor
p
- The clicked point, in manager coordinates.fromNode
- The origin node to test.acceptDestination(ilog.views.IlvPoint, ilog.views.IlvGraphic)
protected boolean acceptDestination(IlvPoint p, IlvGraphic toGraphic)
acceptDestination
in class IlvMakeSDMLinkInteractor
p
- The clicked point, in manager coordinates.toGraphic
- The destination node to test.IlvMakeLinkInteractor.isSelfLinkAllowed()
,
IlvMakeLinkInteractor.getFrom()
public IlvLinkImage createObject(IlvGraphic from, IlvGraphic to, IlvPoint[] points, boolean oriented)
IlvLinkImageFactory
.
Creates a new link.
If a prototype object was set using
IlvMakeSDMLinkInteractor.setPrototypeObject(ilog.views.sdm.IlvSDMModel, java.lang.Object)
, the new object is a copy of
the prototype object. Otherwise, the object is a new object
with the tag specified by IlvMakeSDMLinkInteractor.setTag(java.lang.String)
.
If this interactor is in Opaque mode, and if this
method is being called to create the temporary link drawn to
show feedback during the interaction, then the method
IlvMakeSDMLinkInteractor.createObjectInOpaqueMode(ilog.views.IlvGraphic, ilog.views.IlvGraphic, ilog.views.IlvPoint[], boolean)
is called to create the
temporary link.
If IlvSDMEngine.isDropToGroupEnabled()
returns true
, the new link is created as a child of the
common ancestor of the source and target nodes.
If IlvSDMEngine.isDropToGroupEnabled()
returns false
or if the source and target nodes
have no common ancestor, the link is created at the top level
of the model.
createObject
in interface IlvLinkImageFactory
createObject
in class IlvMakeSDMLinkInteractor
from
- The start node of the link.to
- The end node of the link.points
- The points defining the link.oriented
- true
if the link must end with an arrow showing
the orientation.IlvMakePolyPointsInteractor.setOpaqueMode(boolean)
,
IlvMakeSDMLinkInteractor.createObjectInOpaqueMode(ilog.views.IlvGraphic, ilog.views.IlvGraphic, ilog.views.IlvPoint[], boolean)
protected void reInitialize()
reInitialize
in class IlvMakeLinkInteractor
protected void react(IlvPoint p)
react
in class IlvMakeSDMLinkInteractor
p
- The location of the mouse pointer.protected void highlight(Object obj)
obj
- the model object to be highlighted.protected void highlight(IlvGraphic graphic)
highlight
in class IlvMakeSDMLinkInteractor
graphic
- The node.protected void unHighlight(Object obj)
obj
- The object to unhighlight.protected void unHighlight(IlvGraphic graphic)
unHighlight
in class IlvMakeSDMLinkInteractor
graphic
- The node.protected void processMouseEvent(MouseEvent event)
processMouseEvent
in class IlvMakePolyPointsInteractor
event
- The event.IlvManagerViewInteractor.addMouseListener(java.awt.event.MouseListener)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.