aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/svg/SVGObj.java
blob: 78a84bdda86fff33a8c4b82f3f05b5bfd46e8659 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
 * $Id$
 * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
 * For details on use and redistribution please refer to the
 * LICENSE file included with these sources.
 */

package org.apache.fop.svg;

import org.apache.fop.fo.*;
import org.apache.fop.layout.Area;
import org.apache.fop.layout.FontState;
import org.apache.fop.apps.FOPException;

import org.w3c.dom.Element;

public class SVGObj extends XMLObj {
    /**
     * inner class for making svg objects.
     */
    public static class Maker extends FObj.Maker {
        String tag;

        Maker(String str) {
            tag = str;
        }

        /**
         * make an svg object.
         *
         * @param parent the parent formatting object
         * @param propertyList the explicit properties of this object
         *
         * @return the svg object
         */
        public FObj make(FObj parent,
                         PropertyList propertyList) throws FOPException {
            return new SVGObj(parent, propertyList, tag);
        }
    }

    /**
     * returns the maker for this object.
     *
     * @return the maker for an svg object
     */
    public static FObj.Maker maker(String str) {
        return new SVGObj.Maker(str);
    }

    /**
     * constructs an svg object (called by Maker).
     *
     * @param parent the parent formatting object
     * @param propertyList the explicit properties of this object
     */
    protected SVGObj(FObj parent, PropertyList propertyList, String tag) {
        super(parent, propertyList, tag);
        this.name = "svg:" + tag;
    }

    public String getNameSpace() {
        return "http://www.w3.org/2000/svg";
    }
}