~ubuntu-branches/ubuntu/karmic/batik/karmic

« back to all changes in this revision

Viewing changes to sources/org/apache/batik/extension/StylableExtensionElement.java

  • Committer: Bazaar Package Importer
  • Author(s): Matvey Kozhev, Onkar Shinde, Matvey Kozhev
  • Date: 2008-07-19 01:03:05 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080719010305-0b24skqy185kdsb9
Tags: 1.7.dfsg-0ubuntu1
[ Onkar Shinde ]
* New upstream version (LP: #147818)
* debian/control
  - Add Sun JDK 1.5 as build dependency. Fixes FTBFS on buildd. (LP: #150484)
    Also add Sun JRE as runtime dependencies.
  - Add ant-optional as build dependency.
  - Add libxml-commons-external-java and libxmlgraphics-commons-java as
    build and runtime dependencies.
  - Add 'Homepage' field and correct the url.
  - Change standards version to 3.8.0.
  - Modify Maintainer value to match the DebianMaintainerField
    specification.
* debian/rules
  - Change JAVA_HOME_DIRS for Sun JDK.
  - Add jar file names to DEB_JARS to match new build requirements.
  - Extract version from changelog.
  - Delete bundled jar files in clean target.
  - Don't use hardcoded version in install target.
  - Add get-orig-source target.
* debian/README.Debian-source
  - Change the fo tag name to the one used for this version.
* debian/watch
  - Change expression to match src distribution.
* debian/patches/
  - 01_build_xml.patch, 02_fix_jar_target.patch - Refresh for current source.
  - 03_fix_lib_dirs.patch - Fix the library and classpath references needed
    for pdf transcoder build.
  - 04_fix_transcoder_pkg.patch - Fix transcoder-pkg target to not copy
    files from other jar files.

[ Matvey Kozhev ]
* debian/changelog:
  - Added ".dfsg" to version.
* debian/control, debian/rules:
  - Build with openjdk-6-jdk, depend on openjdk-6-jre.
  - Added java-6-sun as an alternate build JAVA_HOME directory.
  - Fixed get-orig-source to not include debian/ and delete the source dir,
    and made it delete jars from lib/, as done in the current batik package.
* debian/wrappers.sh:
  - Changed java-7-icedtea reference to java-6-openjdk, as the former has been
    removed back in Hardy.
  - Added newline.
* debian/libbatik-java.install:
  - Added newline.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 
3
 
   Copyright 1999-2003  The Apache Software Foundation 
4
 
 
5
 
   Licensed under the Apache License, Version 2.0 (the "License");
6
 
   you may not use this file except in compliance with the License.
7
 
   You may obtain a copy of the License at
 
3
   Licensed to the Apache Software Foundation (ASF) under one or more
 
4
   contributor license agreements.  See the NOTICE file distributed with
 
5
   this work for additional information regarding copyright ownership.
 
6
   The ASF licenses this file to You under the Apache License, Version 2.0
 
7
   (the "License"); you may not use this file except in compliance with
 
8
   the License.  You may obtain a copy of the License at
8
9
 
9
10
       http://www.apache.org/licenses/LICENSE-2.0
10
11
 
15
16
   limitations under the License.
16
17
 
17
18
*/
18
 
 
19
19
package org.apache.batik.extension;
20
20
 
21
 
import java.net.MalformedURLException;
22
 
import java.net.URL;
23
 
 
24
21
import org.apache.batik.css.engine.CSSStylableElement;
 
22
import org.apache.batik.css.engine.StyleDeclarationProvider;
25
23
import org.apache.batik.css.engine.StyleMap;
26
24
import org.apache.batik.dom.AbstractDocument;
27
 
import org.apache.batik.dom.svg.XMLBaseSupport;
 
25
import org.apache.batik.util.ParsedURL;
 
26
 
28
27
import org.w3c.dom.Node;
29
28
import org.w3c.dom.css.CSSStyleDeclaration;
30
29
import org.w3c.dom.css.CSSValue;
38
37
 * attributes (ie: fill="red", ...).
39
38
 *
40
39
 * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
41
 
 * @version $Id: StylableExtensionElement.java,v 1.7 2005/02/22 09:13:02 cam Exp $
 
40
 * @version $Id: StylableExtensionElement.java 579230 2007-09-25 12:52:48Z cam $
42
41
 */
43
42
public abstract class StylableExtensionElement
44
43
    extends ExtensionElement
48
47
    /**
49
48
     * The base URL.
50
49
     */
51
 
    protected URL cssBase;
 
50
    protected ParsedURL cssBase;
52
51
 
53
52
    /**
54
53
     * The computed style map.
71
70
    }
72
71
 
73
72
    // CSSStylableElement //////////////////////////////////////////
74
 
    
 
73
 
75
74
    /**
76
75
     * Returns the computed style of this element/pseudo-element.
77
76
     */
103
102
    /**
104
103
     * Returns the CSS base URL of this element.
105
104
     */
106
 
    public URL getCSSBase() {
 
105
    public ParsedURL getCSSBase() {
107
106
        if (cssBase == null) {
108
 
            try {
109
 
                String bu = XMLBaseSupport.getCascadedXMLBase(this);
110
 
                if (bu == null) {
111
 
                    return null;
112
 
                }
113
 
                cssBase = new URL(XMLBaseSupport.getCascadedXMLBase(this));
114
 
            } catch (MalformedURLException e) {
115
 
                // !!! TODO
116
 
                e.printStackTrace();
117
 
                throw new InternalError();
 
107
            String bu = getBaseURI();
 
108
            if (bu == null) {
 
109
                return null;
118
110
            }
 
111
            cssBase = new ParsedURL(bu);
119
112
        }
120
113
        return cssBase;
121
114
    }
135
128
        return false;
136
129
    }
137
130
 
 
131
    /**
 
132
     * Returns the object that gives access to the underlying
 
133
     * {@link org.apache.batik.css.engine.StyleDeclaration} for the override
 
134
     * style of this element.
 
135
     */
 
136
    public StyleDeclarationProvider getOverrideStyleDeclarationProvider() {
 
137
        return null;
 
138
    }
 
139
 
138
140
    // SVGStylable //////////////////////////////////////////////////
139
141
 
140
142
    /**
141
143
     * <b>DOM</b>: Implements {@link org.w3c.dom.svg.SVGStylable#getStyle()}.
142
144
     */
143
145
    public CSSStyleDeclaration getStyle() {
144
 
        throw new InternalError("Not implemented");
 
146
        throw new UnsupportedOperationException("Not implemented");
145
147
    }
146
148
 
147
149
    /**
149
151
     * org.w3c.dom.svg.SVGStylable#getPresentationAttribute(String)}.
150
152
     */
151
153
    public CSSValue getPresentationAttribute(String name) {
152
 
        throw new InternalError("Not implemented");
 
154
        throw new UnsupportedOperationException("Not implemented");
153
155
    }
154
156
 
155
157
    /**
157
159
     * org.w3c.dom.svg.SVGStylable#getClassName()}.
158
160
     */
159
161
    public SVGAnimatedString getClassName() {
160
 
        throw new InternalError("Not implemented");
 
162
        throw new UnsupportedOperationException("Not implemented");
161
163
    }
162
164
}