dx += (g.getWidth() - width) / 2; } else { g.setWidth(width);
public VOutParameter(mxGraph graph, MParameter param) { super(graph, VOutParameter.class.getSimpleName()); parameter = param; getGeometry().setWidth(BpmnStylesheetColor.PARAMETER_PORT_SIZE); getGeometry().setHeight(BpmnStylesheetColor.PARAMETER_PORT_SIZE); }
public VInParameter(mxGraph graph, MParameter param) { super(graph, VInParameter.class.getSimpleName()); parameter = param; getGeometry().setWidth(BpmnStylesheetColor.PARAMETER_PORT_SIZE); getGeometry().setHeight(BpmnStylesheetColor.PARAMETER_PORT_SIZE); }
geo.setWidth(evtsize.width); geo.setHeight(evtsize.height); geo.setX(dist * 0.2 + dist * count++);
private void setVertexStyle(final mxICell vertex, final String colorstr) { String targetStyle = vertex.getStyle(); targetStyle = mxStyleUtils.removeAllStylenames(targetStyle); targetStyle = mxStyleUtils.setStyle(targetStyle , mxConstants.STYLE_STROKECOLOR, colorstr ); // Style specifics int width, height; if (globalStyle.equals(SIMPLE_STYLE_NAME)) { targetStyle = mxStyleUtils.setStyle(targetStyle, mxConstants.STYLE_FILLCOLOR, colorstr); width = DEFAULT_CELL_HEIGHT; height = width; } else { targetStyle = mxStyleUtils.setStyle(targetStyle, mxConstants.STYLE_FILLCOLOR, "white"); width = DEFAULT_CELL_WIDTH; height = DEFAULT_CELL_HEIGHT; } targetStyle = globalStyle + ";" + targetStyle; graphx.getModel().setStyle(vertex, targetStyle); graphx.getModel().getGeometry(vertex).setWidth(width); graphx.getModel().getGeometry(vertex).setHeight(height); }
private void setVertexStyle(final mxICell vertex, final String colorstr) { String targetStyle = vertex.getStyle(); targetStyle = mxStyleUtils.removeAllStylenames(targetStyle); targetStyle = mxStyleUtils.setStyle(targetStyle , mxConstants.STYLE_STROKECOLOR, colorstr ); // Style specifics int width, height; if (globalStyle.equals(SIMPLE_STYLE_NAME)) { targetStyle = mxStyleUtils.setStyle(targetStyle, mxConstants.STYLE_FILLCOLOR, colorstr); width = DEFAULT_CELL_HEIGHT; height = width; } else { targetStyle = mxStyleUtils.setStyle(targetStyle, mxConstants.STYLE_FILLCOLOR, "white"); width = DEFAULT_CELL_WIDTH; height = DEFAULT_CELL_HEIGHT; } targetStyle = globalStyle + ";" + targetStyle; graphx.getModel().setStyle(vertex, targetStyle); graphx.getModel().getGeometry(vertex).setWidth(width); graphx.getModel().getGeometry(vertex).setHeight(height); }
clone.setWidth(getWidth()); clone.setHeight(getHeight()); clone.setRelative(isRelative());
clone.setWidth(getWidth()); clone.setHeight(getHeight()); clone.setRelative(isRelative());
/** * Resizes the parents recursively so that they contain the complete area * of the resized child cell. * * @param cell <mxCell> that has been resized. */ public void extendParent(Object cell) { if (cell != null) { Object parent = model.getParent(cell); mxGeometry p = model.getGeometry(parent); if (parent != null && p != null && !isCellCollapsed(parent)) { mxGeometry geo = model.getGeometry(cell); if (geo != null && (p.getWidth() < geo.getX() + geo.getWidth() || p .getHeight() < geo.getY() + geo.getHeight())) { p = (mxGeometry) p.clone(); p.setWidth(Math.max(p.getWidth(), geo.getX() + geo.getWidth())); p.setHeight(Math.max(p.getHeight(), geo.getY() + geo.getHeight())); cellsResized(new Object[] { parent }, new mxRectangle[] { p }); } } } }
/** * Resizes the parents recursively so that they contain the complete area * of the resized child cell. * * @param cell <mxCell> that has been resized. */ public void extendParent(Object cell) { if (cell != null) { Object parent = model.getParent(cell); mxGeometry p = model.getGeometry(parent); if (parent != null && p != null && !isCellCollapsed(parent)) { mxGeometry geo = model.getGeometry(cell); if (geo != null && (p.getWidth() < geo.getX() + geo.getWidth() || p .getHeight() < geo.getY() + geo.getHeight())) { p = (mxGeometry) p.clone(); p.setWidth(Math.max(p.getWidth(), geo.getX() + geo.getWidth())); p.setHeight(Math.max(p.getHeight(), geo.getY() + geo.getHeight())); cellsResized(new Object[] { parent }, new mxRectangle[] { p }); } } } }
geo.setWidth(tmp.getWidth()); geo.setHeight(tmp.getHeight());
geo.setWidth(tmp.getWidth()); geo.setHeight(tmp.getHeight());
geometry.setX(geometry.getX() + bounds.getX() - border - left); geometry.setY(geometry.getY() + bounds.getY() - border - top); geometry.setWidth(bounds.getWidth() + 2 * border + left); geometry.setHeight(bounds.getHeight() + 2 * border + top); graph.getModel().setGeometry(group, geometry);
geometry.setX(geometry.getX() + bounds.getX() - border - left); geometry.setY(geometry.getY() + bounds.getY() - border - top); geometry.setWidth(bounds.getWidth() + 2 * border + left); geometry.setHeight(bounds.getHeight() + 2 * border + top); graph.getModel().setGeometry(group, geometry);
dx += (g.getWidth() - width) / 2; } else { g.setWidth(width);
geo.setWidth(childBounds.getWidth() + size.getWidth() + 2 * border); geo.setHeight(childBounds.getHeight()
geo.setWidth(childBounds.getWidth() + size.getWidth() + 2 * border); geo.setHeight(childBounds.getHeight()