public class IlvSwimLanesRenderer extends IlvFilterSDMRenderer
Swimlanes are contiguous vertical or horizontal rectangular areas that
usually span the whole view. Swimlanes are most often used in conjunction
with a hierarchical graph layout algorithm. This algorithm has the ability
to place the nodes of the graph automatically according to swimlanes.
See IlvHierarchicalLayout
and IlvSwimLaneConstraint
for a detailed discussion of the hierarchical layout algorithm and
swimlanes.
The swimlane renderer is not responsible for configuring the
graph layout algorithm so that it creates swimlanes. This is done
by using a GraphLayout renderer (see IlvGraphLayoutRenderer
configured to use a hierarchical algorithm, and setting the
SwimLaneConstraint
property in the style sheet
for appropriate groups of nodes.
The swimlane renderer is merely responsible for displaying the swimlanes.
For this, it reads the SwimLaneConstraint
property of each node
of the graph from the style sheet to determine which nodes belong to the
same swimlane. The swimlanes are then displayed as colored rectangles in the
background of the view, with a label on top of each swimlane.
Since the SwimLaneConstraint
property is also used to
configure the hierarchical layout algorithm so that it places the nodes
automatically in swimlanes, performing a hierarchical layout on the graph
will also place the activities correctly according to their swimlanes.
Note, however, that the IlvSwimLanesRenderer
can be used without
performing a node layout. Conversely, you can perform a node layout using swim
lanes without actually displaying the swimlanes (to do this, just set the
SwimLanes
property to false
).
In other words, you can use the IlvSwimLanesRenderer
to only
display swimlanes, but then the swimlanes may overlap. Performing a node
layout will also make sure that the swimlanes do not overlap, and that the
nodes are arranged as hierarchical graphs inside each swimlane.
participant
property identifying the workflow participant that performs the activity.
Swimlanes are often used to represent the participant. Each swimlane represents
a participant, and the activities are placed in the swimlane of their
participant. This can be implemented very simply using the following rules:
SDM { SwimLanes : "true"; } node.activity { SwimLaneConstraint : "@participant"; }
The first rule tells the SDM engine to display the swimlanes using
an IlvSwimLanesRenderer
. The second rule says that a swimlane
must be displayed around all the activities that have the same participant
property.
The look of the swimlanes can be customized with the following properties:
SwimLaneLabel
: This property can be set to customize the label
of the swimlanes. For example:
node.activity[participant="rnd"] { SwimLaneLabel : "Research and Development"; } node.activity[participant="cs"] { SwimLaneLabel : "Customer Support"; }If this property is not set, the default label is the value of the
SwimLaneConstraint
property.
SwimLaneColor
: This property can be set to customize the colors
of the swimlanes. For example:
node.activity[participant="rnd"] { SwimLaneColor : "blue"; } node.activity[participant="cs"] { SwimLaneColor : "#8800ff00"; // half-transparent green }If this property is not set, a different default color is automatically allocated for each swimlane, based on the values defined by
#setHue
, #setBrightness
, #setSaturation
, and #setAlpha
.
SwimLaneGraphic
: This property can be set to customize
the graphic object representing a swimlane completely. For example:
node.activity { SwimLaneGraphic : "@#swimlane"; } Subobject#swimlane { class : "ilog.views.sdm.graphic.IlvExpandedFrame"; thickness : "10"; }If this property is not set, an
IlvGeneralNode
is used by default.
Note: IlvLaneRenderer
is a simpler implementation of this
feature.
SwimLanes {
adjustingToView : "false";
alias : "<value>";
alpha : "2.0";
brightness : "2.0";
defaultSwimLanes : "<value>";
draggingEnabled : "false";
enabled : "false";
extendingToSides : "false";
hue : "2.0";
labelRotated : "false";
layer : "2";
margin : "2";
overlapsAllowed : "false";
parameter : "<value>";
saturation : "2.0";
scrollDelay : "2";
swimLaneColor[0] : "green";
swimLaneColor[1] : "red";
swimLaneLabel[0] : "<value>";
swimLaneLabel[1] : "<value>";
swimLaneWidth[0] : "3.0";
swimLaneWidth[1] : "3.0";
}
Modifier and Type | Property and Description |
---|---|
boolean |
adjustingToView
Specifies whether the swimlanes are dynamically adjusted according to the size of the view or not. |
java.lang.String |
alias
Sets the alias of this renderer. |
float |
alpha
Sets the alpha channel of the colors allocated by this renderer. |
float |
brightness
Sets the brightness of the colors allocated by this renderer. |
java.lang.String |
defaultSwimLanes
Defines the default swimlanes to display. |
boolean |
draggingEnabled
Allows the user to drag objects from one swimlane to another. |
boolean |
enabled
Enables or disables swimlanes. |
boolean |
extendingToSides
Specifies whether the swimlanes extend to the sides of the view or not. |
float |
hue
Sets the "base" hue. |
boolean |
labelRotated
Sets whether the label is rotated. |
int |
layer
Sets the manager layer in which the swimlane graphics will be added. |
int |
margin
Sets the width of the margin remaining around the objects of a swimlane. |
boolean |
overlapsAllowed
Allows or forbids the swimlanes to overlap. |
java.lang.String |
parameter
This method gives access to a privileged parameter of the renderer, and allows this parameter to be specified quickly in the main option rule of the style sheet. |
float |
saturation
Sets the saturation of the colors allocated by this renderer. |
int |
scrollDelay
Sets the delay after which the swimlanes reappear when the view has been scrolled. |
java.awt.Color[] |
swimLaneColor
Changes the color of a swimlane. |
java.lang.String[] |
swimLaneLabel
Sets the label of the specified swimlane. |
double[] |
swimLaneWidth
Changes the width of a swimlane. |
public boolean adjustingToView
adjustingToView : "false";
public java.lang.String alias
SubGraph
or GraphLayout
.
alias : "<value>";
public float alpha
alpha : "2.0";
public float brightness
brightness : "2.0";
public java.lang.String defaultSwimLanes
defaultSwimLanes : "<value>";
public boolean draggingEnabled
By default, dragging is enabled.
CSS example:
draggingEnabled : "false";
public boolean enabled
By default, swimlanes are enabled.
CSS example:
enabled : "false";
public boolean extendingToSides
By default, swimlanes do not extend to the sides of the view.
CSS example:
extendingToSides : "false";
public float hue
hue : "2.0";
public boolean labelRotated
labelRotated : "false";
public int layer
layer : "2";
public int margin
10
.
margin : "2";
public boolean overlapsAllowed
overlapsAllowed : "false";
public java.lang.String parameter
For example, the main parameter of the
ilog.views.sdm.renderer.maps.IlvMapRenderer
is the name
of the map file. You can specify that you want to display a
map of the USA by the single declaration:
SDM { Map : "usa.ivl"; }
The default implementation does nothing. Subclasses should
override this method to give access to their main parameter.
CSS example:
parameter : "<value>";
public float saturation
saturation : "2.0";
public int scrollDelay
Swimlanes are normally hidden during scrolling interactions.
You can use this method if you notice that swimlanes
reappear in the middle of a scrolling interaction.
The default delay is 200
milliseconds; specify a longer delay to get a smoother
scroll.
CSS example:
scrollDelay : "2";
public java.awt.Color[] swimLaneColor
swimLaneColor[0] : "green";
swimLaneColor[1] : "red";
public java.lang.String[] swimLaneLabel
swimLaneLabel[0] : "<value>";
swimLaneLabel[1] : "<value>";
public double[] swimLaneWidth
swimLaneWidth[0] : "3.0";
swimLaneWidth[1] : "3.0";
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.