/** * Adds or removes the given key, value pair to the style and returns the * new style. If value is null or zero length then the key is removed from * the style. * * @param style * String of the form <code>stylename[;key=value]</code>. * @param key * Key of the style to be changed. * @param value * New value for the given key. * @return Returns the new style. * @deprecated Use <code>mxStyleUtils.setStyle(String, String, String)</code> (Jan 2012) */ public static String setStyle(String style, String key, String value) { return mxStyleUtils.setStyle(style, key, value); }
/** * Adds or removes the given key, value pair to the style and returns the * new style. If value is null or zero length then the key is removed from * the style. * * @param style * String of the form <code>stylename[;key=value]</code>. * @param key * Key of the style to be changed. * @param value * New value for the given key. * @return Returns the new style. * @deprecated Use <code>mxStyleUtils.setStyle(String, String, String)</code> (Jan 2012) */ public static String setStyle(String style, String key, String value) { return mxStyleUtils.setStyle(style, key, value); }
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); }
style = mxStyleUtils.setStyle(style , mxConstants.STYLE_STROKECOLOR, colorstr); graphx.getModel().setStyle(cell, style);
style = mxStyleUtils.setStyle(style , mxConstants.STYLE_STROKECOLOR, colorstr); graphx.getModel().setStyle(cell, style);
String style = setStyle(model.getStyle(cells[i]), key, value); model.setStyle(cells[i], style);
String style = setStyle(model.getStyle(cells[i]), key, value); model.setStyle(cells[i], style);
final double radiusFactor = ( Double ) displaySettings.get( KEY_SPOT_RADIUS_RATIO ); final String imageStr = spotImageUpdater.getImageString( spot, radiusFactor ); style = mxStyleUtils.setStyle( style, mxConstants.STYLE_IMAGE, "data:image/base64," + imageStr ); graph.getModel().setStyle( cell, style );
final String imageStr = spotImageUpdater.getImageString( spot, radiusFactor ); String style = cell.getStyle(); style = mxStyleUtils.setStyle( style, mxConstants.STYLE_IMAGE, "data:image/base64," + imageStr ); graph.getModel().setStyle( cell, style );
final double radiusFactor = ( Double ) displaySettings.get( KEY_SPOT_RADIUS_RATIO ); final String imageStr = spotImageUpdater.getImageString( spot, radiusFactor ); style = mxStyleUtils.setStyle( style, mxConstants.STYLE_IMAGE, "data:image/base64," + imageStr ); graph.getModel().setStyle( cell, style );
final String imageStr = spotImageUpdater.getImageString( spot, radiusFactor ); String style = cell.getStyle(); style = mxStyleUtils.setStyle( style, mxConstants.STYLE_IMAGE, "data:image/base64," + imageStr ); graph.getModel().setStyle( cell, style );