/** * */ public static Font getFont(Map<String, Object> style) { return getFont(style, 1); }
mxUtils.getFontMetrics(mxUtils.getFont(state.getStyle())), w * mxConstants.LABEL_SCALE_BUFFER);
/** * */ public static Font getFont(Map<String, Object> style) { return getFont(style, 1); }
mxUtils.getFontMetrics(mxUtils.getFont(state.getStyle())), w * mxConstants.LABEL_SCALE_BUFFER);
/** * Returns the size for the given label. If isHtml is true then any HTML * markup in the label is computed as HTML and all newlines inside the HTML * body are converted into linebreaks. */ public static mxRectangle getLabelSize(String label, Map<String, Object> style, boolean isHtml, double scale, double htmlWrapWidth) { mxRectangle size; if (isHtml) { size = getSizeForHtml(getBodyMarkup(label, true), style, scale, htmlWrapWidth); } else { size = getSizeForString(label, getFont(style), scale); } return size; }
Font font = mxUtils.getFont(style, scale); FontMetrics fm = mxUtils.getFontMetrics(font); int descent = 0;
/** * Returns the size for the given label. If isHtml is true then any HTML * markup in the label is computed as HTML and all newlines inside the HTML * body are converted into linebreaks. */ public static mxRectangle getLabelSize(String label, Map<String, Object> style, boolean isHtml, double scale, double htmlWrapWidth) { mxRectangle size; if (isHtml) { size = getSizeForHtml(getBodyMarkup(label, true), style, scale, htmlWrapWidth); } else { size = getSizeForString(label, getFont(style), scale); } return size; }
Font scaledFont = mxUtils.getFont(style, scale); g.setFont(scaledFont); int fontSize = mxUtils.getInt(style, mxConstants.STYLE_FONTSIZE,
Font scaledFont = mxUtils.getFont(style, scale); g.setFont(scaledFont); int fontSize = mxUtils.getInt(style, mxConstants.STYLE_FONTSIZE,
final Font scaledFont = mxUtils.getFont( style, scale ); g.setFont( scaledFont ); final int fontSize = mxUtils.getInt( style, mxConstants.STYLE_FONTSIZE, mxConstants.DEFAULT_FONTSIZE );
g = canvas.createTemporaryGraphics(style, opacity, state); Font font = mxUtils.getFont(style, canvas.getScale()); g.setFont(font);
g = canvas.createTemporaryGraphics(style, opacity, state); Font font = mxUtils.getFont(style, canvas.getScale()); g.setFont(font);
final Font scaledFont = mxUtils.getFont( style, scale ); g.setFont( scaledFont ); final int fontSize = mxUtils.getInt( style, mxConstants.STYLE_FONTSIZE, mxConstants.DEFAULT_FONTSIZE );
g.setColor(fontColor); Font scaledFont = mxUtils.getFont(style, scale); g.setFont(scaledFont);
(int) Math.round(w / state.getView().getScale()), (int) Math.round(h / state.getView().getScale()))); textRenderer.setFont(mxUtils.getFont(style, canvas.getScale())); g.scale(scale, scale); rendererPane.paintComponent(g, textRenderer, rendererPane,
(int) Math.round(w / state.getView().getScale()), (int) Math.round(h / state.getView().getScale()))); textRenderer.setFont(mxUtils.getFont(style, canvas.getScale())); g.scale(scale, scale); rendererPane.paintComponent(g, textRenderer, rendererPane,
return getSizeForString(markup, getFont(style), scale);
textArea.setFont(mxUtils.getFont(state.getStyle(), scale)); Color fontColor = mxUtils.getColor(state.getStyle(), mxConstants.STYLE_FONTCOLOR, Color.black);
textArea.setFont(mxUtils.getFont(state.getStyle(), scale)); Color fontColor = mxUtils.getColor(state.getStyle(), mxConstants.STYLE_FONTCOLOR, Color.black);
return getSizeForString(markup, getFont(style), scale);