Here you can find the source of createFontAttributeGraphics(Document d, boolean showFamily, boolean showStyle, boolean showWeight, boolean showSize, boolean showDecoration, boolean showAlign, boolean showRotation)
protected static Element createFontAttributeGraphics(Document d, boolean showFamily, boolean showStyle, boolean showWeight, boolean showSize, boolean showDecoration, boolean showAlign, boolean showRotation)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.Document; import org.w3c.dom.Element; public class Main { protected static Element createFontAttributeGraphics(Document d, boolean showFamily, boolean showStyle, boolean showWeight, boolean showSize, boolean showDecoration, boolean showAlign, boolean showRotation) { Element fontGraphics = d.createElement("font"); if (showFamily) fontGraphics.setAttribute("family", "arial,sans-serif"); if (showStyle) fontGraphics.setAttribute("style", "italic"); if (showWeight) fontGraphics.setAttribute("weight", "bold"); if (showSize) fontGraphics.setAttribute("size", "medium"); if (showDecoration) fontGraphics.setAttribute("decoration", "underline"); if (showAlign) fontGraphics.setAttribute("align", "left"); if (showRotation) fontGraphics.setAttribute("rotation", "0.0"); return fontGraphics; }// w w w. ja v a2 s.co m }