use of org.kie.workbench.common.stunner.bpmn.definition.Lane in project kie-wb-common by kiegroup.
the class LaneConverter method convert.
public BpmnNode convert(org.eclipse.bpmn2.Lane lane) {
Node<View<Lane>, Edge> node = typedFactoryManager.newNode(lane.getId(), Lane.class);
Lane definition = node.getContent().getDefinition();
LanePropertyReader p = propertyReaderFactory.of(lane);
definition.setGeneral(new BPMNGeneralSet(new Name(lane.getName()), new Documentation(p.getDocumentation())));
node.getContent().setBounds(p.getBounds());
definition.setDimensionsSet(p.getRectangleDimensionsSet());
definition.setFontSet(p.getFontSet());
definition.setBackgroundSet(p.getBackgroundSet());
return BpmnNode.of(node);
}
use of org.kie.workbench.common.stunner.bpmn.definition.Lane in project kie-wb-common by kiegroup.
the class LaneConverter method toElement.
public Result<LanePropertyWriter> toElement(Node<View<? extends BPMNViewDefinition>, ?> node) {
return NodeMatch.fromNode(BPMNViewDefinition.class, LanePropertyWriter.class).when(Lane.class, n -> {
org.eclipse.bpmn2.Lane lane = bpmn2.createLane();
lane.setId(n.getUUID());
LanePropertyWriter p = propertyWriterFactory.of(lane);
Lane definition = n.getContent().getDefinition();
BPMNGeneralSet general = definition.getGeneral();
lane.setName(general.getName().getValue());
p.setDocumentation(general.getName().getValue());
p.setBounds(n.getContent().getBounds());
return p;
}).ignore(Object.class).apply(node);
}
Aggregations