public RectangleDimensionsSet getRectangleDimensionsSet() { if (shape == null) { return new RectangleDimensionsSet(); } org.eclipse.dd.dc.Bounds bounds = shape.getBounds(); return new RectangleDimensionsSet(bounds.getWidth() * resolutionFactor, bounds.getHeight() * resolutionFactor); } }
@Override public boolean equals(Object o) { if (o instanceof Lane) { Lane other = (Lane) o; return general.equals(other.general) && backgroundSet.equals(other.backgroundSet) && fontSet.equals(other.fontSet) && dimensionsSet.equals(other.dimensionsSet); } return false; } }
@Before @SuppressWarnings("unchecked") public void init() { task = new ServiceTask(); task.setName(WID_ID); task.setDimensionsSet(new RectangleDimensionsSet()); width = spy(new Width(0d)); height = spy(new Height(0d)); task.getDimensionsSet().setWidth(width); task.getDimensionsSet().setHeight(height); when(registry.items()).thenReturn(Collections.singleton(DEF)); when(registry.get(eq(WID_ID))).thenReturn(DEF); when(view.getChildren()).thenReturn(Collections.singletonList(iconSVGPrimiite)); when(iconSVGPrimiite.getId()).thenReturn(ServiceTaskShapeViewHandler.WID_ICON_ID); when(iconSVGPrimiite.get()).thenReturn(icon); when(iconSVGPrimiite.getPrimitiveId()).thenReturn(ServiceTaskShapeViewHandler.WID_ICON_ID); when(icon.getID()).thenReturn(ServiceTaskShapeViewHandler.WID_ICON_ID); when(icon.getImageProxy()).thenReturn(imageProxy); when(view.getPrimitive()).thenReturn(iconSVGPrimiite); when(icon.getAttributes()).thenReturn(svgAttr); when(svgAttr.getHeight()).thenReturn(HEIGHT); when(svgAttr.getWidth()).thenReturn(WIDTH); this.tested = new ServiceTaskShapeViewHandler(() -> registry); }
root.getDiagramSet().setName(new Name("Case")); root.getDiagramSet().setId(new Id("New Case Management diagram")); root.getDimensionsSet().setWidth(new Width(2800.0)); root.getDimensionsSet().setHeight(new Height(1400.0)); View<CaseManagementDiagram> rootContent = new ViewImpl<>(root, Bounds.create(0.0, 0.0, 2800.0, 1400.0)); Node<View<CaseManagementDiagram>, Edge> rootNode = new NodeImpl<>("_0E761372-8B3C-4BE1-88BC-808D647D9EFF");
@Override public int hashCode() { return HashUtil.combineHashCodes(general.hashCode(), backgroundSet.hashCode(), fontSet.hashCode(), dimensionsSet.hashCode()); }
@Override public int hashCode() { return HashUtil.combineHashCodes(diagramSet.hashCode(), processData.hashCode(), caseManagementSet.hashCode(), backgroundSet.hashCode(), fontSet.hashCode(), dimensionsSet.hashCode()); }
public Lane() { this(new BPMNGeneralSet("Lane"), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet()); }
@Override public int hashCode() { return HashUtil.combineHashCodes(diagramSet.hashCode(), processData.hashCode(), caseManagementSet.hashCode(), backgroundSet.hashCode(), fontSet.hashCode(), dimensionsSet.hashCode()); }
@Override public boolean equals(Object o) { if (o instanceof BPMNDiagramImpl) { BPMNDiagramImpl other = (BPMNDiagramImpl) o; return diagramSet.equals(other.diagramSet) && processData.equals(other.processData) && caseManagementSet.equals(other.caseManagementSet) && backgroundSet.equals(other.backgroundSet) && fontSet.equals(other.fontSet) && dimensionsSet.equals(other.dimensionsSet); } return false; } }
public CaseManagementDiagram() { this(new DiagramSet(""), new ProcessData(), new CaseManagementSet(), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(WIDTH, HEIGHT)); }
@Override public boolean equals(Object o) { if (o instanceof CaseManagementDiagram) { CaseManagementDiagram other = (CaseManagementDiagram) o; return diagramSet.equals(other.diagramSet) && processData.equals(other.processData) && caseManagementSet.equals(other.caseManagementSet) && backgroundSet.equals(other.backgroundSet) && fontSet.equals(other.fontSet) && dimensionsSet.equals(other.dimensionsSet); } return false; } }
@Override public SVGShapeView<?> newViewInstance(final CaseManagementSVGViewFactory factory, final CaseManagementDiagram diagram) { SVGShapeView shapeView = newViewInstance(Optional.ofNullable(diagram.getDimensionsSet().getWidth()), Optional.ofNullable(diagram.getDimensionsSet().getHeight()), factory.rectangle()); return shapeView; } }
public BPMNDiagramImpl() { this(new DiagramSet(), new ProcessData(), new CaseManagementSet(), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(WIDTH, HEIGHT)); }