public String getId() { return this.baseElement.getId(); }
public List<Point2D> getControlPoints() { return PropertyReaderUtils.getControlPoints(definitionResolver, element.getId()); } }
public List<Point2D> getControlPoints() { return PropertyReaderUtils.getControlPoints(definitionResolver, element.getId()); } }
public BPMNShape getBPMNShapeForElement(BaseElement be, BPMNPlane plane) { List<DiagramElement> diagramElements = plane.getPlaneElement(); for (DiagramElement dia : diagramElements) { if (dia instanceof BPMNShape) { BPMNShape shape = (BPMNShape) dia; if (shape.getBpmnElement().getId().equals(be.getId())) { return shape; } } } return null; }
public String getSourceId() { return association.getSourceRef().getId(); }
public String getTargetId() { return association.getTargetRef().getId(); }
public BPMNShape getShape(String elementId) { return getPlane().getPlaneElement().stream() .filter(dia -> dia instanceof BPMNShape) .map(shape -> (BPMNShape) shape) .filter(shape -> shape.getBpmnElement().getId().equals(elementId)) .findFirst().orElse(null); }
public SimulationAttributeSet getSimulationSet() { return definitionResolver.resolveSimulationParameters(element.getId()) .map(SimulationAttributeSets::of) .orElse(new SimulationAttributeSet()); }
public BPMNEdge getEdge(String elementId) { return getPlane().getPlaneElement().stream() .filter(dia -> dia instanceof BPMNEdge) .map(edge -> (BPMNEdge) edge) .filter(edge -> edge.getBpmnElement().getId().equals(elementId)) .findFirst().get(); }
public SimulationSet getSimulationSet() { return definitionResolver.resolveSimulationParameters(element.getId()) .map(SimulationSets::of) .orElse(new SimulationSet()); }
public SimulationSet getSimulationSet() { return definitionResolver.resolveSimulationParameters(element.getId()) .map(SimulationSets::of) .orElse(new SimulationSet()); } }
public void setSimulationSet(SimulationSet simulations) { ElementParameters elementParameters = SimulationSets.toElementParameters(simulations); elementParameters.setElementRef(this.baseElement.getId()); this.simulationParameters.add(elementParameters); }
private void createBpmnShapeForElement(BpmnDiFactory factory, BPMNPlane plane, BaseElement element) { Bounds bounds = _bounds.get(element.getId()); if (bounds != null) { BPMNShape shape = factory.createBPMNShape(); shape.setBpmnElement(element); shape.setBounds(bounds); plane.getPlaneElement().add(shape); } }
private void setDefaultGateway(BasePropertyWriter propertyWriter) { if (propertyWriter.getElement().getId().equals(defaultGatewayId)) { if (gateway instanceof ExclusiveGateway) { ((ExclusiveGateway) gateway).setDefault((SequenceFlow) propertyWriter.getElement()); } else if (gateway instanceof InclusiveGateway) { ((InclusiveGateway) gateway).setDefault((SequenceFlow) propertyWriter.getElement()); } } }
@Before public void setUp() { position = Point2D.create(X, Y); when(bpmnDiagram.getPlane()).thenReturn(bpmnLane); when(association.getId()).thenReturn(ASSOCIATION_ID); when(sourceRef.getId()).thenReturn(SOURCE_ID); when(targetRef.getId()).thenReturn(TARGET_ID); when(association.getSourceRef()).thenReturn(sourceRef); when(association.getTargetRef()).thenReturn(targetRef); propertyReader = new AssociationPropertyReader(association, bpmnDiagram, definitionResolver); }
public Connection getTargetConnection() { Point2D targetPosition = PropertyReaderUtils.getTargetPosition(definitionResolver, element.getId(), getTargetId()); return MagnetConnection.Builder .at(targetPosition.getX(), targetPosition.getY()) .setAuto(PropertyReaderUtils.isAutoConnectionTarget(element)); }
public Connection getTargetConnection() { Point2D targetPosition = PropertyReaderUtils.getTargetPosition(definitionResolver, element.getId(), getTargetId()); return MagnetConnection.Builder .at(targetPosition.getX(), targetPosition.getY()) .setAuto(PropertyReaderUtils.isAutoConnectionTarget(element)); }
public Connection getSourceConnection() { Point2D sourcePosition = PropertyReaderUtils.getSourcePosition(definitionResolver, element.getId(), getSourceId()); return MagnetConnection.Builder .at(sourcePosition.getX(), sourcePosition.getY()) .setAuto(PropertyReaderUtils.isAutoConnectionSource(element)); }
public Connection getSourceConnection() { Point2D sourcePosition = PropertyReaderUtils.getSourcePosition(definitionResolver, element.getId(), getSourceId()); return MagnetConnection.Builder .at(sourcePosition.getX(), sourcePosition.getY()) .setAuto(PropertyReaderUtils.isAutoConnectionSource(element)); }
public void setParent(BasePropertyWriter parent) { parent.addChild(this); if (this.getShape() == null) { return; } if (parent.getShape() == null) { throw new IllegalArgumentException( "Cannot set parent with undefined shape: " + parent.getElement().getId()); } org.eclipse.dd.dc.Bounds parentBounds = getParentBounds(parent.getShape().getBounds()); getShape().setBounds(parentBounds); }