public String getStyle(Object cell) { return (cell instanceof mxICell) ? ((mxICell) cell).getStyle() : null; }
public String getStyle(Object cell) { return (cell instanceof mxICell) ? ((mxICell) cell).getStyle() : null; }
private final void setVertexStyleFromEdge(final mxICell vertex, final mxICell edge) { final String colorstr = getStyleValue(edge.getStyle(), mxConstants.STYLE_STROKECOLOR); setVertexStyle(vertex, colorstr); }
private final void setVertexStyleFromEdge(final mxICell vertex, final mxICell edge) { final String colorstr = getStyleValue(edge.getStyle(), mxConstants.STYLE_STROKECOLOR); setVertexStyle(vertex, colorstr); }
String style = cell.getStyle(); final double radiusFactor = ( Double ) displaySettings.get( KEY_SPOT_RADIUS_RATIO ); final String imageStr = spotImageUpdater.getImageString( spot, radiusFactor );
String style = cell.getStyle(); final double radiusFactor = ( Double ) displaySettings.get( KEY_SPOT_RADIUS_RATIO ); 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 );
String style = cell.getStyle(); style = mxStyleUtils.setStyle( style, mxConstants.STYLE_IMAGE, "data:image/base64," + imageStr ); graph.getModel().setStyle( cell, style );
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); }
public void updateVertexStyle(final Collection<mxCell> vertices) { graphx.getModel().beginUpdate(); try { for (final mxCell vertex : vertices) { final int nedges = vertex.getEdgeCount(); if (nedges == 0) { /* * A lonely spot. We paint it with default color, * according to current style. */ setVertexStyle(vertex, DEFAULT_COLOR); continue; } mxICell edge; for (int i = 0; i < vertex.getEdgeCount(); i++) { edge = vertex.getEdgeAt(i); if (null != edge.getStyle()) { setVertexStyleFromEdge(vertex, edge); break; } } } } finally { graphx.getModel().endUpdate(); } }
public void updateVertexStyle(final Collection<mxCell> vertices) { graphx.getModel().beginUpdate(); try { for (final mxCell vertex : vertices) { final int nedges = vertex.getEdgeCount(); if (nedges == 0) { /* * A lonely spot. We paint it with default color, * according to current style. */ setVertexStyle(vertex, DEFAULT_COLOR); continue; } mxICell edge; for (int i = 0; i < vertex.getEdgeCount(); i++) { edge = vertex.getEdgeAt(i); if (null != edge.getStyle()) { setVertexStyleFromEdge(vertex, edge); break; } } } } finally { graphx.getModel().endUpdate(); } }