Added: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/TextNode.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/TextNode.java?rev=1647590&view=auto
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/TextNode.java
 (added)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/TextNode.java
 Tue Dec 23 15:10:45 2014
@@ -0,0 +1,543 @@
+/*
+
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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.batik.bridge;
+
+import java.awt.Graphics2D;
+import java.awt.Shape;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.GeneralPath;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+import java.text.AttributedCharacterIterator;
+import java.text.CharacterIterator;
+import java.util.List;
+
+import org.apache.batik.gvt.AbstractGraphicsNode;
+import org.apache.batik.gvt.Selectable;
+import org.apache.batik.gvt.text.AttributedCharacterSpanIterator;
+import org.apache.batik.gvt.text.GVTAttributedCharacterIterator;
+import org.apache.batik.gvt.text.TextPaintInfo;
+
+/**
+ * A graphics node that represents text.
+ *
+ * @author <a href="mailto:thierry.korm...@sophia.inria.fr";>Thierry Kormann</a>
+ * @version $Id$
+ */
+public class TextNode extends AbstractGraphicsNode implements Selectable {
+
+    public static final 
+        AttributedCharacterIterator.Attribute PAINT_INFO =
+        GVTAttributedCharacterIterator.TextAttribute.PAINT_INFO;
+
+    /**
+     * Location of this text node (inherited, independent of explicit
+     * X and Y attributes applied to children).
+     */
+    protected Point2D location = new Point2D.Float(0, 0);
+
+    /**
+     * Attributed Character Iterator describing the text
+     */
+    protected AttributedCharacterIterator aci;
+
+    /**
+     * The text of this <code>TextNode</code>.
+     */
+    protected String text;
+
+    /**
+     * The begin mark.
+     */
+    protected Mark beginMark = null;
+
+    /**
+     * The end mark.
+     */
+    protected Mark endMark = null;
+
+    /**
+     * The list of text runs.
+     */
+    protected List textRuns;
+
+    /**
+     * The text painter used to display the text of this text node.
+     */
+    protected TextPainter textPainter = StrokingTextPainter.getInstance();
+
+    /**
+     * Internal Cache: Bounds for this text node, without taking any of the
+     * rendering attributes (e.g., stroke) into account
+     */
+    private Rectangle2D geometryBounds;
+
+    /**
+     * Internal Cache: Primitive Bounds.
+     */
+    private Rectangle2D primitiveBounds;
+
+    /**
+     * Internal Cache: the outline.
+     */
+    private Shape outline;
+
+    /**
+     * Constructs a new empty <code>TextNode</code>.
+     */
+    public TextNode() {
+    }
+
+    /**
+     * Sets the text painter of this text node. If the specified text
+     * painter is null, this text node will use its default text
+     * painter (StrokingTextPainter.getInstance()).
+     *
+     * @param textPainter the text painter to use
+     */
+    public void setTextPainter(TextPainter textPainter) {
+        if (textPainter == null) {
+            this.textPainter = StrokingTextPainter.getInstance();
+        } else {
+            this.textPainter = textPainter;
+        }
+    }
+
+    /**
+     * Returns the text painter of this text node.
+     */
+    public TextPainter getTextPainter() {
+        return textPainter;
+    }
+
+    /**
+     * Returns a list of text runs.
+     */
+    public List getTextRuns() {
+        return textRuns;
+    }
+
+    /**
+     * Sets the list of text runs of this text node.
+     *
+     * @param textRuns the new list of text runs
+     */
+    public void setTextRuns(List textRuns) {
+        this.textRuns = textRuns;
+    }
+
+    /**
+     * Returns the text of this <code>TextNode</code> as a string.
+     */
+    public String getText() {
+
+        if (text != null) 
+            return text;
+
+        if (aci == null) {
+            text = "";
+        } else {
+            StringBuffer buf = new StringBuffer(aci.getEndIndex());
+            for (char c = aci.first();
+                 c != CharacterIterator.DONE;
+                 c = aci.next()) {
+                buf.append(c);
+            }
+            text = buf.toString();
+        }
+        return text;
+    }
+
+    /**
+     * Sets the location of this text node.
+     *
+     * @param newLocation the new location of this text node
+     */
+    public void setLocation(Point2D newLocation){
+        fireGraphicsNodeChangeStarted();
+        invalidateGeometryCache();
+        this.location = newLocation;
+        fireGraphicsNodeChangeCompleted();
+    }
+
+    /**
+     * Returns the location of this text node.
+     *
+     * @return the location of this text node
+     */
+    public Point2D getLocation(){
+        return location;
+    }
+
+    public void swapTextPaintInfo(TextPaintInfo newInfo, 
+                                  TextPaintInfo oldInfo) {
+        fireGraphicsNodeChangeStarted();
+        invalidateGeometryCache();
+        oldInfo.set(newInfo);
+        fireGraphicsNodeChangeCompleted();
+    }
+                                  
+
+    /**
+     * Sets the attributed character iterator of this text node.
+     *
+     * @param newAci the new attributed character iterator
+     */
+    public void setAttributedCharacterIterator
+        (AttributedCharacterIterator newAci) {
+        fireGraphicsNodeChangeStarted();
+        invalidateGeometryCache();
+        this.aci = newAci;
+        text = null;
+        textRuns = null;
+        fireGraphicsNodeChangeCompleted();
+    }
+
+    /**
+     * Returns the attributed character iterator of this text node.
+     *
+     * @return the attributed character iterator
+     */
+    public AttributedCharacterIterator getAttributedCharacterIterator(){
+        return aci;
+    }
+
+    //
+    // Geometric methods
+    //
+
+    /**
+     * Invalidates this <code>TextNode</code>. This node and all its ancestors 
have
+     * been informed that all its cached values related to its bounds must be
+     * recomputed.
+     */
+    protected void invalidateGeometryCache() {
+        super.invalidateGeometryCache();
+        primitiveBounds = null;
+        geometryBounds = null;
+        outline = null;
+    }
+
+    /**
+     * Returns the bounds of the area covered by this node's primitive paint.
+     */
+    public Rectangle2D getPrimitiveBounds(){
+        if (primitiveBounds == null) {
+            if (aci != null) {
+                primitiveBounds = textPainter.getBounds2D(this);
+            }
+        }
+        return primitiveBounds;
+    }
+
+    /**
+     * Returns the bounds of the area covered by this node, without
+     * taking any of its rendering attribute into account. That is,
+     * exclusive of any clipping, masking, filtering or stroking, for
+     * example.
+     */
+    public Rectangle2D getGeometryBounds(){
+        if (geometryBounds == null){
+            if (aci != null) {
+                geometryBounds = textPainter.getGeometryBounds(this);
+            }
+        }
+        return geometryBounds;
+    }
+
+    /**
+     * Returns the bounds of the sensitive area covered by this node,
+     * This includes the stroked area but does not include the effects
+     * of clipping, masking or filtering.
+     */
+    public Rectangle2D getSensitiveBounds() {
+        return getGeometryBounds();
+    }
+
+    /**
+     * Returns the outline of this node.
+     */
+    public Shape getOutline() {
+        if (outline == null) {
+            if (aci != null) {
+                outline = textPainter.getOutline(this);
+            }
+        }
+        return outline;
+    }
+
+    /**
+     * Return the marker for the character at index in this nodes
+     * AttributedCharacterIterator.  Before Char indicates if the
+     * Marker should be considered before or after char.
+     */
+    public Mark getMarkerForChar(int index, boolean beforeChar) {
+        return textPainter.getMark(this, index, beforeChar);
+    }
+
+    //
+    // Selection methods
+    //
+    public void setSelection(Mark begin, Mark end) {
+        if ((begin.getTextNode() != this) ||
+            (end.getTextNode() != this))
+            throw new Error("Markers not from this TextNode");
+
+        beginMark = begin;
+        endMark   = end;
+    }
+
+    /**
+     * Initializes the current selection to begin with the character at (x, y).
+     * @param x the x coordinate of the start of the selection
+     * @param y the y coordinate of the start of the selection
+     */
+    public boolean selectAt(double x, double y) {
+        beginMark = textPainter.selectAt(x, y, this);
+        return true; // assume this always changes selection, for now.
+    }
+
+    /**
+     * Extends the current selection to the character at (x, y).
+     * @param x the x coordinate of the end of the selection
+     * @param y the y coordinate of the end of the selection
+     */
+    public boolean selectTo(double x, double y) {
+        Mark tmpMark = textPainter.selectTo(x, y, beginMark);
+        if (tmpMark == null)
+            return false;
+        if (tmpMark != endMark) {
+            endMark = tmpMark;
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * Selects all the text in this TextNode.  The coordinates are ignored.
+     * @param x the x coordinate of the point the selection was made
+     * @param y the y coordinate of the point the selection was made
+     */
+    public boolean selectAll(double x, double y) {
+        beginMark = textPainter.selectFirst(this);
+        endMark   = textPainter.selectLast(this);
+        return true; // assume this always changes selection, for now.
+    }
+
+    /**
+     * Gets the current text selection.
+     *
+     * @return an object containing the selected content.
+     */
+    public Object getSelection() {
+        Object o = null;
+        if (aci == null) return o;
+
+        int[] ranges = textPainter.getSelected(beginMark, endMark);
+
+        // TODO: later we can return more complex things like
+        // noncontiguous selections
+        if ((ranges != null) && (ranges.length > 1)) {
+            // make sure that they are in order
+            if (ranges[0] > ranges[1]) {
+                int temp = ranges[1];
+                ranges[1] = ranges[0];
+                ranges[0] = temp;
+            }
+            o = new AttributedCharacterSpanIterator
+                (aci, ranges[0], ranges[1]+1);
+        }
+        return o;
+    }
+
+    /**
+     * Returns the shape used to outline this text node.
+     *
+     * @return a Shape which encloses the current text selection.
+     */
+    public Shape getHighlightShape() {
+        Shape highlightShape =
+            textPainter.getHighlightShape(beginMark, endMark);
+        AffineTransform t = getGlobalTransform();
+        highlightShape = t.createTransformedShape(highlightShape);
+        return highlightShape;
+    }
+
+    //
+    // Drawing methods
+    //
+
+    /**
+     * Paints this node without applying Filter, Mask, Composite, and clip.
+     *
+     * @param g2d the Graphics2D to use
+     */
+    public void primitivePaint(Graphics2D g2d) {
+        //
+        // DO NOT REMOVE: THE FOLLOWING IS A WORK AROUND
+        // A BUG IN THE JDK 1.2 RENDERING PIPELINE WHEN
+        // THE CLIP IS A RECTANGLE
+        //
+        Shape clip = g2d.getClip();
+        if (clip != null && !(clip instanceof GeneralPath)) {
+            g2d.setClip(new GeneralPath(clip));
+        }
+        // Paint the text
+        textPainter.paint(this, g2d);
+    }
+
+    //
+    // Geometric methods
+    //
+
+    /**
+     * Returns true if the specified Point2D is inside the boundary of this
+     * node, false otherwise.
+     *
+     * @param p the specified Point2D in the user space
+     */
+    public boolean contains(Point2D p) {
+        // <!> FIXME: should put this code in TextPaint somewhere,
+        // as pointer-events support - same problem with pointer-events
+        // and ShapeNode
+        if (!super.contains(p)) {
+            return false;
+        }
+        List list = getTextRuns();
+        // place coords in text node coordinate system
+        for (int i = 0 ; i < list.size(); i++) {
+            StrokingTextPainter.TextRun run =
+                (StrokingTextPainter.TextRun)list.get(i);
+            TextSpanLayout layout = run.getLayout();
+            float x = (float)p.getX();
+            float y = (float)p.getY();
+            TextHit textHit = layout.hitTestChar(x, y);
+            if (textHit != null && contains(p, layout.getBounds2D())) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    protected boolean contains(Point2D p, Rectangle2D b) {
+        if (b == null || !b.contains(p)) {
+            return false;
+        }
+        switch(pointerEventType) {
+        case VISIBLE_PAINTED:
+        case VISIBLE_FILL:
+        case VISIBLE_STROKE:
+        case VISIBLE:
+            return isVisible;
+        case PAINTED:
+        case FILL:
+        case STROKE:
+        case ALL:
+            return true;
+        case NONE:
+            return false;
+        default:
+            return false;
+        }
+    }
+
+    /**
+     * Defines where the text of a <code>TextNode</code> can be anchored
+     * relative to its location.
+     */
+    public static final class Anchor implements java.io.Serializable {
+
+        /**
+         * The type of the START anchor.
+         */
+        public static final int ANCHOR_START  = 0;
+
+        /**
+         * The type of the MIDDLE anchor.
+         */
+        public static final int ANCHOR_MIDDLE = 1;
+
+        /**
+         * The type of the END anchor.
+         */
+        public static final int ANCHOR_END    = 2;
+
+        /**
+         * The anchor which enables the rendered characters to be aligned such
+         * that the start of the text string is at the initial current text
+         * location.
+         */
+        public static final Anchor START = new Anchor(ANCHOR_START);
+
+        /**
+         * The anchor which enables the rendered characters to be aligned such
+         * that the middle of the text string is at the initial current text
+         * location.
+         */
+        public static final Anchor MIDDLE = new Anchor(ANCHOR_MIDDLE);
+
+        /**
+         * The anchor which enables the rendered characters to be aligned such
+         * that the end of the text string is at the initial current text
+         * location.
+         */
+        public static final Anchor END = new Anchor(ANCHOR_END);
+
+        /**
+         * The anchor type.
+         */
+        private int type;
+
+        /**
+         * No instance of this class.
+         */
+        private Anchor(int type) {
+            this.type = type;
+        }
+
+        /**
+         * Returns the type of this anchor.
+         */
+        public int getType() {
+            return type;
+        }
+
+        /**
+         * This is called by the serialization code before it returns
+         * an unserialized object. To provide for unicity of
+         * instances, the instance that was read is replaced by its
+         * static equivalent. See the serialiazation specification for
+         * further details on this method's logic.
+         */
+        private Object readResolve() throws java.io.ObjectStreamException {
+            switch(type){
+            case ANCHOR_START:
+                return START;
+            case ANCHOR_MIDDLE:
+                return MIDDLE;
+            case ANCHOR_END:
+                return END;
+            default:
+                throw new Error("Unknown Anchor type");
+            }
+        }
+    }
+}
+
+

Added: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/TextPainter.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/TextPainter.java?rev=1647590&view=auto
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/TextPainter.java
 (added)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/TextPainter.java
 Tue Dec 23 15:10:45 2014
@@ -0,0 +1,117 @@
+/*
+
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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.batik.bridge;
+
+import java.awt.Graphics2D;
+import java.awt.Shape;
+import java.awt.geom.Rectangle2D;
+
+
+/**
+ * Renders the attributed character iterator of a <code>TextNode</code>.
+ *
+ * @author <a href="mailto:thierry.korm...@sophia.inria.fr";>Thierry Kormann</a>
+ * @version $Id$
+ */
+public interface TextPainter {
+
+    /**
+     * Paints the specified attributed character iterator using the specified
+     * Graphics2D and context and font context.
+     *
+     * @param node the TextNode to paint
+     * @param g2d the Graphics2D to use
+     */
+    void paint(TextNode node, Graphics2D g2d);
+
+    /**
+     * Initiates a text selection on a particular AttributedCharacterIterator,
+     * using the text/font metrics employed by this TextPainter instance.
+     */
+    Mark selectAt(double x, double y, TextNode node);
+
+    /**
+     * Continues a text selection on a particular AttributedCharacterIterator,
+     * using the text/font metrics employed by this TextPainter instance.
+     */
+    Mark selectTo(double x, double y, Mark beginMark);
+
+    /**
+     * Selects the first glyph in the text node.
+     */
+    Mark selectFirst(TextNode node);
+
+
+    /**
+     * Selects the last glyph in the text node.
+     */
+    Mark selectLast(TextNode node);
+
+    /**
+     * Returns a mark for the char at index in node's
+     * AttributedCharacterIterator.  Leading edge indicates if the 
+     * mark should be considered immediately 'before' glyph or
+     * after
+     */
+     Mark getMark(TextNode node, int index, boolean beforeGlyph);
+
+    /**
+     * Get an array of index pairs corresponding to the indices within an
+     * AttributedCharacterIterator regions bounded by two Marks.
+     *
+     * Note that the instances of Mark passed to this function <em>must
+     * come</em> from the same TextPainter that generated them via selectAt()
+     * and selectTo(), since the TextPainter implementation may rely on hidden
+     * implementation details of its own Mark implementation.  */
+    int[] getSelected(Mark start, Mark finish);
+    
+
+    /**
+     * Get a Shape in userspace coords which encloses the textnode
+     * glyphs bounded by two Marks.
+     * Note that the instances of Mark passed to this function
+     * <em>must come</em>
+     * from the same TextPainter that generated them via selectAt() and
+     * selectTo(), since the TextPainter implementation may rely on hidden
+     * implementation details of its own Mark implementation.
+     */
+    Shape getHighlightShape(Mark beginMark, Mark endMark);
+
+    /**
+     * Get a Shape in userspace coords which defines the textnode 
+     * glyph outlines.
+     * @param node the TextNode to measure
+     */
+    Shape getOutline(TextNode node);
+
+    /**
+     * Get a Rectangle2D in userspace coords which encloses the textnode
+     * glyphs rendered bounds (includes stroke etc).
+     * @param node the TextNode to measure
+     */
+    Rectangle2D getBounds2D(TextNode node);
+
+    /**
+     * Get a Rectangle2D in userspace coords which encloses the textnode
+     * glyphs just including the geometry info.
+     * @param node the TextNode to measure
+     */
+    Rectangle2D getGeometryBounds(TextNode node);
+}
+

Added: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/TextSpanLayout.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/TextSpanLayout.java?rev=1647590&view=auto
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/TextSpanLayout.java
 (added)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/TextSpanLayout.java
 Tue Dec 23 15:10:45 2014
@@ -0,0 +1,241 @@
+/*
+
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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.batik.bridge;
+
+import java.awt.Graphics2D;
+import java.awt.Shape;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+import org.apache.batik.gvt.font.GVTGlyphMetrics;
+import org.apache.batik.gvt.font.GVTGlyphVector;
+import org.apache.batik.gvt.font.GVTLineMetrics;
+
+/**
+ * Class that performs layout of attributed text strings into
+ * glyph sets paintable by TextPainter instances.
+ * Similar to java.awt.font.TextLayout in function and purpose.
+ * Note that while this utility interface is provided for the convenience of
+ * <code>TextPainter</code> implementations, conforming 
<code>TextPainter</code>s
+ * are not required to use this class.
+ * @see java.awt.font.TextLayout
+ * @see org.apache.batik.bridge.TextPainter
+ *
+ * @author <a href="mailto:bill.hane...@ireland.sun.com";>Bill Haneman</a>
+ * @version $Id$
+ */
+public interface TextSpanLayout {
+
+    int DECORATION_UNDERLINE = 0x1;
+    int DECORATION_STRIKETHROUGH = 0x2;
+    int DECORATION_OVERLINE = 0x4;
+    int DECORATION_ALL = DECORATION_UNDERLINE |
+                                DECORATION_OVERLINE |
+                                DECORATION_STRIKETHROUGH;
+
+    /**
+     * Paints the specified text layout using the
+     * specified Graphics2D and rendering context.
+     * @param g2d the Graphics2D to use
+     */
+    void draw(Graphics2D g2d);
+
+    /**
+     * Returns the outline of the specified decorations on the glyphs,
+     * transformed by an AffineTransform.
+     * @param decorationType an integer indicating the type(s) of decorations
+     *     included in this shape.  May be the result of "OR-ing" several
+     *     values together:
+     * e.g. <code>DECORATION_UNDERLINE | DECORATION_STRIKETHROUGH</code>
+     */
+    Shape getDecorationOutline(int decorationType);
+
+    /**
+     * Returns the rectangular bounds of the completed glyph layout.
+     * This includes stroking information, this does not include
+     * deocrations.
+     */
+    Rectangle2D getBounds2D();
+
+    /**
+     * Returns the bounds of the geometry (this is always the bounds
+     * of the outline).
+     */
+    Rectangle2D getGeometricBounds();
+
+    /**
+     * Returns the outline of the completed glyph layout, transformed
+     * by an AffineTransform.
+     */
+    Shape getOutline();
+
+    /**
+     * Returns the current text position at the completion
+     * of glyph layout.
+     * (This is the position that should be used for positioning
+     * adjacent layouts.)
+     */
+    Point2D getAdvance2D();
+
+    /**
+     * Returns the advance between each glyph in text progression direction.
+     */
+    float [] getGlyphAdvances();
+
+    /**
+     * Returns the Metrics for a particular glyph.
+     */
+    GVTGlyphMetrics getGlyphMetrics(int glyphIndex);
+
+    /**
+     * Returns the Line metrics for this text span.
+     */
+    GVTLineMetrics getLineMetrics();
+
+    Point2D getTextPathAdvance();
+
+    /**
+     * Returns the current text position at the completion beginning
+     * of glyph layout, before the application of explicit
+     * glyph positioning attributes.
+     */
+    Point2D getOffset();
+
+    /**
+     * Sets the scaling factor to use for string.  if ajdSpacing is
+     * true then only the spacing between glyphs will be adjusted
+     * otherwise the glyphs and the spaces between them will be
+     * adjusted.
+     * @param xScale Scale factor to apply in X direction.
+     * @param yScale Scale factor to apply in Y direction.
+     * @param adjSpacing True if only spaces should be adjusted.
+     */
+    void setScale(float xScale, float yScale, boolean adjSpacing);
+
+    /**
+     * Sets the text position used for the implicit origin
+     * of glyph layout. Ignored if multiple explicit glyph
+     * positioning attributes are present in ACI
+     * (e.g. if the aci has multiple X or Y values).
+     */
+    void setOffset(Point2D offset);
+
+    /**
+     * Returns a Shape which encloses the currently selected glyphs
+     * as specified by glyph indices <code>begin</code> and <code>end</code>.
+     * @param beginCharIndex the index of the first glyph in the contiguous
+     *                       selection.
+     * @param endCharIndex the index of the last glyph in the contiguous
+     *                     selection.
+     */
+    Shape getHighlightShape(int beginCharIndex, int endCharIndex);
+
+    /**
+     * Perform hit testing for coordinate at x, y.
+     * @return a TextHit object encapsulating the character index for
+     *     successful hits and whether the hit is on the character
+     *     leading edge.
+     * @param x the x coordinate of the point to be tested.
+     * @param y the y coordinate of the point to be tested.
+     */
+    TextHit hitTestChar(float x, float y);
+
+    /**
+     * Returns true if the advance direction of this text is vertical.
+     */
+    boolean isVertical();
+
+    /**
+     * Returns true if this layout in on a text path.
+     */
+    boolean isOnATextPath();
+
+    /**
+     * Returns the number of glyphs in this layout.
+     */
+    int getGlyphCount();
+
+    /**
+     * Returns the number of chars represented by the glyphs within the
+     * specified range.
+     * @param startGlyphIndex The index of the first glyph in the range.
+     * @param endGlyphIndex The index of the last glyph in the range.
+     * @return The number of chars.
+     */
+    int getCharacterCount(int startGlyphIndex, int endGlyphIndex);
+
+    /**
+     * Returns the glyph index of the glyph that has the specified char index.
+     *
+     * @param charIndex The original index of the character in the text node's
+     * text string.
+     * @return The index of the matching glyph in this layout's glyph vector,
+     *         or -1 if a matching glyph could not be found.
+     */
+    int getGlyphIndex(int charIndex);
+
+    /**
+     * Returns true if the text direction in this layout is from left to right.
+     */
+    boolean isLeftToRight();
+
+    /**
+     * Return true is the character index is represented by glyphs
+     * in this layout.
+     *
+     * @param index index of the character in the ACI.
+     * @return true if the layout represents that character.
+     */
+    boolean hasCharacterIndex(int index);
+
+
+    /**
+     * Return the glyph vector asociated to this layout.
+     *
+     * @return glyph vector
+     */
+    GVTGlyphVector getGlyphVector();
+
+    /**
+     * Return the rotation angle applied to the
+     * character.
+     *
+     * @param index index of the character in the ACI
+     * @return rotation angle
+     */
+    double getComputedOrientationAngle(int index);
+
+    /**
+     * Return true if this text run represents
+     * an alt glyph.
+     */
+    boolean isAltGlyph();
+
+    /**
+     * Return true if this text has been reversed.
+     */
+    boolean isReversed();
+
+    /**
+     * Reverse (and optionally mirror) glyphs if not
+     * already reversed.
+     */
+    void maybeReverse(boolean mirror);
+}

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/TextUtilities.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/TextUtilities.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/TextUtilities.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/TextUtilities.java
 Tue Dec 23 15:10:45 2014
@@ -24,7 +24,6 @@ import java.util.StringTokenizer;
 
 import org.apache.batik.css.engine.SVGCSSEngine;
 import org.apache.batik.css.engine.value.Value;
-import org.apache.batik.gvt.TextNode;
 import org.apache.batik.util.CSSConstants;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/URIResolver.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/URIResolver.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/URIResolver.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/URIResolver.java
 Tue Dec 23 15:10:45 2014
@@ -21,8 +21,8 @@ package org.apache.batik.bridge;
 import java.io.IOException;
 import java.net.MalformedURLException;
 
+import org.apache.batik.anim.dom.SVGOMDocument;
 import org.apache.batik.dom.AbstractNode;
-import org.apache.batik.dom.svg.SVGOMDocument;
 import org.apache.batik.util.ParsedURL;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/UpdateManager.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/UpdateManager.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/UpdateManager.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/UpdateManager.java
 Tue Dec 23 15:10:45 2014
@@ -29,11 +29,11 @@ import java.util.List;
 import java.util.Timer;
 import java.util.TimerTask;
 
+import org.apache.batik.anim.dom.SVGOMDocument;
 import org.apache.batik.bridge.svg12.DefaultXBLManager;
 import org.apache.batik.bridge.svg12.SVG12BridgeContext;
 import org.apache.batik.bridge.svg12.SVG12ScriptingEnvironment;
 import org.apache.batik.dom.events.AbstractEvent;
-import org.apache.batik.dom.svg.SVGOMDocument;
 import org.apache.batik.gvt.GraphicsNode;
 import org.apache.batik.gvt.RootGraphicsNode;
 import org.apache.batik.gvt.UpdateTracker;

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/UserAgent.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/UserAgent.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/UserAgent.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/UserAgent.java
 Tue Dec 23 15:10:45 2014
@@ -24,8 +24,6 @@ import java.awt.geom.AffineTransform;
 import java.awt.geom.Dimension2D;
 
 import org.apache.batik.gvt.event.EventDispatcher;
-import org.apache.batik.gvt.font.FontFamilyResolver;
-import org.apache.batik.gvt.text.Mark;
 import org.apache.batik.util.ParsedURL;
 
 import org.w3c.dom.Element;

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/UserAgentAdapter.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/UserAgentAdapter.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/UserAgentAdapter.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/UserAgentAdapter.java
 Tue Dec 23 15:10:45 2014
@@ -28,9 +28,6 @@ import java.util.Iterator;
 import java.util.Set;
 
 import org.apache.batik.gvt.event.EventDispatcher;
-import org.apache.batik.gvt.font.DefaultFontFamilyResolver;
-import org.apache.batik.gvt.font.FontFamilyResolver;
-import org.apache.batik.gvt.text.Mark;
 import org.apache.batik.util.ParsedURL;
 import org.apache.batik.util.SVGFeatureStrings;
 import org.apache.batik.util.XMLResourceDescriptor;

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/ViewBox.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/ViewBox.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/ViewBox.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/ViewBox.java
 Tue Dec 23 15:10:45 2014
@@ -21,8 +21,8 @@ package org.apache.batik.bridge;
 import java.awt.geom.AffineTransform;
 import java.util.StringTokenizer;
 
+import org.apache.batik.anim.dom.SVGOMAnimatedRect;
 import org.apache.batik.dom.svg.LiveAttributeException;
-import org.apache.batik.dom.svg.SVGOMAnimatedRect;
 import org.apache.batik.parser.AWTTransformProducer;
 import org.apache.batik.parser.FragmentIdentifierHandler;
 import org.apache.batik.parser.FragmentIdentifierParser;

Added: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/Window.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/Window.java?rev=1647590&view=auto
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/Window.java
 (added)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/Window.java
 Tue Dec 23 15:10:45 2014
@@ -0,0 +1,188 @@
+/*
+
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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.batik.bridge;
+
+import org.apache.batik.script.Interpreter;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+
+/**
+ * This interface represents the 'window' object defined in the global
+ * environment of a SVG document.
+ *
+ * @author <a href="mailto:steph...@hillion.org";>Stephane Hillion</a>
+ * @version $Id$
+ */
+public interface Window extends org.w3c.dom.Window {
+    /**
+     * Evaluates the given string repeatedly after the given amount of
+     * time.  This method does not stall the script: the evaluation is
+     * scheduled and the script continues its execution.
+     * @return an object representing the interval created.
+     */
+    Object setInterval(String script, long interval);
+
+    /**
+     * Calls the 'run' method of the given Runnable repeatedly after
+     * the given amount of time.  This method does not stall the
+     * script: the evaluation is scheduled and the script continues
+     * its execution.
+     * @return an object representing the interval created.
+     */
+    Object setInterval(Runnable r, long interval);
+
+    /**
+     * Cancels an interval that was set by a call to 'setInterval'.
+     */
+    void clearInterval(Object interval);
+
+    /**
+     * Evaluates the given string after the given amount of time.
+     * This method does not stall the script: the evaluation is
+     * scheduled and the script continues its execution.
+     * @return an object representing the timeout created.
+     */
+    Object setTimeout(String script, long timeout);
+
+    /**
+     * Calls the 'run' method of the given Runnable after the given
+     * amount of time.  This method does not stall the script: the
+     * evaluation is scheduled and the script continues its execution.
+     * @return an object representing the timeout created.
+     */
+    Object setTimeout(Runnable r, long timeout);
+
+    /**
+     * Cancels an timeout that was set by a call to 'setTimeout'.
+     */
+    void clearTimeout(Object timeout);
+
+    /**
+     * Parses the given XML string into a DocumentFragment of the
+     * given document or a new document if 'doc' is null.
+     * @return The document fragment or null on error.
+     */
+    Node parseXML(String text, Document doc);
+
+    /**
+     * Serializes the given node.
+     */
+    String printNode(Node n);
+
+    /**
+     * Gets data from the given URI.
+     * @param uri The URI where the data is located.
+     * @param h A handler called when the data is available.
+     */
+    void getURL(String uri, URLResponseHandler h);
+
+    /**
+     * Gets data from the given URI.
+     * @param uri The URI where the data is located.
+     * @param h A handler called when the data is available.
+     * @param enc The character encoding of the data.
+     */
+    void getURL(String uri, URLResponseHandler h, String enc);
+
+    /**
+     * Posts data to the given URI.
+     * @param uri The URI where the data is located.
+     * @param content The data to post to the server.
+     * @param h A handler called when the data is available.
+     */
+    void postURL(String uri, String content, URLResponseHandler h);
+
+    /**
+     * Posts data to the given URI.
+     * @param uri The URI where the data is located.
+     * @param content The data to post to the server.
+     * @param h A handler called when the data is available.
+     * @param mimeType The mimeType to asscoiate with post.
+     */
+    void postURL(String uri, String content, URLResponseHandler h,
+                 String mimeType);
+
+    /**
+     * Posts data to the given URI.
+     * @param uri The URI where the data is located.
+     * @param content The data to post to the server.
+     * @param h A handler called when the data is available.
+     * @param mimeType The mimeType to asscoiate with post.
+     * @param enc      The encoding to apply to <code>content</code>
+     *                 may be "gzip", "deflate", or <code>null</code>.
+     */
+    void postURL(String uri, String content, URLResponseHandler h,
+                 String mimeType, String enc);
+
+
+    /**
+     * To handle the completion of a 'getURL()' or 'postURL' call.
+     */
+    interface URLResponseHandler {
+
+        /**
+         * Called when the response is recieved.
+         * @param success Whether the data was successfully retreived.
+         * @param mime The data MIME type.
+         * @param content The data.
+         */
+        void getURLDone(boolean success, String mime, String content);
+    }
+
+    /**
+     * To handle the completion of a 'getURL()' call.
+    public interface GetURLHandler extends URLResponseHandler { }
+     */
+
+
+    /**
+     * Displays an alert dialog box.
+     */
+    void alert(String message);
+
+    /**
+     * Displays a confirm dialog box.
+     */
+    boolean confirm(String message);
+
+    /**
+     * Displays an input dialog box.
+     * @return The input of the user, or null if the dialog was cancelled.
+     */
+    String prompt(String message);
+
+    /**
+     * Displays an input dialog box, given the default value.
+     * @return The input of the user, or null if the dialog was cancelled.
+     */
+    String prompt(String message, String defVal);
+
+    /**
+     * Returns the current BridgeContext. This object given a deep
+     * access to the viewer internals.
+     */
+    BridgeContext getBridgeContext();
+
+    /**
+     * Returns the associated interpreter.
+     */
+    Interpreter getInterpreter();
+}

Added: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/WindowWrapper.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/WindowWrapper.java?rev=1647590&view=auto
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/WindowWrapper.java
 (added)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/WindowWrapper.java
 Tue Dec 23 15:10:45 2014
@@ -0,0 +1,591 @@
+/*
+
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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.batik.bridge;
+
+import java.security.AccessControlContext;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+
+import org.mozilla.javascript.Context;
+import org.mozilla.javascript.Function;
+import org.mozilla.javascript.ImporterTopLevel;
+import org.mozilla.javascript.NativeObject;
+import org.mozilla.javascript.Scriptable;
+import org.mozilla.javascript.ScriptableObject;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.Location;
+
+/**
+ * This class wraps a Window object to expose it to the interpreter.
+ * This will be the Global Object of our interpreter.
+ *
+ * @author <a href="mailto:cjo...@ilog.fr";>Christophe Jolif</a>
+ * @author <a href="mailto:steph...@hillion.org";>Stephane Hillion</a>
+ * @version $Id$
+ */
+public class WindowWrapper extends ImporterTopLevel {
+
+    private static final Object[] EMPTY_ARGUMENTS = new Object[0];
+
+    /**
+     * The rhino interpreter.
+     */
+    protected RhinoInterpreter interpreter;
+
+    /**
+     * The wrapped window.
+     */
+    protected Window window;
+
+    /**
+     * Creates a new WindowWrapper.
+     */
+    public WindowWrapper(Context context) {
+        super(context);
+        String[] names = { "setInterval", "setTimeout", "clearInterval",
+                           "clearTimeout", "parseXML", "printNode", "getURL",
+                           "postURL", "alert", "confirm", "prompt" };
+        this.defineFunctionProperties(names, WindowWrapper.class,
+                                      ScriptableObject.DONTENUM);
+        this.defineProperty("location", WindowWrapper.class,
+                            ScriptableObject.PERMANENT);
+    }
+
+    public String getClassName() {
+        return "Window";
+    }
+
+    public String toString() {
+        return "[object Window]";
+    }
+
+    /**
+     * Wraps the 'setInterval' methods of the Window interface.
+     */
+    public static Object setInterval(Context cx,
+                                     Scriptable thisObj,
+                                     Object[] args,
+                                     Function funObj) {
+        int len = args.length;
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        Window window = ww.window;
+
+        if (len < 2) {
+            throw Context.reportRuntimeError("invalid argument count");
+        }
+        long to = ((Long)Context.jsToJava(args[1], Long.TYPE)).longValue();
+        if (args[0] instanceof Function) {
+            RhinoInterpreter interp =
+                (RhinoInterpreter)window.getInterpreter();
+            FunctionWrapper fw;
+            fw = new FunctionWrapper(interp, (Function)args[0],
+                                     EMPTY_ARGUMENTS);
+            return Context.toObject(window.setInterval(fw, to), thisObj);
+        }
+        String script =
+            (String)Context.jsToJava(args[0], String.class);
+        return Context.toObject(window.setInterval(script, to), thisObj);
+    }
+
+    /**
+     * Wraps the 'setTimeout' methods of the Window interface.
+     */
+    public static Object setTimeout(Context cx,
+                                    Scriptable thisObj,
+                                    Object[] args,
+                                    Function funObj) {
+        int len = args.length;
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        Window window = ww.window;
+        if (len < 2) {
+            throw Context.reportRuntimeError("invalid argument count");
+        }
+        long to = ((Long)Context.jsToJava(args[1], Long.TYPE)).longValue();
+        if (args[0] instanceof Function) {
+            RhinoInterpreter interp =
+                (RhinoInterpreter)window.getInterpreter();
+            FunctionWrapper fw;
+            fw = new FunctionWrapper(interp, (Function)args[0],
+                                     EMPTY_ARGUMENTS);
+            return Context.toObject(window.setTimeout(fw, to), thisObj);
+        }
+        String script =
+            (String)Context.jsToJava(args[0], String.class);
+        return Context.toObject(window.setTimeout(script, to), thisObj);
+    }
+
+    /**
+     * Wraps the 'clearInterval' method of the Window interface.
+     */
+    public static void clearInterval(Context cx,
+                                     Scriptable thisObj,
+                                     Object[] args,
+                                     Function funObj) {
+        int len = args.length;
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        Window window = ww.window;
+        if (len >= 1) {
+            window.clearInterval(Context.jsToJava(args[0], Object.class));
+        }
+    }
+
+    /**
+     * Wraps the 'clearTimeout' method of the Window interface.
+     */
+    public static void clearTimeout(Context cx,
+                                    Scriptable thisObj,
+                                    Object[] args,
+                                    Function funObj) {
+        int len = args.length;
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        Window window = ww.window;
+        if (len >= 1) {
+            window.clearTimeout(Context.jsToJava(args[0], Object.class));
+        }
+    }
+
+    /**
+     * Wraps the 'parseXML' method of the Window interface.
+     */
+    public static Object parseXML(Context cx,
+                                  Scriptable thisObj,
+                                  final Object[] args,
+                                  Function funObj) {
+        int len = args.length;
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        final Window window = ww.window;
+        if (len < 2) {
+            throw Context.reportRuntimeError("invalid argument count");
+        }
+
+        RhinoInterpreter     interp = 
(RhinoInterpreter)window.getInterpreter();
+        AccessControlContext acc    = interp.getAccessControlContext();
+
+        PrivilegedAction pa = new PrivilegedAction() {
+                public Object run() {
+                    return window.parseXML
+                        ((String)Context.jsToJava(args[0], String.class),
+                         (Document)Context.jsToJava(args[1], Document.class));
+                }
+            };
+
+        Object ret;
+        // If acc is null we are running in an Applet (or some other
+        // restrictive environment) so don't sweat security it's
+        // the "Browsers" problem...
+        if (acc != null) ret = AccessController.doPrivileged(pa , acc);
+        else             ret = AccessController.doPrivileged(pa);
+
+        return Context.toObject(ret, thisObj);
+    }
+
+    /**
+     * Wraps the 'printNode' method of the Window interface.
+     */
+    public static Object printNode(Context cx,
+                                   Scriptable thisObj,
+                                   final Object[] args,
+                                   Function funObj) {
+        if (args.length != 1) {
+            throw Context.reportRuntimeError("invalid argument count");
+        }
+
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        final Window window = ww.window;
+
+        AccessControlContext acc =
+            
((RhinoInterpreter)window.getInterpreter()).getAccessControlContext();
+
+        Object ret = AccessController.doPrivileged(new PrivilegedAction() {
+                public Object run() {
+                    return window.printNode
+                        ((Node) Context.jsToJava(args[0], Node.class));
+                }
+            }, acc);
+        return Context.toString(ret);
+    }
+
+    /**
+     * Wraps the 'getURL' method of the Window interface.
+     */
+    public static void getURL(Context cx,
+                              Scriptable thisObj,
+                              final Object[] args,
+                              Function funObj) {
+        int len = args.length;
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        final Window window = ww.window;
+        if (len < 2) {
+            throw Context.reportRuntimeError("invalid argument count");
+        }
+        RhinoInterpreter interp =
+            (RhinoInterpreter)window.getInterpreter();
+        final String uri = (String)Context.jsToJava(args[0], String.class);
+        Window.URLResponseHandler urlHandler = null;
+        if (args[1] instanceof Function) {
+            urlHandler = new GetURLFunctionWrapper
+                (interp, (Function)args[1], ww);
+        } else {
+            urlHandler = new GetURLObjectWrapper
+                (interp, (NativeObject)args[1], ww);
+        }
+        final Window.URLResponseHandler fw = urlHandler;
+
+        AccessControlContext acc =
+            
((RhinoInterpreter)window.getInterpreter()).getAccessControlContext();
+
+        if (len == 2) {
+            AccessController.doPrivileged(new PrivilegedAction() {
+                    public Object run(){
+                        window.getURL(uri, fw);
+                        return null;
+                    }
+                }, acc);
+        } else {
+            AccessController.doPrivileged(new PrivilegedAction() {
+                    public Object run() {
+                        window.getURL
+                            (uri, fw,
+                             (String)Context.jsToJava(args[2], String.class));
+                        return null;
+                    }
+                }, acc);
+        }
+    }
+
+    /**
+     * Wraps the 'postURL' method of the Window interface.
+     */
+    public static void postURL(Context cx,
+                               Scriptable thisObj,
+                               final Object[] args,
+                               Function funObj) {
+        int len = args.length;
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        final Window window = ww.window;
+        if (len < 3) {
+            throw Context.reportRuntimeError("invalid argument count");
+        }
+        RhinoInterpreter interp =
+            (RhinoInterpreter)window.getInterpreter();
+        final String uri     = (String)Context.jsToJava(args[0], String.class);
+        final String content = (String)Context.jsToJava(args[1], String.class);
+        Window.URLResponseHandler urlHandler = null;
+        if (args[2] instanceof Function) {
+            urlHandler = new GetURLFunctionWrapper
+                (interp, (Function)args[2], ww);
+        } else {
+            urlHandler = new GetURLObjectWrapper
+                (interp, (NativeObject)args[2], ww);
+        }
+        final Window.URLResponseHandler fw = urlHandler;
+
+        AccessControlContext acc;
+        acc = interp.getAccessControlContext();
+
+        switch (len) {
+        case 3:
+            AccessController.doPrivileged(new PrivilegedAction() {
+                    public Object run(){
+                        window.postURL(uri, content, fw);
+                        return null;
+                    }
+                }, acc);
+            break;
+        case 4:
+            AccessController.doPrivileged(new PrivilegedAction() {
+                    public Object run() {
+                        window.postURL
+                            (uri, content, fw,
+                             (String)Context.jsToJava(args[3], String.class));
+                        return null;
+                    }
+                }, acc);
+            break;
+        default:
+            AccessController.doPrivileged(new PrivilegedAction() {
+                    public Object run() {
+                        window.postURL
+                            (uri, content, fw,
+                             (String)Context.jsToJava(args[3], String.class),
+                             (String)Context.jsToJava(args[4], String.class));
+                        return null;
+                    }
+                }, acc);
+        }
+    }
+
+    /**
+     * Wraps the 'alert' method of the Window interface.
+     */
+    public static void alert(Context cx,
+                             Scriptable thisObj,
+                             Object[] args,
+                             Function funObj) {
+        int len = args.length;
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        Window window = ww.window;
+        if (len >= 1) {
+            String message =
+                (String)Context.jsToJava(args[0], String.class);
+            window.alert(message);
+        }
+    }
+
+    /**
+     * Wraps the 'confirm' method of the Window interface.
+     */
+    public static Object confirm(Context cx,
+                                  Scriptable thisObj,
+                                  Object[] args,
+                                  Function funObj) {
+        int len = args.length;
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        Window window = ww.window;
+        if (len >= 1) {
+            String message =
+                (String)Context.jsToJava(args[0], String.class);
+            if (window.confirm(message))
+                return Context.toObject(Boolean.TRUE, thisObj);
+            else
+                return Context.toObject(Boolean.FALSE, thisObj);
+        }
+        return Context.toObject(Boolean.FALSE, thisObj);
+    }
+
+    /**
+     * Wraps the 'prompt' method of the Window interface.
+     */
+    public static Object prompt(Context cx,
+                                Scriptable thisObj,
+                                Object[] args,
+                                Function funObj) {
+
+        WindowWrapper ww = (WindowWrapper)thisObj;
+        Window window = ww.window;
+        Object result;
+        switch (args.length) {
+            case 0:
+                result = "";
+                break;
+            case 1:
+                String message =
+                    (String)Context.jsToJava(args[0], String.class);
+                result = window.prompt(message);
+                break;
+            default:
+                message =
+                    (String)Context.jsToJava(args[0], String.class);
+                String defVal =
+                    (String)Context.jsToJava(args[1], String.class);
+                result = window.prompt(message, defVal);
+                break;
+        }
+
+        if (result == null) {
+            return null;
+        }
+        return Context.toString(result);
+    }
+
+    /**
+     * Return the Location for this Window.
+     */
+    public Location getLocation() {
+        return window.getLocation();
+    }
+
+    /**
+     * Return the Location for this Window.
+     */
+    public void setLocation(Object val) {
+        String url = (String)Context.jsToJava(val, String.class);
+        window.getLocation().assign(url);
+    }
+
+    /**
+     * To wrap a function in an handler.
+     */
+    protected static class FunctionWrapper implements Runnable {
+
+        /**
+         * The current interpreter.
+         */
+        protected RhinoInterpreter interpreter;
+
+        /**
+         * The function wrapper.
+         */
+        protected Function function;
+
+        /**
+         * The arguments.
+         */
+        protected Object[] arguments;
+
+        /**
+         * Creates a function wrapper.
+         */
+        public FunctionWrapper(RhinoInterpreter ri,
+                               Function f,
+                               Object[] args) {
+            interpreter = ri;
+            function = f;
+            arguments = args;
+        }
+
+        /**
+         * Calls the function.
+         */
+        public void run() {
+            interpreter.callHandler(function, arguments);
+        }
+    }
+
+    /**
+     * To wrap a function passed to getURL().
+     */
+    protected static class GetURLFunctionWrapper
+        implements Window.URLResponseHandler {
+
+        /**
+         * The current interpreter.
+         */
+        protected RhinoInterpreter interpreter;
+
+        /**
+         * The function wrapper.
+         */
+        protected Function function;
+
+        /**
+         * The WindowWrapper
+         */
+        protected WindowWrapper windowWrapper;
+
+        /**
+         * Creates a wrapper.
+         */
+        public GetURLFunctionWrapper(RhinoInterpreter ri, Function fct,
+                                     WindowWrapper ww) {
+            interpreter = ri;
+            function = fct;
+            windowWrapper = ww;
+        }
+
+        /**
+         * Called before 'getURL()' returns.
+         * @param success Whether the data was successfully retreived.
+         * @param mime The data MIME type.
+         * @param content The data.
+         */
+        public void getURLDone(final boolean success,
+                               final String mime,
+                               final String content) {
+            interpreter.callHandler
+                (function,
+                 new GetURLDoneArgBuilder(success, mime,
+                                          content, windowWrapper));
+        }
+    }
+
+    /**
+     * To wrap an object passed to getURL().
+     */
+    private static class GetURLObjectWrapper
+        implements Window.URLResponseHandler {
+
+        /**
+         * The current interpreter.
+         */
+        private RhinoInterpreter interpreter;
+
+        /**
+         * The object wrapper.
+         */
+        private ScriptableObject object;
+
+        /**
+         * The Scope for the callback.
+         */
+        private WindowWrapper windowWrapper;
+
+        private static final String COMPLETE = "operationComplete";
+
+        /**
+         * Creates a wrapper.
+         */
+        public GetURLObjectWrapper(RhinoInterpreter ri,
+                                   ScriptableObject obj,
+                                   WindowWrapper ww) {
+            interpreter = ri;
+            object = obj;
+            windowWrapper = ww;
+        }
+
+        /**
+         * Called before 'getURL()' returns.
+         * @param success Whether the data was successfully retreived.
+         * @param mime The data MIME type.
+         * @param content The data.
+         */
+        public void getURLDone(final boolean success,
+                               final String mime,
+                               final String content) {
+            interpreter.callMethod
+                (object, COMPLETE,
+                 new GetURLDoneArgBuilder(success, mime,
+                                          content, windowWrapper));
+        }
+    }
+
+    static class GetURLDoneArgBuilder
+        implements RhinoInterpreter.ArgumentsBuilder {
+        boolean success;
+        String mime, content;
+        WindowWrapper windowWrapper;
+        public GetURLDoneArgBuilder(boolean success,
+                                    String mime, String content,
+                                    WindowWrapper ww) {
+            this.success = success;
+            this.mime    = mime;
+            this.content = content;
+            this.windowWrapper = ww;
+        }
+
+        public Object[] buildArguments() {
+            ScriptableObject so = new NativeObject();
+            so.put("success", so,
+                   (success) ? Boolean.TRUE : Boolean.FALSE);
+            if (mime != null) {
+                so.put("contentType", so,
+                       Context.toObject(mime, windowWrapper));
+            }
+            if (content != null) {
+                so.put("content", so,
+                       Context.toObject(content, windowWrapper));
+            }
+            return new Object [] { so };
+        }
+    }
+}

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/AbstractContentSelector.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/AbstractContentSelector.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/AbstractContentSelector.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/AbstractContentSelector.java
 Tue Dec 23 15:10:45 2014
@@ -20,7 +20,7 @@ package org.apache.batik.bridge.svg12;
 
 import java.util.HashMap;
 
-import org.apache.batik.dom.svg12.XBLOMContentElement;
+import org.apache.batik.anim.dom.XBLOMContentElement;
 
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/BindableElementBridge.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/BindableElementBridge.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/BindableElementBridge.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/BindableElementBridge.java
 Tue Dec 23 15:10:45 2014
@@ -18,6 +18,7 @@
  */
 package org.apache.batik.bridge.svg12;
 
+import org.apache.batik.anim.dom.BindableElement;
 import org.apache.batik.bridge.AbstractGraphicsNodeBridge;
 import org.apache.batik.bridge.Bridge;
 import org.apache.batik.bridge.BridgeContext;
@@ -25,7 +26,6 @@ import org.apache.batik.bridge.GVTBuilde
 import org.apache.batik.bridge.SVGUtilities;
 import org.apache.batik.bridge.ScriptingEnvironment;
 import org.apache.batik.bridge.UpdateManager;
-import org.apache.batik.dom.svg12.BindableElement;
 import org.apache.batik.gvt.CompositeGraphicsNode;
 import org.apache.batik.gvt.GraphicsNode;
 

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/ContentManager.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/ContentManager.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/ContentManager.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/ContentManager.java
 Tue Dec 23 15:10:45 2014
@@ -25,12 +25,12 @@ import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.Map;
 
+import org.apache.batik.anim.dom.XBLEventSupport;
+import org.apache.batik.anim.dom.XBLOMContentElement;
+import org.apache.batik.anim.dom.XBLOMShadowTreeElement;
 import org.apache.batik.dom.AbstractNode;
 import org.apache.batik.dom.events.NodeEventTarget;
 import org.apache.batik.dom.xbl.XBLManager;
-import org.apache.batik.dom.svg12.XBLEventSupport;
-import org.apache.batik.dom.svg12.XBLOMContentElement;
-import org.apache.batik.dom.svg12.XBLOMShadowTreeElement;
 import org.apache.batik.util.XBLConstants;
 import org.apache.batik.util.XMLConstants;
 

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/ContentSelectionChangedEvent.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/ContentSelectionChangedEvent.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/ContentSelectionChangedEvent.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/ContentSelectionChangedEvent.java
 Tue Dec 23 15:10:45 2014
@@ -20,7 +20,7 @@ package org.apache.batik.bridge.svg12;
 
 import java.util.EventObject;
 
-import org.apache.batik.dom.svg12.XBLOMContentElement;
+import org.apache.batik.anim.dom.XBLOMContentElement;
 
 /**
  * An event to signify a change to the list of selected nodes for an

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/DefaultContentSelector.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/DefaultContentSelector.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/DefaultContentSelector.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/DefaultContentSelector.java
 Tue Dec 23 15:10:45 2014
@@ -20,7 +20,7 @@ package org.apache.batik.bridge.svg12;
 
 import java.util.ArrayList;
 
-import org.apache.batik.dom.svg12.XBLOMContentElement;
+import org.apache.batik.anim.dom.XBLOMContentElement;
 
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/DefaultXBLManager.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/DefaultXBLManager.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/DefaultXBLManager.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/DefaultXBLManager.java
 Tue Dec 23 15:10:45 2014
@@ -29,6 +29,13 @@ import java.util.Map;
 
 import javax.swing.event.EventListenerList;
 
+import org.apache.batik.anim.dom.BindableElement;
+import org.apache.batik.anim.dom.XBLEventSupport;
+import org.apache.batik.anim.dom.XBLOMContentElement;
+import org.apache.batik.anim.dom.XBLOMDefinitionElement;
+import org.apache.batik.anim.dom.XBLOMImportElement;
+import org.apache.batik.anim.dom.XBLOMShadowTreeElement;
+import org.apache.batik.anim.dom.XBLOMTemplateElement;
 import org.apache.batik.bridge.BridgeContext;
 import org.apache.batik.bridge.BridgeException;
 import org.apache.batik.bridge.ErrorConstants;
@@ -36,13 +43,6 @@ import org.apache.batik.dom.AbstractAttr
 import org.apache.batik.dom.AbstractDocument;
 import org.apache.batik.dom.AbstractNode;
 import org.apache.batik.dom.events.NodeEventTarget;
-import org.apache.batik.dom.svg12.BindableElement;
-import org.apache.batik.dom.svg12.XBLEventSupport;
-import org.apache.batik.dom.svg12.XBLOMContentElement;
-import org.apache.batik.dom.svg12.XBLOMDefinitionElement;
-import org.apache.batik.dom.svg12.XBLOMImportElement;
-import org.apache.batik.dom.svg12.XBLOMShadowTreeElement;
-import org.apache.batik.dom.svg12.XBLOMTemplateElement;
 import org.apache.batik.dom.xbl.NodeXBL;
 import org.apache.batik.dom.xbl.ShadowTreeEvent;
 import org.apache.batik.dom.xbl.XBLManager;

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVG12BridgeContext.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVG12BridgeContext.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVG12BridgeContext.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVG12BridgeContext.java
 Tue Dec 23 15:10:45 2014
@@ -20,6 +20,9 @@ package org.apache.batik.bridge.svg12;
 
 import java.util.Iterator;
 
+import org.apache.batik.anim.dom.SVGOMDocument;
+import org.apache.batik.anim.dom.XBLEventSupport;
+import org.apache.batik.anim.dom.XBLOMShadowTreeElement;
 import org.apache.batik.bridge.BridgeContext;
 import org.apache.batik.bridge.BridgeUpdateHandler;
 import org.apache.batik.bridge.DocumentLoader;
@@ -31,9 +34,6 @@ import org.apache.batik.dom.AbstractDocu
 import org.apache.batik.dom.AbstractNode;
 import org.apache.batik.dom.events.EventSupport;
 import org.apache.batik.dom.events.NodeEventTarget;
-import org.apache.batik.dom.svg.SVGOMDocument;
-import org.apache.batik.dom.svg12.XBLEventSupport;
-import org.apache.batik.dom.svg12.XBLOMShadowTreeElement;
 import org.apache.batik.dom.xbl.NodeXBL;
 import org.apache.batik.dom.xbl.XBLManager;
 import org.apache.batik.script.Interpreter;

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVG12FocusManager.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVG12FocusManager.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVG12FocusManager.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVG12FocusManager.java
 Tue Dec 23 15:10:45 2014
@@ -18,12 +18,12 @@
  */
 package org.apache.batik.bridge.svg12;
 
+import org.apache.batik.anim.dom.XBLEventSupport;
 import org.apache.batik.bridge.FocusManager;
 import org.apache.batik.dom.AbstractNode;
 import org.apache.batik.dom.events.AbstractEvent;
 import org.apache.batik.dom.events.DOMUIEvent;
 import org.apache.batik.dom.events.EventSupport;
-import org.apache.batik.dom.svg12.XBLEventSupport;
 import org.apache.batik.util.XMLConstants;
 
 import org.w3c.dom.Document;

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVG12ScriptingEnvironment.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVG12ScriptingEnvironment.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVG12ScriptingEnvironment.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVG12ScriptingEnvironment.java
 Tue Dec 23 15:10:45 2014
@@ -18,6 +18,7 @@
  */
 package org.apache.batik.bridge.svg12;
 
+import org.apache.batik.anim.dom.XBLEventSupport;
 import org.apache.batik.bridge.BridgeContext;
 import org.apache.batik.bridge.DocumentLoader;
 import org.apache.batik.bridge.Messages;
@@ -27,7 +28,6 @@ import org.apache.batik.dom.AbstractDocu
 import org.apache.batik.dom.AbstractElement;
 import org.apache.batik.dom.events.EventSupport;
 import org.apache.batik.dom.svg12.SVGGlobal;
-import org.apache.batik.dom.svg12.XBLEventSupport;
 import org.apache.batik.dom.util.DOMUtilities;
 import org.apache.batik.dom.util.TriplyIndexedTable;
 import org.apache.batik.script.Interpreter;
@@ -290,7 +290,7 @@ public class SVG12ScriptingEnvironment e
     /**
      * Creates a new Window object.
      */
-    public org.apache.batik.script.Window createWindow(Interpreter interp,
+    public org.apache.batik.bridge.Window createWindow(Interpreter interp,
                                                        String lang) {
         return new Global(interp, lang);
     }

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVG12TextElementBridge.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVG12TextElementBridge.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVG12TextElementBridge.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVG12TextElementBridge.java
 Tue Dec 23 15:10:45 2014
@@ -18,11 +18,11 @@
  */
 package org.apache.batik.bridge.svg12;
 
+import org.apache.batik.anim.dom.XBLEventSupport;
 import org.apache.batik.bridge.Bridge;
 import org.apache.batik.bridge.BridgeContext;
 import org.apache.batik.bridge.SVGTextElementBridge;
 import org.apache.batik.dom.AbstractNode;
-import org.apache.batik.dom.svg12.XBLEventSupport;
 import org.apache.batik.dom.events.EventSupport;
 import org.apache.batik.dom.events.NodeEventTarget;
 import org.apache.batik.dom.xbl.NodeXBL;

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVGFlowRootElementBridge.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVGFlowRootElementBridge.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVGFlowRootElementBridge.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVGFlowRootElementBridge.java
 Tue Dec 23 15:10:45 2014
@@ -37,13 +37,18 @@ import java.util.Map;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
+import org.apache.batik.anim.dom.SVGOMElement;
+import org.apache.batik.anim.dom.SVGOMFlowRegionElement;
+import org.apache.batik.anim.dom.XBLEventSupport;
 import org.apache.batik.bridge.Bridge;
 import org.apache.batik.bridge.BridgeContext;
 import org.apache.batik.bridge.CSSUtilities;
 import org.apache.batik.bridge.CursorManager;
+import org.apache.batik.bridge.FlowTextNode;
 import org.apache.batik.bridge.GVTBuilder;
 import org.apache.batik.bridge.SVGTextElementBridge;
 import org.apache.batik.bridge.SVGUtilities;
+import org.apache.batik.bridge.TextNode;
 import org.apache.batik.bridge.TextUtilities;
 import org.apache.batik.bridge.UserAgent;
 import org.apache.batik.bridge.SVGAElementBridge;
@@ -56,16 +61,11 @@ import org.apache.batik.css.engine.value
 import org.apache.batik.css.engine.value.ValueConstants;
 import org.apache.batik.dom.AbstractNode;
 import org.apache.batik.dom.events.NodeEventTarget;
-import org.apache.batik.dom.svg.SVGOMElement;
-import org.apache.batik.dom.svg12.SVGOMFlowRegionElement;
-import org.apache.batik.dom.svg12.XBLEventSupport;
 import org.apache.batik.dom.util.XMLSupport;
 import org.apache.batik.dom.util.XLinkSupport;
 import org.apache.batik.gvt.CompositeGraphicsNode;
 import org.apache.batik.gvt.GraphicsNode;
-import org.apache.batik.gvt.TextNode;
 import org.apache.batik.gvt.flow.BlockInfo;
-import org.apache.batik.gvt.flow.FlowTextNode;
 import org.apache.batik.gvt.flow.RegionInfo;
 import org.apache.batik.gvt.flow.TextLineBreaks;
 import org.apache.batik.gvt.text.GVTAttributedCharacterIterator;

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVGMultiImageElementBridge.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVGMultiImageElementBridge.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVGMultiImageElementBridge.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVGMultiImageElementBridge.java
 Tue Dec 23 15:10:45 2014
@@ -33,6 +33,7 @@ import org.apache.batik.bridge.Bridge;
 import org.apache.batik.bridge.BridgeContext;
 import org.apache.batik.bridge.BridgeException;
 import org.apache.batik.bridge.CSSUtilities;
+import org.apache.batik.bridge.MultiResGraphicsNode;
 import org.apache.batik.bridge.SVGImageElementBridge;
 import org.apache.batik.bridge.SVGUtilities;
 import org.apache.batik.bridge.UnitProcessor;
@@ -41,7 +42,6 @@ import org.apache.batik.dom.AbstractNode
 import org.apache.batik.dom.util.XLinkSupport;
 import org.apache.batik.gvt.GraphicsNode;
 import org.apache.batik.gvt.ImageNode;
-import org.apache.batik.gvt.svg12.MultiResGraphicsNode;
 
 import org.apache.batik.util.ParsedURL;
 import org.apache.batik.util.SVG12Constants;

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVGSolidColorElementBridge.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVGSolidColorElementBridge.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVGSolidColorElementBridge.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/SVGSolidColorElementBridge.java
 Tue Dec 23 15:10:45 2014
@@ -23,6 +23,7 @@ import java.awt.Paint;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.batik.anim.dom.SVGOMDocument;
 import org.apache.batik.bridge.AnimatableGenericSVGBridge;
 import org.apache.batik.bridge.BridgeContext;
 import org.apache.batik.bridge.BridgeException;
@@ -34,7 +35,6 @@ import org.apache.batik.css.engine.CSSEn
 import org.apache.batik.css.engine.CSSStylableElement;
 import org.apache.batik.css.engine.StyleMap;
 import org.apache.batik.css.engine.value.Value;
-import org.apache.batik.dom.svg.SVGOMDocument;
 import org.apache.batik.dom.util.XLinkSupport;
 import org.apache.batik.gvt.GraphicsNode;
 import org.apache.batik.util.SVG12Constants;

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/XBLContentElementBridge.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/XBLContentElementBridge.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/XBLContentElementBridge.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/XBLContentElementBridge.java
 Tue Dec 23 15:10:45 2014
@@ -18,12 +18,12 @@
  */
 package org.apache.batik.bridge.svg12;
 
+import org.apache.batik.anim.dom.XBLOMContentElement;
 import org.apache.batik.bridge.AbstractGraphicsNodeBridge;
 import org.apache.batik.bridge.Bridge;
 import org.apache.batik.bridge.BridgeContext;
 import org.apache.batik.bridge.GVTBuilder;
 import org.apache.batik.dom.AbstractDocument;
-import org.apache.batik.dom.svg12.XBLOMContentElement;
 import org.apache.batik.gvt.CompositeGraphicsNode;
 import org.apache.batik.gvt.GraphicsNode;
 import org.apache.batik.util.XBLConstants;

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/XPathPatternContentSelector.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/XPathPatternContentSelector.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/XPathPatternContentSelector.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/XPathPatternContentSelector.java
 Tue Dec 23 15:10:45 2014
@@ -24,8 +24,8 @@ import org.apache.xml.utils.PrefixResolv
 import org.apache.xpath.XPath;
 import org.apache.xpath.XPathContext;
 
+import org.apache.batik.anim.dom.XBLOMContentElement;
 import org.apache.batik.dom.AbstractDocument;
-import org.apache.batik.dom.svg12.XBLOMContentElement;
 
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/XPathSubsetContentSelector.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/XPathSubsetContentSelector.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/XPathSubsetContentSelector.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/bridge/svg12/XPathSubsetContentSelector.java
 Tue Dec 23 15:10:45 2014
@@ -21,7 +21,7 @@ package org.apache.batik.bridge.svg12;
 import java.io.IOException;
 import java.util.ArrayList;
 
-import org.apache.batik.dom.svg12.XBLOMContentElement;
+import org.apache.batik.anim.dom.XBLOMContentElement;
 import org.apache.batik.parser.AbstractScanner;
 import org.apache.batik.parser.ParseException;
 import org.apache.batik.xml.XMLUtilities;

Modified: 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/dom/svg/AbstractSVGList.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/dom/svg/AbstractSVGList.java?rev=1647590&r1=1647589&r2=1647590&view=diff
==============================================================================
--- 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/dom/svg/AbstractSVGList.java
 (original)
+++ 
xmlgraphics/batik/branches/submodules_cyclic_deps/sources/org/apache/batik/dom/svg/AbstractSVGList.java
 Tue Dec 23 15:10:45 2014
@@ -399,7 +399,7 @@ public abstract class AbstractSVGList {
         }
 
         try {
-            ListBuilder builder = new ListBuilder();
+            ListBuilder builder = new ListBuilder(this);
 
             doParse(getValueAsString(), builder);
 
@@ -498,43 +498,4 @@ public abstract class AbstractSVGList {
         }
         list.clear();
     }
-
-    /**
-     * A class for receiving notification of parsed list items.
-     */
-    protected class ListBuilder implements ListHandler {
-
-        /**
-         * The list being built.
-         */
-        protected List list;
-
-        /**
-         * Returns the newly created list.
-         */
-        public List getList() {
-            return list;
-        }
-
-        /**
-         * Begins the construction of the list.
-         */
-        public void startList(){
-            list = new ArrayList();
-        }
-
-        /**
-         * Adds an item to the list.
-         */
-        public void item(SVGItem item) {
-            item.setParent(AbstractSVGList.this);
-            list.add(item);
-        }
-
-        /**
-         * Ends the construction of the list.
-         */
-        public void endList() {
-        }
-    }
 }


Reply via email to