Java Reference
In-Depth Information
((TaskNameEditPart) childEditPart).setLabel(getPrimaryShape()
.getFigureRoundedRectangleNameLabel());
return true;
}
if (childEditPart instanceof EventXEditPart) {
BorderItemLocator locator = new BorderItemLocator(getMainFigure(),
PositionConstants.NONE);
locator.setBorderItemOffset(new Dimension(getMapMode().DPtoLP(10),
getMapMode().DPtoLP(10)));
getBorderedFigure().getBorderItemContainer().add(
((Event2EditPart) childEditPart).getFigure(), locator);
return true;
}
return false;
}
Figure 4-35 shows the result of the change, showing the before and after
versions.
A Task
Another Task
A Task
Another Task
Figure 4-35
Task border item
Intermediate Event Outline
Our graphical definition model has no “double line” option, so we need to write
some custom code to create a double outline for our intermediate event. We can
do this in several ways, including nesting figures. It seems easiest to simply over-
ride the outlineShape() method in our generated Ellipse figure. Following
is the modification made to accomplish this, though it won't work if we have a
line width other than 1. Fortunately, we know that we won't, because otherwise
we'd take the time to put the additional logic in the templates and provide a
decorator model for our graphical definition model. The following code is found
in the generated Event2EditPart class. After generating the figures plug-in
in Section 4.5.5, “Generating the Figures Plug-In,” you can find the code to
modify in org.eclipse.bpmn.figures.DoubleCircle and associated
DoubleCircleWithEnvelope .
/**
* Modified to draw double outline, assuming lineWidth == 1
*
* @generated NOT
*/
 
Search WWH ::




Custom Search