graphicInfo.setX(Double.valueOf(xtr.getAttributeValue(null, ATTRIBUTE_DI_X)).intValue()); graphicInfo.setY(Double.valueOf(xtr.getAttributeValue(null, ATTRIBUTE_DI_Y)).intValue()); graphicInfo.setWidth(Double.valueOf(xtr.getAttributeValue(null, ATTRIBUTE_DI_WIDTH)).intValue()); graphicInfo.setHeight(Double.valueOf(xtr.getAttributeValue(null, ATTRIBUTE_DI_HEIGHT)).intValue()); model.addLabelGraphicInfo(id, graphicInfo);
public void parse(XMLStreamReader xtr, BpmnModel model) throws Exception { String id = xtr.getAttributeValue(null, ATTRIBUTE_DI_BPMNELEMENT); GraphicInfo graphicInfo = new GraphicInfo(); String strIsExpanded = xtr.getAttributeValue(null, ATTRIBUTE_DI_IS_EXPANDED); if ("true".equalsIgnoreCase(strIsExpanded)) { graphicInfo.setExpanded(true); } else if ("false".equalsIgnoreCase(strIsExpanded)) { graphicInfo.setExpanded(false); } BpmnXMLUtil.addXMLLocation(graphicInfo, xtr); while (xtr.hasNext()) { xtr.next(); if (xtr.isStartElement() && ELEMENT_DI_BOUNDS.equalsIgnoreCase(xtr.getLocalName())) { graphicInfo.setX(Double.valueOf(xtr.getAttributeValue(null, ATTRIBUTE_DI_X))); graphicInfo.setY(Double.valueOf(xtr.getAttributeValue(null, ATTRIBUTE_DI_Y))); graphicInfo.setWidth(Double.valueOf(xtr.getAttributeValue(null, ATTRIBUTE_DI_WIDTH))); graphicInfo.setHeight(Double.valueOf(xtr.getAttributeValue(null, ATTRIBUTE_DI_HEIGHT))); model.addGraphicInfo(id, graphicInfo); break; } else if (xtr.isEndElement() && ELEMENT_DI_SHAPE.equalsIgnoreCase(xtr.getLocalName())) { break; } } }
graphicInfo.setWidth(lowerRightNode.get(EDITOR_BOUNDS_X).asDouble() - graphicInfo.getX() + parentX); graphicInfo.setHeight(lowerRightNode.get(EDITOR_BOUNDS_Y).asDouble() - graphicInfo.getY() + parentY);
protected GraphicInfo createDiagramInterchangeInformation(FlowElement flowElement, int x, int y, int width, int height) { GraphicInfo graphicInfo = new GraphicInfo(); graphicInfo.setX(x); graphicInfo.setY(y); graphicInfo.setWidth(width); graphicInfo.setHeight(height); graphicInfo.setElement(flowElement); bpmnModel.addGraphicInfo(flowElement.getId(), graphicInfo); return graphicInfo; }
diagramInfo.setWidth(rightX);
diagramInfo.setWidth(rightX);
protected void fillDiagramInfo(GraphicInfo graphicInfo, GraphicInfo diagramInfo) { double rightX = graphicInfo.getX() + graphicInfo.getWidth(); double bottomY = graphicInfo.getY() + graphicInfo.getHeight(); double middleX = graphicInfo.getX() + (graphicInfo.getWidth() / 2); if (middleX < diagramInfo.getX()) { diagramInfo.setX(middleX); } if (graphicInfo.getY() < diagramInfo.getY()) { diagramInfo.setY(graphicInfo.getY()); } if (rightX > diagramInfo.getWidth()) { diagramInfo.setWidth(rightX); } if (bottomY > diagramInfo.getHeight()) { diagramInfo.setHeight(bottomY); } }
protected void fillDiagramInfo(GraphicInfo graphicInfo, GraphicInfo diagramInfo) { double rightX = graphicInfo.getX() + graphicInfo.getWidth(); double bottomY = graphicInfo.getY() + graphicInfo.getHeight(); double middleX = graphicInfo.getX() + (graphicInfo.getWidth() / 2); if (middleX < diagramInfo.getX()) { diagramInfo.setX(middleX); } if (graphicInfo.getY() < diagramInfo.getY()) { diagramInfo.setY(graphicInfo.getY()); } if (rightX > diagramInfo.getWidth()) { diagramInfo.setWidth(rightX); } if (bottomY > diagramInfo.getHeight()) { diagramInfo.setHeight(bottomY); } } }