/** * Returns a new, empty DOM document. * * @return Returns a new DOM document. */ public static String createHtmlDocument(Map<String, Object> style, String text, double scale) { return createHtmlDocument(style, text, scale, 0); }
/** * Returns a new, empty DOM document. * * @return Returns a new DOM document. */ public static String createHtmlDocument(Map<String, Object> style, String text) { return createHtmlDocument(style, text, 1, 0); }
/** * Returns a new, empty DOM document. * * @return Returns a new DOM document. */ public static String createHtmlDocument(Map<String, Object> style, String text) { return createHtmlDocument(style, text, 1, 0); }
/** * Returns a new, empty DOM document. * * @return Returns a new DOM document. */ public static String createHtmlDocument(Map<String, Object> style, String text, double scale, int width) { return createHtmlDocument(style, text, scale, width, null); }
/** * Returns a new, empty DOM document. * * @return Returns a new DOM document. */ public static String createHtmlDocument(Map<String, Object> style, String text, double scale) { return createHtmlDocument(style, text, scale, 0); }
/** * Returns a new, empty DOM document. * * @return Returns a new DOM document. */ public static String createHtmlDocument(Map<String, Object> style, String text, double scale, int width) { return createHtmlDocument(style, text, scale, width, null); }
/** * Returns a new, empty DOM document. The head argument can be used to * provide an optional HEAD section without the HEAD tags as follows: * * <pre> * mxUtils.createHtmlDocument(style, text, 1, 0, "<style type=\"text/css\">.classname { color:red; }</style>") * </pre> * * @return Returns a new DOM document. */ public static String createHtmlDocument(Map<String, Object> style, String text, double scale, int width, String head) { return createHtmlDocument(style, text, scale, width, null, null); };
/** * Returns a new, empty DOM document. The head argument can be used to * provide an optional HEAD section without the HEAD tags as follows: * * <pre> * mxUtils.createHtmlDocument(style, text, 1, 0, "<style type=\"text/css\">.classname { color:red; }</style>") * </pre> * * @return Returns a new DOM document. */ public static String createHtmlDocument(Map<String, Object> style, String text, double scale, int width, String head) { return createHtmlDocument(style, text, scale, width, null, null); };
/** * */ protected String createHtmlDocument(Map<String, Object> style, String text, int w, int h) { String overflow = mxUtils.getString(style, mxConstants.STYLE_OVERFLOW, ""); if (overflow.equals("fill")) { return mxUtils.createHtmlDocument(style, text, 1, w, null, "height:" + h + "pt;"); } else if (overflow.equals("width")) { return mxUtils.createHtmlDocument(style, text, 1, w); } else { return mxUtils.createHtmlDocument(style, text); } }
/** * */ protected String createHtmlDocument(Map<String, Object> style, String text, int w, int h) { String overflow = mxUtils.getString(style, mxConstants.STYLE_OVERFLOW, ""); if (overflow.equals("fill")) { return mxUtils.createHtmlDocument(style, text, 1, w, null, "height:" + h + "pt;"); } else if (overflow.equals("width")) { return mxUtils.createHtmlDocument(style, text, 1, w); } else { return mxUtils.createHtmlDocument(style, text); } }
textRenderer.setText(createHtmlDocument(style, markup)); Dimension size = textRenderer.getPreferredSize(); textRenderer.setText(createHtmlDocument( style, markup,
textRenderer.setText(createHtmlDocument(style, markup)); Dimension size = textRenderer.getPreferredSize(); textRenderer.setText(createHtmlDocument( style, markup,