You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2013/10/08 16:03:36 UTC

[21/62] [abbrv] [partial] Merged Apache Flex 4.9.0 release branch

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/Resources.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/Resources.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/Resources.java
deleted file mode 100644
index 484e95f..0000000
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/Resources.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
-
-   Copyright 2001,2003  The Apache Software Foundation 
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
- */
-package org.apache.flex.forks.batik.apps.svgbrowser;
-
-import java.util.Locale;
-import java.util.MissingResourceException;
-
-import org.apache.flex.forks.batik.i18n.LocalizableSupport;
-import org.apache.flex.forks.batik.util.gui.resource.ResourceManager;
-
-/**
- * This class manages the message for the Swing extensions.
- *
- * @author <a href="mailto:vhardy@apache.org">Vincent Hardy</a>
- * @version $Id: Resources.java,v 1.6 2004/08/18 07:12:27 vhardy Exp $
- */
-public class Resources {
-
-    /**
-     * This class does not need to be instantiated.
-     */
-    protected Resources() { }
-
-    /**
-     * The error messages bundle class name.
-     */
-    protected final static String RESOURCES =
-        "org.apache.flex.forks.batik.apps.svgbrowser.resources.GUI";
-
-    /**
-     * The localizable support for the error messages.
-     */
-    protected static LocalizableSupport localizableSupport =
-        new LocalizableSupport(RESOURCES, Resources.class.getClassLoader());
-
-    /**
-     * The resource manager to decode messages.
-     */
-    protected static ResourceManager resourceManager =
-        new ResourceManager(localizableSupport.getResourceBundle());
-
-    /**
-     * Implements {@link org.apache.flex.forks.batik.i18n.Localizable#setLocale(Locale)}.
-     */
-    public static void setLocale(Locale l) {
-        localizableSupport.setLocale(l);
-        resourceManager = new ResourceManager(localizableSupport.getResourceBundle());
-    }
-
-    /**
-     * Implements {@link org.apache.flex.forks.batik.i18n.Localizable#getLocale()}.
-     */
-    public static Locale getLocale() {
-        return localizableSupport.getLocale();
-    }
-
-    /**
-     * Implements {@link
-     * org.apache.flex.forks.batik.i18n.Localizable#formatMessage(String,Object[])}.
-     */
-    public static String formatMessage(String key, Object[] args)
-        throws MissingResourceException {
-        return localizableSupport.formatMessage(key, args);
-    }
-
-    public static String getString(String key)
-        throws MissingResourceException {
-        return resourceManager.getString(key);
-    }
-
-    public static int getInteger(String key) 
-        throws MissingResourceException {
-        return resourceManager.getInteger(key);
-    }
-
-    public static int getCharacter(String key)
-        throws MissingResourceException {
-        return resourceManager.getCharacter(key);
-    }
-}

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/SVGInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/SVGInputHandler.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/SVGInputHandler.java
deleted file mode 100644
index 9cf8f9c..0000000
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/SVGInputHandler.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
-
-   Copyright 2002-2003  The Apache Software Foundation 
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
- */
-package org.apache.flex.forks.batik.apps.svgbrowser;
-
-import java.io.File;
-
-import org.apache.flex.forks.batik.util.ParsedURL;
-
-/**
- * This implementation of the <tt>SquiggleInputHandler</tt> class
- * simply displays an SVG file into the JSVGCanvas.
- *
- * @author <a mailto="vincent.hardy@sun.com">Vincent Hardy</a>
- * @version $Id: SVGInputHandler.java,v 1.5 2004/08/18 07:12:27 vhardy Exp $
- */
-public class SVGInputHandler implements SquiggleInputHandler {
-    public static final String[] SVG_MIME_TYPES = 
-    { "image/svg+xml" };
-
-    public static final String[] SVG_FILE_EXTENSIONS =
-    { ".svg", ".svgz" };
-
-    /**
-     * Returns the list of mime types handled by this handler.
-     */
-    public String[] getHandledMimeTypes() {
-        return SVG_MIME_TYPES;
-    }
-    
-    /**
-     * Returns the list of file extensions handled by this handler
-     */
-    public String[] getHandledExtensions() {
-        return SVG_FILE_EXTENSIONS;
-    }
-
-    /**
-     * Returns a description for this handler.
-     */
-    public String getDescription() {
-        return "";
-    }
-
-    /**
-     * Handles the given input for the given JSVGViewerFrame
-     */
-    public void handle(ParsedURL purl, JSVGViewerFrame svgViewerFrame) {
-        svgViewerFrame.getJSVGCanvas().loadSVGDocument(purl.toString());
-    }
-
-    /**
-     * Returns true if the input file can be handled.
-     */
-    public boolean accept(File f) {
-        return f != null && f.isFile() && accept(f.getPath());
-    }
-
-    /**
-     * Returns true if the input URI can be handled by the handler
-     */
-    public boolean accept(ParsedURL purl) {
-        // <!> Note: this should be improved to rely on Mime Type 
-        //     when the http protocol is used. This will use the 
-        //     ParsedURL.getContentType method.
-        if (purl == null) {
-            return false;
-        }
-
-        String path = purl.getPath();
-        if (path == null) return false;
-
-        return accept(path);
-    }
-
-    /**
-     * Returns true if the resource at the given path can be handled
-     */
-    public boolean accept(String path) {
-        if (path == null) return false;
-        for (int i=0; i<SVG_FILE_EXTENSIONS.length; i++) {
-            if (path.endsWith(SVG_FILE_EXTENSIONS[i])) {
-                return true;
-            }
-        }
-
-        return false;
-    }
-}

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/SVGOptionPanel.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/SVGOptionPanel.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/SVGOptionPanel.java
deleted file mode 100644
index bb26f25..0000000
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/SVGOptionPanel.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
-
-   Copyright 2001-2003  The Apache Software Foundation 
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
- */
-package org.apache.flex.forks.batik.apps.svgbrowser;
-
-import java.awt.Component;
-import java.awt.BorderLayout;
-
-import javax.swing.JLabel;
-import javax.swing.JCheckBox;
-
-/**
- * This class represents a panel to control svg encoding options.
- *
- * @author <a href="mailto:tkormann@apache.org">Thierry Kormann</a>
- * @version $Id: SVGOptionPanel.java,v 1.2 2005/03/29 10:48:02 deweese Exp $
- */
-public class SVGOptionPanel extends OptionPanel {
-    /**
-     * The svg encoding options.
-     */
-    protected JCheckBox xmlbaseCB;
-    protected JCheckBox prettyPrintCB;
-
-    /**
-     * Creates a new panel.
-     */
-    public SVGOptionPanel() {
-	super(new BorderLayout());
-	add(new JLabel(resources.getString("SVGOptionPanel.label")), 
-	    BorderLayout.NORTH);
-
-        xmlbaseCB = new JCheckBox
-            (resources.getString("SVGOptionPanel.UseXMLBase"));
-        xmlbaseCB.setSelected
-            (resources.getBoolean("SVGOptionPanel.UseXMLBaseDefault"));
-        add(xmlbaseCB, BorderLayout.CENTER);
-             
-        prettyPrintCB = new JCheckBox
-            (resources.getString("SVGOptionPanel.PrettyPrint"));
-        prettyPrintCB.setSelected
-            (resources.getBoolean("SVGOptionPanel.PrettyPrintDefault"));
-        add(prettyPrintCB, BorderLayout.SOUTH);
-    }
-
-    /**
-     * Returns true if the output should use xml:base.
-     */
-    public boolean getUseXMLBase() {
-	return xmlbaseCB.isSelected();
-    }
-
-    /**
-     * Returns true if the output should use xml:base.
-     */
-    public boolean getPrettyPrint() {
-	return prettyPrintCB.isSelected();
-    }
-
-    /**
-     * Shows a dialog to choose the jpeg encoding quality and return
-     * the quality as a float.  
-     */
-    public static SVGOptionPanel showDialog(Component parent) {
-        String title = resources.getString("SVGOptionPanel.dialog.title");
-        SVGOptionPanel panel = new SVGOptionPanel();
-	Dialog dialog = new Dialog(parent, title, panel);
-	dialog.pack();
-	dialog.show();
-	return panel;
-    }
-}

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/SquiggleInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/SquiggleInputHandler.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/SquiggleInputHandler.java
deleted file mode 100644
index ddc332e..0000000
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/SquiggleInputHandler.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-
-   Copyright 2002  The Apache Software Foundation 
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
- */
-package org.apache.flex.forks.batik.apps.svgbrowser;
-
-import java.io.File;
-
-import org.apache.flex.forks.batik.util.ParsedURL;
-
-/**
- * This is the interface expected from classes which can handle specific 
- * types of input for the Squiggle SVG browser. The simplest implementation
- * will simply handle SVG documents. Other, more sophisticated implementations
- * will handle other types of documents and convert them into SVG before
- * displaying them in an SVG canvas.
- *
- * @author <a mailto="vincent.hardy@sun.com">Vincent Hardy</a>
- * @version $Id: SquiggleInputHandler.java,v 1.3 2004/08/18 07:12:27 vhardy Exp $
- */
-public interface SquiggleInputHandler {
-    /**
-     * Returns the list of mime types handled by this handler.
-     */
-    String[] getHandledMimeTypes();
-
-    /**
-     * Returns the list of file extensions handled by this handler
-     */
-    String[] getHandledExtensions();
-
-    /**
-     * Returns a description for this handler
-     */
-    String getDescription();
-
-    /**
-     * Returns true if the input file can be handled by the handler
-     */
-    boolean accept(File f);
-
-    /**
-     * Returns true if the input URI can be handled by the handler
-     * @param purl URL describing the candidate input
-     */
-    boolean accept(ParsedURL purl);
-
-    /**
-     * Handles the given input for the given JSVGViewerFrame
-     */
-    void handle(ParsedURL purl, JSVGViewerFrame svgFrame) throws Exception ;
-}

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/SquiggleInputHandlerFilter.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/SquiggleInputHandlerFilter.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/SquiggleInputHandlerFilter.java
deleted file mode 100644
index ac5498c..0000000
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/SquiggleInputHandlerFilter.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-
-   Copyright 2002-2003  The Apache Software Foundation 
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
- */
-package org.apache.flex.forks.batik.apps.svgbrowser;
-
-import java.io.File;
-
-import javax.swing.filechooser.FileFilter;
-
-/**
- * This class filters file for a given <tt>SquiggleInputHandler</tt>
- *
- * @author <a mailto="vincent.hardy@sun.com">Vincent Hardy</a>
- * @version $Id: SquiggleInputHandlerFilter.java,v 1.4 2004/08/18 07:12:27 vhardy Exp $
- */
-public class SquiggleInputHandlerFilter extends FileFilter {
-    protected SquiggleInputHandler handler;
-
-    public SquiggleInputHandlerFilter(SquiggleInputHandler handler) {
-        this.handler = handler;
-    }
-
-    public boolean accept(File f) {
-        return f.isDirectory() || handler.accept(f);
-    }
-
-    public String getDescription() {
-        StringBuffer sb = new StringBuffer();
-        String extensions[] = handler.getHandledExtensions();
-        int n = extensions != null ? extensions.length : 0;
-        for (int i=0; i<n; i++) {
-            if (i > 0) {
-                sb.append(", ");
-            }
-            sb.append(extensions[i]);
-        }
-
-        if (n > 0) {
-            sb.append(" ");
-        }
-
-        sb.append(handler.getDescription());
-        return sb.toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/StatusBar.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/StatusBar.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/StatusBar.java
deleted file mode 100644
index 36d1569..0000000
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/StatusBar.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
-
-   Copyright 2001,2003  The Apache Software Foundation 
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
- */
-package org.apache.flex.forks.batik.apps.svgbrowser;
-
-import java.awt.BorderLayout;
-import java.awt.Dimension;
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.border.BevelBorder;
-
-import org.apache.flex.forks.batik.util.gui.resource.ResourceManager;
-
-/**
- * This class represents a viewer status bar.
- *
- * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: StatusBar.java,v 1.8 2005/03/27 08:58:30 cam Exp $
- */
-public class StatusBar extends JPanel {
-
-    /**
-     * The gui resources file name
-     */
-    protected final static String RESOURCES =
-        "org.apache.flex.forks.batik.apps.svgbrowser.resources.StatusBarMessages";
-
-    /**
-     * The resource bundle
-     */
-    protected static ResourceBundle bundle;
-
-    /**
-     * The resource manager
-     */
-    protected static ResourceManager rManager;
-    static {
-        bundle = ResourceBundle.getBundle(RESOURCES, Locale.getDefault());
-        rManager = new ResourceManager(bundle);
-    }
-
-    /**
-     * The x position/width label.
-     */
-    protected JLabel xPosition;
-
-    /**
-     * The y position/height label.
-     */
-    protected JLabel yPosition;
-
-    /**
-     * The zoom label.
-     */
-    protected JLabel zoom;
-
-    /**
-     * The message label
-     */
-    protected JLabel message;
-
-    /**
-     * The main message
-     */
-    protected String mainMessage;
-
-    /**
-     * The temporary message
-     */
-    protected String temporaryMessage;
-
-    /**
-     * The current display thread.
-     */
-    protected DisplayThread displayThread;
-
-    /**
-     * Creates a new status bar.
-     */
-    public StatusBar() {
-        super(new BorderLayout(5, 5));
-
-        JPanel p = new JPanel(new BorderLayout(0, 0));
-        add("West", p);
-
-        xPosition = new JLabel();
-        BevelBorder bb;
-        bb = new BevelBorder(BevelBorder.LOWERED,
-                             getBackground().brighter().brighter(),
-                             getBackground(),
-                             getBackground().darker().darker(),
-                             getBackground());
-        xPosition.setBorder(bb);
-        xPosition.setPreferredSize(new Dimension(110, 16));
-        p.add("West", xPosition);
-
-        yPosition = new JLabel();
-        yPosition.setBorder(bb);
-        yPosition.setPreferredSize(new Dimension(110, 16));
-        p.add("Center", yPosition);
-
-        zoom = new JLabel();
-        zoom.setBorder(bb);
-        zoom.setPreferredSize(new Dimension(70, 16));
-        p.add("East", zoom);
-
-        p = new JPanel(new BorderLayout(0, 0));
-        message = new JLabel();
-        message.setBorder(bb);
-        p.add(message);
-        add(p);
-        setMainMessage(rManager.getString("Panel.default_message"));
-    }
-
-    /**
-     * Sets the x position.
-     */
-    public void setXPosition(float x) {
-        xPosition.setText("x: " + x);
-    }
-
-    /**
-     * Sets the width.
-     */
-    public void setWidth(float w) {
-        xPosition.setText(rManager.getString("Position.width_letters") +
-                          " " + w);
-    }
-
-    /**
-     * Sets the y position.
-     */
-    public void setYPosition(float y) {
-        yPosition.setText("y: " + y);
-    }
-
-    /**
-     * Sets the height.
-     */
-    public void setHeight(float h) {
-        yPosition.setText(rManager.getString("Position.height_letters") +
-                          " " + h);
-    }
-
-    /**
-     * Sets the zoom factor.
-     */
-    public void setZoom(float f) {
-        f = (f > 0) ? f : -f;
-        if (f == 1) {
-            zoom.setText("1:1");
-        } else if (f >= 1) {
-            String s = Float.toString(f);
-            if (s.length() > 6) {
-                s = s.substring(0, 6);
-            }
-            zoom.setText("1:" + s);
-        } else {
-            String s = Float.toString(1 / f);
-            if (s.length() > 6) {
-                s = s.substring(0, 6);
-            }
-            zoom.setText(s + ":1");
-        }
-    }
-
-    /**
-     * Sets a temporary message
-     * @param s the message
-     */
-    public void setMessage(String s) {
-        setPreferredSize(new Dimension(0, getPreferredSize().height));
-        if (displayThread != null) {
-            displayThread.finish();
-        }
-        temporaryMessage = s;
-        Thread old = displayThread;
-        displayThread = new DisplayThread(old);
-        displayThread.start();
-    }
-
-    /**
-     * Sets the main message
-     * @param s the message
-     */
-    public void setMainMessage(String s) {
-        mainMessage = s;
-        message.setText(mainMessage = s);
-        if (displayThread != null) {
-            displayThread.finish();
-            displayThread = null;
-        }
-        setPreferredSize(new Dimension(0, getPreferredSize().height));
-    }
-
-    /**
-     * To display the main message
-     */
-    protected class DisplayThread extends Thread {
-        static final long DEFAULT_DURATION = 5000;
-        long duration;
-        Thread toJoin;
-        public DisplayThread() {
-            this(DEFAULT_DURATION, null);
-        }
-        public DisplayThread(long duration) {
-            this(duration, null);
-        }
-        public DisplayThread(Thread toJoin) {
-            this(DEFAULT_DURATION, toJoin);
-        }
-        public DisplayThread(long duration, Thread toJoin) {
-            this.duration = duration;
-            this.toJoin   = toJoin;
-            setPriority(Thread.MIN_PRIORITY);
-        }
-
-        public synchronized void finish() {
-            this.duration = 0;
-            this.notifyAll();
-        }
-
-        public void run() {
-            synchronized (this) {
-                if (toJoin != null) {
-                    while (toJoin.isAlive()) {
-                        try { toJoin.join(); }
-                        catch (InterruptedException ie) { }
-                    }
-                    toJoin = null;
-                }
-
-                message.setText(temporaryMessage);
-
-                long lTime = System.currentTimeMillis();
-
-                while (duration > 0) {
-                    try {
-                        wait(duration);
-                    } catch(InterruptedException e) { }
-                    long cTime = System.currentTimeMillis();
-                    duration -= (cTime-lTime);
-                    lTime = cTime;
-                }
-                message.setText(mainMessage);
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/ThumbnailDialog.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/ThumbnailDialog.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/ThumbnailDialog.java
deleted file mode 100644
index 57d8a76..0000000
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/ThumbnailDialog.java
+++ /dev/null
@@ -1,394 +0,0 @@
-/*
-
-   Copyright 2001,2003  The Apache Software Foundation 
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
- */
-package org.apache.flex.forks.batik.apps.svgbrowser;
-
-import java.awt.BasicStroke;
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Frame;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.Shape;
-import java.awt.event.ComponentAdapter;
-import java.awt.event.ComponentEvent;
-import java.awt.event.MouseEvent;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.Dimension2D;
-import java.awt.geom.NoninvertibleTransformException;
-import java.awt.geom.Point2D;
-import java.awt.geom.Rectangle2D;
-import java.util.List;
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-import javax.swing.JDialog;
-import javax.swing.event.MouseInputAdapter;
-
-import org.apache.flex.forks.batik.bridge.ViewBox;
-import org.apache.flex.forks.batik.gvt.CanvasGraphicsNode;
-import org.apache.flex.forks.batik.gvt.CompositeGraphicsNode;
-import org.apache.flex.forks.batik.gvt.GraphicsNode;
-import org.apache.flex.forks.batik.swing.JSVGCanvas;
-import org.apache.flex.forks.batik.swing.gvt.GVTTreeRendererAdapter;
-import org.apache.flex.forks.batik.swing.gvt.GVTTreeRendererEvent;
-import org.apache.flex.forks.batik.swing.gvt.JGVTComponent;
-import org.apache.flex.forks.batik.swing.gvt.Overlay;
-import org.apache.flex.forks.batik.swing.svg.SVGDocumentLoaderAdapter;
-import org.apache.flex.forks.batik.swing.svg.SVGDocumentLoaderEvent;
-import org.apache.flex.forks.batik.util.gui.resource.ResourceManager;
-import org.apache.flex.forks.batik.util.SVGConstants;
-import org.w3c.flex.forks.dom.svg.SVGDocument;
-import org.w3c.flex.forks.dom.svg.SVGSVGElement;
-
-/**
- * This class represents a Dialog that displays a Thumbnail of the current SVG
- * document.
- *
- * @author <a href="mailto:tkormann@apache.org">Thierry Kormann</a>
- * @version $Id: ThumbnailDialog.java,v 1.15 2005/03/27 08:58:30 cam Exp $
- */
-public class ThumbnailDialog extends JDialog {
-
-    /**
-     * The resource file name
-     */
-    protected final static String RESOURCES =
-        "org.apache.flex.forks.batik.apps.svgbrowser.resources.ThumbnailDialog";
-
-    /**
-     * The resource bundle
-     */
-    protected static ResourceBundle bundle;
-
-    /**
-     * The resource manager
-     */
-    protected static ResourceManager resources;
-
-    static {
-        bundle = ResourceBundle.getBundle(RESOURCES, Locale.getDefault());
-        resources = new ResourceManager(bundle);
-    }
-
-    /** The canvas that owns the SVG document to display. */
-    protected JSVGCanvas svgCanvas;
-
-    /** The canvas that displays the thumbnail. */
-    protected JGVTComponent svgThumbnailCanvas;
-
-    /** A flag bit that indicates a document has been loaded. */
-    protected boolean documentChanged;
-
-    /** The overlay used to display the area of interest. */
-    protected AreaOfInterestOverlay overlay;
-
-    /** The overlay used to display the area of interest. */
-    protected AreaOfInterestListener aoiListener;
-
-    protected boolean interactionEnabled = true;
-
-    /**
-     * Constructs a new <tt>ThumbnailDialog</tt> for the specified canvas.
-     *
-     * @param owner the owner frame
-     * @param svgCanvas the canvas that owns the SVG document to display
-     */
-    public ThumbnailDialog(Frame owner, JSVGCanvas svgCanvas) {
-        super(owner, resources.getString("Dialog.title"));
-
-        addWindowListener(new ThumbnailListener());
-
-        // register listeners to maintain consistency
-        this.svgCanvas = svgCanvas;
-        svgCanvas.addGVTTreeRendererListener(new ThumbnailGVTListener());
-        svgCanvas.addSVGDocumentLoaderListener(new ThumbnailDocumentListener());        
-        svgCanvas.addComponentListener(new ThumbnailCanvasComponentListener());
-
-        // create the thumbnail
-        svgThumbnailCanvas = new JGVTComponent();
-        overlay = new AreaOfInterestOverlay();
-        svgThumbnailCanvas.getOverlays().add(overlay);
-        svgThumbnailCanvas.setPreferredSize(new Dimension(150, 150));
-        svgThumbnailCanvas.addComponentListener(new ThumbnailComponentListener());
-        aoiListener = new AreaOfInterestListener();
-        svgThumbnailCanvas.addMouseListener(aoiListener);
-        svgThumbnailCanvas.addMouseMotionListener(aoiListener);
-        getContentPane().add(svgThumbnailCanvas, BorderLayout.CENTER);
-    }
-
-    public void setInteractionEnabled(boolean b) {
-        if (b == interactionEnabled) return;
-        interactionEnabled = b;
-        if (b) {
-            svgThumbnailCanvas.addMouseListener      (aoiListener);
-            svgThumbnailCanvas.addMouseMotionListener(aoiListener);
-        } else {
-            svgThumbnailCanvas.removeMouseListener      (aoiListener);
-            svgThumbnailCanvas.removeMouseMotionListener(aoiListener);
-        }
-    }
-
-    public boolean getInteractionEnabled() {
-        return interactionEnabled;
-    }
-
-    /**
-     * Updates the thumbnail component.
-     */
-    protected void updateThumbnailGraphicsNode() {
-        svgThumbnailCanvas.setGraphicsNode(svgCanvas.getGraphicsNode());
-        updateThumbnailRenderingTransform();
-    }
-
-    protected CanvasGraphicsNode getCanvasGraphicsNode(GraphicsNode gn) {
-        if (!(gn instanceof CompositeGraphicsNode))
-            return null;
-        CompositeGraphicsNode cgn = (CompositeGraphicsNode)gn;
-        List children = cgn.getChildren();
-        if (children.size() == 0) 
-            return null;
-        gn = (GraphicsNode)cgn.getChildren().get(0);
-        if (!(gn instanceof CanvasGraphicsNode))
-            return null;
-        return (CanvasGraphicsNode)gn;
-    }
-
-    /**
-     * Updates the thumbnail component rendering transform.
-     */
-    protected void updateThumbnailRenderingTransform() {
-        SVGDocument svgDocument = svgCanvas.getSVGDocument();
-        if (svgDocument != null) {
-            SVGSVGElement elt = svgDocument.getRootElement();
-            Dimension dim = svgThumbnailCanvas.getSize();
-
-            String viewBox = elt.getAttributeNS
-                (null, SVGConstants.SVG_VIEW_BOX_ATTRIBUTE);
-
-            AffineTransform Tx;
-            if (viewBox.length() != 0) {
-                String aspectRatio = elt.getAttributeNS
-                    (null, SVGConstants.SVG_PRESERVE_ASPECT_RATIO_ATTRIBUTE);
-                Tx = ViewBox.getPreserveAspectRatioTransform
-                    (elt, viewBox, aspectRatio, dim.width, dim.height);
-            }else {
-                // no viewBox has been specified, create a scale transform
-                Dimension2D docSize = svgCanvas.getSVGDocumentSize();
-                double sx = dim.width / docSize.getWidth();
-                double sy = dim.height / docSize.getHeight();
-                double s = Math.min(sx, sy);
-                Tx = AffineTransform.getScaleInstance(s, s);
-            }
-
-            GraphicsNode gn = svgCanvas.getGraphicsNode();
-            CanvasGraphicsNode cgn = getCanvasGraphicsNode(gn);
-            if (cgn != null) {
-                AffineTransform vTx = cgn.getViewingTransform();
-                if ((vTx != null) && !vTx.isIdentity()) {
-                    try {
-                        AffineTransform invVTx = vTx.createInverse();
-                        Tx.concatenate(invVTx);
-                    } catch (NoninvertibleTransformException nite) {
-                        /* nothing */
-                    }
-                }
-            }
-
-            svgThumbnailCanvas.setRenderingTransform(Tx);
-            overlay.synchronizeAreaOfInterest();
-        }
-    }
-
-    /**
-     * Used to determine whether or not the GVT tree of the thumbnail has to be
-     * updated.
-     */
-    protected class ThumbnailDocumentListener extends SVGDocumentLoaderAdapter {
-
-        public void documentLoadingStarted(SVGDocumentLoaderEvent e) {
-            documentChanged = true;
-        }
-    }
-
-    /**
-     * Used to perform a translation using the area of interest.
-     */
-    protected class AreaOfInterestListener extends MouseInputAdapter {
-
-        protected int sx, sy;
-        protected boolean in;
-
-        public void mousePressed(MouseEvent evt) {
-            sx = evt.getX();
-            sy = evt.getY();
-            in = overlay.contains(sx, sy);
-            overlay.setPaintingTransform(new AffineTransform());
-        }
-
-        public void mouseDragged(MouseEvent evt) {
-            if (in) {
-                int dx = evt.getX() - sx;
-                int dy = evt.getY() - sy;
-                overlay.setPaintingTransform
-                    (AffineTransform.getTranslateInstance(dx, dy));
-                svgThumbnailCanvas.repaint();
-            }
-        }
-
-        public void mouseReleased(MouseEvent evt) {
-            if (in) {
-                in = false;
-
-                int dx = evt.getX() - sx;
-                int dy = evt.getY() - sy;
-                AffineTransform at = overlay.getOverlayTransform();
-                Point2D pt0 = new Point2D.Float(0, 0);
-                Point2D pt = new Point2D.Float(dx, dy);
-
-                try {
-                    at.inverseTransform(pt0, pt0);
-                    at.inverseTransform(pt, pt);
-                    double tx = pt0.getX() - pt.getX();
-                    double ty = pt0.getY() - pt.getY();
-                    at = svgCanvas.getRenderingTransform();
-                    at.preConcatenate
-                        (AffineTransform.getTranslateInstance(tx, ty));
-                    svgCanvas.setRenderingTransform(at);
-                } catch (NoninvertibleTransformException ex) { }
-            }
-        }
-    }
-
-    /**
-     * Used to update the overlay and/or the GVT tree of the thumbnail.
-     */
-    protected class ThumbnailGVTListener extends GVTTreeRendererAdapter {
-
-        public void gvtRenderingCompleted(GVTTreeRendererEvent e) {
-            if (documentChanged) {
-                updateThumbnailGraphicsNode();
-                documentChanged = false;
-            } else {
-                overlay.synchronizeAreaOfInterest();
-                svgThumbnailCanvas.repaint();
-            }
-        }
-
-        public void gvtRenderingCancelled(GVTTreeRendererEvent e) {
-	    if (documentChanged) {
-		svgThumbnailCanvas.setGraphicsNode(null);
-		svgThumbnailCanvas.setRenderingTransform(new AffineTransform());
-	    }
-        }
-
-        public void gvtRenderingFailed(GVTTreeRendererEvent e) {
-	    if (documentChanged) {
-		svgThumbnailCanvas.setGraphicsNode(null);
-		svgThumbnailCanvas.setRenderingTransform(new AffineTransform());
-	    }
-	}
-    }
-
-    /**
-     * Used the first time the thumbnail dialog is shown to make visible the
-     * current GVT tree being displayed by the original SVG component.
-     */
-    protected class ThumbnailListener extends WindowAdapter {
-
-        public void windowOpened(WindowEvent evt) {
-            updateThumbnailGraphicsNode();
-        }
-    }
-
-    /**
-     * Used to allow the SVG document being displayed by the thumbnail to be
-     * resized properly.
-     */
-    protected class ThumbnailComponentListener extends ComponentAdapter {
-
-        public void componentResized(ComponentEvent e) {
-            updateThumbnailRenderingTransform();
-        }
-    }
-
-    /**
-     * Used to allow the SVG document being displayed by the thumbnail to be
-     * resized properly when parent resizes.
-     */
-    protected class ThumbnailCanvasComponentListener extends ComponentAdapter {
-
-        public void componentResized(ComponentEvent e) {
-            updateThumbnailRenderingTransform();
-        }
-    }
-
-    /**
-     * An overlay that represents the current area of interest.
-     */
-    protected class AreaOfInterestOverlay implements Overlay {
-
-        protected Shape s;
-        protected AffineTransform at;
-        protected AffineTransform paintingTransform = new AffineTransform();
-
-        public boolean contains(int x, int y) {
-            return (s != null) ? s.contains(x, y) : false;
-        }
-
-        public AffineTransform getOverlayTransform() {
-            return at;
-        }
-
-        public void setPaintingTransform(AffineTransform rt) {
-            this.paintingTransform = rt;
-        }
-
-        public AffineTransform getPaintingTransform() {
-            return paintingTransform;
-        }
-
-        public void synchronizeAreaOfInterest() {
-            paintingTransform = new AffineTransform();
-            Dimension dim = svgCanvas.getSize();
-            s = new Rectangle2D.Float(0, 0, dim.width, dim.height);
-            try {
-		at = svgCanvas.getRenderingTransform().createInverse();
-		at.preConcatenate(svgThumbnailCanvas.getRenderingTransform());
-                s = at.createTransformedShape(s);
-            } catch (NoninvertibleTransformException ex) {
-                dim = svgThumbnailCanvas.getSize();
-                s = new Rectangle2D.Float(0, 0, dim.width, dim.height);
-            }
-        }
-
-        public void paint(Graphics g) {
-            if (s != null) {
-                Graphics2D g2d = (Graphics2D)g;
-                g2d.transform(paintingTransform);
-                g2d.setColor(new Color(255, 255, 255, 128));
-                g2d.fill(s);
-                g2d.setColor(Color.black);
-                g2d.setStroke(new BasicStroke());
-                g2d.draw(s);
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/TransformHistory.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/TransformHistory.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/TransformHistory.java
deleted file mode 100644
index 112bbfc..0000000
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/TransformHistory.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-
-   Copyright 2001,2003  The Apache Software Foundation 
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
- */
-package org.apache.flex.forks.batik.apps.svgbrowser;
-
-import java.awt.geom.AffineTransform;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * This class implements a transform history mechanism.
- *
- * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: TransformHistory.java,v 1.4 2004/08/18 07:12:27 vhardy Exp $
- */
-public class TransformHistory {
-    
-    /**
-     * The transform stack.
-     */
-    protected List transforms = new ArrayList();
-
-    /**
-     * The current position in the stack.
-     */
-    protected int position = -1;
-
-    /**
-     * Goes back of one position in the history.
-     * Assumes that <tt>canGoBack()</tt> is true.
-     */
-    public void back() {
-        position -= 2;
-    }
-
-    /**
-     * Whether it is possible to go back.
-     */
-    public boolean canGoBack() {
-        return position > 0;
-    }
-
-    /**
-     * Goes forward of one position in the history.
-     * Assumes that <tt>canGoForward()</tt> is true.
-     */
-    public void forward() {
-    }
-
-    /**
-     * Whether it is possible to go forward.
-     */
-    public boolean canGoForward() {
-        return position < transforms.size() - 1;
-    }
-
-    /**
-     * Returns the current transform.
-     */
-    public AffineTransform currentTransform() {
-        return (AffineTransform)transforms.get(position + 1);
-    }
-
-    /**
-     * Adds a transform to the history.
-     */
-    public void update(AffineTransform at) {
-        if (position < -1) {
-            position = -1;
-        }
-        if (++position < transforms.size()) {
-            if (!transforms.get(position).equals(at)) {
-                transforms = transforms.subList(0, position + 1);
-            }
-            transforms.set(position, at);
-        } else {
-            transforms.add(at);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/WindowsAltFileSystemView.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/WindowsAltFileSystemView.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/WindowsAltFileSystemView.java
deleted file mode 100644
index 804ab89..0000000
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/WindowsAltFileSystemView.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
-
-   Copyright 2002-2003  The Apache Software Foundation 
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
- */
-package org.apache.flex.forks.batik.apps.svgbrowser;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.util.Vector;
-
-import javax.swing.filechooser.FileSystemView;
-
-/**
- * Work around FileSystemView implementation bug on the Windows 
- * platform. See:
- *
- * <a href="http://forums.java.sun.com/thread.jsp?forum=38&thread=71491">
- * Using JFileChooser in WebStart-deployed application</a>
- *
- * @author <a href="mailto:vhardy@apache.org">Vincent Hardy</a>
- * @version $Id: WindowsAltFileSystemView.java,v 1.4 2004/08/18 07:12:27 vhardy Exp $
- */
-
-// This class is necessary due to an annoying bug on Windows NT where
-// instantiating a JFileChooser with the default FileSystemView will
-// cause a "drive A: not ready" error every time. I grabbed the
-// Windows FileSystemView impl from the 1.3 SDK and modified it so
-// as to not use java.io.File.listRoots() to get fileSystem roots.
-// java.io.File.listRoots() does a SecurityManager.checkRead() which
-// causes the OS to try to access drive A: even when there is no disk,
-// causing an annoying "abort, retry, ignore" popup message every time
-// we instantiate a JFileChooser!
-//
-// Instead of calling listRoots() we use a straightforward alternate
-// method of getting file system roots.
-
-class WindowsAltFileSystemView extends FileSystemView {
-    public static final String EXCEPTION_CONTAINING_DIR_NULL
-        = "AltFileSystemView.exception.containing.dir.null";
-
-    public static final String EXCEPTION_DIRECTORY_ALREADY_EXISTS
-        = "AltFileSystemView.exception.directory.already.exists";
-
-    public static final String NEW_FOLDER_NAME = 
-        " AltFileSystemView.new.folder.name";
-
-    public static final String FLOPPY_DRIVE = 
-        "AltFileSystemView.floppy.drive";
-
-    private static final Object[] noArgs = {};
-    private static final Class[] noArgTypes = {};
-    
-    private static Method listRootsMethod = null;
-    private static boolean listRootsMethodChecked = false;
-    
-    /**
-     * Returns true if the given file is a root.
-     */
-    public boolean isRoot(File f) {
-        if(!f.isAbsolute()) {
-            return false;
-        }
-        
-        String parentPath = f.getParent();
-        if(parentPath == null) {
-            return true;
-        } else {
-            File parent = new File(parentPath);
-            return parent.equals(f);
-        }
-    }
-    
-    /**
-     * creates a new folder with a default folder name.
-     */
-    public File createNewFolder(File containingDir) throws
-        IOException {
-        if(containingDir == null) {
-            throw new IOException(Resources.getString(EXCEPTION_CONTAINING_DIR_NULL));
-        }
-        File newFolder = null;
-        // Using NT's default folder name
-        newFolder = createFileObject(containingDir, 
-                                     Resources.getString(NEW_FOLDER_NAME));
-        int i = 2;
-        while (newFolder.exists() && (i < 100)) {
-            newFolder = createFileObject
-                (containingDir, Resources.getString(NEW_FOLDER_NAME) + " (" + i + ")");
-            i++;
-        }
-        
-        if(newFolder.exists()) {
-            throw new IOException
-                (Resources.formatMessage(EXCEPTION_DIRECTORY_ALREADY_EXISTS,
-                                         new Object[]{newFolder.getAbsolutePath()}));
-        } else {
-            newFolder.mkdirs();
-        }
-        
-        return newFolder;
-    }
-    
-    /**
-     * Returns whether a file is hidden or not. On Windows
-     * there is currently no way to get this information from
-     * io.File, therefore always return false.
-     */
-    public boolean isHiddenFile(File f) {
-        return false;
-    }
-    
-    /**
-     * Returns all root partitians on this system. On Windows, this
-     * will be the A: through Z: drives.
-     */
-    public File[] getRoots() {
-        
-        Vector rootsVector = new Vector();
-        
-        // Create the A: drive whether it is mounted or not
-        FileSystemRoot floppy = new FileSystemRoot(Resources.getString(FLOPPY_DRIVE)
-                                                   + "\\");
-        rootsVector.addElement(floppy);
-        
-        // Run through all possible mount points and check
-        // for their existance.
-        for (char c = 'C'; c <= 'Z'; c++) {
-            char device[] = {c, ':', '\\'};
-            String deviceName = new String(device);
-            File deviceFile = new FileSystemRoot(deviceName);
-            if (deviceFile != null && deviceFile.exists()) {
-                rootsVector.addElement(deviceFile);
-            }
-        }
-        File[] roots = new File[rootsVector.size()];
-        rootsVector.copyInto(roots);
-        return roots;
-    }
-    
-    class FileSystemRoot extends File {
-        public FileSystemRoot(File f) {
-            super(f, "");
-        }
-        
-        public FileSystemRoot(String s) {
-            super(s);
-        }
-        
-        public boolean isDirectory() {
-            return true;
-        }
-    }
-    
-}
-

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/XMLInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/XMLInputHandler.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/XMLInputHandler.java
deleted file mode 100644
index c994252..0000000
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/XMLInputHandler.java
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
-
-   Copyright 2002-2003  The Apache Software Foundation 
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
- */
-package org.apache.flex.forks.batik.apps.svgbrowser;
-
-import java.io.File;
-import java.io.StringReader;
-import java.io.StringWriter;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.URIResolver;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-import org.apache.flex.forks.batik.dom.svg.SAXSVGDocumentFactory;
-import org.apache.flex.forks.batik.dom.svg.SVGDOMImplementation;
-import org.apache.flex.forks.batik.dom.util.DOMUtilities;
-import org.apache.flex.forks.batik.dom.util.HashTable;
-import org.apache.flex.forks.batik.util.ParsedURL;
-import org.apache.flex.forks.batik.util.SVGConstants;
-import org.apache.flex.forks.batik.util.XMLResourceDescriptor;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.ProcessingInstruction;
-import org.w3c.flex.forks.dom.svg.SVGDocument;
-
-/**
- * A <tt>SquiggleInputHandler</tt> that handles XSLT transformable
- * XML documents.
- * This implementation of the <tt>SquiggleInputHandler</tt> class
- * handles XML files by looking for the first
- * &lt;?xml-stylesheet ... ?&gt; processing instruction referencing
- * an xsl document. In case there is one, the transform is applied to the 
- * input XML file and the handler checks that the result is an 
- * SVG document with an SVG root.
- *
- * @author <a mailto="vincent.hardy@sun.com">Vincent Hardy</a>
- * @version $Id: XMLInputHandler.java,v 1.9 2005/03/27 08:58:30 cam Exp $
- */
-public class XMLInputHandler implements SquiggleInputHandler {
-    public static final String[] XVG_MIME_TYPES = 
-    { "image/xml+xsl+svg" };
-
-    public static final String[] XVG_FILE_EXTENSIONS =
-    { ".xml", ".xsl" };
-
-    public static final String ERROR_NO_XML_STYLESHEET_PROCESSING_INSTRUCTION
-        = "XMLInputHandler.error.no.xml.stylesheet.processing.instruction";
-
-    public static final String ERROR_TRANSFORM_OUTPUT_NOT_SVG
-        = "XMLInputHandler.error.transform.output.not.svg";
-
-    public static final String ERROR_TRANSFORM_PRODUCED_NO_CONTENT
-        = "XMLInputHandler.error.transform.produced.no.content";
-
-    public static final String ERROR_TRANSFORM_OUTPUT_WRONG_NS
-        = "XMLInputHandler.error.transform.output.wrong.ns";
-
-    public static final String ERROR_RESULT_GENERATED_EXCEPTION 
-        = "XMLInputHandler.error.result.generated.exception";
-
-    public static final String XSL_PROCESSING_INSTRUCTION_TYPE
-        = "text/xsl";
-
-    public static final String PSEUDO_ATTRIBUTE_TYPE
-        = "type";
-
-    public static final String PSEUDO_ATTRIBUTE_HREF
-        = "href";
-
-    /**
-     * Returns the list of mime types handled by this handler.
-     */
-    public String[] getHandledMimeTypes() {
-        return XVG_MIME_TYPES;
-    }
-    
-    /**
-     * Returns the list of file extensions handled by this handler
-     */
-    public String[] getHandledExtensions() {
-        return XVG_FILE_EXTENSIONS;
-    }
-
-    /**
-     * Returns a description for this handler
-     */
-    public String getDescription() {
-        return "";
-    }
-
-    /**
-     * Returns true if the input file can be handled by the handler
-     */
-    public boolean accept(File f) {
-        return f.isFile() && accept(f.getPath());
-    }
-
-    /**
-     * Returns true if the input URI can be handled by the handler
-     */
-    public boolean accept(ParsedURL purl) {
-        if (purl == null) {
-            return false;
-        }
-
-        // <!> Note: this should be improved to rely on Mime Type 
-        //     when the http protocol is used. This will use the 
-        //     ParsedURL.getContentType method.
-
-        String path = purl.getPath();        
-        return accept(path);
-    }
-
-    /**
-     * Return true if the resource with the given path can 
-     * be handled.
-     */
-    public boolean accept(String path) {
-        if (path == null) {
-            return false;
-        }
-
-        for (int i=0; i<XVG_FILE_EXTENSIONS.length; i++) {
-            if (path.endsWith(XVG_FILE_EXTENSIONS[i])) {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * Handles the given input for the given JSVGViewerFrame
-     */
-    public void handle(ParsedURL purl, JSVGViewerFrame svgViewerFrame) throws Exception {
-        String uri = purl.toString();
-
-        TransformerFactory tFactory 
-            = TransformerFactory.newInstance();
-        
-        // First, load the input XML document into a generic DOM tree
-        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-        dbf.setValidating(false);
-        dbf.setNamespaceAware(true);
-
-        DocumentBuilder db = dbf.newDocumentBuilder();
-
-        Document inDoc = db.parse(uri);
-       
-        // Now, look for <?xml-stylesheet ...?> processing instructions
-        String xslStyleSheetURI 
-            = extractXSLProcessingInstruction(inDoc);
-        
-        if (xslStyleSheetURI == null) {
-            // Assume that the input file is a literal result template
-            xslStyleSheetURI = uri;
-        }
-
-        ParsedURL parsedXSLStyleSheetURI 
-            = new ParsedURL(uri, xslStyleSheetURI);
-
-        Transformer transformer
-            = tFactory.newTransformer
-            (new StreamSource(parsedXSLStyleSheetURI.toString()));
-
-        // Set the URIResolver to properly handle document() and xsl:include
-        transformer.setURIResolver
-            (new DocumentURIResolver(parsedXSLStyleSheetURI.toString()));
-
-        // Now, apply the transformation to the input document.
-        //
-        // <!> Due to issues with namespaces, the transform creates the 
-        //     result in a stream which is parsed. This is sub-optimal
-        //     but this was the only solution found to be able to 
-        //     generate content in the proper namespaces.
-        //
-        // SVGOMDocument outDoc = 
-        //   (SVGOMDocument)impl.createDocument(svgNS, "svg", null);
-        // outDoc.setURLObject(new URL(uri));
-        // transformer.transform
-        //     (new DOMSource(inDoc),
-        //     new DOMResult(outDoc.getDocumentElement()));
-        //
-        StringWriter sw = new StringWriter();
-        StreamResult result = new StreamResult(sw);
-        transformer.transform(new DOMSource(inDoc),
-                              result);
-        sw.flush();
-        sw.close();
-
-        String parser = XMLResourceDescriptor.getXMLParserClassName();
-        SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
-        SVGDocument outDoc = null;
-
-        try {
-            outDoc = f.createSVGDocument
-                (uri, new StringReader(sw.toString()));
-        } catch (Exception e) {
-            System.err.println("======================================");
-            System.err.println(sw.toString());
-            System.err.println("======================================");
-            
-            throw new IllegalArgumentException
-                (Resources.getString(ERROR_RESULT_GENERATED_EXCEPTION));
-        }
-
-        // Patch the result tree to go under the root node
-        // checkAndPatch(outDoc);
-        
-        svgViewerFrame.getJSVGCanvas().setSVGDocument(outDoc);
-        svgViewerFrame.setSVGDocument(outDoc,
-                                      uri,
-                                      outDoc.getTitle());
-    }
-
-    /**
-     * This method checks that the generated content is SVG.
-     *
-     * This method accounts for the fact that the root svg's first child
-     * is the result of the transform. It moves all its children under the root
-     * and sets the attributes
-     */
-    protected void checkAndPatch(Document doc) {
-        Element root = doc.getDocumentElement();
-        Node realRoot = root.getFirstChild();
-        String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
-
-        if (realRoot == null) {
-            throw new IllegalArgumentException
-                (Resources.getString(ERROR_TRANSFORM_PRODUCED_NO_CONTENT));
-        }
-
-        if (realRoot.getNodeType() != Node.ELEMENT_NODE
-            || 
-            !SVGConstants.SVG_SVG_TAG.equals(realRoot.getLocalName())) {
-            throw new IllegalArgumentException
-                (Resources.getString(ERROR_TRANSFORM_OUTPUT_NOT_SVG));
-        }
-
-        if (!svgNS.equals(realRoot.getNamespaceURI())) {
-            throw new IllegalArgumentException
-                (Resources.getString(ERROR_TRANSFORM_OUTPUT_WRONG_NS));
-        }
-
-        Node child = realRoot.getFirstChild();
-        while ( child != null ) {
-            root.appendChild(child);
-            child = realRoot.getFirstChild();
-        }
-
-        NamedNodeMap attrs = realRoot.getAttributes();
-        int n = attrs.getLength();
-        for (int i=0; i<n; i++) {
-            root.setAttributeNode((Attr)attrs.item(i));
-        }
-
-        root.removeChild(realRoot);
-    }
-
-    /**
-     * Extracts the first XSL processing instruction from the input 
-     * XML document. 
-     */
-    protected String extractXSLProcessingInstruction(Document doc) {
-        Node child = doc.getFirstChild();
-        while (child != null) {
-            if (child.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) {
-                ProcessingInstruction pi 
-                    = (ProcessingInstruction)child;
-                
-                HashTable table = new HashTable();
-                DOMUtilities.parseStyleSheetPIData(pi.getData(),
-                                                   table);
-
-                Object type = table.get(PSEUDO_ATTRIBUTE_TYPE);
-                if (XSL_PROCESSING_INSTRUCTION_TYPE.equals(type)) {
-                    Object href = table.get(PSEUDO_ATTRIBUTE_HREF);
-                    if (href != null) {
-                        return href.toString();
-                    } else {
-                        return null;
-                    }
-                }
-            }
-            child = child.getNextSibling();
-        }
-
-        return null;
-    }
-
-    /**
-     * Implements the URIResolver interface so that relative urls used in 
-     * transformations are resolved properly.
-     */
-    public class DocumentURIResolver implements URIResolver {
-        String documentURI;
-
-        public DocumentURIResolver(String documentURI) {
-            this.documentURI = documentURI;
-        }
-
-        public Source resolve(String href, String base) {
-            if (base == null || "".equals(base)) {
-                base = documentURI;
-            }
-
-            ParsedURL purl = new ParsedURL(base, href);
-
-            return new StreamSource(purl.toString());
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/XMLPreferenceManager.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/XMLPreferenceManager.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/XMLPreferenceManager.java
deleted file mode 100644
index 543647c..0000000
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgbrowser/XMLPreferenceManager.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
-
-   Copyright 1999-2003  The Apache Software Foundation 
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-*/
-
-package org.apache.flex.forks.batik.apps.svgbrowser;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-
-import org.apache.flex.forks.batik.dom.GenericDOMImplementation;
-import org.apache.flex.forks.batik.dom.util.DOMUtilities;
-import org.apache.flex.forks.batik.dom.util.DocumentFactory;
-import org.apache.flex.forks.batik.dom.util.SAXDocumentFactory;
-import org.apache.flex.forks.batik.util.PreferenceManager;
-import org.apache.flex.forks.batik.util.XMLResourceDescriptor;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * An extension of {@link PreferenceManager} which store the preference
- * in XML.
- *
- * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: XMLPreferenceManager.java,v 1.6 2004/10/30 18:38:04 deweese Exp $
- */
-public class XMLPreferenceManager extends PreferenceManager {
-    
-    /**
-     * The XML parser
-     */
-    protected String xmlParserClassName;
-
-    /**
-     * The XML encoding used to store properties
-     */
-    public static final String PREFERENCE_ENCODING = "8859_1";
-
-    /**
-     * Creates a preference manager.
-     * @param prefFileName the name of the preference file.
-     */
-    public XMLPreferenceManager(String prefFileName){
-        this(prefFileName, null, 
-             XMLResourceDescriptor.getXMLParserClassName());
-    }
-
-    /**
-     * Creates a preference manager.
-     * @param prefFileName the name of the preference file.
-     * @param defaults where to get defaults value if the value is
-     * not specified in the file.
-     */
-    public XMLPreferenceManager(String prefFileName,
-                                Map defaults){
-        this(prefFileName, defaults, 
-             XMLResourceDescriptor.getXMLParserClassName());
-    }
-
-    /**
-     * Creates a preference manager.
-     * @param prefFileName the name of the preference file.
-     * @param parser The XML parser class name.
-     */
-    public XMLPreferenceManager(String prefFileName, String parser) {
-        this(prefFileName, null, parser);
-    }
-
-    /**
-     * Creates a preference manager with a default values
-     * initialization map.
-     * @param prefFileName the name of the preference file.
-     * @param defaults where to get defaults value if the value is
-     * not specified in the file.
-     * @param parser The XML parser class name.
-     */
-    public XMLPreferenceManager(String prefFileName, Map defaults, String parser) {
-        super(prefFileName, defaults);
-        internal = new XMLProperties();
-        xmlParserClassName = parser;
-    }
-
-    /**
-     * To store the preferences.
-     */
-    protected class XMLProperties extends Properties {
-
-        /**
-         * Reads a property list (key and element pairs) from the input stream.
-         * The stream is assumed to be using the ISO 8859-1 character encoding.
-         */
-        public synchronized void load(InputStream is) throws IOException {
-            BufferedReader r;
-            r = new BufferedReader(new InputStreamReader(is, PREFERENCE_ENCODING));
-            DocumentFactory df = new SAXDocumentFactory
-                (GenericDOMImplementation.getDOMImplementation(),
-                 xmlParserClassName);
-            Document doc = df.createDocument("http://xml.apache.org/batik/preferences",
-                                             "preferences",
-                                             null,
-                                             r);
-            Element elt = doc.getDocumentElement();
-            for (Node n = elt.getFirstChild(); n != null; n = n.getNextSibling()) {
-                if (n.getNodeType() == Node.ELEMENT_NODE) {
-                    if (n.getNodeName().equals("property")) {
-                        String name = ((Element)n).getAttributeNS(null, "name");
-                        
-                        StringBuffer cont = new StringBuffer();
-                        for (Node c = n.getFirstChild();
-                             c != null;
-                             c = c.getNextSibling()) {
-                            if (c.getNodeType() == Node.TEXT_NODE) {
-                                cont.append(c.getNodeValue());
-                            } else {
-                                break;
-                            }
-                        }
-                        String val = cont.toString();
-                        put(name, val);
-                    }
-                }
-            }
-        }
-
-        /**
-         * Writes this property list (key and element pairs) in this
-         * <code>Properties</code> table to the output stream in a format suitable
-         * for loading into a <code>Properties</code> table using the
-         * <code>load</code> method.
-         * The stream is written using the ISO 8859-1 character encoding.
-         */
-        public synchronized void store(OutputStream os, String header)
-            throws IOException {
-            BufferedWriter w;
-            w = new BufferedWriter(new OutputStreamWriter(os, PREFERENCE_ENCODING));
-
-            Map m = new HashMap();
-            enumerate(m);
-
-            w.write("<preferences xmlns=\"http://xml.apache.org/batik/preferences\">\n");
-
-            Iterator it = m.keySet().iterator();
-            while (it.hasNext()) {
-                String n = (String)it.next();
-                String v = (String)m.get(n);
-                
-                w.write("<property name=\"" + n + "\">");
-                w.write(DOMUtilities.contentToString(v));
-                w.write("</property>\n");
-            }
-
-            w.write("</preferences>\n");
-            w.flush();
-        }
-
-        /**
-         * Enumerates all key/value pairs in the specified m.
-         * @param m the map
-         */
-        private synchronized void enumerate(Map m) {
-            if (defaults != null) {
-                Iterator it = m.keySet().iterator();
-                while (it.hasNext()) {
-                    Object k = it.next();
-                    m.put(k, defaults.get(k));
-                }
-            }
-            Iterator it = keySet().iterator();
-            while (it.hasNext()) {
-                Object k = it.next();
-                m.put(k, get(k));
-            }
-        }
-        
-    }
-}

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgpp/Main.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgpp/Main.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgpp/Main.java
deleted file mode 100644
index e71d240..0000000
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/svgpp/Main.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
-
-   Copyright 1999-2003  The Apache Software Foundation 
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-*/
-
-package org.apache.flex.forks.batik.apps.svgpp;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.flex.forks.batik.i18n.LocalizableSupport;
-import org.apache.flex.forks.batik.transcoder.Transcoder;
-import org.apache.flex.forks.batik.transcoder.TranscoderInput;
-import org.apache.flex.forks.batik.transcoder.TranscoderOutput;
-import org.apache.flex.forks.batik.transcoder.svg2svg.SVGTranscoder;
-
-/**
- * This class is the main class of the svgpp application.
- * <p>
- * svgpp is a pretty-printer for SVG source files.
- *
- * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: Main.java,v 1.8 2004/10/30 18:38:04 deweese Exp $
- */
-public class Main {
-
-    /**
-     * The application main method.
-     * @param args The command-line arguments.
-     */
-    public static void main(String[] args) {
-        new Main(args).run();
-    }
-
-    /**
-     * The default resource bundle base name.
-     */
-    public final static String BUNDLE_CLASSNAME =
-	"org.apache.flex.forks.batik.apps.svgpp.resources.Messages";
-
-    /**
-     * The localizable support.
-     */
-    protected static LocalizableSupport localizableSupport =
-        new LocalizableSupport(BUNDLE_CLASSNAME, Main.class.getClassLoader());
-
-    /**
-     * The arguments.
-     */
-    protected String[] arguments;
-
-    /**
-     * The current index.
-     */
-    protected int index;
-
-    /**
-     * The option handlers.
-     */
-    protected Map handlers = new HashMap();
-    {
-        handlers.put("-doctype", new DoctypeHandler());
-        handlers.put("-doc-width", new DocWidthHandler());
-        handlers.put("-newline", new NewlineHandler());
-        handlers.put("-public-id", new PublicIdHandler());
-        handlers.put("-no-format", new NoFormatHandler());
-        handlers.put("-system-id", new SystemIdHandler());
-        handlers.put("-tab-width", new TabWidthHandler());
-        handlers.put("-xml-decl", new XMLDeclHandler());
-    }
-
-    /**
-     * The transcoder.
-     */
-    protected Transcoder transcoder = new SVGTranscoder();
-
-    /**
-     * Initializes the application.
-     * @param args The command-line arguments.
-     */
-    public Main(String[] args) {
-        arguments = args;
-    }
-
-    /**
-     * Runs the pretty printer.
-     */
-    public void run() {
-        if (arguments.length == 0) {
-            printUsage();
-            return;
-        }
-        try {
-            for (;;) {
-                OptionHandler oh = (OptionHandler)handlers.get(arguments[index]);
-                if (oh == null) {
-                    break;
-                }
-                oh.handleOption();
-            }
-            TranscoderInput in;
-            in = new TranscoderInput(new java.io.FileReader(arguments[index++]));
-            TranscoderOutput out;
-            if (index < arguments.length) {
-                out = new TranscoderOutput(new java.io.FileWriter(arguments[index]));
-            } else {
-                out = new TranscoderOutput(new java.io.OutputStreamWriter(System.out));
-            }
-            transcoder.transcode(in, out);
-        } catch (Exception e) {
-            e.printStackTrace();
-            printUsage();
-        }
-    }
-
-    /**
-     * Prints the command usage.
-     */
-    protected void printUsage() {
-        printHeader();
-        System.out.println(localizableSupport.formatMessage("syntax", null));
-        System.out.println();
-        System.out.println(localizableSupport.formatMessage("options", null));
-        Iterator it = handlers.keySet().iterator();
-        while (it.hasNext()) {
-            String s = (String)it.next();
-            System.out.println(((OptionHandler)handlers.get(s)).getDescription());
-        }
-    }
-
-    /**
-     * Prints the command header.
-     */
-    protected void printHeader() {
-        System.out.println(localizableSupport.formatMessage("header", null));
-    }
-
-    /**
-     * This interface represents an option handler.
-     */
-    protected interface OptionHandler {
-        /**
-         * Handles the current option.
-         */
-        void handleOption();
-
-        /**
-         * Returns the option description.
-         */
-        String getDescription();
-    }
-
-    /**
-     * To handle the '-doctype' option.
-     */
-    protected class DoctypeHandler implements OptionHandler {
-        protected final Map values = new HashMap(6);
-        {
-            values.put("remove", SVGTranscoder.VALUE_DOCTYPE_REMOVE);
-            values.put("change", SVGTranscoder.VALUE_DOCTYPE_CHANGE);
-        }
-        public void handleOption() {
-            index++;
-            if (index >= arguments.length) {
-                throw new IllegalArgumentException();
-            }
-            Object val = values.get(arguments[index++]);
-            if (val == null) {
-                throw new IllegalArgumentException();
-            }
-            transcoder.addTranscodingHint(SVGTranscoder.KEY_DOCTYPE, val);
-        }
-
-        public String getDescription() {
-            return localizableSupport.formatMessage("doctype.description", null);
-        }
-    }
-
-    /**
-     * To handle the '-newline' option.
-     */
-    protected class NewlineHandler implements OptionHandler {
-        protected final Map values = new HashMap(6);
-        {
-            values.put("cr",    SVGTranscoder.VALUE_NEWLINE_CR);
-            values.put("cr-lf", SVGTranscoder.VALUE_NEWLINE_CR_LF);
-            values.put("lf",    SVGTranscoder.VALUE_NEWLINE_LF);
-        }
-        public void handleOption() {
-            index++;
-            if (index >= arguments.length) {
-                throw new IllegalArgumentException();
-            }
-            Object val = values.get(arguments[index++]);
-            if (val == null) {
-                throw new IllegalArgumentException();
-            }
-            transcoder.addTranscodingHint(SVGTranscoder.KEY_NEWLINE, val);
-        }
-
-        public String getDescription() {
-            return localizableSupport.formatMessage("newline.description", null);
-        }
-    }
-
-    /**
-     * To handle the '-no-format' option.
-     */
-    protected class NoFormatHandler implements OptionHandler {
-        public void handleOption() {
-            index++;
-            transcoder.addTranscodingHint(SVGTranscoder.KEY_FORMAT, Boolean.FALSE);
-        }
-
-        public String getDescription() {
-            return localizableSupport.formatMessage("no-format.description", null);
-        }
-    }
-
-    /**
-     * To handle the '-public-id' option.
-     */
-    protected class PublicIdHandler implements OptionHandler {
-        public void handleOption() {
-            index++;
-            if (index >= arguments.length) {
-                throw new IllegalArgumentException();
-            }
-            String s = arguments[index++];
-            transcoder.addTranscodingHint(SVGTranscoder.KEY_PUBLIC_ID, s);
-        }
-
-        public String getDescription() {
-            return localizableSupport.formatMessage("public-id.description", null);
-        }
-    }
-
-    /**
-     * To handle the '-system-id' option.
-     */
-    protected class SystemIdHandler implements OptionHandler {
-        public void handleOption() {
-            index++;
-            if (index >= arguments.length) {
-                throw new IllegalArgumentException();
-            }
-            String s = arguments[index++];
-            transcoder.addTranscodingHint(SVGTranscoder.KEY_SYSTEM_ID, s);
-        }
-
-        public String getDescription() {
-            return localizableSupport.formatMessage("system-id.description", null);
-        }
-    }
-
-    /**
-     * To handle the '-xml-decl' option.
-     */
-    protected class XMLDeclHandler implements OptionHandler {
-        public void handleOption() {
-            index++;
-            if (index >= arguments.length) {
-                throw new IllegalArgumentException();
-            }
-            String s = arguments[index++];
-            transcoder.addTranscodingHint(SVGTranscoder.KEY_XML_DECLARATION, s);
-        }
-
-        public String getDescription() {
-            return localizableSupport.formatMessage("xml-decl.description", null);
-        }
-    }
-
-    /**
-     * To handle the '-tab-width' option.
-     */
-    protected class TabWidthHandler implements OptionHandler {
-        public void handleOption() {
-            index++;
-            if (index >= arguments.length) {
-                throw new IllegalArgumentException();
-            }
-            transcoder.addTranscodingHint(SVGTranscoder.KEY_TABULATION_WIDTH,
-                                          new Integer(arguments[index++]));
-        }
-
-        public String getDescription() {
-            return localizableSupport.formatMessage("tab-width.description", null);
-        }
-    }
-
-    /**
-     * To handle the '-doc-width' option.
-     */
-    protected class DocWidthHandler implements OptionHandler {
-        public void handleOption() {
-            index++;
-            if (index >= arguments.length) {
-                throw new IllegalArgumentException();
-            }
-            transcoder.addTranscodingHint(SVGTranscoder.KEY_DOCUMENT_WIDTH,
-                                          new Integer(arguments[index++]));
-        }
-
-        public String getDescription() {
-            return localizableSupport.formatMessage("doc-width.description", null);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f690ea2f/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/ttf2svg/Main.java
----------------------------------------------------------------------
diff --git a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/ttf2svg/Main.java b/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/ttf2svg/Main.java
deleted file mode 100644
index 4716677..0000000
--- a/modules/thirdparty/batik/sources/org/apache/flex/forks/batik/apps/ttf2svg/Main.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-
-   Copyright 1999-2003  The Apache Software Foundation 
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-*/
-
-package org.apache.flex.forks.batik.apps.ttf2svg;
-
-import org.apache.flex.forks.batik.svggen.font.SVGFont;
-
-/**
- * This test runs the True Type Font to SVG Font converter, the 
- * tool that allows some characters from a font to be converted
- * to the SVG Font format.
- *
- * @author <a href="mailto:vhardy@apache.org">Vincent Hardy</a>
- * @version $Id: Main.java,v 1.4 2004/10/30 18:38:04 deweese Exp $
- */
-public class Main {
-    public static void main(String[] args){
-        SVGFont.main(args);
-    }
-}
-