private static void drawHighLight(DefaultProcessDiagramCanvas processDiagramCanvas, GraphicInfo graphicInfo) { processDiagramCanvas.drawHighLight((int) graphicInfo.getX(), (int) graphicInfo.getY(), (int) graphicInfo.getWidth(), (int) graphicInfo.getHeight()); }
ArrayNode dockersArrayNode = objectMapper.createArrayNode(); ObjectNode dockNode = objectMapper.createObjectNode(); dockNode.put(EDITOR_BOUNDS_X, model.getGraphicInfo(association.getSourceRef()).getWidth() / 2.0); dockNode.put(EDITOR_BOUNDS_Y, model.getGraphicInfo(association.getSourceRef()).getHeight() / 2.0); dockersArrayNode.add(dockNode); double diffRightX = Math.abs(flowGraphicInfo.getX() - (targetGraphicInfo.getX() + targetGraphicInfo.getWidth())); double diffBottomY = Math.abs(flowGraphicInfo.getY() - (targetGraphicInfo.getY() + targetGraphicInfo.getHeight())); dockNode.put(EDITOR_BOUNDS_X, targetGraphicInfo.getWidth() / 2.0); dockNode.put(EDITOR_BOUNDS_Y, 0.0); dockNode.put(EDITOR_BOUNDS_X, targetGraphicInfo.getWidth()); dockNode.put(EDITOR_BOUNDS_Y, targetGraphicInfo.getHeight() / 2.0); dockNode.put(EDITOR_BOUNDS_X, targetGraphicInfo.getWidth() / 2.0); dockNode.put(EDITOR_BOUNDS_Y, targetGraphicInfo.getHeight());
ArrayNode dockersArrayNode = objectMapper.createArrayNode(); ObjectNode dockNode = objectMapper.createObjectNode(); dockNode.put(EDITOR_BOUNDS_X, model.getGraphicInfo(messageFlow.getSourceRef()).getWidth() / 2.0); dockNode.put(EDITOR_BOUNDS_Y, model.getGraphicInfo(messageFlow.getSourceRef()).getHeight() / 2.0); dockersArrayNode.add(dockNode); dockNode.put(EDITOR_BOUNDS_X, model.getGraphicInfo(messageFlow.getTargetRef()).getWidth() / 2.0); dockNode.put(EDITOR_BOUNDS_Y, model.getGraphicInfo(messageFlow.getTargetRef()).getHeight() / 2.0); dockersArrayNode.add(dockNode);
public void drawErrorStartEvent(String id, GraphicInfo graphicInfo) { drawNoneStartEvent(id, graphicInfo); int imageX = (int) (graphicInfo.getX() + (graphicInfo.getWidth() / 4)); int imageY = (int) (graphicInfo.getY() + (graphicInfo.getHeight() / 4)); ERROR_THROW_IMAGE.drawIcon(imageX, imageY, ICON_PADDING, g); }
public void drawErrorEndEvent(String id, String name, GraphicInfo graphicInfo) { drawNoneEndEvent(id, name, graphicInfo); int imageX = (int) (graphicInfo.getX() + (graphicInfo.getWidth() / 4)); int imageY = (int) (graphicInfo.getY() + (graphicInfo.getHeight() / 4)); ERROR_THROW_IMAGE.drawIcon(imageX, imageY, ICON_PADDING, g); }
int x = (int) graphicInfo.getX(); int y = (int) graphicInfo.getY(); int width = (int) graphicInfo.getWidth(); int height = (int) graphicInfo.getHeight(); g.drawRect(x,
public void drawGateway(GraphicInfo graphicInfo) { Polygon rhombus = new Polygon(); int x = (int) graphicInfo.getX(); int y = (int) graphicInfo.getY(); int width = (int) graphicInfo.getWidth(); int height = (int) graphicInfo.getHeight(); rhombus.addPoint(x, y + (height / 2)); rhombus.addPoint(x + (width / 2), y + height); rhombus.addPoint(x + width, y + (height / 2)); rhombus.addPoint(x + (width / 2), y); g.draw(rhombus); }
public void drawStartEvent(String id, GraphicInfo graphicInfo, IconType icon) { Paint originalPaint = g.getPaint(); g.setPaint(EVENT_COLOR); Ellipse2D circle = new Ellipse2D.Double(graphicInfo.getX(), graphicInfo.getY(), graphicInfo.getWidth(), graphicInfo.getHeight()); g.fill(circle); g.setPaint(EVENT_BORDER_COLOR); g.draw(circle); g.setPaint(originalPaint); // calculate coordinates to center image if (icon != null) { int imageX = (int) Math.round(graphicInfo.getX() + (graphicInfo.getWidth() / 2) - (icon.getWidth() / 2)); int imageY = (int) Math.round(graphicInfo.getY() + (graphicInfo.getHeight() / 2) - (icon.getHeight() / 2)); icon.drawIcon(imageX, imageY, ICON_PADDING, g); } // set element's id g.setCurrentGroupId(id); }
public void drawExclusiveGateway(String id, GraphicInfo graphicInfo) { // rhombus drawGateway(graphicInfo); int x = (int) graphicInfo.getX(); int y = (int) graphicInfo.getY(); int width = (int) graphicInfo.getWidth(); int height = (int) graphicInfo.getHeight(); int quarterWidth = width / 4; int quarterHeight = height / 4; // X inside rhombus Stroke orginalStroke = g.getStroke(); g.setStroke(GATEWAY_TYPE_STROKE); Line2D.Double line = new Line2D.Double(x + quarterWidth + 3, y + quarterHeight + 3, x + 3 * quarterWidth - 3, y + 3 * quarterHeight - 3); g.draw(line); line = new Line2D.Double(x + quarterWidth + 3, y + 3 * quarterHeight - 3, x + 3 * quarterWidth - 3, y + quarterHeight + 3); g.draw(line); g.setStroke(orginalStroke); // set element's id g.setCurrentGroupId(id); }
public void drawParallelGateway(String id, GraphicInfo graphicInfo) { // rhombus drawGateway(graphicInfo); int x = (int) graphicInfo.getX(); int y = (int) graphicInfo.getY(); int width = (int) graphicInfo.getWidth(); int height = (int) graphicInfo.getHeight(); // plus inside rhombus Stroke orginalStroke = g.getStroke(); g.setStroke(GATEWAY_TYPE_STROKE); Line2D.Double line = new Line2D.Double(x + 10, y + height / 2, x + width - 10, y + height / 2); // horizontal g.draw(line); line = new Line2D.Double(x + width / 2, y + height - 10, x + width / 2, y + 10); // vertical g.draw(line); g.setStroke(orginalStroke); // set element's id g.setCurrentGroupId(id); }
public void drawInclusiveGateway(String id, GraphicInfo graphicInfo) { // rhombus drawGateway(graphicInfo); int x = (int) graphicInfo.getX(); int y = (int) graphicInfo.getY(); int width = (int) graphicInfo.getWidth(); int height = (int) graphicInfo.getHeight(); int diameter = width / 2; // circle inside rhombus Stroke orginalStroke = g.getStroke(); g.setStroke(GATEWAY_TYPE_STROKE); Ellipse2D.Double circle = new Ellipse2D.Double(((width - diameter) / 2) + x, ((height - diameter) / 2) + y, diameter, diameter); g.draw(circle); g.setStroke(orginalStroke); // set element's id g.setCurrentGroupId(id); }
graphicInfo.getWidth(), graphicInfo.getHeight()); } else if (SHAPE_TYPE.Rhombus.equals(shapeType)) { rhombus.moveTo(graphicInfo.getX(), graphicInfo.getY() + graphicInfo.getHeight() / 2); rhombus.lineTo(graphicInfo.getX() + graphicInfo.getWidth() / 2, graphicInfo.getY() + graphicInfo.getHeight()); rhombus.lineTo(graphicInfo.getX() + graphicInfo.getWidth(), graphicInfo.getY() + graphicInfo.getHeight() / 2); rhombus.lineTo(graphicInfo.getX() + graphicInfo.getWidth() / 2, graphicInfo.getY()); rhombus.lineTo(graphicInfo.getX(), graphicInfo.getWidth(), graphicInfo.getHeight());
private Polyline2D createRectangle(GraphicInfo graphicInfo) { Polyline2D rectangle = new Polyline2D(new Point2D(graphicInfo.getX(), graphicInfo.getY()), new Point2D(graphicInfo.getX() + graphicInfo.getWidth(), graphicInfo.getY()), new Point2D(graphicInfo.getX() + graphicInfo.getWidth(), graphicInfo.getY() + graphicInfo.getHeight()), new Point2D(graphicInfo.getX(), graphicInfo.getY() + graphicInfo.getHeight()), new Point2D(graphicInfo.getX(), graphicInfo.getY())); return rectangle; }
private Polyline2D createGateway(GraphicInfo graphicInfo) { double middleX = graphicInfo.getX() + (graphicInfo.getWidth() / 2); double middleY = graphicInfo.getY() + (graphicInfo.getHeight() / 2); Polyline2D gatewayRectangle = new Polyline2D(new Point2D(graphicInfo.getX(), middleY), new Point2D(middleX, graphicInfo.getY()), new Point2D(graphicInfo.getX() + graphicInfo.getWidth(), middleY), new Point2D(middleX, graphicInfo.getY() + graphicInfo.getHeight()), new Point2D(graphicInfo.getX(), middleY)); return gatewayRectangle; }
public void drawNoneEndEvent(String id, String name, GraphicInfo graphicInfo) { Paint originalPaint = g.getPaint(); Stroke originalStroke = g.getStroke(); g.setPaint(EVENT_COLOR); Ellipse2D circle = new Ellipse2D.Double(graphicInfo.getX(), graphicInfo.getY(), graphicInfo.getWidth(), graphicInfo.getHeight()); g.fill(circle); g.setPaint(EVENT_BORDER_COLOR); g.setStroke(END_EVENT_STROKE); g.draw(circle); g.setStroke(originalStroke); g.setPaint(originalPaint); // set element's id g.setCurrentGroupId(id); drawLabel(name, graphicInfo); }
RoundRectangle2D rect = new RoundRectangle2D.Double(graphicInfo.getX(), graphicInfo.getY(), graphicInfo.getWidth(), graphicInfo.getHeight(), 8, RoundRectangle2D outerRect = new RoundRectangle2D.Double(graphicInfo.getX()-3, graphicInfo.getY()-3, graphicInfo.getWidth()+6, graphicInfo.getHeight()+6, 8, (int) graphicInfo.getWidth()); g.drawString(text, (int) graphicInfo.getX() + 10,
int width = (int) graphicInfo.getWidth(); int height = (int) graphicInfo.getHeight();
double tX = graphicInfo.getX(); if (centered) { tX += (int) (graphicInfo.getWidth() / 2 - bb.getWidth() / 2);
int x = (int) graphicInfo.getX(); int y = (int) graphicInfo.getY(); int width = (int) graphicInfo.getWidth(); int height = (int) graphicInfo.getHeight();
int x = (int) graphicInfo.getX(); int y = (int) graphicInfo.getY(); int width = (int) graphicInfo.getWidth(); int height = (int) graphicInfo.getHeight();