protected void handleActivity(FlowElement flowElement) { Object activityVertex = graph.insertVertex(cellParent, flowElement.getId(), "", 0, 0, taskWidth, taskHeight); generatedVertices.put(flowElement.getId(), activityVertex); }
protected void createEventVertex(FlowElement flowElement) { // Add styling for events if needed if (!graph.getStylesheet().getStyles().containsKey(STYLE_EVENT)) { Hashtable<String, Object> eventStyle = new Hashtable<String, Object>(); eventStyle.put(mxConstants.STYLE_SHAPE, mxConstants.SHAPE_ELLIPSE); graph.getStylesheet().putCellStyle(STYLE_EVENT, eventStyle); } // Add vertex representing event to graph Object eventVertex = graph.insertVertex(cellParent, flowElement.getId(), "", 0, 0, eventSize, eventSize, STYLE_EVENT); generatedVertices.put(flowElement.getId(), eventVertex); }
protected void createGatewayVertex(FlowElement flowElement) { // Add styling for gateways if needed if (graph.getStylesheet().getStyles().containsKey(STYLE_GATEWAY)) { Hashtable<String, Object> style = new Hashtable<String, Object>(); style.put(mxConstants.STYLE_SHAPE, mxConstants.SHAPE_RHOMBUS); graph.getStylesheet().putCellStyle(STYLE_GATEWAY, style); } // Create gateway node Object gatewayVertex = graph.insertVertex(cellParent, flowElement.getId(), "", 0, 0, gatewaySize, gatewaySize, STYLE_GATEWAY); generatedVertices.put(flowElement.getId(), gatewayVertex); }
protected void handleSubProcess(FlowElement flowElement) { BpmnAutoLayout bpmnAutoLayout = new BpmnAutoLayout(bpmnModel); bpmnAutoLayout.layout((SubProcess) flowElement); double subProcessWidth = bpmnAutoLayout.getGraph().getView().getGraphBounds().getWidth(); double subProcessHeight = bpmnAutoLayout.getGraph().getView().getGraphBounds().getHeight(); Object subProcessVertex = graph.insertVertex(cellParent, flowElement.getId(), "", 0, 0, subProcessWidth + 2 * subProcessMargin, subProcessHeight + 2 * subProcessMargin); generatedVertices.put(flowElement.getId(), subProcessVertex); }
/** * Creates and adds a new vertex with an empty style. */ public Object insertVertex(Object parent, String id, Object value, double x, double y, double width, double height) { return insertVertex(parent, id, value, x, y, width, height, null); }
/** * Creates and adds a new vertex with an empty style. */ public Object insertVertex(Object parent, String id, Object value, double x, double y, double width, double height) { return insertVertex(parent, id, value, x, y, width, height, null); }
public GraphEditor(String appTitle, mxGraphComponent component) { super(appTitle, component); final mxGraph graph = graphComponent.getGraph(); graph.insertVertex(graph.getDefaultParent(), null, "Test", 100, 100, 200, 100); ... }
protected void handleActivity(FlowElement flowElement) { Object activityVertex = graph.insertVertex(cellParent, flowElement.getId(), "", 0, 0, taskWidth, taskHeight); generatedVertices.put(flowElement.getId(), activityVertex); }
protected void createEventVertex(FlowElement flowElement) { // Add styling for events if needed if (!graph.getStylesheet().getStyles().containsKey(STYLE_EVENT)) { Hashtable<String, Object> eventStyle = new Hashtable<String, Object>(); eventStyle.put(mxConstants.STYLE_SHAPE, mxConstants.SHAPE_ELLIPSE); graph.getStylesheet().putCellStyle(STYLE_EVENT, eventStyle); } // Add vertex representing event to graph Object eventVertex = graph.insertVertex(cellParent, flowElement.getId(), "", 0, 0, eventSize, eventSize, STYLE_EVENT); generatedVertices.put(flowElement.getId(), eventVertex); }
protected void createGatewayVertex(FlowElement flowElement) { // Add styling for gateways if needed if (graph.getStylesheet().getStyles().containsKey(STYLE_GATEWAY)) { Hashtable<String, Object> style = new Hashtable<String, Object>(); style.put(mxConstants.STYLE_SHAPE, mxConstants.SHAPE_RHOMBUS); graph.getStylesheet().putCellStyle(STYLE_GATEWAY, style); } // Create gateway node Object gatewayVertex = graph.insertVertex(cellParent, flowElement.getId(), "", 0, 0, gatewaySize, gatewaySize, STYLE_GATEWAY); generatedVertices.put(flowElement.getId(), gatewayVertex); }
protected void createEventVertex(FlowElement flowElement) { // Add styling for events if needed if (!graph.getStylesheet().getStyles().containsKey(STYLE_EVENT)) { Hashtable<String, Object> eventStyle = new Hashtable<>(); eventStyle.put(mxConstants.STYLE_SHAPE, mxConstants.SHAPE_ELLIPSE); graph.getStylesheet().putCellStyle(STYLE_EVENT, eventStyle); } // Add vertex representing event to graph Object eventVertex = graph.insertVertex(cellParent, flowElement.getId(), "", 0, 0, eventSize, eventSize, STYLE_EVENT); generatedVertices.put(flowElement.getId(), eventVertex); }
protected void createGatewayVertex(FlowElement flowElement) { // Add styling for gateways if needed if (graph.getStylesheet().getStyles().containsKey(STYLE_GATEWAY)) { Hashtable<String, Object> style = new Hashtable<>(); style.put(mxConstants.STYLE_SHAPE, mxConstants.SHAPE_RHOMBUS); graph.getStylesheet().putCellStyle(STYLE_GATEWAY, style); } // Create gateway node Object gatewayVertex = graph.insertVertex(cellParent, flowElement.getId(), "", 0, 0, gatewaySize, gatewaySize, STYLE_GATEWAY); generatedVertices.put(flowElement.getId(), gatewayVertex); }
private static void addStartTransition(mxGraph graph, STask<?> taskInicial, Map<String, Object> mapaVertice) { final Object v = graph.insertVertex(graph.getDefaultParent(), null, null, 20, 20, 20, 20); setStyle(v, "START"); final Object destiny = mapaVertice.get(taskInicial.getAbbreviation()); graph.insertEdge(graph.getDefaultParent(), null, null, v, destiny); }
private static void addStartTransition(mxGraph graph, MTask<?> taskInicial, Map<String, Object> mapaVertice) { final Object v = graph.insertVertex(graph.getDefaultParent(), null, null, 20, 20, 20, 20); setStyle(v, "START"); final Object destino = mapaVertice.get(taskInicial.getAbbreviation()); graph.insertEdge(graph.getDefaultParent(), null, null, v, destino); }
private static void addStartTransition(mxGraph graph, STask<?> taskInicial, Map<String, Object> mapaVertice) { final Object v = graph.insertVertex(graph.getDefaultParent(), null, null, 20, 20, 20, 20); setStyle(v, "START"); final Object destiny = mapaVertice.get(taskInicial.getAbbreviation()); graph.insertEdge(graph.getDefaultParent(), null, null, v, destiny); }
private static void addStartTransition(mxGraph graph, STask<?> taskInicial, Map<String, Object> mapaVertice) { final Object v = graph.insertVertex(graph.getDefaultParent(), null, null, 20, 20, 20, 20); setStyle(v, "START"); final Object destiny = mapaVertice.get(taskInicial.getAbbreviation()); graph.insertEdge(graph.getDefaultParent(), null, null, v, destiny); }
/** * */ public Object insertCell(mxRectangle bounds) { // FIXME: Clone prototype cell for insert return graphComponent.getGraph().insertVertex(null, null, "", bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight(), style); }
/** * */ public Object insertCell(mxRectangle bounds) { // FIXME: Clone prototype cell for insert return graphComponent.getGraph().insertVertex(null, null, "", bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight(), style); }
protected void handleSubProcess(FlowElement flowElement) { BpmnAutoLayout bpmnAutoLayout = new BpmnAutoLayout(bpmnModel); bpmnAutoLayout.layout((SubProcess) flowElement); double subProcessWidth = bpmnAutoLayout.getGraph().getView().getGraphBounds().getWidth(); double subProcessHeight = bpmnAutoLayout.getGraph().getView().getGraphBounds().getHeight(); Object subProcessVertex = graph.insertVertex(cellParent, flowElement.getId(), "", 0, 0, subProcessWidth + 2 * subProcessMargin, subProcessHeight + 2 * subProcessMargin); generatedVertices.put(flowElement.getId(), subProcessVertex); }
protected void handleSubProcess(FlowElement flowElement) { BpmnAutoLayout bpmnAutoLayout = new BpmnAutoLayout(bpmnModel); bpmnAutoLayout.layout((SubProcess) flowElement); double subProcessWidth = bpmnAutoLayout.getGraph().getView().getGraphBounds().getWidth(); double subProcessHeight = bpmnAutoLayout.getGraph().getView().getGraphBounds().getHeight(); Object subProcessVertex = graph.insertVertex(cellParent, flowElement.getId(), "", 0, 0, subProcessWidth + 2 * subProcessMargin, subProcessHeight + 2 * subProcessMargin); generatedVertices.put(flowElement.getId(), subProcessVertex); }