public static String createHtmlDocument(Map<String,Object> style,String text,double scale){
  StringBuffer css=new StringBuffer();
  css.append("font-family:" + getString(style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILIES) + ";");
  css.append("font-size:" + (int)(getInt(style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE) * scale) + " pt;");
  String color=mxUtils.getString(style,mxConstants.STYLE_FONTCOLOR);
  if (color != null) {
    css.append("color:" + color + ";");
  }
  int fontStyle=mxUtils.getInt(style,mxConstants.STYLE_FONTSTYLE);
  if ((fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD) {
    css.append("font-weight:bold;");
  }
  if ((fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC) {
    css.append("font-style:italic;");
  }
  if ((fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE) {
    css.append("text-decoration:underline;");
  }
  String align=getString(style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT);
  if (align.equals(mxConstants.ALIGN_CENTER)) {
    css.append("text-align:center;");
  }
 else   if (align.equals(mxConstants.ALIGN_RIGHT)) {
    css.append("text-align:right;");
  }
  return "<html><body style=\"" + css.toString() + "\">"+ text+ "</body></html>";
}

public static String createHtmlDocument ( Map < String , Object > style , String text , double scale ) { StringBuffer css = new StringBuffer ( ) ; css . append ( "font-family:" + getString ( style , mxConstants . STYLE_FONTFAMILY , mxConstants . DEFAULT_FONTFAMILIES ) + ";" ) ; css . append ( "font-size:" + ( int ) ( getInt ( style , mxConstants . STYLE_FONTSIZE , mxConstants . DEFAULT_FONTSIZE ) * scale ) + " pt;" ) ; String color = mxUtils . getString ( style , mxConstants . STYLE_FONTCOLOR ) ; if ( color != null ) { css . append ( "color:" + color + ";" ) ; } int fontStyle = mxUtils . getInt ( style , mxConstants . STYLE_FONTSTYLE ) ; if ( ( fontStyle & mxConstants . FONT_BOLD ) == mxConstants . FONT_BOLD ) { css . append ( "font-weight:bold;" ) ; } if ( ( fontStyle & mxConstants . FONT_ITALIC ) == mxConstants . FONT_ITALIC ) { css . append ( "font-style:italic;" ) ; } if ( ( fontStyle & mxConstants . FONT_UNDERLINE ) == mxConstants . FONT_UNDERLINE ) { css . append ( "text-decoration:underline;" ) ; } String align = getString ( style , mxConstants . STYLE_ALIGN , mxConstants . ALIGN_LEFT ) ; if ( align . equals ( mxConstants . ALIGN_CENTER ) ) { css . append ( "text-align:center;" ) ; } else if ( align . equals ( mxConstants . ALIGN_RIGHT ) ) { css . append ( "text-align:right;" ) ; } return "<html><body style=\"" + css . toString ( ) + "\">" + text + "</body></html>" ; }
returns a new , empty dom document .
