Package org.jfree.xml.writer

Examples of org.jfree.xml.writer.AttributeList$AttributeIterator


        final float dashPhase = stroke.getDashPhase();
        final int endCap = stroke.getEndCap();
        final int lineJoin = stroke.getLineJoin();
        final float lineWidth = stroke.getLineWidth();
        final float miterLimit = stroke.getMiterLimit();
        final AttributeList attribs = new AttributeList();
        if (mPlexAttribute != null) {
            attribs.setAttribute(mPlexAttribute, mPlexValue);
        }
        attribs.setAttribute("type", "basic");
        attribs.setAttribute("endCap", String.valueOf(endCap));
        attribs.setAttribute("lineJoin", String.valueOf(lineJoin));
        attribs.setAttribute("lineWidth", String.valueOf(lineWidth));
        attribs.setAttribute("miterLimit", String.valueOf(miterLimit));
        if (dashArray != null) {
            attribs.setAttribute("dashArray", toString(dashArray));
            attribs.setAttribute("dashPhase", String.valueOf(dashPhase));
        }
        writer.writeTag(tagName, attribs, true);
    }
View Full Code Here


     */
    public void write(final String tagName, final Object object, final XMLWriter writer,
                      final String mPlexAttribute, final String mPlexValue)
        throws IOException, XMLWriterException {
        final Color color = (Color) object;
        final AttributeList attribs = new AttributeList();
        if (mPlexAttribute != null) {
            attribs.setAttribute(mPlexAttribute, mPlexValue);
        }
        attribs.setAttribute("value", encodeColor(color));
        if (color.getAlpha() != 255) {
            attribs.setAttribute("alpha", String.valueOf(color.getAlpha()));
        }
        writer.writeTag(tagName, attribs, true);
    }
View Full Code Here

        throws IOException, XMLWriterException {

        try {
            this.factory.readProperties(object);

            final AttributeList attributes = new AttributeList();
            if (mPlexAttribute != null) {
                attributes.setAttribute(mPlexAttribute, mPlexValue);
            }
            final AttributeDefinition[] attribDefs = this.factory.getAttributeDefinitions();
            final ArrayList properties = new ArrayList();
            for (int i = 0; i < attribDefs.length; i++) {
                final AttributeDefinition adef = attribDefs[i];
                final String pName = adef.getAttributeName();
                final Object propValue = this.factory.getProperty(adef.getPropertyName());
                if (propValue != null) {
                    Log.debug(
                        "Here: " + this.factory.getBaseClass() + " -> " + adef.getPropertyName()
                    );
                    final String value = adef.getHandler().toAttributeValue(propValue);
                    if (value != null) {
                        attributes.setAttribute(pName, value);
                    }
                }
                properties.add(adef.getPropertyName());
            }
            writer.writeTag(tagName, attributes, false);
View Full Code Here

        final Rectangle2D rect = (Rectangle2D) object;
        final double x = rect.getX();
        final double y = rect.getY();
        final double w = rect.getWidth();
        final double h = rect.getHeight();
        final AttributeList attribs = new AttributeList();
        if (mPlexAttribute != null) {
            attribs.setAttribute(mPlexAttribute, mPlexValue);
        }
        attribs.setAttribute("x", String.valueOf(x));
        attribs.setAttribute("y", String.valueOf(y));
        attribs.setAttribute("width", String.valueOf(w));
        attribs.setAttribute("height", String.valueOf(h));
        writer.writeTag(tagName, attribs, true);
    }
View Full Code Here

TOP

Related Classes of org.jfree.xml.writer.AttributeList$AttributeIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.