本文整理汇总了Java中org.eclipse.bpmn2.di.BPMNDiagram.getPlane方法的典型用法代码示例。如果您正苦于以下问题:Java BPMNDiagram.getPlane方法的具体用法?Java BPMNDiagram.getPlane怎么用?Java BPMNDiagram.getPlane使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.bpmn2.di.BPMNDiagram
的用法示例。
在下文中一共展示了BPMNDiagram.getPlane方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: orderDiagramElements
import org.eclipse.bpmn2.di.BPMNDiagram; //导入方法依赖的package包/类
private void orderDiagramElements(Definitions def) {
if (zOrderEnabled) {
if (def.getDiagrams() != null) {
for (BPMNDiagram diagram : def.getDiagrams()) {
if (diagram != null) {
_logger.debug("Sorting diagram elements using DIZorderComparator");
BPMNPlane plane = diagram.getPlane();
List<DiagramElement> unsortedElements = new ArrayList<DiagramElement>(plane.getPlaneElement());
plane.getPlaneElement().clear();
Collections.sort(unsortedElements,
new DIZorderComparator());
plane.getPlaneElement().addAll(unsortedElements);
diagram.setPlane(plane);
}
}
}
}
}
示例2: marshallProcess
import org.eclipse.bpmn2.di.BPMNDiagram; //导入方法依赖的package包/类
protected void marshallProcess(Process process,
Definitions def,
JsonGenerator generator,
String preProcessingData) throws JsonGenerationException, IOException {
BPMNPlane plane = null;
for (BPMNDiagram d : def.getDiagrams()) {
if (d != null) {
BPMNPlane p = d.getPlane();
if (p != null) {
if (p.getBpmnElement() == process) {
plane = p;
break;
}
}
}
}
if (plane == null) {
throw new IllegalArgumentException("Could not find BPMNDI information");
}
generator.writeArrayFieldStart("childShapes");
List<String> laneFlowElementsIds = new ArrayList<String>();
for (LaneSet laneSet : process.getLaneSets()) {
for (Lane lane : laneSet.getLanes()) {
// we only want to marshall lanes if we have the bpmndi info for them!
if (findDiagramElement(plane,
lane) != null) {
laneFlowElementsIds.addAll(marshallLanes(lane,
plane,
generator,
0,
0,
preProcessingData,
def));
}
}
}
for (FlowElement flowElement : process.getFlowElements()) {
if (!laneFlowElementsIds.contains(flowElement.getId())) {
marshallFlowElement(flowElement,
plane,
generator,
0,
0,
preProcessingData,
def);
}
}
for (Artifact artifact : process.getArtifacts()) {
marshallArtifact(artifact,
plane,
generator,
0,
0,
preProcessingData,
def);
}
generator.writeEndArray();
}