diff options
Diffstat (limited to 'src/org/apache/fop/dom')
80 files changed, 0 insertions, 9812 deletions
diff --git a/src/org/apache/fop/dom/CharacterDataImpl.java b/src/org/apache/fop/dom/CharacterDataImpl.java deleted file mode 100644 index ed7d39e68..000000000 --- a/src/org/apache/fop/dom/CharacterDataImpl.java +++ /dev/null @@ -1,114 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom; - -import org.apache.fop.datatypes.*; -import org.apache.fop.messaging.*; -import org.apache.fop.dom.svg.*; - -import org.w3c.dom.*; - -import java.util.*; - -/** - * - * - */ -public class CharacterDataImpl extends NodeImpl implements CharacterData { - String str; - - public CharacterDataImpl() - { - } - - public String getData() - { - return str; - } - - public void setData(String s) - { - str = s; - } - - public void insertData(int i, String s) - { - } - - public void deleteData(int i, int j) - { - } - - public int getLength() - { - return str.length(); - } - - public void appendData(String s) - { - str = str + s; - } - - public void replaceData(int i, int j, String s) - { - } - - public String substringData(int i, int j) - { - return str.substring(i, j); - } - - public String toString() - { - return "Character Data: " + str; - } -} diff --git a/src/org/apache/fop/dom/ElementImpl.java b/src/org/apache/fop/dom/ElementImpl.java deleted file mode 100644 index 9e10b6daa..000000000 --- a/src/org/apache/fop/dom/ElementImpl.java +++ /dev/null @@ -1,173 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom; - -import org.apache.fop.datatypes.*; - -import org.w3c.dom.*; - -import java.util.*; - -/** - * - * - */ -public class ElementImpl extends NodeImpl implements Element { - - public Node replaceChild(Node n, Node no) - { - return null; - } - - public String getAttribute(String name) - { - return null; - } - - public void setAttribute(String name, String value) throws DOMException - { - } - - public void removeAttribute(String name) throws DOMException - { - } - - public Attr getAttributeNode(String name) - { - return null; - } - - public Attr setAttributeNode(Attr newAttr) - throws DOMException - { - return null; - } - - public Attr removeAttributeNode(Attr oldAttr) - throws DOMException - { - return null; - } - - public NodeList getElementsByTagName(String name) - { - NodeList nl = getChildNodes(); - Vector eles = new Vector(); - for(int count = 0; count < nl.getLength(); count++) { - Node el = (Node)nl.item(count); - if(el instanceof Element) { - if(name.equals(((Element)el).getTagName())) { - eles.addElement(el); - } - NodeList subtags = ((Element)el).getElementsByTagName(name); - for(int c = 0; c < subtags.getLength(); c++) { - Node node = (Node)subtags.item(c); - eles.addElement(node); - } - } - } - NodeList val = new NodeListImpl(eles); - return val; - } - - public String getAttributeNS(String namespaceURI, - String localName) - { - return null; - } - - public void setAttributeNS(String namespaceURI, - String qualifiedName, - String value) - throws DOMException - { - } - - public void removeAttributeNS(String namespaceURI, - String localName) - throws DOMException - { - } - - public Attr getAttributeNodeNS(String namespaceURI, - String localName) - { - return null; - } - - public Attr setAttributeNodeNS(Attr newAttr) - throws DOMException - { - return null; - } - - public NodeList getElementsByTagNameNS(String namespaceURI, - String localName) - { - return null; - } - - public boolean hasAttributeNS (String namespaceURI, - String localName) - { - return false; - } - - public boolean hasAttribute (String name) - { - return false; - } - - public boolean hasAttributes() - { - return false; - } -} diff --git a/src/org/apache/fop/dom/NodeImpl.java b/src/org/apache/fop/dom/NodeImpl.java deleted file mode 100644 index 7a2c263d6..000000000 --- a/src/org/apache/fop/dom/NodeImpl.java +++ /dev/null @@ -1,238 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom; - -import org.apache.fop.datatypes.*; - -import org.w3c.dom.*; - -import java.util.*; - -/** - * - * - */ -public class NodeImpl implements Node { - protected Vector childs = new Vector(); - Node parent = null; - protected Document ownerDoc; - - public Node replaceChild(Node n, Node no) - { - return null; - } - - public String getNodeName() - { - return null; - } - - public short getNodeType() - { - return 0; - } - - public Node getParentNode() - { - return parent; - } - - public NodeList getChildNodes() - { - return new NodeListImpl(childs); - } - - public Node getFirstChild() - { - if(childs.size() > 0) { - return (Node)childs.elementAt(0); - } - return null; - } - - public Node getLastChild() - { - if(childs.size() > 0) { - return (Node)childs.elementAt(childs.size() - 1); - } - return null; - } - - public Node getPreviousSibling() - { - int ind = ((NodeImpl)parent).childs.indexOf(this); - if(ind > 0) { - return (Node)((NodeImpl)parent).childs.elementAt(ind - 1); - } - return null; - } - - public Node getNextSibling() - { - int ind = ((NodeImpl)parent).childs.indexOf(this); - if(ind + 1 < ((NodeImpl)parent).childs.size()) { - return (Node)((NodeImpl)parent).childs.elementAt(ind + 1); - } - return null; - } - - public NamedNodeMap getAttributes() - { - return null; - } - - public Document getOwnerDocument() - { - return ownerDoc; - } - - void setOwnerDocument(Document doc) - { - ownerDoc = doc; - NodeList nl = getChildNodes(); - for(int count = 0; count < nl.getLength(); count++) { - Node n = nl.item(count); - if(n instanceof ElementImpl) { - ((ElementImpl)n).setOwnerDocument(ownerDoc); - } - } - } - - public Node insertBefore(Node newChild, - Node refChild) - throws DOMException - { - return null; - } - - public Node removeChild(Node oldChild) - throws DOMException - { - return null; - } - - public Node appendChild(Node newChild) - throws DOMException - { - childs.addElement(newChild); - if(newChild instanceof ElementImpl) { - ElementImpl ele = (ElementImpl)newChild; - ele.parent = this; - ele.setOwnerDocument(ownerDoc); - } - return newChild; - } - - public boolean hasChildNodes() - { - return childs.size() > 0; - } - - public Node cloneNode(boolean deep) - { - return null; - } - - public void normalize() - { - } - - public boolean supports(String feature, - String version) - { - return false; - } - - public boolean isSupported(String feature, - String version) - { - return false; - } - - - public String getNamespaceURI() - { - return ""; - } - - public String getPrefix() - { - return "svg"; - } - - public void setPrefix(String prefix) throws DOMException - { - } - - public String getLocalName() - { - return null; - } - - public String getNodeValue() throws DOMException - { - return null; - } - - public void setNodeValue(String nodeValue) throws DOMException - { - } - - public String getTagName() - { - return null; - } - - public boolean hasAttributes() - { - return false; - } -} diff --git a/src/org/apache/fop/dom/NodeListImpl.java b/src/org/apache/fop/dom/NodeListImpl.java deleted file mode 100644 index 8a800eaf9..000000000 --- a/src/org/apache/fop/dom/NodeListImpl.java +++ /dev/null @@ -1,86 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom; - -import org.apache.fop.datatypes.*; - -import org.w3c.dom.*; - -import java.util.*; - -/** - * - * - */ -class NodeListImpl implements NodeList -{ - Vector vect = null; - - NodeListImpl(Vector v) - { - vect = v; - } - - public int getLength() - { - return vect.size(); - } - - public Node item(int i) - { - return (Node)vect.elementAt(i); - } - - public String toString() - { - return vect.toString(); - } -} diff --git a/src/org/apache/fop/dom/css/CSSPrimitiveValueImpl.java b/src/org/apache/fop/dom/css/CSSPrimitiveValueImpl.java deleted file mode 100644 index 484925726..000000000 --- a/src/org/apache/fop/dom/css/CSSPrimitiveValueImpl.java +++ /dev/null @@ -1,116 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.css; - -import org.w3c.dom.css.*; - -/** - * - * - */ -public class CSSPrimitiveValueImpl extends CSSValueImpl implements CSSPrimitiveValue { - short primType = CSS_UNKNOWN; - float floatVal = 0; - String strVal = null; - - public CSSPrimitiveValueImpl() - { - type = CSS_PRIMITIVE_VALUE; - } - - public short getPrimitiveType() - { - return primType; - } - - public void setFloatValue(short unitType, - float floatValue) - { - primType = unitType; - this.floatVal = floatValue; - } - - public float getFloatValue(short unitType) - { - return this.floatVal; - } - - public void setStringValue(short stringType, - String stringValue) - { - strVal = stringValue; - } - - public String getStringValue() - { - return strVal; - } - - public Counter getCounterValue() - { - return null; - } - - public Rect getRectValue() - { - return null; - } - - public RGBColor getRGBColorValue() - { - if(primType == CSSPrimitiveValue.CSS_RGBCOLOR) { - } else { - // throw a DOMException - } - return null; - } -} diff --git a/src/org/apache/fop/dom/css/CSSStyleDeclarationImpl.java b/src/org/apache/fop/dom/css/CSSStyleDeclarationImpl.java deleted file mode 100644 index 194add272..000000000 --- a/src/org/apache/fop/dom/css/CSSStyleDeclarationImpl.java +++ /dev/null @@ -1,394 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.css; - -import org.apache.fop.datatypes.*; -import org.apache.fop.messaging.*; -import org.apache.fop.dom.svg.*; - -import org.w3c.dom.css.*; -import org.w3c.dom.svg.*; - -import java.util.*; - -/** - * - * - */ -public class CSSStyleDeclarationImpl implements CSSStyleDeclaration { - Hashtable table = new Hashtable(); - - public CSSStyleDeclarationImpl() { - } - - public String removeProperty(String str) { - return null; - } - - public String getCssText() { - return null; - } - - public void setCssText(String str) { - try { - parseStyleText(str); - } catch (Exception e) { - e.printStackTrace(); - } - } - - protected void parseStyleText(String len) { - StringTokenizer st = new StringTokenizer(len, ";"); - while (st.hasMoreTokens()) { - String str = st.nextToken(); - int pos; - pos = str.indexOf(":"); - if (pos != -1) { - String type = str.substring(0, pos).trim(); - String value = str.substring(pos + 1, str.length()).trim(); - if (type.equals("stroke-width")) { - CSSPrimitiveValue primval = new LengthValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("stroke")) { - CSSPrimitiveValue primval = new RGBColorValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("color")) { - CSSPrimitiveValue primval = new RGBColorValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("stroke-linecap")) { - CSSPrimitiveValue primval = new StringValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("stroke-linejoin")) { - CSSPrimitiveValue primval = new StringValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("stroke-miterlimit")) { - CSSPrimitiveValue primval = new LengthValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("stroke-dasharray")) { - // array of space or comma separated numbers - if (!value.equals("none")) { - CSSValueListImpl list = new CSSValueListImpl(); - StringTokenizer array = - new StringTokenizer(value, " ,"); - while (array.hasMoreTokens()) { - CSSPrimitiveValue primval = new LengthValue(); - primval.setCssText(array.nextToken()); - list.addValue(primval); - } - table.put(type, list); - } else { - CSSPrimitiveValue primval = new StringValue(); - primval.setCssText(value); - table.put(type, primval); - } - } else if (type.equals("stroke-dashoffset")) { - CSSPrimitiveValue primval = new LengthValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("stroke-opacity")) { - CSSPrimitiveValue primval = new LengthValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("fill")) { - CSSPrimitiveValue primval = new RGBColorValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("fill-rule")) { - // nonzero - CSSPrimitiveValue primval = new StringValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("font")) { - CSSPrimitiveValue primval = new StringValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("font-size")) { - CSSPrimitiveValue primval = new LengthValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("font-family")) { - CSSPrimitiveValue primval = new StringValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("font-weight")) { - CSSPrimitiveValue primval = new StringValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("font-style")) { - CSSPrimitiveValue primval = new StringValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("font-variant")) { - CSSPrimitiveValue primval = new StringValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("font-stretch")) { - CSSPrimitiveValue primval = new StringValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("font-size-adjust")) { - CSSPrimitiveValue primval = new StringValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("letter-spacing")) { - CSSPrimitiveValue primval = new LengthValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("word-spacing")) { - CSSPrimitiveValue primval = new LengthValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("text-decoration")) { - CSSPrimitiveValue primval = new StringValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("mask")) { - CSSPrimitiveValue primval = new URIValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("fill-opacity")) { - CSSPrimitiveValue primval = new LengthValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("opacity")) { - CSSPrimitiveValue primval = new LengthValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("filter")) { - // table.put(type, new Filter(value)); - } else if (type.equals("stop-color")) { - CSSPrimitiveValue primval = new RGBColorValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("stop-opacity")) { - CSSPrimitiveValue primval = new LengthValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("overflow")) { - CSSPrimitiveValue primval = new StringValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("clip-rule")) { - CSSPrimitiveValue primval = new StringValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("clip-path")) { - CSSPrimitiveValue primval = new URIValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("clip")) { - CSSPrimitiveValue primval = new URIValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("marker-start")) { - CSSPrimitiveValue primval = new URIValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("marker-mid")) { - CSSPrimitiveValue primval = new URIValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("marker-end")) { - CSSPrimitiveValue primval = new URIValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("text-antialiasing")) { - // boolean - } else if (type.equals("stroke-antialiasing")) { - // boolean - } else if (type.equals("writing-mode")) { - } else if (type.equals("glyph-orientation-vertical")) { - } else if (type.equals("glyph-orientation-horizontal")) { - } else if (type.equals("direction")) { - } else if (type.equals("unicode-bidi")) { - } else if (type.equals("text-anchor")) { - CSSPrimitiveValue primval = new StringValue(); - primval.setCssText(value); - table.put(type, primval); - } else if (type.equals("dominant-baseline")) { - } else if (type.equals("baseline-identifier")) { - } else if (type.equals("baseline-shift")) { - } else if (type.equals("font-size-adjust")) { - } else { - MessageHandler.logln( - "WARNING: Unknown style element : " + type); - } - } else { - if (!"".equals(str.trim())) - MessageHandler.errorln( - "ERROR: Invalid style element " + str); - } - } - } - - public String getPropertyValue(String str) { - return getPropertyCSSValue(str).getCssText(); - } - - public void setProperty(String a, String b, String c) { - } - - public String item(int n) { - return null; - } - - public CSSRule getParentRule() { - return null; - } - - public String getPropertyPriority(String str) { - return null; - } - - public CSSValue getPropertyCSSValue(String str) { - return (CSSValue) table.get(str); - } - - public int getLength() { - return table.size(); - } - - class RGBColorValue extends CSSPrimitiveValueImpl { - RGBColor col = null; - - public void setCssText(String str) { - super.setCssText(str); - if (str.startsWith("url(")) { - primType = CSS_URI; - } else if (str.equals("currentColor")) { - primType = CSS_STRING; - } else if (!str.equals("none")) { - float red; - float green; - float blue; - ColorType ct = new ColorType(str); - red = ct.red(); - green = ct.green(); - blue = ct.blue(); - col = new RGBColorImpl(red, green, blue); - primType = CSS_RGBCOLOR; - } else { - primType = CSS_STRING; - } - } - - public RGBColor getRGBColorValue() { - if (primType != CSS_RGBCOLOR) { - // throw exception - } - return col; - } - } - - /* - * This should probably be moved to dom.svg... - */ - class LengthValue extends CSSPrimitiveValueImpl { - - public void setCssText(String str) { - super.setCssText(str); - SVGLength length = new SVGLengthImpl(str); - floatVal = length.getValue(); - switch (length.getUnitType()) { - case SVGLength.SVG_LENGTHTYPE_IN: - primType = CSS_IN; - break; - case SVGLength.SVG_LENGTHTYPE_CM: - primType = CSS_CM; - break; - case SVGLength.SVG_LENGTHTYPE_MM: - primType = CSS_MM; - break; - case SVGLength.SVG_LENGTHTYPE_PT: - primType = CSS_PT; - break; - case SVGLength.SVG_LENGTHTYPE_PC: - primType = CSS_PC; - break; - case SVGLength.SVG_LENGTHTYPE_EMS: - primType = CSS_EMS; - break; - case SVGLength.SVG_LENGTHTYPE_PX: - primType = CSS_PX; - break; - case SVGLength.SVG_LENGTHTYPE_PERCENTAGE: - primType = CSS_PERCENTAGE; - break; - case SVGLength.SVG_LENGTHTYPE_NUMBER: - primType = CSS_NUMBER; - break; - } - } - } - - class StringValue extends CSSPrimitiveValueImpl { - - public void setCssText(String str) { - super.setCssText(str); - primType = CSS_STRING; - } - } - - class URIValue extends CSSPrimitiveValueImpl { - - public void setCssText(String str) { - super.setCssText(str); - primType = CSS_URI; - } - } -} diff --git a/src/org/apache/fop/dom/css/CSSStyleRuleImpl.java b/src/org/apache/fop/dom/css/CSSStyleRuleImpl.java deleted file mode 100644 index 5d6e37a35..000000000 --- a/src/org/apache/fop/dom/css/CSSStyleRuleImpl.java +++ /dev/null @@ -1,323 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.css; - -//import org.apache.fop.dom.svg.*; -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.*; -import org.w3c.dom.*; -import org.w3c.dom.stylesheets.*; - -import java.util.*; - -/** - * - * - */ -public class CSSStyleRuleImpl implements CSSStyleRule { - String seltext; - String cssText; - CSSStyleDeclaration style; - CSSStyleSheet styleSheet; - Vector selectors = new Vector(); - - public CSSStyleRuleImpl(CSSStyleSheet styleSheet) - { - this.styleSheet = styleSheet; - } - - public String getSelectorText() - { - return seltext; - } - - /** - * Selectors are comma separated values (except for attributes) - * of all the selectors for the style. - */ - public void setSelectorText(String selectorText) - { - seltext = selectorText; - parseSelector(); - } - - protected void parseSelector() - { - // need to handle "," in attribute selectors - StringTokenizer st = new StringTokenizer(seltext, ","); - while(st.hasMoreTokens()) { - String sel = st.nextToken().trim(); - StringTokenizer subt = new StringTokenizer(sel, " \t\n\r"); - Selector last = null; - Selector current = null; - int compoundstate = 0; - while(subt.hasMoreTokens()) { - String str = subt.nextToken().trim(); - current = new Selector(); - boolean compounding = false; - if(str.equals("*")) { - // all - current.type = Selector.ALL; - current.value = "*"; - } else if(str.equals(">")) { - // child of - compoundstate = 1; - compounding = true; - } else if(str.equals("+")) { - // precedent of - compoundstate = 2; - compounding = true; - } else if(str.startsWith("#")) { - // id - current.type = Selector.ID; - current.value = str.substring(1); - } else if(str.startsWith(".")) { - // class - current.type = Selector.CLASS; - current.value = str.substring(1); - } else if(str.startsWith("[")) { - // attribute - current.type = Selector.ATTRIBUTE; - current.value = str.substring(1, str.length() - 1); - } else { - // tag - current.type = Selector.TAG; - if(str.indexOf(":") != -1) { - current.type = Selector.TAG_FIRST_CHILD; - int pos = str.indexOf(":"); - current.value = str.substring(0, pos); - current.subValue = str.substring(pos + 1); - } else if(str.indexOf("#") != -1) { - current.type = Selector.TAG_ID; - int pos = str.indexOf("#"); - current.value = str.substring(0, pos); - current.subValue = str.substring(pos + 1); - } else if(str.indexOf(".") != -1) { - current.type = Selector.TAG_CLASS; - int pos = str.indexOf("."); - current.value = str.substring(0, pos); - current.subValue = str.substring(pos + 1); - } else { - current.value = str; - } - } - if(!compounding) { - switch(compoundstate) { - case 0: - if(last != null) { - Selector compound = new Selector(); - compound.type = Selector.DESCENDANT; - compound.last = last; - compound.current = current; - current = compound; - compoundstate = 0; - } - break; - case 1: - { - Selector compound = new Selector(); - compound.type = Selector.CHILD; - compound.last = last; - compound.current = current; - current = compound; - compoundstate = 0; - } - break; - case 2: - { - Selector compound = new Selector(); - compound.type = Selector.PRECEDENT; - compound.last = last; - compound.current = current; - current = compound; - compoundstate = 0; - } - break; - } - last = current; - } - } - if(current != null) - selectors.addElement(current); - } - } - - public CSSStyleDeclaration getStyle() - { - return style; - } - - public String getCssText() - { - return cssText; - } - - public void setCssText(String cssText) - { - this.cssText = cssText; - style = new CSSStyleDeclarationImpl(); - style.setCssText(cssText); - } - - public short getType() - { - return STYLE_RULE; - } - - public CSSStyleSheet getParentStyleSheet() - { - return styleSheet; - } - - public CSSRule getParentRule() - { - return null; - } - - /** - * This should probably be elsewhere, in dom.svg - */ - public boolean matches(SVGElement el) - { - for(Enumeration e = selectors.elements(); e.hasMoreElements(); ) { - Selector sel = (Selector)e.nextElement(); - if(matches(el, sel)) - return true; - } - return false; - } - - protected boolean matches(SVGElement el, Selector sel) - { - short type = sel.type; - if(el == null) - return false; - switch(type) { - case Selector.ALL: - return true; -// break; - case Selector.ID: - return el.getId().equals(sel.value); -// break; - case Selector.CLASS: - return ((SVGStylable)el).getClassName().getBaseVal().equals(sel.value); -// break; - case Selector.ATTRIBUTE: -//System.out.println(sel.value + ":" + el.getAttribute(sel.value)); -// return el.getAttribute(sel.value); - break; - case Selector.TAG: - return sel.value.equals(el.getTagName()); -// break; - case Selector.TAG_FIRST_CHILD: - if(el.getParentNode() != null) - return (el.getParentNode().getFirstChild() == el); - break; - case Selector.TAG_ID: - return sel.value.equals(el.getTagName()) - && sel.subValue.equals(el.getId()); -// break; - case Selector.TAG_CLASS: - return sel.value.equals(el.getTagName()) - && sel.subValue.equals(((SVGStylable)el).getClassName().getBaseVal()); -// break; - case Selector.DESCENDANT: - if(el.getParentNode() instanceof SVGElement) { - if(!matches(el, sel.current)) - return false; - SVGElement parent = (SVGElement)el.getParentNode(); - while(parent != null) { - if(matches(parent, sel.last)) - return true; - if(parent.getParentNode() instanceof SVGElement) { - parent = (SVGElement)parent.getParentNode(); - } else { - return false; - } - } - } - return false; -// break; - case Selector.CHILD: - return matches(el, sel.current) - && matches((SVGElement)el.getParentNode(), sel.last); -// break; - case Selector.PRECEDENT: - return matches(el, sel.current) - && matches((SVGElement)el.getPreviousSibling(), sel.last); -// break; - } - return false; - } -} - -class Selector { - final static short NONE = -1; - final static short ALL = 0; - final static short ID = 1; - final static short CLASS = 2; - final static short ATTRIBUTE = 3; - final static short TAG = 4; - final static short DESCENDANT = 5; - final static short CHILD = 6; - final static short PRECEDENT = 7; - final static short TAG_FIRST_CHILD = 8; - final static short TAG_ID = 9; - final static short TAG_CLASS = 10; - short type = NONE; - String value = ""; - String subValue = ""; - // pre- simple selector in compound selectors - Selector last = null; - Selector current = null; -} diff --git a/src/org/apache/fop/dom/css/CSSStyleSheetImpl.java b/src/org/apache/fop/dom/css/CSSStyleSheetImpl.java deleted file mode 100644 index 97ee8ef3f..000000000 --- a/src/org/apache/fop/dom/css/CSSStyleSheetImpl.java +++ /dev/null @@ -1,194 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.css; - -import org.w3c.dom.css.*; -import org.w3c.dom.*; -import org.w3c.dom.stylesheets.*; - -import java.util.*; - -/** - * - * - */ -public class CSSStyleSheetImpl implements CSSStyleSheet { - Vector rules = new Vector(); - - public CSSStyleSheetImpl(String sheet) - { - parseSheet(sheet); - } - - protected void parseSheet(String str) - { - // get each rule and insert it - // rule ends with } - // need to ignore comments - String newStr = str; - int pos1; - int pos2; - pos1 = newStr.indexOf("/*"); - pos2 = newStr.indexOf("*/"); - while((pos1 != -1) && (pos2 != -1)) { - newStr = newStr.substring(0, pos1) + newStr.substring(pos2 + 2, newStr.length()); - pos1 = newStr.indexOf("/*"); - pos2 = newStr.indexOf("*/"); - } - StringTokenizer st = new StringTokenizer(newStr, "}"); - while(st.hasMoreTokens()) { - String rule = st.nextToken() + "}"; - insertRule(rule, rules.size()); - } - } - - public CSSRule getOwnerRule() - { - // since this is for a style element - return null; - } - - public CSSRuleList getCssRules() - { - return new CSSRuleListImpl(rules); - } - - public int insertRule(String rule, - int index) - throws DOMException - { - CSSRule r = parseRule(rule); - if(r != null) - rules.addElement(r); - return 0; - } - - public void deleteRule(int index) - throws DOMException - { - rules.removeElementAt(index); - } - - public String getType() - { - return "text/css"; - } - - public boolean getDisabled() - { - return false; - } - - public void setDisabled(boolean disabled) - { - } - - public Node getOwnerNode() - { - // return the style element - return null; - } - - public StyleSheet getParentStyleSheet() - { - return null; - } - - public String getHref() - { - return null; - } - - public String getTitle() - { - return null; - } - - public MediaList getMedia() - { - return null; - } - - protected CSSRule parseRule(String str) - { - // a rule is "selectors {style}" - // a list of selectors followed by the style statement in brackets - int pos1 = str.indexOf("{"); - int pos2 = str.indexOf("}"); - if(pos1 == -1 || pos2 == -1) - return null; - String sel = str.substring(0, pos1); - String style = str.substring(pos1 + 1, pos2); - CSSStyleRule rule = new CSSStyleRuleImpl(this); - rule.setSelectorText(sel); - rule.setCssText(style); - return rule; - } -} - -class CSSRuleListImpl implements CSSRuleList { - Vector rules; - CSSRuleListImpl(Vector v) - { - rules = v; - } - - public int getLength() - { - return rules.size(); - } - - public CSSRule item(int pos) - { - return (CSSRule)rules.elementAt(pos); - } -} diff --git a/src/org/apache/fop/dom/css/CSSValueImpl.java b/src/org/apache/fop/dom/css/CSSValueImpl.java deleted file mode 100644 index 9b7b2986c..000000000 --- a/src/org/apache/fop/dom/css/CSSValueImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.css; - -import org.w3c.dom.css.*; - -/** - * - * - */ -public class CSSValueImpl implements CSSValue { - String text; - short type; - - public CSSValueImpl() - { - } - - public void setCssText(String str) - { - text = str; - } - - public String getCssText() - { - return text; - } - - public short getValueType() - { - return type; - } -} diff --git a/src/org/apache/fop/dom/css/CSSValueListImpl.java b/src/org/apache/fop/dom/css/CSSValueListImpl.java deleted file mode 100644 index 91053618b..000000000 --- a/src/org/apache/fop/dom/css/CSSValueListImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.css; - -import org.w3c.dom.css.*; - -import java.util.Vector; - -/** - * - * - */ -public class CSSValueListImpl extends CSSValueImpl implements CSSValueList { - Vector values = new Vector(); - - public CSSValueListImpl() { - type = CSS_VALUE_LIST; - } - - public int getLength() { - return values.size(); - } - - public CSSValue item(int index) { - return (CSSValue) values.elementAt(index); - } - - void addValue(CSSValue val) { - values.addElement(val); - } -} diff --git a/src/org/apache/fop/dom/css/RGBColorImpl.java b/src/org/apache/fop/dom/css/RGBColorImpl.java deleted file mode 100644 index b937df46e..000000000 --- a/src/org/apache/fop/dom/css/RGBColorImpl.java +++ /dev/null @@ -1,89 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.css; - -import org.w3c.dom.css.*; - -/** - * - * - */ -public class RGBColorImpl implements RGBColor { - CSSPrimitiveValue red; - CSSPrimitiveValue green; - CSSPrimitiveValue blue; - - public RGBColorImpl(float r, float g, float b) - { - red = new CSSPrimitiveValueImpl(); - red.setFloatValue(CSSPrimitiveValue.CSS_NUMBER, r); - green = new CSSPrimitiveValueImpl(); - green.setFloatValue(CSSPrimitiveValue.CSS_NUMBER, g); - blue = new CSSPrimitiveValueImpl(); - blue.setFloatValue(CSSPrimitiveValue.CSS_NUMBER, b); - } - - public CSSPrimitiveValue getRed() - { - return red; - } - - public CSSPrimitiveValue getGreen() - { - return green; - } - - public CSSPrimitiveValue getBlue() - { - return blue; - } -} diff --git a/src/org/apache/fop/dom/stylesheets/StyleSheetListImpl.java b/src/org/apache/fop/dom/stylesheets/StyleSheetListImpl.java deleted file mode 100644 index ebd0ccb46..000000000 --- a/src/org/apache/fop/dom/stylesheets/StyleSheetListImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.stylesheets; - -import org.w3c.dom.stylesheets.*; - -import java.util.*; - -/** - * - * - */ -public class StyleSheetListImpl implements StyleSheetList { - Vector sheets = new Vector(); - - public StyleSheetListImpl(Vector sheets) - { - this.sheets = sheets; - } - - public int getLength() - { - return sheets.size(); - } - - public StyleSheet item(int pos) - { - return (StyleSheet)sheets.elementAt(pos); - } -} diff --git a/src/org/apache/fop/dom/svg/GraphicElement.java b/src/org/apache/fop/dom/svg/GraphicElement.java deleted file mode 100644 index 682bdad1e..000000000 --- a/src/org/apache/fop/dom/svg/GraphicElement.java +++ /dev/null @@ -1,257 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import java.util.Enumeration; - -import org.apache.fop.datatypes.*; - -import org.w3c.dom.svg.*; -import org.w3c.dom.*; -import org.w3c.dom.events.*; - -/** - * base class for SVG graphic objects. - * - * Graphic objects include rectangles, lines and text - * - */ -public abstract class GraphicElement extends SVGElementImpl implements SVGTransformable, -SVGLangSpace, SVGTests, EventTarget { - protected SVGStringList reqFeatures; - protected SVGStringList reqExtensions; - protected SVGStringList sysLanguage; - SVGAnimatedTransformList transform; - String xmlspace = "default"; - - public SVGElement getNearestViewportElement() { - Node node = getParentNode(); - while (node != null) { - if (node instanceof SVGGElement) { - return (SVGElement) node; - } else if (node instanceof SVGSVGElement) { - return (SVGElement) node; - } - node = getParentNode(); - } - return null; - } - - public SVGElement getFarthestViewportElement() { - Node node = getParentNode(); - SVGElement viewport = null; - while (node != null) { - if (node instanceof SVGGElement) { - viewport = (SVGElement) node; - } else if (node instanceof SVGSVGElement) { - viewport = (SVGElement) node; - } - node = getParentNode(); - } - return viewport; - } - - public SVGAnimatedTransformList getTransform() { - if (transform != null) { - return transform; - } - SVGTransformList stl = new SVGTransformListImpl(); - SVGTransform transform = new SVGTransformImpl(); - stl.appendItem(transform); - SVGAnimatedTransformListImpl atl = - new SVGAnimatedTransformListImpl(); - atl.setBaseVal(stl); - return atl; - } - - public void setTransform(SVGAnimatedTransformList transform) { - this.transform = transform; - } - - public SVGRect getBBox() { - return null; - } - - /** - * Returns the transformation matrix from current user units (i.e., after - * application of the transform attribute) to the viewport coordinate system - * for the nearestViewportElement. - */ - public SVGMatrix getCTM() { - return transform.getBaseVal().consolidate().getMatrix(); - } - - /** - * Returns the transformation matrix from current user units (i.e., after - * application of the transform attribute) to the parent user agent's notice - * of a "pixel". For display devices, ideally this represents a physical - * screen pixel. For other devices or environments where physical pixel sizes - * are not known, then an algorithm similar to the CSS2 definition of a "pixel" - * can be used instead. - * This is the matrix that converts from the user space to the position - * on the screen. - */ - public SVGMatrix getScreenCTM() { - if (transform == null) { - return new SVGMatrixImpl(); - } - Node node = getParentNode(); - SVGMatrix matrix = null; - if (node != null && node instanceof SVGTransformable) { - matrix = ((SVGTransformable) node).getScreenCTM(); - } - if (matrix != null) { - matrix = transform.getBaseVal().consolidate().getMatrix(). - multiply(matrix); - } else { - matrix = transform.getBaseVal().consolidate().getMatrix(); - } - return matrix; - } - - public SVGMatrix getTransformToElement(SVGElement element) - throws SVGException { - return null; - } - - public String getXMLlang() { - return null; - } - - public void setXMLlang(String xmllang) { - } - - public String getXMLspace() { - return xmlspace; - } - - public void setXMLspace(String xmlspace) { - this.xmlspace = xmlspace; - } - - public SVGStringList getRequiredFeatures() { - return reqFeatures; - } - - public void setRequiredFeatures(SVGStringList requiredFeatures) - throws DOMException { - reqFeatures = requiredFeatures; - } - - public SVGStringList getRequiredExtensions() { - return reqExtensions; - } - - public void setRequiredExtensions(SVGStringList requiredExtensions) - throws DOMException { - reqExtensions = requiredExtensions; - } - - public boolean hasExtension (String extension) { - return false; - } - - public SVGStringList getSystemLanguage() { - return sysLanguage; - } - - public void setSystemLanguage(SVGStringList systemLanguage) { - sysLanguage = systemLanguage; - } - - public void addEventListener(String type, EventListener listener, - boolean useCapture) { - } - - public void removeEventListener(String type, - EventListener listener, boolean useCapture) { - } - - public boolean dispatchEvent(Event evt)// throws EventException - { - return false; - } - - /** - * Convenience method for implementations of SVGTransformable - * that have children that represents the bounding box - */ - protected SVGRect getChildrenBBox() { - float minX = 10000000; // a big number - float maxX = -10000000; // a low number - float minY = 10000000; // a big number - float maxY = -10000000; // a low number - NodeList nl = getChildNodes(); - // can width and height be negative?? - for (int count = 0; count < nl.getLength(); count++) { - Node n = nl.item(count); - if (n instanceof SVGTransformable) { - SVGRect r = ((SVGTransformable) n).getBBox(); - if (r != null) { - if (minX > r.getX()) - minX = r.getX(); - if (minY > r.getY()) - minY = r.getY(); - if (maxX < r.getX() + r.getWidth()) - maxX = r.getX() + r.getWidth(); - if (maxY > r.getY() + r.getHeight()) - maxY = r.getY() + r.getHeight(); - } - } - } - SVGRect rect = new SVGRectImpl(); - rect.setX(minX); - rect.setY(minY); - rect.setWidth(maxX - minX); - rect.setHeight(maxY - minY); - return rect; - } -} diff --git a/src/org/apache/fop/dom/svg/GraphicImpl.java b/src/org/apache/fop/dom/svg/GraphicImpl.java deleted file mode 100644 index 72dfc5c4a..000000000 --- a/src/org/apache/fop/dom/svg/GraphicImpl.java +++ /dev/null @@ -1,76 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import org.apache.fop.datatypes.*; - -import java.util.*; - -import org.w3c.dom.svg.SVGElement; - -/** - * base class for SVG graphic objects. - * - * Graphic objects include rectangles, lines and text - * - */ -// use this so that the SVGArea can also hold style, defs and transform etc. -public interface GraphicImpl { - public Hashtable oldgetStyle(); - public void setParent(SVGElement g); - public SVGElement getGraphicParent(); - public Vector oldgetTransform(); // ?? - public Hashtable getDefs(); - public SVGElement locateDef(String str); - public void setStyle(Hashtable st); - public void addDefs(Hashtable st); - public void setTransform(Vector tr); // ?? -} diff --git a/src/org/apache/fop/dom/svg/SVGAElementImpl.java b/src/org/apache/fop/dom/svg/SVGAElementImpl.java deleted file mode 100644 index 66206068e..000000000 --- a/src/org/apache/fop/dom/svg/SVGAElementImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * class representing a line in an SVG Area - * - */ -public class SVGAElementImpl extends SVGURIReferenceImpl implements SVGAElement { - SVGAnimatedString target; - - public SVGAElementImpl() - { - } - - public void setTarget(SVGAnimatedString str) - { - target = str; - } - - public SVGAnimatedString getTarget() - { - return target; - } - - public SVGRect getBBox() - { - return getChildrenBBox(); - } -} diff --git a/src/org/apache/fop/dom/svg/SVGAltGlyphElementImpl.java b/src/org/apache/fop/dom/svg/SVGAltGlyphElementImpl.java deleted file mode 100644 index f1bec3848..000000000 --- a/src/org/apache/fop/dom/svg/SVGAltGlyphElementImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -/** - * class representing a line in an SVG Area - * - */ -public class SVGAltGlyphElementImpl extends SVGElementImpl { - public SVGAltGlyphElementImpl() - { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGAngleImpl.java b/src/org/apache/fop/dom/svg/SVGAngleImpl.java deleted file mode 100644 index ec7d44daa..000000000 --- a/src/org/apache/fop/dom/svg/SVGAngleImpl.java +++ /dev/null @@ -1,205 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Fop" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import org.apache.fop.fo.Property; - -import java.util.*; -import java.text.*; - -import org.w3c.dom.svg.*; - -/** - * SVG Angle. - * - * @author Keiron Liddle <keiron@aftexsw.com> - * modified Nov 14,2000 Mike Crowe <crowe@psilongbeach.com>, Fop internal - * representation of angles is in degrees, added convert before doing any trig - * function - */ -public class SVGAngleImpl implements SVGAngle { - float value = 0; - short unitType = SVG_ANGLETYPE_UNKNOWN; - - public SVGAngleImpl() { - } - - public short getUnitType() { - return unitType; - } - - public float getValue() { - return value; - } - - public void setValue(float value) { - this.value = value; - } - - public float getValueInSpecifiedUnits() { - switch (unitType) { - case SVG_ANGLETYPE_UNKNOWN: - throw new SVGExceptionImpl( - SVGException.SVG_WRONG_TYPE_ERR, "unknown unit type"); - // break; - case SVG_ANGLETYPE_UNSPECIFIED: - throw new SVGExceptionImpl( - SVGException.SVG_WRONG_TYPE_ERR, "unknown unit type"); - // break; - case SVG_ANGLETYPE_DEG: - break; - case SVG_ANGLETYPE_RAD: - break; - case SVG_ANGLETYPE_GRAD: - break; - } - return 0; - } - - public void setValueInSpecifiedUnits(float valueInSpecifiedUnits) { - switch (unitType) { - case SVG_ANGLETYPE_UNKNOWN: - throw new SVGExceptionImpl( - SVGException.SVG_WRONG_TYPE_ERR, "unknown unit type"); - // break; - case SVG_ANGLETYPE_UNSPECIFIED: - throw new SVGExceptionImpl( - SVGException.SVG_WRONG_TYPE_ERR, "unknown unit type"); - // break; - case SVG_ANGLETYPE_DEG: - break; - case SVG_ANGLETYPE_RAD: - break; - case SVG_ANGLETYPE_GRAD: - break; - } - } - - public String getValueAsString() { - NumberFormat nf = NumberFormat.getInstance(); - return nf.format(value); - } - - /** - *The following is from CR-SVG-20000802 4.1 Basic Data Types; - * <angle>: An angle value is a <number> optionally followed - * immediately with an angle unit identifier. Angle unit identifiers are: - * deg: degrees m - * grad: grads m - * rad: radians m - * For properties defined in [CSS2], an angle unit identifier must be - * provided. For SVG-specific attributes and properties, the angle unit - * identifier is optional. If not provided, the angle value is assumed to be - * in degrees. - */ - public void setValueAsString(String valueAsString) { - NumberFormat nf = NumberFormat.getInstance(); - try { - value = nf.parse(valueAsString).floatValue(); - if (valueAsString.indexOf("grad") != -1) { - value = (float)(value * 360.0 / 400.0); - } else if (valueAsString.indexOf("rad") != -1) { - value = (float)(value * 180.0 / Math.PI); - } - } catch (ParseException pe) { - value = 0; - } - } - - public float getAnimatedValue() { - return 0; - } - - public void newValueSpecifiedUnits (short unitType, - float valueInSpecifiedUnits) throws SVGException { - switch (unitType) { - case SVG_ANGLETYPE_UNKNOWN: - throw new SVGExceptionImpl( - SVGException.SVG_WRONG_TYPE_ERR, "unknown unit type"); - // break; - case SVG_ANGLETYPE_UNSPECIFIED: - throw new SVGExceptionImpl( - SVGException.SVG_WRONG_TYPE_ERR, "unknown unit type"); - // break; - case SVG_ANGLETYPE_DEG: - value = (float)(valueInSpecifiedUnits * Math.PI / 90.0); - break; - case SVG_ANGLETYPE_RAD: - value = valueInSpecifiedUnits; - break; - case SVG_ANGLETYPE_GRAD: - value = (float)(valueInSpecifiedUnits * Math.PI / 90.0); - break; - } - this.unitType = unitType; - } - - public void convertToSpecifiedUnits (short unitType) - throws SVGException { - switch (unitType) { - case SVG_ANGLETYPE_UNKNOWN: - throw new SVGExceptionImpl( - SVGException.SVG_WRONG_TYPE_ERR, "unknown unit type"); - // break; - case SVG_ANGLETYPE_UNSPECIFIED: - throw new SVGExceptionImpl( - SVGException.SVG_WRONG_TYPE_ERR, "unknown unit type"); - // break; - case SVG_ANGLETYPE_DEG: - break; - case SVG_ANGLETYPE_RAD: - break; - case SVG_ANGLETYPE_GRAD: - break; - } - this.unitType = unitType; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGAnimateColorElementImpl.java b/src/org/apache/fop/dom/svg/SVGAnimateColorElementImpl.java deleted file mode 100644 index e39f1bf5b..000000000 --- a/src/org/apache/fop/dom/svg/SVGAnimateColorElementImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -/** - * - * - */ -public class SVGAnimateColorElementImpl extends SVGElementImpl { - - public SVGAnimateColorElementImpl() - { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGAnimateElementImpl.java b/src/org/apache/fop/dom/svg/SVGAnimateElementImpl.java deleted file mode 100644 index 6c45033d2..000000000 --- a/src/org/apache/fop/dom/svg/SVGAnimateElementImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -/** - * - * - */ -public class SVGAnimateElementImpl extends SVGElementImpl { - - public SVGAnimateElementImpl() - { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGAnimateMotionElementImpl.java b/src/org/apache/fop/dom/svg/SVGAnimateMotionElementImpl.java deleted file mode 100644 index a6c98546e..000000000 --- a/src/org/apache/fop/dom/svg/SVGAnimateMotionElementImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -/** - * - */ -public class SVGAnimateMotionElementImpl extends SVGElementImpl { - - public SVGAnimateMotionElementImpl() - { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGAnimateTransformElementImpl.java b/src/org/apache/fop/dom/svg/SVGAnimateTransformElementImpl.java deleted file mode 100644 index 99512eedf..000000000 --- a/src/org/apache/fop/dom/svg/SVGAnimateTransformElementImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -/** - * - */ -public class SVGAnimateTransformElementImpl extends SVGElementImpl { - - public SVGAnimateTransformElementImpl() - { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGAnimatedEnumerationImpl.java b/src/org/apache/fop/dom/svg/SVGAnimatedEnumerationImpl.java deleted file mode 100644 index 585e390aa..000000000 --- a/src/org/apache/fop/dom/svg/SVGAnimatedEnumerationImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.DOMException; - -public class SVGAnimatedEnumerationImpl implements SVGAnimatedEnumeration { - short baseval = 0; - - public SVGAnimatedEnumerationImpl(short base) - { - baseval = base; - } - - public short getBaseVal( ) - { - return baseval; - } - - public void setBaseVal(short baseVal) - { - this.baseval = baseVal; - } - - public short getAnimVal( ) - { - return baseval; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGAnimatedLengthImpl.java b/src/org/apache/fop/dom/svg/SVGAnimatedLengthImpl.java deleted file mode 100644 index 3e21499fb..000000000 --- a/src/org/apache/fop/dom/svg/SVGAnimatedLengthImpl.java +++ /dev/null @@ -1,78 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -public class SVGAnimatedLengthImpl implements SVGAnimatedLength { - SVGLength len = null; - - public SVGAnimatedLengthImpl(SVGLength l) - { - len = l; - } - - public SVGLength getBaseVal( ) - { - return len; - } - - public void setBaseVal( SVGLength baseVal ) - { - len = baseVal; - } - - public SVGLength getAnimVal( ) - { - return len; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGAnimatedLengthListImpl.java b/src/org/apache/fop/dom/svg/SVGAnimatedLengthListImpl.java deleted file mode 100644 index 0c1feb8fa..000000000 --- a/src/org/apache/fop/dom/svg/SVGAnimatedLengthListImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Fop" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * a length quantity in XSL - */ -public class SVGAnimatedLengthListImpl extends SVGListImpl implements SVGAnimatedLengthList { - SVGLengthList baseVal; - - public SVGAnimatedLengthListImpl() - { - } - - public SVGLengthList getBaseVal( ) - { - return baseVal; - } - - public void setBaseVal(SVGLengthList baseVal) - { - this.baseVal = baseVal; - } - - public SVGLengthList getAnimVal( ) - { - return baseVal; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGAnimatedNumberImpl.java b/src/org/apache/fop/dom/svg/SVGAnimatedNumberImpl.java deleted file mode 100644 index bc3a0b626..000000000 --- a/src/org/apache/fop/dom/svg/SVGAnimatedNumberImpl.java +++ /dev/null @@ -1,84 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Fop" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import org.apache.fop.fo.Property; - -import java.util.*; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGAnimatedNumberImpl implements SVGAnimatedNumber { - float base = 0; - - public SVGAnimatedNumberImpl(float b) - { - base = b; - } - - public float getBaseVal() - { - return base; - } - - public void setBaseVal(float baseVal) - { - base = baseVal; - } - - public float getAnimVal() - { - return base; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGAnimatedRectImpl.java b/src/org/apache/fop/dom/svg/SVGAnimatedRectImpl.java deleted file mode 100644 index 5ddc97a62..000000000 --- a/src/org/apache/fop/dom/svg/SVGAnimatedRectImpl.java +++ /dev/null @@ -1,78 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -public class SVGAnimatedRectImpl implements SVGAnimatedRect { - SVGRect rect = null; - - public SVGAnimatedRectImpl(SVGRect r) - { - rect = r; - } - - public SVGRect getBaseVal( ) - { - return rect; - } - - public void setBaseVal( SVGRect baseVal ) - { - rect = baseVal; - } - - public SVGRect getAnimVal( ) - { - return rect; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGAnimatedStringImpl.java b/src/org/apache/fop/dom/svg/SVGAnimatedStringImpl.java deleted file mode 100644 index b65ad9960..000000000 --- a/src/org/apache/fop/dom/svg/SVGAnimatedStringImpl.java +++ /dev/null @@ -1,78 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -public class SVGAnimatedStringImpl implements SVGAnimatedString { - String str = null; - - public SVGAnimatedStringImpl(String l) - { - str = l; - } - - public String getBaseVal( ) - { - return str; - } - - public void setBaseVal( String baseVal ) - { - str = baseVal; - } - - public String getAnimVal( ) - { - return str; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGAnimatedTransformListImpl.java b/src/org/apache/fop/dom/svg/SVGAnimatedTransformListImpl.java deleted file mode 100644 index 5144008c5..000000000 --- a/src/org/apache/fop/dom/svg/SVGAnimatedTransformListImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import java.util.*; - -import org.w3c.dom.svg.*; -import org.w3c.dom.*; - -/** - * Transform List - */ -public class SVGAnimatedTransformListImpl implements SVGAnimatedTransformList { - SVGTransformList base; - - public SVGAnimatedTransformListImpl() - { - } - - public SVGTransformList getBaseVal( ) - { - return base; - } - - public void setBaseVal(SVGTransformList baseVal ) - { - base = baseVal; - } - - public SVGTransformList getAnimVal() - { - return null; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGArea.java b/src/org/apache/fop/dom/svg/SVGArea.java deleted file mode 100644 index 58c3fee68..000000000 --- a/src/org/apache/fop/dom/svg/SVGArea.java +++ /dev/null @@ -1,108 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Fop" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -// FOP -import org.apache.fop.render.Renderer; -import org.apache.fop.layout.FontState; -import org.apache.fop.layout.Area; -import org.apache.fop.dom.svg.*; - -import java.util.*; - -import org.w3c.dom.svg.*; -import org.w3c.dom.*; - - -/** - * class representing an SVG area in which the SVG graphics sit - */ -public class SVGArea extends Area implements GetSVGDocument { - SVGDocument doc; - - /** - * construct an SVG area - * - * @param fontState the font state - * @param width the width of the area - * @param height the height of the area - */ - public SVGArea(FontState fontState, float width, float height) { - super(fontState, (int)width * 1000, (int)height * 1000); - currentHeight = (int)height * 1000; - contentRectangleWidth = (int)width * 1000; - } - - public void setSVGDocument(SVGDocument doc) - { - this.doc = doc; - } - - public SVGDocument getSVGDocument() throws DOMException - { - return doc; - } - - public int getWidth() - { -// return getSVGDocument().getRootElement().getWidth().getBaseVal().getValue(); - return contentRectangleWidth; - } - - /** - * render the SVG. - * - * @param renderer the Renderer to use - */ - public void render(Renderer renderer) { - renderer.renderSVGArea(this); - } -} diff --git a/src/org/apache/fop/dom/svg/SVGCircleElementImpl.java b/src/org/apache/fop/dom/svg/SVGCircleElementImpl.java deleted file mode 100644 index 8a3ee7e71..000000000 --- a/src/org/apache/fop/dom/svg/SVGCircleElementImpl.java +++ /dev/null @@ -1,114 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGCircleElementImpl extends GraphicElement implements SVGCircleElement { - private SVGAnimatedLength cx; - private SVGAnimatedLength cy; - private SVGAnimatedLength r; - - /** - */ - public SVGCircleElementImpl() - { - } - - public SVGRect getBBox() - { - SVGRect rect = new SVGRectImpl(); - rect.setX(cx.getBaseVal().getValue() - r.getBaseVal().getValue()); - rect.setY(cy.getBaseVal().getValue() - r.getBaseVal().getValue()); - rect.setWidth(2 * r.getBaseVal().getValue()); - rect.setHeight(2 * r.getBaseVal().getValue()); - return rect; - } - - public SVGAnimatedLength getCx( ) - { - return cx; - } - - public void setCx( SVGAnimatedLength cx ) - { - this.cx = cx; - } - - public SVGAnimatedLength getCy( ) - { - return cy; - } - - public void setCy( SVGAnimatedLength cy ) - { - this.cy = cy; - } - - public SVGAnimatedLength getR( ) - { - return r; - } - - public void setR( SVGAnimatedLength r ) - { - this.r = r; - } - - public String getTagName() - { - return "circle"; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGClipPathElementImpl.java b/src/org/apache/fop/dom/svg/SVGClipPathElementImpl.java deleted file mode 100644 index 77c333bad..000000000 --- a/src/org/apache/fop/dom/svg/SVGClipPathElementImpl.java +++ /dev/null @@ -1,83 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import java.util.Vector; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGClipPathElementImpl extends GraphicElement implements SVGClipPathElement { - public Vector elements = new Vector(); - SVGAnimatedEnumeration units; - - public void addElement(SVGElement g) - { - elements.addElement(g); - } - - public SVGClipPathElementImpl() - { - } - - public SVGAnimatedEnumeration getClipPathUnits( ) - { - return units; - } - - public void setClipPathUnits(SVGAnimatedEnumeration clipPathUnits) - { - units = clipPathUnits; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGCursorElementImpl.java b/src/org/apache/fop/dom/svg/SVGCursorElementImpl.java deleted file mode 100644 index b777e2fc3..000000000 --- a/src/org/apache/fop/dom/svg/SVGCursorElementImpl.java +++ /dev/null @@ -1,86 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGCursorElementImpl extends SVGURIReferenceImpl implements SVGCursorElement { - SVGAnimatedLength x; - SVGAnimatedLength y; - - public SVGCursorElementImpl() - { - } - - public SVGAnimatedLength getX( ) - { - return x; - } - - public void setX( SVGAnimatedLength x ) - { - this.x = x; - } - - public SVGAnimatedLength getY( ) - { - return y; - } - - public void setY( SVGAnimatedLength y ) - { - this.y = y; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGDefsElementImpl.java b/src/org/apache/fop/dom/svg/SVGDefsElementImpl.java deleted file mode 100644 index 79766a989..000000000 --- a/src/org/apache/fop/dom/svg/SVGDefsElementImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * class representing a line in an SVG Area - */ -public class SVGDefsElementImpl extends GraphicElement implements SVGDefsElement { - - public SVGDefsElementImpl() - { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGDescElementImpl.java b/src/org/apache/fop/dom/svg/SVGDescElementImpl.java deleted file mode 100644 index 7784b94fd..000000000 --- a/src/org/apache/fop/dom/svg/SVGDescElementImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * class representing a line in an SVG Area - */ -public class SVGDescElementImpl extends GraphicElement implements SVGDescElement { - - public SVGDescElementImpl() - { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGDocumentImpl.java b/src/org/apache/fop/dom/svg/SVGDocumentImpl.java deleted file mode 100644 index 66e613507..000000000 --- a/src/org/apache/fop/dom/svg/SVGDocumentImpl.java +++ /dev/null @@ -1,213 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import java.util.*; - -import org.apache.fop.dom.ElementImpl; - -import org.w3c.dom.svg.*; -import org.w3c.dom.*; -import org.w3c.dom.events.*; - -/** - * - */ -public class SVGDocumentImpl extends ElementImpl implements SVGDocument { - String title; - public static final String namespaceURI = "http://www.w3.org/2000/svg"; - - public SVGDocumentImpl() - { - ownerDoc = this; - } - - public String getTitle() - { - return title; - } - - public void setTitle(String title) - { - this.title = title; - } - - public String getNamespaceURI() - { - return namespaceURI; - } - - public String getReferrer() - { - return null; - } - - public String getDomain() - { - return null; - } - - public String getURL() - { - return ""; - } - - public SVGSVGElement getRootElement() - { - if(childs.size() > 0) - return (SVGSVGElement)childs.elementAt(0); - return null; - } - - public Element getElementById(String elementId) - { - SVGSVGElement svg = getRootElement(); - return findChild(svg, elementId); - } - - protected Element findChild(Node ele, String id) - { - NodeList nl = ele.getChildNodes(); - for(int count = 0; count < nl.getLength(); count++) { - Node n = nl.item(count); - if(n instanceof SVGElement) { - if(id.equals(((SVGElement)n).getId())) { - return (Element)n; - } - } - if(n != null) { - Element el = findChild(n, id); - if(el != null) { - return el; - } - } - } - return null; - } - - public Event createEvent(String eventType) - throws DOMException - { - return null; - } - - public DOMImplementation getImplementation() - { - return null; - } - - public EntityReference createEntityReference(String str) - { - return null; - } - - public DocumentFragment createDocumentFragment() - { - return null; - } - - public Text createTextNode(String str) - { - return null; - } - - public Element createElement(String str) - { - return null; - } - - public Element createElementNS(String namespaceURI, - String qualifiedName){ - return null; - } - - public ProcessingInstruction createProcessingInstruction(String s1, String s2) - { - return null; - } - - public DocumentType getDoctype() - { - return null; - } - - public CDATASection createCDATASection(String str) - { - return null; - } - - public Comment createComment(String str) - { - return null; - } - - public Attr createAttribute(String str) - { - return null; - } - - public Attr createAttributeNS(String namespaceURI, - String qualifiedName) - throws DOMException - { - return null; - } - - public Element getDocumentElement() - { - return null; - } - - public Node importNode(Node importedNode, boolean deep) - { - return null; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGElementImpl.java b/src/org/apache/fop/dom/svg/SVGElementImpl.java deleted file mode 100644 index 6fe052d79..000000000 --- a/src/org/apache/fop/dom/svg/SVGElementImpl.java +++ /dev/null @@ -1,199 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import org.apache.fop.dom.stylesheets.*; -import org.apache.fop.dom.css.*; -import org.apache.fop.datatypes.*; -import org.apache.fop.dom.ElementImpl; - -import org.w3c.dom.css.*; -import org.w3c.dom.svg.*; -import org.w3c.dom.*; -import org.w3c.dom.stylesheets.*; - -import java.util.*; - -public abstract class SVGElementImpl extends ElementImpl implements SVGElement { - String idString = ""; - CSSStyleDeclaration styleDec; - SVGSVGElement ownerSvg; - SVGAnimatedString className = new SVGAnimatedStringImpl(""); - - public String getId() - { - return idString; - } - - public String getNamespaceURI() - { - return SVGDocumentImpl.namespaceURI; - } - - public void setId(String id) - { - idString = id; - } - - public SVGSVGElement getOwnerSVGElement( ) - { - return ownerSvg; - } - - public SVGElement getViewportElement( ) - { - return null; - } - - public SVGAnimatedString getClassName( ) - { - return className; - } - - public void setClassName( SVGAnimatedString className ) - { - this.className = className; - } - - public CSSValue getPresentationAttribute ( String name ) - { - CSSStyleDeclaration style; - CSSValue val = null; - - style = getStyle(); - if(style != null) { - val = style.getPropertyCSSValue(name); - } - - if(val == null) { - // this checks for the style selector matching - // everytime a property is requested, this is bad, slow - - // get "style" element style for this - SVGSVGElement svg = getOwnerSVGElement(); - // maybe - // val = svg.getComputedStyle(this, name); - StyleSheetList list = svg.getStyleSheets(); - for(int count = 0; count < list.getLength(); count++) { - CSSRuleList rlist = ((CSSStyleSheet)list.item(count)).getCssRules(); - for(int c = 0; c < rlist.getLength(); c++) { - CSSRule rule = rlist.item(c); - if(rule.getType() == CSSRule.STYLE_RULE) { - if(((CSSStyleRuleImpl)rule).matches(this)) { - style = ((CSSStyleRule)rule).getStyle(); - val = style.getPropertyCSSValue(name); -// break; - } - } - } -// if(val != null) { -// break; -// } - } - } - if(val == null) { - // get element parents style - Node par = getParentNode(); - if(par instanceof SVGStylable) { - val = ((SVGStylable)par).getPresentationAttribute(name); - } - } - return val; - } - - public CSSValue getAnimatedPresentationAttribute ( String name ) - { - return getPresentationAttribute(name); - } - - public CSSStyleDeclaration getStyle( ) - { - return styleDec; - } - - public void setStyle(CSSStyleDeclaration dec) - { - styleDec = dec; - } - - public SVGAnimatedBoolean getExternalResourcesRequired( ) - { - return null; - } - - public void setExternalResourcesRequired( SVGAnimatedBoolean externalResourcesRequired ) - { - } - - public Node appendChild(Node newChild) - throws DOMException - { - Node nChild = super.appendChild(newChild); - if(newChild instanceof SVGElementImpl) { - SVGElementImpl ele = (SVGElementImpl)newChild; - if(ownerSvg != null) - ele.setOwnerSVG(ownerSvg); - } - return nChild; - } - - public void setOwnerSVG(SVGSVGElement owner) - { - ownerSvg = owner; - NodeList nl = getChildNodes(); - for(int count = 0; count < nl.getLength(); count++) { - Node n = nl.item(count); - if(n instanceof SVGElementImpl) { - ((SVGElementImpl)n).setOwnerSVG(owner); - } - } - } -} diff --git a/src/org/apache/fop/dom/svg/SVGEllipseElementImpl.java b/src/org/apache/fop/dom/svg/SVGEllipseElementImpl.java deleted file mode 100644 index b92234fe8..000000000 --- a/src/org/apache/fop/dom/svg/SVGEllipseElementImpl.java +++ /dev/null @@ -1,115 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; -import org.w3c.dom.*; -import org.w3c.dom.events.*; - -/** - * - */ -public class SVGEllipseElementImpl extends GraphicElement implements SVGEllipseElement { - private SVGAnimatedLength cx; - private SVGAnimatedLength cy; - private SVGAnimatedLength rx; - private SVGAnimatedLength ry; - - /** - */ - public SVGEllipseElementImpl() - { - } - - public SVGRect getBBox() - { - SVGRect rect = new SVGRectImpl(); - rect.setX(cx.getBaseVal().getValue() - rx.getBaseVal().getValue()); - rect.setY(cy.getBaseVal().getValue() - ry.getBaseVal().getValue()); - rect.setWidth(2 * rx.getBaseVal().getValue()); - rect.setHeight(2 * ry.getBaseVal().getValue()); - return rect; - } - - public SVGAnimatedLength getCx( ) - { - return cx; - } - public void setCx( SVGAnimatedLength cx ) - { - this.cx = cx; - } - public SVGAnimatedLength getCy( ) - { - return cy; - } - public void setCy( SVGAnimatedLength cy ) - { - this.cy = cy; - } - public SVGAnimatedLength getRx( ) - { - return rx; - } - public void setRx( SVGAnimatedLength rx ) - { - this.rx = rx; - } - public SVGAnimatedLength getRy( ) - { - return ry; - } - public void setRy( SVGAnimatedLength ry ) - { - this.ry = ry; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGExceptionImpl.java b/src/org/apache/fop/dom/svg/SVGExceptionImpl.java deleted file mode 100644 index d1104ebea..000000000 --- a/src/org/apache/fop/dom/svg/SVGExceptionImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Fop" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import org.apache.fop.fo.Property; - -import java.util.*; -import java.text.*; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGExceptionImpl extends SVGException { - public SVGExceptionImpl(short code, String message) - { - super(code, message); - } -} diff --git a/src/org/apache/fop/dom/svg/SVGFilterElementImpl.java b/src/org/apache/fop/dom/svg/SVGFilterElementImpl.java deleted file mode 100644 index 497f6b879..000000000 --- a/src/org/apache/fop/dom/svg/SVGFilterElementImpl.java +++ /dev/null @@ -1,140 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGFilterElementImpl extends SVGURIReferenceImpl implements SVGFilterElement { - - public SVGFilterElementImpl() - { - } - - public SVGAnimatedEnumeration getFilterUnits( ) - { - return null; - } - - public void setFilterUnits( SVGAnimatedEnumeration filterUnits ) - { - } - - public SVGAnimatedEnumeration getPrimitiveUnits( ) - { - return null; - } - - public void setPrimitiveUnits( SVGAnimatedEnumeration filterUnits ) - { - } - - public SVGAnimatedLength getX( ) - { - return null; - } - - public void setX( SVGAnimatedLength x ) - { - } - - public SVGAnimatedLength getY( ) - { - return null; - } - - public void setY( SVGAnimatedLength y ) - { - } - - public SVGAnimatedLength getWidth( ) - { - return null; - } - - public void setWidth( SVGAnimatedLength width ) - { - } - - public SVGAnimatedLength getHeight( ) - { - return null; - } - - public void setHeight( SVGAnimatedLength height ) - { - } - - public SVGAnimatedInteger getFilterResX( ) - { - return null; - } - - public SVGAnimatedInteger getFilterResY( ) - { - return null; - } - - public void setFilterResX( SVGAnimatedInteger filterResX ) - { - } - - public void setFilterResY( SVGAnimatedInteger filterResY ) - { - } - - public void setFilterRes ( int filterResX, int filterResY ) - { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGFontElementImpl.java b/src/org/apache/fop/dom/svg/SVGFontElementImpl.java deleted file mode 100644 index dd45ce697..000000000 --- a/src/org/apache/fop/dom/svg/SVGFontElementImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGFontElementImpl extends SVGElementImpl implements SVGFontElement { - - public SVGFontElementImpl() - { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGGElementImpl.java b/src/org/apache/fop/dom/svg/SVGGElementImpl.java deleted file mode 100644 index 95330d4a7..000000000 --- a/src/org/apache/fop/dom/svg/SVGGElementImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Fop" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import org.apache.fop.layout.*; - -import java.util.*; - -import org.w3c.dom.svg.*; -import org.w3c.dom.*; - -/** - * - */ -public class SVGGElementImpl extends GraphicElement implements SVGGElement { - - /** - */ - public SVGGElementImpl() - { - } - - public SVGRect getBBox() - { - return getChildrenBBox(); - } -} diff --git a/src/org/apache/fop/dom/svg/SVGGlyphElementImpl.java b/src/org/apache/fop/dom/svg/SVGGlyphElementImpl.java deleted file mode 100644 index 98938085a..000000000 --- a/src/org/apache/fop/dom/svg/SVGGlyphElementImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -/** - * - */ -public class SVGGlyphElementImpl extends SVGElementImpl { - - public SVGGlyphElementImpl() - { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGGradientElementImpl.java b/src/org/apache/fop/dom/svg/SVGGradientElementImpl.java deleted file mode 100644 index 57f6748fb..000000000 --- a/src/org/apache/fop/dom/svg/SVGGradientElementImpl.java +++ /dev/null @@ -1,107 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGGradientElementImpl extends SVGURIReferenceImpl implements SVGGradientElement { - /* - SVG_SPREADMETHOD_UNKNOWN; - SVG_SPREADMETHOD_PAD; - SVG_SPREADMETHOD_REFLECT; - SVG_SPREADMETHOD_REPEAT; - */ - SVGAnimatedEnumeration spreadMethod = - new SVGAnimatedEnumerationImpl(SVG_SPREADMETHOD_UNKNOWN); - SVGAnimatedEnumeration units = - new SVGAnimatedEnumerationImpl(SVG_UNIT_TYPE_UNKNOWN); - SVGAnimatedTransformList gradientTransform; - - public SVGGradientElementImpl() { - } - - public SVGAnimatedEnumeration getGradientUnits() { - return units; - } - - public void setGradientUnits(SVGAnimatedEnumeration gradientUnits) { - units = gradientUnits; - } - - public SVGAnimatedTransformList getGradientTransform() { - return gradientTransform; - } - - public void setGradientTransform( - SVGAnimatedTransformList gradientTransform) { - this.gradientTransform = gradientTransform; - } - - public SVGAnimatedEnumeration getSpreadMethod() { - return spreadMethod; - } - - public void setSpreadMethod(SVGAnimatedEnumeration spreadMethod) { - this.spreadMethod = spreadMethod; - } - - public SVGAnimatedBoolean getExternalResourcesRequired() { - return null; - } - - public void setExternalResourcesRequired( - SVGAnimatedBoolean externalResourcesRequired) { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGHKernElementImpl.java b/src/org/apache/fop/dom/svg/SVGHKernElementImpl.java deleted file mode 100644 index 28a563270..000000000 --- a/src/org/apache/fop/dom/svg/SVGHKernElementImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -/** - * - */ -public class SVGHKernElementImpl extends SVGElementImpl { - - public SVGHKernElementImpl() - { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGImageElementImpl.java b/src/org/apache/fop/dom/svg/SVGImageElementImpl.java deleted file mode 100644 index 1cb4ccb2b..000000000 --- a/src/org/apache/fop/dom/svg/SVGImageElementImpl.java +++ /dev/null @@ -1,76 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.apache.fop.datatypes.*; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGImageElementImpl extends GraphicElement implements SVGTransformable { - public String link; - public float x; - public float y; - public float width; - public float height; - - public SVGImageElementImpl(String l, float x, float y, float w, float h) - { - link = l; - this.x = x; - this.y = y; - width = w; - height = h; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGLengthImpl.java b/src/org/apache/fop/dom/svg/SVGLengthImpl.java deleted file mode 100644 index 83f1c6c69..000000000 --- a/src/org/apache/fop/dom/svg/SVGLengthImpl.java +++ /dev/null @@ -1,191 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Fop" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import org.apache.fop.fo.Property; -import org.apache.fop.messaging.MessageHandler; - -import java.util.*; - -import org.w3c.dom.svg.*; - -/** - * a length quantity in SVG - */ -public class SVGLengthImpl implements SVGLength { - short unitType = SVG_LENGTHTYPE_UNKNOWN; - protected float millipoints = 0; - protected float fontsize = 12; //?? - - public short getUnitType() { - return unitType; - } - - public float getValue() { - return millipoints; - } - - public void setValue(float value) { - millipoints = value; - } - - public float getValueInSpecifiedUnits() { - return 0; - } - - public void setValueInSpecifiedUnits(float valueInSpecifiedUnits) { - } - - public String getValueAsString() { - return null; - } - - public void setValueAsString(String valueAsString) { - convert(valueAsString); - } - - public float getAnimatedValue() { - return 0; - } - - public void newValueSpecifiedUnits(short unitType, - float valueInSpecifiedUnits) throws SVGException { - this.unitType = unitType; - millipoints = valueInSpecifiedUnits; - } - - public void convertToSpecifiedUnits(short unitType) - throws SVGException { - } - - /** - * set the length given a particular String specifying length and units - */ - public SVGLengthImpl (String len) { - convert(len); - } - - public SVGLengthImpl() { - } - - protected void convert(String len) { - int l = len.length(); - - if (l == 0) { - System.err.println("WARNING: empty length"); - this.millipoints = 0; - } else { - float dvalue = getFloatValue(len, l); - this.millipoints = dvalue; - } - } - - protected float getFloatValue(String len, int l) { - int assumed_resolution = 1; // points/pixel - - float dvalue; - try { - if (len.endsWith("in")) { - dvalue = Float.valueOf( - len.substring(0, (l - 2))).floatValue(); - dvalue = dvalue * 72; - unitType = SVG_LENGTHTYPE_IN; - } else if (len.endsWith("cm")) { - dvalue = Float.valueOf( - len.substring(0, (l - 2))).floatValue(); - dvalue = dvalue * 28.35f; - unitType = SVG_LENGTHTYPE_CM; - } else if (len.endsWith("mm")) { - dvalue = Float.valueOf( - len.substring(0, (l - 2))).floatValue(); - dvalue = dvalue * 2.84f; - unitType = SVG_LENGTHTYPE_MM; - } else if (len.endsWith("pt")) { - dvalue = Float.valueOf( - len.substring(0, (l - 2))).floatValue(); - // dvalue = dvalue; - unitType = SVG_LENGTHTYPE_PT; - } else if (len.endsWith("pc")) { - dvalue = Float.valueOf( - len.substring(0, (l - 2))).floatValue(); - dvalue = dvalue * 12; - unitType = SVG_LENGTHTYPE_PC; - } else if (len.endsWith("em")) { - dvalue = Float.valueOf( - len.substring(0, (l - 2))).floatValue(); - dvalue = dvalue * fontsize; - unitType = SVG_LENGTHTYPE_EMS; - } else if (len.endsWith("px")) { - dvalue = Float.valueOf( - len.substring(0, (l - 2))).floatValue(); - dvalue = dvalue * assumed_resolution; - unitType = SVG_LENGTHTYPE_PX; - } else if (len.endsWith("%")) { - dvalue = Float.valueOf( - len.substring(0, (l - 1))).floatValue() / 100f; - unitType = SVG_LENGTHTYPE_PERCENTAGE; - } else { - dvalue = Float.valueOf(len).floatValue(); - unitType = SVG_LENGTHTYPE_NUMBER; - } - } catch (Exception e) { - dvalue = 0; - unitType = SVG_LENGTHTYPE_UNKNOWN; - MessageHandler.errorln("ERROR: unknown length units in " + len); - } - return dvalue; - } - - public String toString() { - String s = millipoints + "mpt"; - return s; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGLengthListImpl.java b/src/org/apache/fop/dom/svg/SVGLengthListImpl.java deleted file mode 100644 index a3e5466ff..000000000 --- a/src/org/apache/fop/dom/svg/SVGLengthListImpl.java +++ /dev/null @@ -1,197 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Fop" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import org.apache.fop.fo.Property; -import org.apache.fop.messaging.MessageHandler; - -import java.util.*; - -import org.w3c.dom.svg.*; -import org.w3c.dom.*; - -/** - * a length quantity in XSL - */ -public class SVGLengthListImpl extends SVGListImpl implements SVGLengthList { - protected float fontsize = 12; - - public void setValueAsString(String valueAsString) { - convert(valueAsString); - } - - /** - * set the length given a particular String specifying length and units - */ - public SVGLengthListImpl (String len) { - convert(len); - } - - public SVGLengthListImpl () { - } - - /** - * set the length given a particular String specifying length and units, - * and the font-size (necessary for an em) - */ - public SVGLengthListImpl (String len, int fontsize) { - this.fontsize = fontsize; - convert(len); - } - - protected void convert(String len) { - int l = len.length(); - - if (l == 0) { - // MessageHandler.errorln("WARNING: empty length"); - } else { - // could be an array of points, as in for svg:text - int pos; - pos = len.trim().indexOf(" "); - if (pos != -1) { - StringTokenizer st = new StringTokenizer(len.trim()); - while (st.hasMoreTokens()) { - String val = st.nextToken(); - float dvalue = getFloatValue(val, val.length()); - float intValue = dvalue; - SVGLengthImpl impl = new SVGLengthImpl(); - impl.setValue(intValue); - appendItem(impl); - } - } else { - float dvalue = getFloatValue(len, l); - SVGLengthImpl impl = new SVGLengthImpl(); - impl.setValue(dvalue); - appendItem(impl); - } - } - } - - protected float getFloatValue(String len, int l) { - int assumed_resolution = 1; // points/pixel - - float dvalue; - try { - if (len.endsWith("in")) { - dvalue = Float.valueOf( - len.substring(0, (l - 2))).floatValue(); - dvalue = dvalue * 72; - } else if (len.endsWith("cm")) { - dvalue = Float.valueOf( - len.substring(0, (l - 2))).floatValue(); - dvalue = dvalue * 28.35f; - } else if (len.endsWith("mm")) { - dvalue = Float.valueOf( - len.substring(0, (l - 2))).floatValue(); - dvalue = dvalue * 2.84f; - } else if (len.endsWith("pt")) { - dvalue = Float.valueOf( - len.substring(0, (l - 2))).floatValue(); - dvalue = dvalue; - } else if (len.endsWith("pc")) { - dvalue = Float.valueOf( - len.substring(0, (l - 2))).floatValue(); - dvalue = dvalue * 12; - } else if (len.endsWith("em")) { - dvalue = Float.valueOf( - len.substring(0, (l - 2))).floatValue(); - dvalue = dvalue * fontsize; - } else if (len.endsWith("px")) { - dvalue = Float.valueOf( - len.substring(0, (l - 2))).floatValue(); - dvalue = dvalue * assumed_resolution; - } else if (len.endsWith("%")) { - dvalue = Float.valueOf( - len.substring(0, (l - 1))).floatValue() / 100f; //?? - } else { - dvalue = Float.valueOf(len).floatValue(); - } - } catch (Exception e) { - dvalue = 0; - MessageHandler.errorln("ERROR: unknown length units in " + len); - } - return dvalue; - } - - public SVGLength initialize (SVGLength newItem) throws SVGException { - return null; - } - - public SVGLength createItem() { - return new SVGLengthImpl(); - } - - public SVGLength getItem(int index) throws DOMException { - Object obj = list.elementAt(index); - return (SVGLength) obj; - } - - public SVGLength removeItem(int index) throws DOMException { - Object obj = list.elementAt(index); - list.removeElementAt(index); - return (SVGLength) obj; - } - - public SVGLength appendItem(SVGLength newItem) throws SVGException { - list.addElement(newItem); - return null; - } - - public SVGLength replaceItem(SVGLength newItem, - int index) throws DOMException, SVGException { - return null; - } - - public SVGLength insertItemBefore(SVGLength newItem, - int index) throws SVGException { - return null; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGLineElementImpl.java b/src/org/apache/fop/dom/svg/SVGLineElementImpl.java deleted file mode 100644 index 34168c864..000000000 --- a/src/org/apache/fop/dom/svg/SVGLineElementImpl.java +++ /dev/null @@ -1,135 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; -import org.w3c.dom.*; -import org.w3c.dom.events.*; - -/** - * class representing a line in an SVG Area - */ -public class SVGLineElementImpl extends GraphicElement implements SVGLineElement { - /** x-coordinate of start */ - protected SVGAnimatedLength x1; - - /** y-coordinate of start */ - protected SVGAnimatedLength y1; - - /** x-coordinate of end */ - protected SVGAnimatedLength x2; - - /** y-coordinate of end */ - protected SVGAnimatedLength y2; - - /** - * construct a line graphic - * - * @param x1 x-coordinate of start - * @param y1 y-coordinate of start - * @param x2 x-coordinate of end - * @param y2 y-coordinate of end - */ - public SVGLineElementImpl() - { - } - - public SVGRect getBBox() - { - SVGRect rect = new SVGRectImpl(); - rect.setX(Math.min(x1.getBaseVal().getValue(), x2.getBaseVal().getValue())); - rect.setY(Math.min(y1.getBaseVal().getValue(), y2.getBaseVal().getValue())); - rect.setWidth(Math.abs(x1.getBaseVal().getValue() - x2.getBaseVal().getValue())); - rect.setHeight(Math.abs(y1.getBaseVal().getValue() - y2.getBaseVal().getValue())); - return rect; - } - - public SVGAnimatedLength getX1( ) - { - return x1; - } - - public void setX1( SVGAnimatedLength x1 ) - { - this.x1 = x1; - } - - public SVGAnimatedLength getY1( ) - { - return y1; - } - - public void setY1( SVGAnimatedLength y1 ) - { - this.y1 = y1; - } - - public SVGAnimatedLength getX2( ) - { - return x2; - } - - public void setX2( SVGAnimatedLength x2 ) - { - this.x2 = x2; - } - - public SVGAnimatedLength getY2( ) - { - return y2; - } - - public void setY2( SVGAnimatedLength y2 ) - { - this.y2 = y2; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGLinearGradientElementImpl.java b/src/org/apache/fop/dom/svg/SVGLinearGradientElementImpl.java deleted file mode 100644 index 3c38b9afd..000000000 --- a/src/org/apache/fop/dom/svg/SVGLinearGradientElementImpl.java +++ /dev/null @@ -1,110 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGLinearGradientElementImpl extends SVGGradientElementImpl - implements SVGLinearGradientElement { - - SVGAnimatedLength x1; - SVGAnimatedLength x2; - SVGAnimatedLength y1; - SVGAnimatedLength y2; - - public SVGLinearGradientElementImpl() - { - } - - public SVGAnimatedLength getX1() - { - return x1; - } - - public void setX1(SVGAnimatedLength x1) - { - this.x1 = x1; - } - - public SVGAnimatedLength getY1() - { - return y1; - } - - public void setY1(SVGAnimatedLength y1) - { - this.y1 = y1; - } - - public SVGAnimatedLength getX2() - { - return x2; - } - - public void setX2(SVGAnimatedLength x2) - { - this.x2 = x2; - } - - public SVGAnimatedLength getY2() - { - return y2; - } - - public void setY2(SVGAnimatedLength y2) - { - this.y2 = y2; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGListImpl.java b/src/org/apache/fop/dom/svg/SVGListImpl.java deleted file mode 100644 index c7aaa3e93..000000000 --- a/src/org/apache/fop/dom/svg/SVGListImpl.java +++ /dev/null @@ -1,120 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import java.util.*; - -import org.w3c.dom.svg.*; -import org.w3c.dom.*; - -/** - * - */ -public class SVGListImpl { - Vector list = new Vector(); - - public int getNumberOfItems() { - return list.size(); - } - - public void clear() { - list.removeAllElements(); - } - - /* public Object initialize ( Object newItem ) - throws SVGException - { - return null; - } - - public Object createItem() - { - return null; - } - - public Object getItem(int index) - throws DOMException - { - Object obj = list.elementAt(index); - return obj; - } - - public Object insertItemBefore(Object newItem, int index) - throws SVGException - { - return null; - } - - public Object replaceItem(Object newItem, int index) - throws DOMException, SVGException - { - return null; - } - - public Object removeItem(int index) - throws DOMException - { - Object obj = list.elementAt(index); - list.removeElementAt(index); - return obj; - } - - public Object appendItem(Object newItem) - throws SVGException - { - list.addElement(newItem); - return null; - }*/ - - public String toString() { - return list.toString(); - } -} diff --git a/src/org/apache/fop/dom/svg/SVGMarkerElementImpl.java b/src/org/apache/fop/dom/svg/SVGMarkerElementImpl.java deleted file mode 100644 index 0d7b8fc49..000000000 --- a/src/org/apache/fop/dom/svg/SVGMarkerElementImpl.java +++ /dev/null @@ -1,148 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGMarkerElementImpl extends GraphicElement implements SVGMarkerElement { - SVGAnimatedEnumeration units; - SVGAnimatedEnumeration otype; - - public SVGMarkerElementImpl() - { - } - - public SVGAnimatedEnumeration getMarkerUnits( ) - { - return units; - } - - public SVGAnimatedEnumeration getOrientType( ) - { - return otype; - } - - public SVGAnimatedAngle getOrientAngle( ) - { - return null; - } - - public SVGAnimatedLength getRefX( ) - { - return null; - } - - public void setRefX(SVGAnimatedLength refX) - { - } - - public SVGAnimatedLength getRefY( ) - { - return null; - } - - public void setRefY( SVGAnimatedLength refY ) - { - } - - public SVGAnimatedLength getMarkerWidth( ) - { - return null; - } - - public void setMarkerWidth( SVGAnimatedLength markerWidth ) - { - } - - public SVGAnimatedLength getMarkerHeight( ) - { - return null; - } - - public void setMarkerHeight( SVGAnimatedLength markerHeight ) - { - } - - public void setOrientToAuto ( ) - { - } - - public void setOrientToAngle ( SVGAngle angle ) - throws SVGException - { - } - - public SVGAnimatedRect getViewBox( ) - { - return null; - } - - public void setViewBox( SVGAnimatedRect viewBox ) - { - } - - public SVGAnimatedPreserveAspectRatio getPreserveAspectRatio( ) - { - return null; - } - - public void setPreserveAspectRatio( SVGAnimatedPreserveAspectRatio preserveAspectRatio ) - { - } - - public void setMarkerUnits( SVGAnimatedEnumeration markerUnits ) - { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGMaskElementImpl.java b/src/org/apache/fop/dom/svg/SVGMaskElementImpl.java deleted file mode 100644 index c9efa34b8..000000000 --- a/src/org/apache/fop/dom/svg/SVGMaskElementImpl.java +++ /dev/null @@ -1,97 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -import java.util.Vector; - -/** - * - */ -public class SVGMaskElementImpl extends GraphicElement implements SVGMaskElement { - public Vector elements = new Vector(); - - public void addElement(SVGElement g) - { - elements.addElement(g); - } - - public SVGMaskElementImpl() - { - } - - public SVGAnimatedEnumeration getMaskUnits( ) - { - return null; - } - - public SVGAnimatedLength getX( ) - { - return null; - } - - public SVGAnimatedLength getY( ) - { - return null; - } - - public SVGAnimatedLength getWidth( ) - { - return null; - } - - public SVGAnimatedLength getHeight( ) - { - return null; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGMatrixImpl.java b/src/org/apache/fop/dom/svg/SVGMatrixImpl.java deleted file mode 100644 index 6e764724f..000000000 --- a/src/org/apache/fop/dom/svg/SVGMatrixImpl.java +++ /dev/null @@ -1,235 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Fop" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import org.apache.fop.fo.Property; - -import java.util.*; - -import org.w3c.dom.svg.*; - -/** - * @author Keiron Liddle <keiron@aftexsw.com> - */ -public class SVGMatrixImpl implements SVGMatrix { - float a = 1.0f; - float b = 0.0f; - float c = 0.0f; - float d = 1.0f; - float e = 0.0f; - float f = 0.0f; - - public SVGMatrixImpl() { - } - - public float getA() { - return a; - } - - public void setA(float a) { - this.a = a; - } - - public float getB() { - return b; - } - - public void setB(float b) { - this.b = b; - } - - public float getC() { - return c; - } - - public void setC(float c) { - this.c = c; - } - - public float getD() { - return d; - } - - public void setD(float d) { - this.d = d; - } - - public float getE() { - return e; - } - - public void setE(float e) { - this.e = e; - } - - public float getF() { - return f; - } - - public void setF(float f) { - this.f = f; - } - - public SVGMatrix multiply (SVGMatrix secondMatrix) throws SVGException { - SVGMatrix mat = new SVGMatrixImpl(); - mat.setA(a * secondMatrix.getA() + b * secondMatrix.getC()); - mat.setB(a * secondMatrix.getB() + b * secondMatrix.getD()); - mat.setC(c * secondMatrix.getA() + d * secondMatrix.getC()); - mat.setD(c * secondMatrix.getB() + d * secondMatrix.getD()); - // e,f? - mat.setE(a * e + c * f + secondMatrix.getE()); - mat.setF(b * f + d * f + secondMatrix.getF()); - return mat; - } - - public SVGMatrix inverse () throws SVGException { - SVGMatrix mat = new SVGMatrixImpl(); - double det = Math.abs(a * d - b * c); - if (det == 0) { - // throw exception - throw new SVGExceptionImpl( - SVGException.SVG_MATRIX_NOT_INVERTABLE, - "Matrix: " + toString() + " could not be inverted"); - } - mat.setA((float)(d / det)); - mat.setB((float)(b / det)); - mat.setC((float)(-c / det)); - mat.setD((float)(a / det)); - // e,f? - mat.setE(-e); - mat.setF(-f); - return mat; - } - - public SVGMatrix translate (float x, float y) throws SVGException { - SVGMatrix matrix = new SVGMatrixImpl(); - matrix.setA(a); - matrix.setB(b); - matrix.setC(c); - matrix.setD(d); - matrix.setE(e + x); - matrix.setF(f + y); - return matrix; - } - - public SVGMatrix scale(float scaleFactor) throws SVGException { - SVGMatrix matrix = new SVGMatrixImpl(); - matrix.setA(a * scaleFactor); - matrix.setB(b); - matrix.setC(c); - matrix.setD(d * scaleFactor); - matrix.setE(e); - matrix.setF(f); - return matrix; - } - - public SVGMatrix scaleNonUniform(float scaleFactorX, - float scaleFactorY) throws SVGException { - SVGMatrix matrix = new SVGMatrixImpl(); - matrix.setA(a * scaleFactorX); - matrix.setB(b); - matrix.setC(c); - matrix.setD(d * scaleFactorY); - matrix.setE(e); - matrix.setF(f); - return matrix; - } - - public SVGMatrix rotate (float angle) throws SVGException { - angle = (float)(angle * Math.PI / 180f); - SVGMatrix matrix = new SVGMatrixImpl(); - matrix.setA((float) Math.cos(angle)); - matrix.setB((float) Math.sin(angle)); - matrix.setC((float) - Math.sin(angle)); - matrix.setD((float) Math.cos(angle)); - return multiply(matrix); - } - - public SVGMatrix rotateFromVector(float x, - float y) throws SVGException { - return null; - } - - public SVGMatrix flipX() { - return null; - } - - public SVGMatrix flipY() { - return null; - } - - public SVGMatrix skewX(float angle) throws SVGException { - angle = (float)(angle * Math.PI / 180f); - - SVGMatrix matrix = new SVGMatrixImpl(); - matrix.setA(1); - matrix.setB(0); - matrix.setC((float) Math.tan(angle)); - matrix.setD(1); - return multiply(matrix); - } - - public SVGMatrix skewY(float angle) throws SVGException { - angle = (float)(angle * Math.PI / 180f); - - SVGMatrix matrix = new SVGMatrixImpl(); - matrix.setA(1); - matrix.setB((float) Math.tan(angle)); - matrix.setC(0); - matrix.setD(1); - return multiply(matrix); - } - - public String toString() { - return "[" + getA() + " " + getB() + " " + getC() + " " + - getD() + " " + getE() + " " + getF() + "]"; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGMissingGlyphElementImpl.java b/src/org/apache/fop/dom/svg/SVGMissingGlyphElementImpl.java deleted file mode 100644 index 976a5468b..000000000 --- a/src/org/apache/fop/dom/svg/SVGMissingGlyphElementImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -/** - * - */ -public class SVGMissingGlyphElementImpl extends SVGElementImpl { - - public SVGMissingGlyphElementImpl() { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGPathElementImpl.java b/src/org/apache/fop/dom/svg/SVGPathElementImpl.java deleted file mode 100644 index 6834d288e..000000000 --- a/src/org/apache/fop/dom/svg/SVGPathElementImpl.java +++ /dev/null @@ -1,301 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import java.util.*; - -import org.w3c.dom.svg.*; - -/** - * TODO: implement properly - */ -public class SVGPathElementImpl extends GraphicElement implements SVGPathElement { - - public Vector pathElements; - - /** - * construct a line graphic - */ - public SVGPathElementImpl(Vector v) { - this.pathElements = v; - } - - public SVGAnimatedNumber getPathLength() { - return null; - } - - public SVGRect getBBox() { - float minX = 10000000; // a big number - float maxX = -10000000; // a low number - float minY = 10000000; // a big number - float maxY = -10000000; // a low number - // the bounds of a path is always within the end points and - // the control points, so adjust the min and max to be these extremes - float lastx = 0; - float lasty = 0; - float lastmovex = 0; - float lastmovey = 0; - float[] cxs; - float tempx; - float tempy; - float lastcx = 0; - float lastcy = 0; - for (Enumeration e = pathElements.elements(); - e.hasMoreElements();) { - SVGPathSegImpl pc = (SVGPathSegImpl) e.nextElement(); - float[] vals = pc.getValues(); - switch (pc.getPathSegType()) { - case SVGPathSeg.PATHSEG_MOVETO_ABS: - lastx = vals[0]; - lasty = vals[1]; - break; - case SVGPathSeg.PATHSEG_MOVETO_REL: - break; - case SVGPathSeg.PATHSEG_LINETO_ABS: - lastx = vals[0]; - lasty = vals[1]; - break; - case SVGPathSeg.PATHSEG_LINETO_REL: - lastx += vals[0]; - lasty += vals[1]; - break; - case SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS: - lasty = vals[0]; - break; - case SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL: - lasty += vals[0]; - break; - case SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS: - lastx = vals[0]; - break; - case SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL: - lastx += vals[0]; - break; - case SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS: - lastx = vals[4]; - lasty = vals[5]; - lastcx = vals[2]; - lastcy = vals[3]; - break; - case SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL: - break; - case SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: - break; - case SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL: - break; - case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS: - break; - case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL: - break; - case SVGPathSeg.PATHSEG_ARC_ABS: - break; - case SVGPathSeg.PATHSEG_ARC_REL: - break; - case SVGPathSeg.PATHSEG_CLOSEPATH: - break; - } - if (lastx < minX) { - minX = lastx; - } - if (lastx > maxX) { - maxX = lastx; - } - if (lasty < minY) { - minY = lasty; - } - if (lasty > minX) { - maxY = lasty; - } - } - SVGRect rect = new SVGRectImpl(); - rect.setX(minX); - rect.setY(minY); - rect.setWidth(maxX - minX); - rect.setHeight(maxY - minY); - return rect; - } - - public void setPathLength(SVGAnimatedNumber length) { - } - - public SVGPathSegList getPathSegList() { - return null; - } - - public SVGPathSegList getNormalizedPathSegList() { - return null; - } - - public float getTotalLength() { - return 0; - } - - public SVGPoint getPointAtLength(float distance) throws SVGException { - return null; - } - - public int getPathSegAtLength(float distance) throws SVGException { - return 0; - } - - public short getPathSegType() { - return 0; - } - - public String getPathSegTypeAsLetter() { - return null; - } - - public SVGPathSegClosePath createSVGPathSegClosePath () { - return null; - } - - public SVGPathSegMovetoAbs createSVGPathSegMovetoAbs (float x, - float y) { - return null; - } - - public SVGPathSegMovetoRel createSVGPathSegMovetoRel (float x, - float y) { - return null; - } - - public SVGPathSegLinetoAbs createSVGPathSegLinetoAbs (float x, - float y) { - return null; - } - - public SVGPathSegLinetoRel createSVGPathSegLinetoRel (float x, - float y) { - return null; - } - - public SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs ( - float x, float y, float x1, float y1, float x2, float y2) { - return null; - } - - public SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel ( - float x, float y, float x1, float y1, float x2, float y2) { - return null; - } - - public SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs ( - float x, float y, float x1, float y1) { - return null; - } - - public SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel ( - float x, float y, float x1, float y1) { - return null; - } - - public SVGPathSegArcAbs createSVGPathSegArcAbs (float x, float y, - float r1, float r2, float angle, boolean largeArcFlag, - boolean sweepFlag) { - return null; - } - - public SVGPathSegArcRel createSVGPathSegArcRel (float x, float y, - float r1, float r2, float angle, boolean largeArcFlag, - boolean sweepFlag) { - return null; - } - - public SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs ( - float x) { - return null; - } - - public SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel ( - float x) { - return null; - } - - public SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs ( - float y) { - return null; - } - - public SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel ( - float y) { - return null; - } - - public SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs ( - float x, float y, float x2, float y2) { - return null; - } - - public SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel ( - float x, float y, float x2, float y2) { - return null; - } - - public SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs ( - float x, float y) { - return null; - } - - public SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel ( - float x, float y) { - return null; - } - - public SVGPathSegList getAnimatedPathSegList() { - return null; - } - - public SVGPathSegList getAnimatedNormalizedPathSegList() { - return null; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGPathSegImpl.java b/src/org/apache/fop/dom/svg/SVGPathSegImpl.java deleted file mode 100644 index eb68a8258..000000000 --- a/src/org/apache/fop/dom/svg/SVGPathSegImpl.java +++ /dev/null @@ -1,185 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Fop" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -public class SVGPathSegImpl implements SVGPathSeg { - float[] values; - short commandType; - public SVGPathSegImpl(short type, float[] vals) - { - commandType = type; - values = vals; - } - - public float[] getValues() - { - return values; - } - - public short getPathSegType( ) - { - return commandType; - } - - public void setPathSegType( short pathSegType ) - { - } - - public String getPathSegTypeAsLetter( ) - { - return null; - } - - public void setPathSegTypeAsLetter( String pathSegTypeAsLetter ) - { - } - -/* public float getX( ) - { - return 0; - } - - public void setX( float x ) - { - } - - public float getY( ) - { - return 0; - } - - public void setY( float y ) - { - } - - public float getX1( ) - { - return 0; - } - - public void setX1( float x1 ) - { - } - - public float getY1( ) - { - return 0; - } - - public void setY1( float y1 ) - { - } - - public float getX2( ) - { - return 0; - } - - public void setX2( float x2 ) - { - } - - public float getY2( ) - { - return 0; - } - - public void setY2( float y2 ) - { - } - - public float getR1( ) - { - return 0; - } - - public void setR1( float r1 ) - { - } - - public float getR2( ) - { - return 0; - } - - public void setR2( float r2 ) - { - } - - public float getAngle( ) - { - return 0; - } - - public void setAngle( float angle ) - { - } - - public boolean getLargeArcFlag( ) - { - return false; - } - - public void setLargeArcFlag( boolean largeArcFlag ) - { - } - - public boolean getSweepFlag( ) - { - return false; - } - - public void setSweepFlag( boolean sweepFlag ) - { - }*/ -} diff --git a/src/org/apache/fop/dom/svg/SVGPatternElementImpl.java b/src/org/apache/fop/dom/svg/SVGPatternElementImpl.java deleted file mode 100644 index 446482206..000000000 --- a/src/org/apache/fop/dom/svg/SVGPatternElementImpl.java +++ /dev/null @@ -1,151 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGPatternElementImpl extends SVGURIReferenceImpl implements SVGPatternElement { - SVGAnimatedEnumeration patternUnits; - SVGAnimatedTransformList patternTransform; - SVGAnimatedLength x; - SVGAnimatedLength y; - SVGAnimatedLength width; - SVGAnimatedLength height; - SVGAnimatedRect viewBox; - SVGAnimatedPreserveAspectRatio preserveAspectRatio; - - public SVGPatternElementImpl() { - } - - public SVGAnimatedEnumeration getPatternUnits( ) - { - return patternUnits; - } - - public void setPatternUnits( SVGAnimatedEnumeration patternUnits ) - { - this.patternUnits = patternUnits; - } - - public SVGAnimatedTransformList getPatternTransform( ) - { - return patternTransform; - } - - public void setPatternTransform( SVGAnimatedTransformList patternTransform ) - { - this.patternTransform = patternTransform; - } - - public SVGAnimatedLength getX( ) - { - return x; - } - - public void setX( SVGAnimatedLength x ) - { - this.x = x; - } - - public SVGAnimatedLength getY( ) - { - return y; - } - - public void setY( SVGAnimatedLength y ) - { - this.y = y; - } - - public SVGAnimatedLength getWidth( ) - { - return width; - } - - public void setWidth( SVGAnimatedLength width ) - { - this.width = width; - } - - public SVGAnimatedLength getHeight( ) - { - return height; - } - - public void setHeight( SVGAnimatedLength height ) - { - this.height = height; - } - - public SVGAnimatedRect getViewBox( ) - { - return viewBox; - } - - public void setViewBox( SVGAnimatedRect viewBox ) - { - this.viewBox = viewBox; - } - - public SVGAnimatedPreserveAspectRatio getPreserveAspectRatio( ) - { - return preserveAspectRatio; - } - - public void setPreserveAspectRatio( SVGAnimatedPreserveAspectRatio preserveAspectRatio) - { - this.preserveAspectRatio = preserveAspectRatio; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGPolygonElementImpl.java b/src/org/apache/fop/dom/svg/SVGPolygonElementImpl.java deleted file mode 100644 index a247c1267..000000000 --- a/src/org/apache/fop/dom/svg/SVGPolygonElementImpl.java +++ /dev/null @@ -1,96 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import java.util.*; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGPolygonElementImpl extends GraphicElement implements SVGPolygonElement { - - public Vector points; - - public SVGPolygonElementImpl(Vector p) { - this.points = p; - } - - public SVGPointList getPoints() { - return null; - } - - public SVGPointList getAnimatedPoints() { - return null; - } - - public SVGRect getBBox() { - float minX = 10000000; // a big number - float maxX = -10000000; // a low number - float minY = 10000000; // a big number - float maxY = -10000000; // a low number - for (Enumeration e = points.elements(); e.hasMoreElements();) { - e.nextElement(); - } - SVGRect rect = new SVGRectImpl(); - rect.setX(minX); - rect.setY(minY); - rect.setWidth(maxX - minX); - rect.setHeight(maxY - minY); - return rect; - } - - public String getTagName() { - return "polygon"; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGPolylineElementImpl.java b/src/org/apache/fop/dom/svg/SVGPolylineElementImpl.java deleted file mode 100644 index 88e774406..000000000 --- a/src/org/apache/fop/dom/svg/SVGPolylineElementImpl.java +++ /dev/null @@ -1,76 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import java.util.*; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGPolylineElementImpl extends GraphicElement implements SVGPolylineElement { - - public Vector points; - - public SVGPolylineElementImpl(Vector p) { - this.points = p; - } - - public SVGPointList getPoints() { - return null; - } - - public SVGPointList getAnimatedPoints() { - return null; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGRadialGradientElementImpl.java b/src/org/apache/fop/dom/svg/SVGRadialGradientElementImpl.java deleted file mode 100644 index 978b6bd40..000000000 --- a/src/org/apache/fop/dom/svg/SVGRadialGradientElementImpl.java +++ /dev/null @@ -1,119 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGRadialGradientElementImpl extends SVGGradientElementImpl implements SVGRadialGradientElement { - SVGAnimatedLength cx; - SVGAnimatedLength cy; - SVGAnimatedLength r; - SVGAnimatedLength fx; - SVGAnimatedLength fy; - - public SVGRadialGradientElementImpl() - { - } - - public SVGAnimatedLength getCx() - { - return cx; - } - - public void setCx(SVGAnimatedLength cx) - { - this.cx = cx; - } - - public SVGAnimatedLength getCy() - { - return cy; - } - - public void setCy(SVGAnimatedLength cy) - { - this.cy = cy; - } - - public SVGAnimatedLength getR() - { - return r; - } - - public void setR(SVGAnimatedLength r) - { - this.r = r; - } - - public SVGAnimatedLength getFx() - { - return fx; - } - - public void setFx(SVGAnimatedLength fx) - { - this.fx = fx; - } - - public SVGAnimatedLength getFy() - { - return fy; - } - - public void setFy(SVGAnimatedLength fy) - { - this.fy = fy; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGRectElementImpl.java b/src/org/apache/fop/dom/svg/SVGRectElementImpl.java deleted file mode 100644 index fe01baa51..000000000 --- a/src/org/apache/fop/dom/svg/SVGRectElementImpl.java +++ /dev/null @@ -1,223 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Fop" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; -import org.w3c.dom.*; -import org.w3c.dom.events.*; - -/** - * class representing a rectangle in an SVG Area - */ -public class SVGRectElementImpl extends GraphicElement implements SVGRectElement { - - /** x-coordinate of corner */ - private SVGAnimatedLength x; - - /** y-coordinate of corner */ - private SVGAnimatedLength y; - private SVGAnimatedLength rx; - private SVGAnimatedLength ry; - - /** width of rectangle */ - private SVGAnimatedLength width; - - /** height of rectangle */ - private SVGAnimatedLength height; - - /** - * construct a rectangle graphic. - * - * @param x x-coordinate of corner - * @param y y-coordinate of corner - * @param width width of rectangle - * @param height height of rectangle - */ - public SVGRectElementImpl() { - } - - public SVGRect getBBox() - { - SVGMatrix matrix = getScreenCTM(); - double minx = 10000; - double maxx = -10000; - double miny = 10000; - double maxy = -10000; - double[] tl = new double[2]; - double[] tr = new double[2]; - double[] bl = new double[2]; - double[] br = new double[2]; - double[] res = new double[2]; - tl[0] = x.getBaseVal().getValue(); - tl[1] = y.getBaseVal().getValue(); - res[0] = matrix.getA() * tl[0] + matrix.getB() * tl[1] + matrix.getE(); - res[1] = matrix.getC() * tl[0] + matrix.getD() * tl[1] + matrix.getF(); - if(res[0] > maxx) - maxx = res[0]; - if(res[0] < minx) - minx = res[0]; - if(res[1] > maxy) - maxy = res[1]; - if(res[1] < miny) - miny = res[1]; - - tl[0] = x.getBaseVal().getValue() + width.getBaseVal().getValue(); - tl[1] = y.getBaseVal().getValue(); - res[0] = matrix.getA() * tl[0] + matrix.getB() * tl[1] + matrix.getE(); - res[1] = matrix.getC() * tl[0] + matrix.getD() * tl[1] + matrix.getF(); - if(res[0] > maxx) - maxx = res[0]; - if(res[0] < minx) - minx = res[0]; - if(res[1] > maxy) - maxy = res[1]; - if(res[1] < miny) - miny = res[1]; - - tl[0] = x.getBaseVal().getValue(); - tl[1] = y.getBaseVal().getValue() + height.getBaseVal().getValue(); - res[0] = matrix.getA() * tl[0] + matrix.getB() * tl[1] + matrix.getE(); - res[1] = matrix.getC() * tl[0] + matrix.getD() * tl[1] + matrix.getF(); - if(res[0] > maxx) - maxx = res[0]; - if(res[0] < minx) - minx = res[0]; - if(res[1] > maxy) - maxy = res[1]; - if(res[1] < miny) - miny = res[1]; - - tl[0] = x.getBaseVal().getValue() + width.getBaseVal().getValue(); - tl[1] = y.getBaseVal().getValue() + height.getBaseVal().getValue(); - res[0] = matrix.getA() * tl[0] + matrix.getB() * tl[1] + matrix.getE(); - res[1] = matrix.getC() * tl[0] + matrix.getD() * tl[1] + matrix.getF(); - if(res[0] > maxx) - maxx = res[0]; - if(res[0] < minx) - minx = res[0]; - if(res[1] > maxy) - maxy = res[1]; - if(res[1] < miny) - miny = res[1]; - - SVGRect rect = new SVGRectImpl(); - rect.setX((float)minx); - rect.setY((float)miny); - rect.setWidth((float)(maxx - minx)); - rect.setHeight((float)(maxy - miny)); - return rect; - } - - public SVGAnimatedLength getX( ) - { - return x; - } - - public void setX( SVGAnimatedLength x ) - { - this.x = x; - } - - public SVGAnimatedLength getY( ) - { - return y; - } - - public void setY( SVGAnimatedLength y ) - { - this.y = y; - } - - public SVGAnimatedLength getWidth( ) - { - return width; - } - - public void setWidth( SVGAnimatedLength width ) - { - this.width = width; - } - - public SVGAnimatedLength getHeight( ) - { - return height; - } - - public void setHeight( SVGAnimatedLength height ) - { - this.height = height; - } - - public SVGAnimatedLength getRx( ) - { - return rx; - } - - public void setRx( SVGAnimatedLength rx ) - { - this.rx = rx; - } - - public SVGAnimatedLength getRy( ) - { - return ry; - } - - public void setRy( SVGAnimatedLength ry ) - { - this.ry = ry; - } - - public String getTagName() - { - return "rect"; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGRectImpl.java b/src/org/apache/fop/dom/svg/SVGRectImpl.java deleted file mode 100644 index b8f64a259..000000000 --- a/src/org/apache/fop/dom/svg/SVGRectImpl.java +++ /dev/null @@ -1,111 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Fop" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import org.apache.fop.fo.Property; - -import java.util.*; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGRectImpl implements SVGRect { - float x; - float y; - float width; - float height; - - public SVGRectImpl() - { - } - - public float getX( ) - { - return x; - } - - public void setX(float x ) - { - this.x = x; - } - - public float getY( ) - { - return y; - } - - public void setY(float y ) - { - this.y = y; - } - - public float getWidth( ) - { - return width; - } - - public void setWidth(float width ) - { - this.width = width; - } - - public float getHeight( ) - { - return height; - } - - public void setHeight(float height ) - { - this.height = height; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGSVGElementImpl.java b/src/org/apache/fop/dom/svg/SVGSVGElementImpl.java deleted file mode 100644 index 5c7c52182..000000000 --- a/src/org/apache/fop/dom/svg/SVGSVGElementImpl.java +++ /dev/null @@ -1,368 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Fop" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import org.apache.fop.dom.stylesheets.StyleSheetListImpl; -import org.apache.fop.fo.Property; - -import java.util.*; - -import org.w3c.dom.events.Event; -import org.w3c.dom.Element; -import org.w3c.dom.css.RGBColor; -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.stylesheets.StyleSheetList; -import org.w3c.dom.stylesheets.StyleSheet; -import org.w3c.dom.NodeList; -import org.w3c.dom.views.DocumentView; -import org.w3c.dom.svg.*; -import org.w3c.dom.css.*; -import org.w3c.dom.*; - -/** - * - */ -public class SVGSVGElementImpl extends GraphicElement implements SVGSVGElement { - SVGAnimatedLength x; - SVGAnimatedLength y; - SVGAnimatedLength width; - SVGAnimatedLength height; - // This will be null if the user supplied no viewBox attribute - SVGAnimatedRect viewBox; - - public SVGSVGElementImpl() { - } - - public SVGAnimatedLength getX() { - return x; - } - - public SVGAnimatedLength getY() { - return y; - } - - public SVGAnimatedLength getWidth() { - return width; - } - - public SVGAnimatedLength getHeight() { - return height; - } - - public void setWidth(SVGAnimatedLength w) { - width = w; - } - - public void setHeight(SVGAnimatedLength h) { - height = h; - } - - public void setX(SVGAnimatedLength x) { - this.x = x; - } - - public void setY(SVGAnimatedLength y) { - this.y = y; - } - - public SVGAnimatedRect getViewBox() - { - return viewBox; - } - - public void setViewBox(SVGAnimatedRect viewBox) - { - this.viewBox = viewBox; - } - - public SVGRect getViewport() { - return null; - } - - public SVGRect getBBox() { - return getChildrenBBox(); - } - - public String getContentScriptType() { - return null; - } - - public void setContentScriptType(String contentScriptType) { - } - - public String getContentStyleType() { - return null; - } - - public void setContentStyleType(String contentStyleType) { - } - - /* public CSSValue getPresentationAttribute ( String name ) - { - CSSStyleDeclaration style; - style = getStyle(); - CSSValue val; - val = style.getPropertyCSSValue(name); - if(val == null) { - // get "style" element style for this - } - if(val == null) { - // get element parents style - Node par = getParentNode(); - if(par instanceof SVGStylable) { - val = ((SVGStylable)par).getPresentationAttribute(name); - } - } - return val; - }*/ - - public SVGPoint getCurrentTranslate() { - return null; - } - - public void setCurrentTranslate(SVGPoint currentTranslate) { - } - - public SVGViewSpec getCurrentView() { - return null; - } - - public void deSelectAll() { - } - - public NodeList getIntersectionList (SVGRect rect, - SVGElement referenceElement) { - return null; - } - - public NodeList getEnclosureList (SVGRect rect, - SVGElement referenceElement) { - return null; - } - - public boolean checkIntersection (SVGElement element, SVGRect rect) { - return false; - } - - public boolean checkEnclosure (SVGElement element, SVGRect rect) { - return false; - } - - public float getPixelUnitToMillimeterX() { - return 0; - } - - public float getPixelUnitToMillimeterY() { - return 0; - } - - public float getScreenPixelToMillimeterX() { - return 0; - } - - public float getScreenPixelToMillimeterY() { - return 0; - } - - public boolean getUseCurrentView() { - return true; - } - - public void setUseCurrentView(boolean useCurrentView) { - } - - public float getCurrentScale() { - return 0; - } - - public void setCurrentScale(float currentScale) { - } - - public int suspendRedraw (int max_wait_milliseconds) { - return 0; - } - - public void unsuspendRedraw (int suspend_handle_id) { - } - - public void unsuspendRedrawAll () { - } - - public void forceRedraw () { - } - - public void pauseAnimations () { - } - - public void unpauseAnimations () { - } - - public boolean animationsPaused () { - return true; - } - - public float getCurrentTime() { - return 0; - } - - public void setCurrentTime (float seconds) { - } - - public SVGLength createSVGLength () { - return new SVGLengthImpl(); - } - - public SVGAngle createSVGAngle () { - return new SVGAngleImpl(); - } - - public SVGPoint createSVGPoint () { - return null; - } - - public SVGMatrix createSVGMatrix () { - return new SVGMatrixImpl(); - } - - public SVGRect createSVGRect () { - return new SVGRectImpl(); - } - - public SVGTransform createSVGTransform () { - return new SVGTransformImpl(); - } - - public SVGTransform createSVGTransformFromMatrix (SVGMatrix matrix) { - SVGTransform trans = new SVGTransformImpl(); - trans.setMatrix(matrix); - return trans; - } - - public RGBColor createRGBColor () { - return null; - } - - public SVGICCColor createSVGICCColor () { - return null; - } - - public Element getElementById (String elementId) { - return null; - } - - public short getZoomAndPan() { - return 0; - } - - public void setZoomAndPan(short zoomAndPan) { - } - - public SVGAnimatedPreserveAspectRatio getPreserveAspectRatio() { - return null; - } - - public CSSStyleDeclaration getComputedStyle(Element el, String str) { - return null; - } - - public CSSStyleDeclaration getOverrideStyle(Element el, String str) { - return null; - } - - public StyleSheetList getStyleSheets() { - NodeList nl = getElementsByTagName("style"); - Vector shs = new Vector(); - for (int count = 0; count < nl.getLength(); count++) { - Node el = (Node) nl.item(count); - SVGStyleElementImpl sse = (SVGStyleElementImpl) el; - StyleSheet sheet = sse.getStyleSheet(); - shs.addElement(sheet); - } - return new StyleSheetListImpl(shs); - } - - public Event createEvent(String str) { - return null; - } - - public SVGNumber createSVGNumber () { - return null;//new SVGNumberImpl(); - } - - public String createSVGString () { - return new String(); - } - - public DocumentView getDocument() { - return null; - } - - public Node appendChild(Node newChild) throws DOMException { - Node nChild = super.appendChild(newChild); - if (newChild instanceof SVGElementImpl) { - SVGElementImpl ele = (SVGElementImpl) newChild; - ele.setOwnerSVG(this); - } - setOwnerSVG(this); - return nChild; - } - - public void setOwnerSVG(SVGSVGElement owner) { - ownerSvg = owner; - NodeList nl = getChildNodes(); - for (int count = 0; count < nl.getLength(); count++) { - Node n = nl.item(count); - if (n instanceof SVGElementImpl) { - ((SVGElementImpl) n).setOwnerSVG(this); - } - } - } -} diff --git a/src/org/apache/fop/dom/svg/SVGSetElementImpl.java b/src/org/apache/fop/dom/svg/SVGSetElementImpl.java deleted file mode 100644 index e259d2170..000000000 --- a/src/org/apache/fop/dom/svg/SVGSetElementImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGSetElementImpl extends GraphicElement {// implements SVGSetElement { - - public SVGSetElementImpl() - { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGStopElementImpl.java b/src/org/apache/fop/dom/svg/SVGStopElementImpl.java deleted file mode 100644 index de0592809..000000000 --- a/src/org/apache/fop/dom/svg/SVGStopElementImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGStopElementImpl extends SVGElementImpl implements SVGStopElement { - SVGAnimatedNumber offset; - - public SVGStopElementImpl() - { - } - - public SVGAnimatedNumber getOffset() - { - return offset; - } - - public void setOffset(SVGAnimatedNumber offset) - { - this.offset = offset; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGStringListImpl.java b/src/org/apache/fop/dom/svg/SVGStringListImpl.java deleted file mode 100644 index e4eccf139..000000000 --- a/src/org/apache/fop/dom/svg/SVGStringListImpl.java +++ /dev/null @@ -1,109 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.apache.fop.dom.svg.*; -import org.w3c.dom.svg.*; -import org.w3c.dom.*; - -import java.util.*; - -/** - * - */ -public class SVGStringListImpl extends SVGListImpl implements SVGStringList { - public SVGStringListImpl(String str) { - parseString(str); - } - - void parseString(String str) { - StringTokenizer st = new StringTokenizer(str, ", \n\r\t:;"); - while (st.hasMoreTokens()) { - String item = st.nextToken(); - appendItem(item); - } - } - - public String initialize (String newItem) throws SVGException { - return null; - } - - public String createItem() { - return new String(); - } - - public String getItem(int index) throws DOMException { - Object obj = list.elementAt(index); - return (String) obj; - } - - public String removeItem(int index) throws DOMException { - Object obj = list.elementAt(index); - list.removeElementAt(index); - return (String) obj; - } - - public String appendItem(String newItem) throws SVGException { - list.addElement(newItem); - return null; - } - - public String replaceItem(String newItem, - int index) throws DOMException, SVGException { - return null; - } - - public String insertItemBefore(String newItem, - int index) throws SVGException { - return null; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGStyleElementImpl.java b/src/org/apache/fop/dom/svg/SVGStyleElementImpl.java deleted file mode 100644 index 3fedd5edb..000000000 --- a/src/org/apache/fop/dom/svg/SVGStyleElementImpl.java +++ /dev/null @@ -1,109 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.apache.fop.dom.css.*; - -import org.w3c.dom.svg.*; -import org.w3c.dom.css.*; -import org.w3c.dom.stylesheets.*; - -/** - * - */ -public class SVGStyleElementImpl extends GraphicElement implements SVGStyleElement { - String type; - CSSStyleSheet styleSheet; - - public SVGStyleElementImpl(String str) - { - styleSheet = new CSSStyleSheetImpl(str); - } - - public String getType() - { - return type; - } - - public void setType(String type) - { - this.type = type; - } - - public String getMedia( ) - { - return null; - } - - public void setMedia( String media ) - { - } - - public String getTitle( ) - { - return null; - } - - public void setTitle( String title ) - { - } - - public StyleSheet getStyleSheet() - { - return styleSheet; - } - - public String getTagName() - { - return "style"; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGSwitchElementImpl.java b/src/org/apache/fop/dom/svg/SVGSwitchElementImpl.java deleted file mode 100644 index be4ecacab..000000000 --- a/src/org/apache/fop/dom/svg/SVGSwitchElementImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGSwitchElementImpl extends GraphicElement implements SVGSwitchElement { - - public SVGSwitchElementImpl() { - } - - public SVGRect getBBox() - { - // is this valid since only one will be rendered? - return getChildrenBBox(); - } -} diff --git a/src/org/apache/fop/dom/svg/SVGSymbolElementImpl.java b/src/org/apache/fop/dom/svg/SVGSymbolElementImpl.java deleted file mode 100644 index 5cc318de5..000000000 --- a/src/org/apache/fop/dom/svg/SVGSymbolElementImpl.java +++ /dev/null @@ -1,86 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGSymbolElementImpl extends GraphicElement implements SVGSymbolElement { - SVGAnimatedRect viewBox; - SVGAnimatedPreserveAspectRatio preserveAspectRatio; - - public SVGSymbolElementImpl() - { - } - - public SVGAnimatedRect getViewBox() - { - return viewBox; - } - - public void setViewBox(SVGAnimatedRect viewBox) - { - this.viewBox = viewBox; - } - - public SVGAnimatedPreserveAspectRatio getPreserveAspectRatio( ) - { - return preserveAspectRatio; - } - - public void setPreserveAspectRatio(SVGAnimatedPreserveAspectRatio preserveAspectRatio) - { - this.preserveAspectRatio = preserveAspectRatio; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGTRefElementImpl.java b/src/org/apache/fop/dom/svg/SVGTRefElementImpl.java deleted file mode 100644 index 205b84b00..000000000 --- a/src/org/apache/fop/dom/svg/SVGTRefElementImpl.java +++ /dev/null @@ -1,154 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import java.util.Vector; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGTRefElementImpl extends SVGTSpanElementImpl implements SVGTRefElement { - public String ref; - - String xlinkType; - String xlinkRole; - String xlinkTitle; - String xlinkShow; - String xlinkActuate; - String xlinkArcRole; - SVGAnimatedString href; - - public SVGTRefElementImpl() - { - } - - public String getXlinkType( ) - { - return xlinkType; - } - - public void setXlinkType( String xlinkType ) - { - this.xlinkType = xlinkType; - } - - public String getXlinkRole( ) - { - return xlinkRole; - } - - public void setXlinkRole( String xlinkRole ) - { - this.xlinkRole = xlinkRole; - } - - public String getXlinkTitle( ) - { - return xlinkTitle; - } - - public void setXlinkTitle( String xlinkTitle ) - { - this.xlinkTitle = xlinkTitle; - } - - public String getXlinkArcRole() - { - return xlinkArcRole; - } - - public void setXlinkArcRole(String xlinkArcRole) - { - this.xlinkArcRole = xlinkArcRole; - } - - public String getXlinkShow( ) - { - return xlinkShow; - } - - public void setXlinkShow( String xlinkShow ) - { - this.xlinkShow = xlinkShow; - } - - public String getXlinkActuate( ) - { - return xlinkActuate; - } - - public void setXlinkActuate( String xlinkActuate ) - { - this.xlinkActuate = xlinkActuate; - } - - public SVGAnimatedString getHref( ) - { - return href; - } - - public void setHref( SVGAnimatedString href ) - { - this.href = href; - } - - public SVGAnimatedBoolean getExternalResourcesRequired() - { - return null; - } - - public void setExternalResourcesRequired(SVGAnimatedBoolean externalResourcesRequired) - { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGTSpanElementImpl.java b/src/org/apache/fop/dom/svg/SVGTSpanElementImpl.java deleted file mode 100644 index 209c693ee..000000000 --- a/src/org/apache/fop/dom/svg/SVGTSpanElementImpl.java +++ /dev/null @@ -1,95 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import java.util.*; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGTSpanElementImpl extends SVGTextContentElementImpl implements SVGTSpanElement { - public String str; - public int dx = 0; - public int dy = 0; - public SVGAnimatedLengthList xlist = null; - public SVGAnimatedLengthList ylist = null; - public SVGAnimatedLengthList dxlist = null; - public SVGAnimatedLengthList dylist = null; - - /** - * - */ - public SVGTSpanElementImpl() { - } - - public SVGAnimatedLengthList getX() { - return xlist; - } - - public SVGAnimatedLengthList getY() { - return ylist; - } - - public SVGAnimatedLengthList getDx() { - return dxlist; - } - - public SVGAnimatedLengthList getDy() { - return dylist; - } - - public SVGAnimatedNumberList getRotate() { - return null; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGTextContentElementImpl.java b/src/org/apache/fop/dom/svg/SVGTextContentElementImpl.java deleted file mode 100644 index ebf0ca5a7..000000000 --- a/src/org/apache/fop/dom/svg/SVGTextContentElementImpl.java +++ /dev/null @@ -1,120 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Fop" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import java.util.*; - -import org.w3c.dom.svg.*; - -/** - * class representing text in an SVG Area - * - */ -public class SVGTextContentElementImpl extends GraphicElement implements SVGTextContentElement { - - public SVGTextContentElementImpl() - { - } - - public SVGAnimatedLength getTextLength( ) - { - return null; - } - - public SVGAnimatedEnumeration getLengthAdjust( ) - { - return null; - } - - public int getNumberOfChars ( ) - { - return 0; - } - - public float getComputedTextLength ( ) - { - return 0; - } - - public float getSubStringLength ( int charnum, int nchars) - { - return 0; - } - - public SVGPoint getStartPositionOfChar ( int charnum ) - { - return null; - } - - public SVGPoint getEndPositionOfChar ( int charnum ) - { - return null; - } - - public SVGRect getExtentOfChar ( int charnum ) - { - return null; - } - - public float getRotationOfChar ( int charnum ) - { - return 0; - } - - public int getCharNumAtPosition ( SVGPoint point ) - { - return 0; - } - - public void selectSubString ( int charnum, int nchars ) - { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGTextElementImpl.java b/src/org/apache/fop/dom/svg/SVGTextElementImpl.java deleted file mode 100644 index cf8490214..000000000 --- a/src/org/apache/fop/dom/svg/SVGTextElementImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Fop" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import java.util.*; - -import org.w3c.dom.svg.*; -import org.apache.fop.fo.EnumProperty; - -/** - * class representing text in an SVG Area - * - */ -public class SVGTextElementImpl extends SVGTextContentElementImpl { - - /** x-coordinate of text */ - public float x; - - /** y-coordinate of text */ - public float y; - - /** alignment of text */ - public EnumProperty anchor; - - /** vector of text elements, strings, tspan, tref */ - public Vector textList; - - /** - * construct a text element - */ - public SVGTextElementImpl() - { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGTextPathElementImpl.java b/src/org/apache/fop/dom/svg/SVGTextPathElementImpl.java deleted file mode 100644 index 0394d1f4c..000000000 --- a/src/org/apache/fop/dom/svg/SVGTextPathElementImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -/** - * - */ -public class SVGTextPathElementImpl extends SVGElementImpl { - public String pathLink; - public String str; - - public SVGTextPathElementImpl(String s, String con) - { - pathLink = s; - str = con; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGTitleElementImpl.java b/src/org/apache/fop/dom/svg/SVGTitleElementImpl.java deleted file mode 100644 index 935cbf693..000000000 --- a/src/org/apache/fop/dom/svg/SVGTitleElementImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * class representing a line in an SVG Area - */ -public class SVGTitleElementImpl extends GraphicElement implements SVGTitleElement { - public SVGTitleElementImpl() - { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGTransformImpl.java b/src/org/apache/fop/dom/svg/SVGTransformImpl.java deleted file mode 100644 index db2f6ef11..000000000 --- a/src/org/apache/fop/dom/svg/SVGTransformImpl.java +++ /dev/null @@ -1,121 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "Fop" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import org.apache.fop.fo.Property; - -import java.util.*; - -import org.w3c.dom.svg.*; - -/** - * - */ -public class SVGTransformImpl implements SVGTransform { - short type; - SVGMatrix matrix = new SVGMatrixImpl(); - - public SVGTransformImpl() - { - } - - public short getType( ) - { - return type; - } - - public SVGMatrix getMatrix( ) - { - return matrix; - } - - public float getAngle( ) - { - return 0.0f; - } - - public void setMatrix ( SVGMatrix matrix ) - { - this.matrix = matrix; - } - - public void setTranslate ( float tx, float ty ) - throws SVGException - { - matrix.setE(tx); - matrix.setF(ty); - } - - public void setScale ( float sx, float sy ) - throws SVGException - { - matrix.setA(sx); - matrix.setD(sy); - } - - public void setRotate (float angle, float cx, float cy) - throws SVGException - { - matrix = matrix.rotate(angle); - } - - public void setSkewX ( float angle ) - throws SVGException - { - matrix = matrix.skewX(angle); - } - - public void setSkewY ( float angle ) - throws SVGException - { - matrix = matrix.skewY(angle); - } -} diff --git a/src/org/apache/fop/dom/svg/SVGTransformListImpl.java b/src/org/apache/fop/dom/svg/SVGTransformListImpl.java deleted file mode 100644 index 480cf560e..000000000 --- a/src/org/apache/fop/dom/svg/SVGTransformListImpl.java +++ /dev/null @@ -1,115 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -package org.apache.fop.dom.svg; - -import java.util.*; - -import org.w3c.dom.svg.*; -import org.w3c.dom.*; - -/** - * Transform List - */ -public class SVGTransformListImpl extends SVGListImpl implements SVGTransformList { - public SVGTransform createSVGTransformFromMatrix (SVGMatrix matrix) - throws SVGException { - SVGTransform st = new SVGTransformImpl(); - st.setMatrix(matrix); - return st; - } - - public SVGTransform consolidate() { - SVGMatrix matrix = new SVGMatrixImpl(); - for (int count = 0; count < getNumberOfItems(); count++) { - SVGMatrix mat = ((SVGTransform) getItem(count)).getMatrix(); - matrix = matrix.multiply(mat); - } - SVGTransform trans = new SVGTransformImpl(); - trans.setMatrix(matrix); - return trans; - } - - public SVGTransform initialize (SVGTransform newItem) - throws SVGException { - return null; - } - - public SVGTransform createItem() { - return new SVGTransformImpl(); - } - - public SVGTransform getItem(int index) throws DOMException { - Object obj = list.elementAt(index); - return (SVGTransform) obj; - } - - public SVGTransform removeItem(int index) throws DOMException { - Object obj = list.elementAt(index); - list.removeElementAt(index); - return (SVGTransform) obj; - } - - public SVGTransform appendItem(SVGTransform newItem) - throws SVGException { - list.addElement(newItem); - return null; - } - - public SVGTransform replaceItem(SVGTransform newItem, - int index) throws DOMException, SVGException { - return null; - } - - public SVGTransform insertItemBefore(SVGTransform newItem, - int index) throws SVGException { - return null; - } -} diff --git a/src/org/apache/fop/dom/svg/SVGURIReferenceImpl.java b/src/org/apache/fop/dom/svg/SVGURIReferenceImpl.java deleted file mode 100644 index edf9a3ad0..000000000 --- a/src/org/apache/fop/dom/svg/SVGURIReferenceImpl.java +++ /dev/null @@ -1,143 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -public class SVGURIReferenceImpl extends GraphicElement implements SVGURIReference { - String xlinkType; - String xlinkRole; - String xlinkTitle; - String xlinkShow; - String xlinkActuate; - String xlinkArcRole; - SVGAnimatedString href; - - public String getXlinkType( ) - { - return xlinkType; - } - - public void setXlinkType( String xlinkType ) - { - this.xlinkType = xlinkType; - } - - public String getXlinkRole( ) - { - return xlinkRole; - } - - public void setXlinkRole( String xlinkRole ) - { - this.xlinkRole = xlinkRole; - } - - public String getXlinkTitle( ) - { - return xlinkTitle; - } - - public void setXlinkTitle( String xlinkTitle ) - { - this.xlinkTitle = xlinkTitle; - } - - public String getXlinkArcRole() - { - return xlinkArcRole; - } - - public void setXlinkArcRole(String xlinkArcRole) - { - this.xlinkArcRole = xlinkArcRole; - } - - public String getXlinkShow( ) - { - return xlinkShow; - } - - public void setXlinkShow( String xlinkShow ) - { - this.xlinkShow = xlinkShow; - } - - public String getXlinkActuate( ) - { - return xlinkActuate; - } - - public void setXlinkActuate( String xlinkActuate ) - { - this.xlinkActuate = xlinkActuate; - } - - public SVGAnimatedString getHref( ) - { - return href; - } - - public void setHref( SVGAnimatedString href ) - { - this.href = href; - } - - public SVGAnimatedBoolean getExternalResourcesRequired() - { - return null; - } - - public void setExternalResourcesRequired(SVGAnimatedBoolean externalResourcesRequired) - { - } -} diff --git a/src/org/apache/fop/dom/svg/SVGUseElementImpl.java b/src/org/apache/fop/dom/svg/SVGUseElementImpl.java deleted file mode 100644 index 6de276cbf..000000000 --- a/src/org/apache/fop/dom/svg/SVGUseElementImpl.java +++ /dev/null @@ -1,194 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * Use Element - * - */ -public class SVGUseElementImpl extends GraphicElement implements SVGUseElement { - public String link; - String xlinkArcRole; - SVGAnimatedLength x; - SVGAnimatedLength y; - SVGAnimatedLength width; - SVGAnimatedLength height; - - public SVGUseElementImpl(String s) - { - link = s; - } - - public String getXlinkType( ) - { - return null; - } - - public void setXlinkType( String xlinkType ) - { - } - - public String getXlinkRole( ) - { - return null; - } - - public void setXlinkRole( String xlinkRole ) - { - } - - public String getXlinkTitle( ) - { - return null; - } - - public void setXlinkTitle( String xlinkTitle ) - { - } - - public String getXlinkArcRole() - { - return xlinkArcRole; - } - - public void setXlinkArcRole(String xlinkArcRole) - { - this.xlinkArcRole = xlinkArcRole; - } - - public String getXlinkShow( ) - { - return null; - } - - public void setXlinkShow( String xlinkShow ) - { - } - - public String getXlinkActuate( ) - { - return null; - } - - public void setXlinkActuate( String xlinkActuate ) - { - } - - public SVGAnimatedString getHref( ) - { - return null; - } - - public void setHref( SVGAnimatedString href ) - { - } - - public SVGAnimatedLength getX( ) - { - return x; - } - - public void setX( SVGAnimatedLength x ) - { - this.x = x; - } - - public SVGAnimatedLength getY( ) - { - return y; - } - - public void setY( SVGAnimatedLength y ) - { - this.y = y; - } - - public SVGAnimatedLength getWidth( ) - { - return width; - } - - public void setWidth( SVGAnimatedLength width ) - { - this.width = width; - } - - public SVGAnimatedLength getHeight( ) - { - return height; - } - - public void setHeight( SVGAnimatedLength height ) - { - this.height = height; - } - - public SVGElementInstance getInstanceRoot( ) - { - return null; - } - - public SVGElementInstance getAnimatedInstanceRoot( ) - { - return null; - } - -/* public SVGAnimatedBoolean getExternalResourcesRequired( ) - { - } - - public void setExternalResourcesRequired( SVGAnimatedBoolean externalResourcesRequired ) - { - }*/ -} diff --git a/src/org/apache/fop/dom/svg/SVGVKernElementImpl.java b/src/org/apache/fop/dom/svg/SVGVKernElementImpl.java deleted file mode 100644 index befa97e76..000000000 --- a/src/org/apache/fop/dom/svg/SVGVKernElementImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.dom.svg; - -import org.w3c.dom.svg.*; - -/** - * - * - */ -public class SVGVKernElementImpl extends SVGElementImpl implements SVGVKernElement { - - public SVGVKernElementImpl() - { - } -} |