public class IlvLaneRenderer extends IlvInteractorRenderer
IlvSwimLanesRenderer
,
on the following points:
These new swimlanes make it possible to display processes that conform to the Business Process Modeling Notation (BPMN) standard, which requires hierarchical lanes.
This renderer looks up the following properties in the style sheet:
LaneName
property is also
set. It defines the height of the lane if lanes are horizontal, or
the width if they are vertical.
LaneName
property is also
set. It defines the width of the lane if lanes are horizontal, or
the height if they are vertical.
false
.
Lane
property.
Modifier and Type | Class and Description |
---|---|
static class |
IlvLaneRenderer.ResizeLaneInteractor
This class is public only to allow saving in an IVL file the contents of a
grapher associated with an SDM engine and containing lanes.
|
static class |
IlvLaneRenderer.ResizeLaneSelection
A custom resize interactor on selection handles.
|
_interactor
_renderer
PSEUDOCLASS_PREFIX
Constructor and Description |
---|
IlvLaneRenderer()
Creates a new lane renderer.
|
IlvLaneRenderer(IlvSDMRenderer renderer)
Creates a new lane renderer with the specified filtered renderer.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
acceptInteractor(IlvSDMEngine engine,
Object object,
IlvGraphic graphic)
This method allows subclasses to filter the objects on which the
interactor will be set.
|
protected boolean |
acceptShortcut(IlvSDMEngine engine,
IlvManagerView view,
InputEvent event)
The intent of this method is to allow
the object interactor installed by this renderer to be activated
even if a view interactor is installed on the manager view.
|
void |
afterLayout(IlvHierarchicalLayout hl)
This method is used internally, do not call it directly.
|
void |
beforeLayout(IlvHierarchicalLayout hl)
This method is used internally, do not call it directly.
|
IlvGraphic |
createNodeGraphic(IlvSDMEngine engine,
Object node)
If the
"LaneName" rendering property is set for the node,
the node is considered as being a lane. |
void |
customize(IlvSDMEngine engine,
Object object,
IlvGraphic g,
String[] pseudoClasses)
This method simply calls the
customize method
of the filtered renderer. |
double |
getDefaultLength()
Returns the default length of lanes (that is, the width if lanes are
horizontal, or the height if they are vertical).
|
double |
getDefaultSize()
Returns the default size of lanes (that is, the height if lanes are
horizontal, or the width if they are vertical).
|
static IlvLaneRenderer |
getInstance(IlvSDMEngine engine)
Returns the IlvLaneRenderer instance which belongs to
the specified SDM engine.
|
Object |
getLaneNode(String name)
Returns a lane node with the given name.
|
double |
getMargin()
Returns the margin between the objects inside the lane and the
bounds of the lane.
|
Object |
getNodeLane(Object node)
Returns the lane representing the given model object.
|
double |
getSpacing()
Returns the minimum spacing between adjacent lanes.
|
double |
getSublaneOffset()
If lanes are horizontal, returns the offset between the left side of a
sub-lane and the left side of its parent lane.
|
boolean |
isAutomaticExtending()
Tests whether the lane is in automatic extending mode.
|
boolean |
isHorizontal()
Returns
true if the lanes are displayed horizontally. |
boolean |
isNodeReparenting()
Returns
true if the node reparenting mode is enabled. |
void |
nodeGraphicAdded(IlvSDMEngine engine,
Object node,
IlvGraphic graphic,
boolean redraw)
Sets the object interactor on the node once it has been
added in the grapher.
|
void |
nodeGraphicBBoxChanged(IlvSDMEngine engine,
Object node,
IlvGraphic graphic,
IlvRect oldBBox,
IlvRect newBBox,
String[] pseudoClasses)
This method calls the filtered renderer's
nodeGraphicBBoxChanged
method. |
void |
prepareRendering(IlvSDMEngine engine)
This implementation calls the filtered renderer's
prepareRendering method. |
void |
propertiesChanged(IlvSDMEngine engine,
Object object,
Collection<String> propertyNames,
IlvGraphic graphic)
Resets the object interactor on the object once it has been
customized.
|
void |
propertiesChanged(IlvSDMEngine engine,
Object object,
Collection<String> propertyNames,
Object oldValue,
Object newValue,
IlvGraphic graphic)
Deprecated.
Please use
propertiesChanged(IlvSDMEngine, Object, Collection, IlvGraphic)
instead. Actually, oldValue and newValue have
never been used. |
void |
removeAll(IlvSDMEngine engine)
This implementation calls the filtered renderer's
removeAll method. |
void |
removeNodeGraphic(IlvSDMEngine engine,
Object node,
IlvGraphic graphic,
boolean redraw)
Simply calls the
removeNodeGraphic method
of the filtered renderer. |
void |
renderingDone(IlvSDMEngine engine)
This implementation calls the filtered renderer's
renderingDone method. |
void |
setAutomaticExtending(boolean automatic)
Enables or disables the automatic extending mode.
|
void |
setDefaultLength(double defaultLength)
Changes the default length of lanes (that is, the width if lanes are
horizontal, or the height if they are vertical).
|
void |
setDefaultSize(double defaultSize)
Changes the default size of lanes (that is, the height if lanes are
horizontal, or the width if they are vertical).
|
void |
setHorizontal(boolean horizontal)
Changes the orientation of the lanes.
|
void |
setMargin(double margin)
Sets the margin between the objects inside the lane and the
bounds of the lane.
|
void |
setNodeReparenting(boolean reparent)
Enables or disables the node reparenting mode.
|
void |
setSpacing(double spacing)
Changes the minimum spacing between adjacent lanes.
|
void |
setSublaneOffset(double sublaneOffset)
If lanes are horizontal, changes the offset between the left side of a
sub-lane and the left side of its parent lane.
|
addViewListeners, getInteractor, getParameter, isProcessMouseMoveEvents, isShorcutEnabled, isShortcutEnabled, linkGraphicAdded, needsViewListeners, removeViewListeners, setInteractor, setParameter, setProcessMouseMoveEvents, setShorcutEnabled, setShortcutEnabled
addLinkGraphic, addNodeGraphic, computeBBox, createLinkGraphic, getEncapsulatedGraphic, getFilteredRenderer, getGraphicProperty, getLinkConnectionRectangle, moveResizeNodeGraphic, processServerAction, removeLinkGraphic, setFilteredRenderer, updateObjectProperties
callMoveResizeNodeGraphic, convert, convert, getAlias, getAuxiliaryBean, getAuxiliaryBeans, getEngine, getLinkConnectionRectangle, getLocation, propertyChanged, setAlias, setEngine, setLayerName
public IlvLaneRenderer()
public IlvLaneRenderer(IlvSDMRenderer renderer)
renderer
- the next rendererpublic static IlvLaneRenderer getInstance(IlvSDMEngine engine)
engine
- the SDM enginepublic boolean isHorizontal()
true
if the lanes are displayed horizontally.public void setHorizontal(boolean horizontal)
horizontal
- the new valuepublic double getSpacing()
public void setSpacing(double spacing)
spacing
- the new valuepublic double getDefaultLength()
public void setDefaultLength(double defaultLength)
defaultLength
- the new lengthpublic double getDefaultSize()
public void setDefaultSize(double defaultSize)
defaultSize
- the new valuepublic double getMargin()
public void setMargin(double margin)
margin
- the new margin valuepublic double getSublaneOffset()
public void setSublaneOffset(double sublaneOffset)
sublaneOffset
- the new valuepublic void setAutomaticExtending(boolean automatic)
automatic
- true
if the lane is automatically extended
to fully contain all its nodes when they are moved or resized.isAutomaticExtending()
public boolean isAutomaticExtending()
true
if the lane is automatically extended
to fully contain its nodes when they are moved or resized.setAutomaticExtending(boolean)
public void setNodeReparenting(boolean reparent)
reparent
- If true
, nodes can be reparented when
they are moved.isNodeReparenting()
public boolean isNodeReparenting()
true
if the node reparenting mode is enabled.true
the node reparenting mode is enabled.setNodeReparenting(boolean)
public void prepareRendering(IlvSDMEngine engine)
prepareRendering
method.prepareRendering
in class IlvFilterSDMRenderer
engine
- The SDM engine.public IlvGraphic createNodeGraphic(IlvSDMEngine engine, Object node)
"LaneName"
rendering property is set for the node,
the node is considered as being a lane.
If the "Lane"
rendering property is set for the node,
the node is considered as belonging to the specified lane.
createNodeGraphic
in class IlvFilterSDMRenderer
engine
- The SDM enginenode
- The node whose graphic object is being created.public void removeNodeGraphic(IlvSDMEngine engine, Object node, IlvGraphic graphic, boolean redraw)
removeNodeGraphic
method
of the filtered renderer.removeNodeGraphic
in class IlvFilterSDMRenderer
engine
- The SDM engine associated with the grapher from which
the graphic object will be removed.node
- The node that has been removed or modified in the data model.graphic
- The graphic object that must be removed from the grapher.redraw
- If true
, the region covered by the
graphic object must be redrawn.public void customize(IlvSDMEngine engine, Object object, IlvGraphic g, String[] pseudoClasses)
customize
method
of the filtered renderer.customize
in class IlvFilterSDMRenderer
engine
- The SDM engine.object
- The data object that the graphic object represents.g
- The graphic object to customize.pseudoClasses
- The pseudo-classes of the object. This parameter
can be null
.public void nodeGraphicBBoxChanged(IlvSDMEngine engine, Object node, IlvGraphic graphic, IlvRect oldBBox, IlvRect newBBox, String[] pseudoClasses)
nodeGraphicBBoxChanged
method.nodeGraphicBBoxChanged
in class IlvFilterSDMRenderer
engine
- The SDM engine.node
- The data node that the graphic object represents.graphic
- The graphic object that has been moved and/or resized.oldBBox
- The bounding box of the graphic object before
the change.newBBox
- The bounding box of the graphic object after
the change.pseudoClasses
- The pseudo-classes of the object.
This parameter can be null
.public void nodeGraphicAdded(IlvSDMEngine engine, Object node, IlvGraphic graphic, boolean redraw)
nodeGraphicAdded
in class IlvInteractorRenderer
engine
- The SDM engine associated with the grapher in which
the graphic object has been added.node
- The node that is being translated into an IlvGraphic
.graphic
- The graphic object returned by createNodeGraphic
.redraw
- If true
, the region covered by the new
graphic object must be redrawn.IlvSDMRenderer.addNodeGraphic(ilog.views.sdm.IlvSDMEngine, java.lang.Object, ilog.views.IlvGraphic, boolean)
public void renderingDone(IlvSDMEngine engine)
renderingDone
method.renderingDone
in class IlvFilterSDMRenderer
engine
- The SDM engine.public void propertiesChanged(IlvSDMEngine engine, Object object, Collection<String> propertyNames, IlvGraphic graphic)
propertiesChanged
in class IlvInteractorRenderer
engine
- The SDM engine associated with the grapher in
which the graphic object is displayed.object
- The data object whose property has changed.propertyNames
- The names of the properties that have been modified.graphic
- The graphic object associated with object
.@Deprecated public void propertiesChanged(IlvSDMEngine engine, Object object, Collection<String> propertyNames, Object oldValue, Object newValue, IlvGraphic graphic)
propertiesChanged(IlvSDMEngine, Object, Collection, IlvGraphic)
instead. Actually, oldValue
and newValue
have
never been used.engine
- The SDM engine associated with the grapher in
which the graphic object is displayed.object
- The data object whose property has changed.propertyNames
- The names of the properties that have been modified.oldValue
- The old value of the property.newValue
- The new value of the property.graphic
- The graphic object associated with object
.public void removeAll(IlvSDMEngine engine)
removeAll
method.removeAll
in class IlvFilterSDMRenderer
engine
- The SDM engine.public Object getLaneNode(String name)
name
- the lane namepublic Object getNodeLane(Object node)
node
- the model objectprotected boolean acceptInteractor(IlvSDMEngine engine, Object object, IlvGraphic graphic)
If the method returns true
, the interactor will be
installed on the graphic object representing the specified
data object. Otherwise, no interactor will installed on this
object.
The default implementation always returns true
,
which means that the interactor is installed on all objects.
acceptInteractor
in class IlvInteractorRenderer
engine
- The SDM engine.object
- The data object.graphic
- The graphic object.protected boolean acceptShortcut(IlvSDMEngine engine, IlvManagerView view, InputEvent event)
If a view interactor is installed on the reference view
of the SDM engine, this method is called every time a mouse
or keyboard event occurs in the reference view. If the method
returns true
, the event will be sent to the interactor
of the object where the event occurred. If the method returns
false
, the object interactor is not called.
The default implementation returns true
if the
event is a middle- or right-click.
acceptShortcut
in class IlvInteractorRenderer
engine
- The SDM engine attached to the reference view
in which the event occurred.view
- The reference view.event
- The event received by the manager view while
a view interactor was active.public void beforeLayout(IlvHierarchicalLayout hl)
hl
- the new valuepublic void afterLayout(IlvHierarchicalLayout hl)
hl
- the layout© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.