Here you can find the source of createFillAttributeGraphics(Document d, boolean showColor, boolean showGradientColor, boolean showGradientRotation, boolean showImage)
protected static Element createFillAttributeGraphics(Document d, boolean showColor, boolean showGradientColor, boolean showGradientRotation, boolean showImage)
//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 createFillAttributeGraphics(Document d, boolean showColor, boolean showGradientColor, boolean showGradientRotation, boolean showImage) { Element fillGraphics = d.createElement("fill"); if (showColor) fillGraphics.setAttribute("color", "#FF0000"); if (showGradientColor) fillGraphics.setAttribute("gradient-color", "#FFFFFF"); if (showGradientRotation) fillGraphics.setAttribute("gradient-rotation", "diagonal"); if (showImage) fillGraphics.setAttribute("image", "http://www.some-url.com/image.png"); return fillGraphics; }//from w w w . jav a 2s . c o m }