You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by de...@apache.org on 2007/02/03 15:53:43 UTC
svn commit: r503215 - in /xmlgraphics/batik/trunk:
samples/tests/spec/linking/ sources/org/apache/batik/bridge/
sources/org/apache/batik/bridge/svg12/ sources/org/apache/batik/dom/events/
sources/org/apache/batik/extension/svg/ test-references/samples/...
Author: deweese
Date: Sat Feb 3 06:53:42 2007
New Revision: 503215
URL: http://svn.apache.org/viewvc?view=rev&rev=503215
Log:
1) Fixed preventDefault interaction with anchor element.
2) Added new tests for preventDefault with links
Modified:
xmlgraphics/batik/trunk/samples/tests/spec/linking/anchor.svg
xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGAElementBridge.java
xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGTextElementBridge.java
xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/svg12/SVGFlowRootElementBridge.java
xmlgraphics/batik/trunk/sources/org/apache/batik/dom/events/AbstractEvent.java
xmlgraphics/batik/trunk/sources/org/apache/batik/dom/events/EventSupport.java
xmlgraphics/batik/trunk/sources/org/apache/batik/extension/svg/BatikFlowTextElementBridge.java
xmlgraphics/batik/trunk/test-references/samples/tests/spec/linking/anchor.png
Modified: xmlgraphics/batik/trunk/samples/tests/spec/linking/anchor.svg
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/samples/tests/spec/linking/anchor.svg?view=diff&rev=503215&r1=503214&r2=503215
==============================================================================
--- xmlgraphics/batik/trunk/samples/tests/spec/linking/anchor.svg (original)
+++ xmlgraphics/batik/trunk/samples/tests/spec/linking/anchor.svg Sat Feb 3 06:53:42 2007
@@ -20,17 +20,19 @@
limitations under the License.
-->
-<!-- ========================================================================= -->
-<!-- This interactive test validates that the <anchor> tag works on the -->
-<!-- various element types. -->
-<!-- -->
-<!-- @author vhardy@apache.org -->
+<!-- ====================================================================== -->
+<!-- This interactive test validates that the <anchor> tag works on the -->
+<!-- various element types. -->
+<!-- -->
+<!-- @author vhardy@apache.org -->
<!-- @version $Id$ -->
-<!-- ========================================================================= -->
+<!-- ====================================================================== -->
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="body" width="450" height="500" viewBox="0 0 450 500">
-<title>Marker Test</title>
+<svg id="body" width="450" height="500" viewBox="0 0 450 500"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" >
+<title>Anchor (<a/>) Test</title>
<style type="text/css"><![CDATA[
.label { text-anchor: middle; }
@@ -38,8 +40,9 @@
<g id="content">
- <text class="title" x="50%" y="40">Anchor <a> Test
- <desc>Click in any of the links in the
+ <text class="title" x="50%" y="40"
+ >Anchor (<a>) Test<desc
+ >Click in any of the links in the
table. You should see a smilley.</desc></text>
<defs>
@@ -48,7 +51,18 @@
<circle cx="15" cy="15" r="10"/>
<circle cx="12" cy="12" r="1.5" fill="black"/>
<circle cx="17" cy="12" r="1.5" fill="black"/>
- <path d="M 10 19 A 8 8 0 0 0 20 19" stroke="black" stroke-width="1"/>
+ <path d="M 10 19 A 8 8 0 0 0 20 19"
+ stroke="black" stroke-width="1"/>
+ </g>
+ </g>
+
+ <g id="unsmilley">
+ <g transform="scale(.8, .8) translate(-15,-15)">
+ <circle cx="15" cy="15" r="10"/>
+ <circle cx="12" cy="12" r="1.5" fill="black"/>
+ <circle cx="17" cy="12" r="1.5" fill="black"/>
+ <path d="M 10 19 A 8 8 0 0 1 20 19" fill="none"
+ stroke="black" stroke-width="1"/>
</g>
</g>
@@ -56,29 +70,63 @@
<use xlink:href="#smilley" />
</g>
+ <g id="failure" fill="rgb(255,0,0)">
+ <use xlink:href="#unsmilley" />
+ </g>
+
</defs>
<g transform="translate(5, 5) scale(.2)">
- <use xlink:href="#success"/>
<a xlink:href="#svgView(viewBox(0,0,450,500))">
+ <use xlink:href="#success"/>
<text y="-11" font-size="2" fill="blue" text-decoration="underline" text-anchor="middle">Return to test</text>
</a>
</g>
- <g id="graphicsElementsTable" transform="translate(165, 80)">
+ <g transform="translate(10, 5) scale(.2)">
+ <a xlink:href="#svgView(viewBox(0,0,450,500))">
+ <use xlink:href="#failure"/>
+ <text y="-11" font-size="2" fill="blue" text-decoration="underline" text-anchor="middle">Return to test</text>
+ </a>
+ </g>
- <g id="additionalInfoHeader" transform="translate(60, 0)">
- <rect x="0" y="0" width="60" height="20" fill="#eeeeee" stroke="black" />
- <g id="additionalInfoHeaderLabels" transform="translate(0, 15)" class="label">
- <text x="30" y="0">Link</text>
- </g>
+
+ <g id="graphicsElementsTable" transform="translate(4, 60)">
+
+ <g id="additionalInfoHeader">
+ <g stroke="black">
+ <rect x="60" y="0" width="60" height="40" fill="#AFA"/>
+ <rect x="120" y="0" width="90" height="40" fill="#FCC"/>
+ <rect x="210" y="0" width="90" height="40" fill="#FCC"/>
+ <rect x="300" y="0" width="70" height="40" fill="#AFA"/>
+ <rect x="370" y="0" width="70" height="40" fill="#FCC"/>
+ </g>
+ <g id="additionalInfoHeaderLabels" class="label">
+ <text x="90" y="15">Link</text>
+
+ <text x="165" y="15">preventDefault</text>
+ <text x="165" y="30">inside a</text>
+
+ <text x="255" y="15">preventDefault</text>
+ <text x="255" y="30">outside a</text>
+
+ <text x="335" y="15">mouseover</text>
+ <text x="335" y="30">prvtDflt</text>
+
+ <text x="405" y="15">click</text>
+ <text x="405" y="30">prvtDflt</text>
+ </g>
</g>
- <g id="rectRow" transform="translate(0, 20)">
+ <g id="rectRow" transform="translate(0, 40)">
<g fill="white" stroke="black">
- <rect x="0" y="0" width="60" height="20" />
- <rect x="60" y="0" width="60" height="20" />
+ <rect x="0" y="0" width="60" height="20"/>
+ <rect x="60 " y="0" width="60" height="20"/>
+ <rect x="120" y="0" width="90" height="20"/>
+ <rect x="210" y="0" width="90" height="20"/>
+ <rect x="300" y="0" width="70" height="20"/>
+ <rect x="370" y="0" width="70" height="20"/>
</g>
<text x="30" y="15" class="label"><rect></text>
@@ -87,12 +135,44 @@
<rect id="testRect" x="80" y="3" fill="gold" width="20" height="14" />
</a>
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <rect onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()"
+ x="155" y="3" fill="gold" width="20" height="14" />
+ </a>
+
+ <g transform="translate(90,0)"
+ onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <rect x="155" y="3" fill="gold" width="20" height="14" />
+ </a>
+ </g>
+
+ <g transform="translate(170,0)"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(3,2.5,4,4))">
+ <rect x="155" y="3" fill="gold" width="20" height="14" />
+ </a>
+ </g>
+
+ <g transform="translate(240,0)"
+ onclick="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <rect x="155" y="3" fill="gold" width="20" height="14" />
+ </a>
+ </g>
+
</g> <!-- "rectRow" -->
- <g id="circleRow" transform="translate(0, 40)">
+ <g id="circleRow" transform="translate(0, 60)">
<g fill="white" stroke="black">
- <rect x="0" y="0" width="60" height="20" />
- <rect x="60" y="0" width="60" height="20" />
+ <rect x="0" y="0" width="60" height="20"/>
+ <rect x="60 " y="0" width="60" height="20"/>
+ <rect x="120" y="0" width="90" height="20"/>
+ <rect x="210" y="0" width="90" height="20"/>
+ <rect x="300" y="0" width="70" height="20"/>
+ <rect x="370" y="0" width="70" height="20"/>
</g>
<text x="30" y="15" class="label"><circle></text>
@@ -101,12 +181,44 @@
<circle id="testCircle" cx="90" cy="10" r="8" fill="crimson" />
</a>
- </g> <!-- "circleRow" -->
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <circle id="testCirclePd1"
+ onclick ="evt.preventDefault()"
+ onmouseover="evt.preventDefault()"
+ cx="165" cy="10" r="8" fill="crimson" />
+ </a>
+
+ <g transform="translate(90,0)"
+ onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <circle cx="165" cy="10" r="8" fill="crimson" />
+ </a>
+ </g>
- <g id="ellipseRow" transform="translate(0, 60)">
+ <g transform="translate(170,0)"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(3,2.5,4,4))">
+ <circle cx="165" cy="10" r="8" fill="crimson" />
+ </a>
+ </g>
+
+ <g transform="translate(240,0)"
+ onclick="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <circle cx="165" cy="10" r="8" fill="crimson" />
+ </a>
+ </g>
+ </g> <!-- "circleRow" -->
+
+ <g id="ellipseRow" transform="translate(0, 80)">
<g fill="white" stroke="black">
- <rect x="0" y="0" width="60" height="20" />
- <rect x="60" y="0" width="60" height="20" />
+ <rect x="0" y="0" width="60" height="20"/>
+ <rect x="60 " y="0" width="60" height="20"/>
+ <rect x="120" y="0" width="90" height="20"/>
+ <rect x="210" y="0" width="90" height="20"/>
+ <rect x="300" y="0" width="70" height="20"/>
+ <rect x="370" y="0" width="70" height="20"/>
</g>
<text x="30" y="15" class="label"><ellipse></text>
@@ -115,12 +227,43 @@
<ellipse cx="90" cy="10" rx="20" ry="6" fill="gold" />
</a>
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <ellipse onclick ="evt.preventDefault()"
+ onmouseover="evt.preventDefault()"
+ cx="165" cy="10" rx="20" ry="6" fill="gold" />
+ </a>
+
+ <g transform="translate(90,0)"
+ onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <ellipse cx="165" cy="10" rx="20" ry="6" fill="gold" />
+ </a>
+ </g>
+
+ <g transform="translate(170,0)"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(3,2.5,4,4))">
+ <ellipse cx="165" cy="10" rx="20" ry="6" fill="gold" />
+ </a>
+ </g>
+
+ <g transform="translate(240,0)"
+ onclick="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <ellipse cx="165" cy="10" rx="20" ry="6" fill="gold" />
+ </a>
+ </g>
</g> <!-- "ellipseRow" -->
- <g id="lineRow" transform="translate(0, 80)">
+ <g id="lineRow" transform="translate(0, 100)">
<g fill="white" stroke="black">
- <rect x="0" y="0" width="60" height="20" />
- <rect x="60" y="0" width="60" height="20" />
+ <rect x="0" y="0" width="60" height="20"/>
+ <rect x="60 " y="0" width="60" height="20"/>
+ <rect x="120" y="0" width="90" height="20"/>
+ <rect x="210" y="0" width="90" height="20"/>
+ <rect x="300" y="0" width="70" height="20"/>
+ <rect x="370" y="0" width="70" height="20"/>
</g>
<text x="30" y="15" class="label"><line></text>
@@ -129,12 +272,48 @@
<line x1="70" y1="10" x2="110" y2="10" stroke="gold" stroke-width="4" />
</a>
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <line onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()"
+ x1="145" y1="10" x2="185" y2="10"
+ stroke="gold" stroke-width="4" />
+ </a>
+
+
+ <g transform="translate(90,0)"
+ onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <line x1="145" y1="10" x2="185" y2="10"
+ stroke="gold" stroke-width="4" />
+ </a>
+ </g>
+
+ <g transform="translate(170,0)"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(3,2.5,4,4))">
+ <line x1="145" y1="10" x2="185" y2="10"
+ stroke="gold" stroke-width="4" />
+ </a>
+ </g>
+
+ <g transform="translate(240,0)"
+ onclick="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <line x1="145" y1="10" x2="185" y2="10"
+ stroke="gold" stroke-width="4" />
+ </a>
+ </g>
</g> <!-- "lineRow" -->
- <g id="polylineRow" transform="translate(0, 100)">
+ <g id="polylineRow" transform="translate(0, 120)">
<g fill="white" stroke="black">
- <rect x="0" y="0" width="60" height="20" />
- <rect x="60" y="0" width="60" height="20" />
+ <rect x="0" y="0" width="60" height="20"/>
+ <rect x="60 " y="0" width="60" height="20"/>
+ <rect x="120" y="0" width="90" height="20"/>
+ <rect x="210" y="0" width="90" height="20"/>
+ <rect x="300" y="0" width="70" height="20"/>
+ <rect x="370" y="0" width="70" height="20"/>
</g>
<text x="30" y="15" class="label"><polyline></text>
@@ -144,84 +323,291 @@
fill="none" stroke="gold" stroke-width="4" />
</a>
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <polyline onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()"
+ points="140,10 140,15 165,15 165,5 190,5 190,10"
+ fill="none" stroke="gold" stroke-width="4" />
+ </a>
+ <g transform="translate(90,0)"
+ onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <polyline points="140,10 140,15 165,15 165,5 190,5 190,10"
+ fill="none" stroke="gold" stroke-width="4" />
+ </a>
+ </g>
+
+ <g transform="translate(170,0)"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(3,2.5,4,4))">
+ <polyline points="140,10 140,15 165,15 165,5 190,5 190,10"
+ fill="none" stroke="gold" stroke-width="4" />
+ </a>
+ </g>
+
+ <g transform="translate(240,0)"
+ onclick="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <polyline points="140,10 140,15 165,15 165,5 190,5 190,10"
+ fill="none" stroke="gold" stroke-width="4" />
+ </a>
+ </g>
</g> <!-- "polylineRow" -->
- <g id="polygonRow" transform="translate(0, 120)">
+ <g id="polygonRow" transform="translate(0, 140)">
<g fill="white" stroke="black">
- <rect x="0" y="0" width="60" height="20" />
- <rect x="60" y="0" width="60" height="20" />
+ <rect x="0" y="0" width="60" height="20"/>
+ <rect x="60 " y="0" width="60" height="20"/>
+ <rect x="120" y="0" width="90" height="20"/>
+ <rect x="210" y="0" width="90" height="20"/>
+ <rect x="300" y="0" width="70" height="20"/>
+ <rect x="370" y="0" width="70" height="20"/>
</g>
<text x="30" y="15" class="label"><polygon></text>
<a xlink:href="#svgView(viewBox(3,2.5,4,4))">
- <polygon transform="translate(60, 0)" points="5,10 5,15 30,15 30,5 55,5 55,10"
- fill="gold" stroke="black" stroke-width="1" />
+ <polygon points="65,10 65,15 90,15 90,5 115,5 115,10"
+ fill="gold" stroke="black" stroke-width="1" />
+ </a>
+
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <polygon onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()"
+ points="140,10 140,15 165,15 165,5 190,5 190,10"
+ fill="gold" stroke="black" stroke-width="1" />
+ </a>
+
+ <g transform="translate(90,0)"
+ onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <polygon points="140,10 140,15 165,15 165,5 190,5 190,10"
+ fill="gold" stroke="black" stroke-width="1" />
+ </a>
+ </g>
+
+ <g transform="translate(170,0)"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(3,2.5,4,4))">
+ <polygon points="140,10 140,15 165,15 165,5 190,5 190,10"
+ fill="gold" stroke="black" stroke-width="1" />
</a>
+ </g>
+ <g transform="translate(240,0)"
+ onclick="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <polygon points="140,10 140,15 165,15 165,5 190,5 190,10"
+ fill="gold" stroke="black" stroke-width="1" />
+ </a>
+ </g>
</g> <!-- "polygonRow" -->
- <g id="pathRow" transform="translate(0, 140)">
+ <g id="pathRow" transform="translate(0, 160)">
<g fill="white" stroke="black">
- <rect x="0" y="0" width="60" height="20" />
- <rect x="60" y="0" width="60" height="20" />
+ <rect x="0" y="0" width="60" height="20"/>
+ <rect x="60 " y="0" width="60" height="20"/>
+ <rect x="120" y="0" width="90" height="20"/>
+ <rect x="210" y="0" width="90" height="20"/>
+ <rect x="300" y="0" width="70" height="20"/>
+ <rect x="370" y="0" width="70" height="20"/>
</g>
<text x="30" y="15" class="label"><path></text>
<a xlink:href="#svgView(viewBox(3,2.5,4,4))">
- <path transform="translate(60, 0)" d="M5,10l0,5l25,0l0,-10l25,0l0,5Z"
- fill="gold" stroke="black" stroke-width="1" />
+ <path d="M65,10l0,5l25,0l0,-10l25,0l0,5Z"
+ fill="gold" stroke="black" stroke-width="1" />
+ </a>
+
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <path onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()"
+ d="M140,10l0,5l25,0l0,-10l25,0l0,5Z"
+ fill="gold" stroke="black" stroke-width="1" />
</a>
+ <g transform="translate(90,0)"
+ onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <path d="M140,10l0,5l25,0l0,-10l25,0l0,5Z"
+ fill="gold" stroke="black" stroke-width="1" />
+ </a>
+ </g>
+
+ <g transform="translate(170,0)"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(3,2.5,4,4))">
+ <path d="M140,10l0,5l25,0l0,-10l25,0l0,5Z"
+ fill="gold" stroke="black" stroke-width="1" />
+ </a>
+ </g>
+
+ <g transform="translate(240,0)"
+ onclick="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <path d="M140,10l0,5l25,0l0,-10l25,0l0,5Z"
+ fill="gold" stroke="black" stroke-width="1" />
+ </a>
+ </g>
</g> <!-- "pathRow" -->
- <g id="imageRow" transform="translate(0, 160)">
+ <g id="imageRow" transform="translate(0, 180)">
<g fill="white" stroke="black">
- <rect x="0" y="0" width="60" height="20" />
- <rect x="60" y="0" width="60" height="20" />
+ <rect x="0" y="0" width="60" height="20"/>
+ <rect x="60 " y="0" width="60" height="20"/>
+ <rect x="120" y="0" width="90" height="20"/>
+ <rect x="210" y="0" width="90" height="20"/>
+ <rect x="300" y="0" width="70" height="20"/>
+ <rect x="370" y="0" width="70" height="20"/>
</g>
<text x="30" y="15" class="label"><image></text>
<a xlink:href="#svgView(viewBox(3,2.5,4,4))">
- <image transform="translate(60, 0)" x="8" y="2" width="43" height="18" xlink:href="../../resources/images/tde.jpg"/>
+ <image x="68" y="1" width="43" height="18"
+ xlink:href="../../resources/images/tde.jpg"/>
+ </a>
+
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <image onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()"
+ x="143" y="1" width="43" height="18"
+ xlink:href="../../resources/images/tde.jpg"/>
+ </a>
+
+ <g transform="translate(90,0)"
+ onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <image x="143" y="1" width="43" height="18"
+ xlink:href="../../resources/images/tde.jpg"/>
+ </a>
+ </g>
+
+ <g transform="translate(170,0)"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(3,2.5,4,4))">
+ <image x="143" y="1" width="43" height="18"
+ xlink:href="../../resources/images/tde.jpg"/>
</a>
+ </g>
+ <g transform="translate(240,0)"
+ onclick="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <image x="143" y="1" width="43" height="18"
+ xlink:href="../../resources/images/tde.jpg"/>
+ </a>
+ </g>
</g> <!-- "imageRow" -->
- <g id="svgImageRow" transform="translate(0, 180)">
+ <g id="svgImageRow" transform="translate(0, 200)">
<g fill="white" stroke="black">
- <rect x="0" y="0" width="60" height="20" />
- <rect x="60" y="0" width="60" height="20" />
+ <rect x="0" y="0" width="60" height="20"/>
+ <rect x="60 " y="0" width="60" height="20"/>
+ <rect x="120" y="0" width="90" height="20"/>
+ <rect x="210" y="0" width="90" height="20"/>
+ <rect x="300" y="0" width="70" height="20"/>
+ <rect x="370" y="0" width="70" height="20"/>
</g>
<text x="30" y="15" class="label"><image></text>
<a xlink:href="#svgView(viewBox(3,2.5,4,4))">
- <image transform="translate(60, 0)" x="20" y="2" width="24" height="18" xlink:href="../../resources/images/svg.svg"/>
+ <image x="80" y="2" width="24" height="18"
+ xlink:href="../../resources/images/svg.svg"/>
</a>
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <image onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()"
+ x="155" y="2" width="24" height="18"
+ xlink:href="../../resources/images/svg.svg"/>
+ </a>
+
+ <g transform="translate(90,0)"
+ onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <image x="155" y="2" width="24" height="18"
+ xlink:href="../../resources/images/svg.svg"/>
+ </a>
+ </g>
+
+ <g transform="translate(170,0)"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(3,2.5,4,4))">
+ <image x="155" y="2" width="24" height="18"
+ xlink:href="../../resources/images/svg.svg"/>
+ </a>
+ </g>
+
+ <g transform="translate(240,0)"
+ onclick="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <image x="155" y="2" width="24" height="18"
+ xlink:href="../../resources/images/svg.svg"/>
+ </a>
+ </g>
</g> <!-- "svgImageRow" -->
- <g id="textRow" transform="translate(0, 200)">
+ <g id="textRow" transform="translate(0, 220)">
<g fill="white" stroke="black">
- <rect x="0" y="0" width="60" height="20" />
- <rect x="60" y="0" width="60" height="20" />
+ <rect x="0" y="0" width="60" height="20"/>
+ <rect x="60 " y="0" width="60" height="20"/>
+ <rect x="120" y="0" width="90" height="20"/>
+ <rect x="210" y="0" width="90" height="20"/>
+ <rect x="300" y="0" width="70" height="20"/>
+ <rect x="370" y="0" width="70" height="20"/>
</g>
<text x="30" y="15" class="label"><text></text>
<a xlink:href="#svgView(viewBox(3,2.5,4,4))">
- <text transform="translate(60, 0)" x="30" y="15" text-anchor="middle">Ho, la, la!</text>
+ <text x="90" y="15" text-anchor="middle">Ho, la, la!</text>
</a>
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <text onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()"
+ x="165" y="15" text-anchor="middle">Ho, la, la!</text>
+ </a>
+
+ <g transform="translate(90,0)"
+ onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <text x="165" y="15" text-anchor="middle">Ho, la, la!</text>
+ </a>
+ </g>
+
+ <g transform="translate(170,0)"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(3,2.5,4,4))">
+ <text x="165" y="15" text-anchor="middle">Ho, la, la!</text>
+ </a>
+ </g>
+
+ <g transform="translate(240,0)"
+ onclick="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <text x="165" y="15" text-anchor="middle">Ho, la, la!</text>
+ </a>
+ </g>
</g> <!-- "textRow" -->
- <g id="useRow" transform="translate(0, 220)">
+ <g id="useRow" transform="translate(0, 240)">
<g fill="white" stroke="black">
- <rect x="0" y="0" width="60" height="20" />
- <rect x="60" y="0" width="60" height="20" />
+ <rect x="0" y="0" width="60" height="20"/>
+ <rect x="60 " y="0" width="60" height="20"/>
+ <rect x="120" y="0" width="90" height="20"/>
+ <rect x="210" y="0" width="90" height="20"/>
+ <rect x="300" y="0" width="70" height="20"/>
+ <rect x="370" y="0" width="70" height="20"/>
</g>
<text x="30" y="15" class="label"><use></text>
@@ -230,25 +616,106 @@
<use xlink:href="#testRect" />
</a>
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <use onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()"
+ x="75" xlink:href="#testRect" />
+ </a>
+
+ <g transform="translate(90,0)"
+ onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <use x="75" xlink:href="#testRect" />
+ </a>
+ </g>
+
+ <g transform="translate(170,0)"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(3,2.5,4,4))">
+ <use x="75" xlink:href="#testRect" />
+ </a>
+ </g>
+
+ <g transform="translate(240,0)"
+ onclick="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <use x="75" xlink:href="#testRect" />
+ </a>
+ </g>
+
</g> <!-- "useRow" -->
- <g id="groupRow" transform="translate(0, 240)">
+ <g id="groupRow" transform="translate(0, 260)">
<g fill="white" stroke="black">
- <rect x="0" y="0" width="60" height="20" />
- <rect x="60" y="0" width="60" height="20" />
+ <rect x="0" y="0" width="60" height="20"/>
+ <rect x="60 " y="0" width="60" height="20"/>
+ <rect x="120" y="0" width="90" height="20"/>
+ <rect x="210" y="0" width="90" height="20"/>
+ <rect x="300" y="0" width="70" height="20"/>
+ <rect x="370" y="0" width="70" height="20"/>
</g>
<text x="30" y="15" class="label"><g></text>
<a xlink:href="#svgView(viewBox(3,2.5,4,4))">
<g>
- <use xlink:href="#testRect" />
- <use xlink:href="#testCircle" transform="translate(10, 0)"/>
+ <use xlink:href="#testRect" />
+ <use x="10" xlink:href="#testCircle"/>
+ </g>
+ </a>
+
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <g onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()">
+ <use x="75" xlink:href="#testRect" />
+ <use x="85" xlink:href="#testCircle"/>
</g>
</a>
+ <g transform="translate(90,0)"
+ onclick="evt.preventDefault()"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <g>
+ <use x="75" xlink:href="#testRect" />
+ <use x="85" xlink:href="#testCircle"/>
+ </g>
+ </a>
+ </g>
+
+ <g transform="translate(170,0)"
+ onmouseover="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(3,2.5,4,4))">
+ <g>
+ <use x="75" xlink:href="#testRect" />
+ <use x="85" xlink:href="#testCircle"/>
+ </g>
+ </a>
+ </g>
+
+ <g transform="translate(240,0)"
+ onclick="evt.preventDefault()">
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <g>
+ <use x="75" xlink:href="#testRect" />
+ <use x="85" xlink:href="#testCircle"/>
+ </g>
+ </a>
+ </g>
</g> <!-- "groupRow" -->
+ <a xlink:href="#svgView(viewBox(8,2.5,4,4))">
+ <a xlink:href="#svgView(viewBox(3,2.5,4,4))">
+ <g transform="translate(120,330)">
+ <use xlink:href="#testRect" />
+ <use x="10" xlink:href="#testCircle"/>
+ </g>
+ </a>
+ </a>
+
+ <text x="215" y="365" class="label"
+ >Element with two 'a' elems</text>
</g>
</g><!-- "content" -->
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGAElementBridge.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGAElementBridge.java?view=diff&rev=503215&r1=503214&r2=503215
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGAElementBridge.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGAElementBridge.java Sat Feb 3 06:53:42 2007
@@ -20,6 +20,9 @@
import java.awt.Cursor;
+import java.util.Iterator;
+import java.util.List;
+
import org.apache.batik.dom.events.AbstractEvent;
import org.apache.batik.dom.events.NodeEventTarget;
import org.apache.batik.gvt.GraphicsNode;
@@ -77,7 +80,9 @@
if (ctx.isInteractive()) {
NodeEventTarget target = (NodeEventTarget)e;
- al = new AnchorListener(ctx.getUserAgent());
+ CursorHolder ch = new CursorHolder(CursorManager.DEFAULT_CURSOR);
+
+ al = new AnchorListener(ctx.getUserAgent(), ch);
target.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_CLICK,
al, false, null);
@@ -86,7 +91,7 @@
XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_CLICK,
al, false);
- bl = new CursorMouseOverListener(ctx.getUserAgent());
+ bl = new CursorMouseOverListener(ctx.getUserAgent(), ch);
target.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_MOUSEOVER,
bl, false, null);
@@ -94,7 +99,8 @@
(target,
XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_MOUSEOVER,
bl, false);
- cl = new CursorMouseOutListener(ctx.getUserAgent());
+
+ cl = new CursorMouseOutListener(ctx.getUserAgent(), ch);
target.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_MOUSEOUT,
cl, false, null);
@@ -135,26 +141,72 @@
return true;
}
+ public static class CursorHolder {
+ Cursor cursor = null;
+
+ public CursorHolder(Cursor c) {
+ cursor = c;
+ }
+
+ public void holdCursor(Cursor c) {
+ cursor = c;
+ }
+ public Cursor getCursor() {
+ return cursor;
+ }
+ }
+
/**
* To handle a click on an anchor.
*/
public static class AnchorListener implements EventListener {
-
protected UserAgent userAgent;
+ protected CursorHolder holder;
- public AnchorListener(UserAgent ua) {
+ public AnchorListener(UserAgent ua, CursorHolder ch) {
userAgent = ua;
+ holder = ch;
}
public void handleEvent(Event evt) {
- if (((AbstractEvent) evt).getDefaultPrevented()) {
- return;
+ if (!(evt instanceof AbstractEvent)) return;
+ final AbstractEvent ae = (AbstractEvent)evt;
+
+ List l = ae.getDefaultActions();
+ if (l != null) {
+ Iterator i = l.iterator();
+ while (i.hasNext()) {
+ Object o = i.next();
+ if (o instanceof AnchorDefaultActionable)
+ return; // only one anchor in default list...
+ }
}
+
+
SVGAElement elt = (SVGAElement)evt.getCurrentTarget();
- Cursor cursor = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
- userAgent.setSVGCursor(cursor);
+ ae.addDefaultAction(new AnchorDefaultActionable
+ (elt, userAgent, holder));
+ }
+ }
+
+
+ public static class AnchorDefaultActionable implements Runnable {
+
+ protected SVGAElement elt;
+ protected UserAgent userAgent;
+ protected CursorHolder holder;
+
+ public AnchorDefaultActionable(SVGAElement e,
+ UserAgent ua,
+ CursorHolder ch) {
+ elt = e;
+ userAgent = ua;
+ holder = ch;
+ }
+
+ public void run() {
+ userAgent.setSVGCursor(holder.getCursor());
userAgent.openLink(elt);
- evt.stopPropagation();
}
}
@@ -164,16 +216,53 @@
public static class CursorMouseOverListener implements EventListener {
protected UserAgent userAgent;
+ protected CursorHolder holder;
- public CursorMouseOverListener(UserAgent ua) {
+ public CursorMouseOverListener(UserAgent ua, CursorHolder ch) {
userAgent = ua;
+ holder = ch;
}
public void handleEvent(Event evt) {
- if (((AbstractEvent) evt).getDefaultPrevented()) {
- return;
+ if (!(evt instanceof AbstractEvent)) return;
+ final AbstractEvent ae = (AbstractEvent)evt;
+
+ List l = ae.getDefaultActions();
+ if (l != null) {
+ Iterator i = l.iterator();
+ while (i.hasNext()) {
+ Object o = i.next();
+ if (o instanceof MouseOverDefaultActionable)
+ return; // only one anchor in default list...
+ }
}
- //
+
+ Element target = (Element)ae.getTarget();
+ SVGAElement elt = (SVGAElement)ae.getCurrentTarget();
+
+ ae.addDefaultAction(new MouseOverDefaultActionable
+ (target, elt, userAgent, holder));
+ }
+ }
+
+ public static class MouseOverDefaultActionable implements Runnable {
+
+ protected Element target;
+ protected SVGAElement elt;
+ protected UserAgent userAgent;
+ protected CursorHolder holder;
+
+ public MouseOverDefaultActionable(Element t,
+ SVGAElement e,
+ UserAgent ua,
+ CursorHolder ch) {
+ target = t;
+ elt = e;
+ userAgent = ua;
+ holder = ch;
+ }
+
+ public void run() {
// Only modify the cursor if the target's cursor property is
// 'auto'. Note that we do not need to check the value of
// anchor element as the target's cursor value is resulting
@@ -191,9 +280,8 @@
// The cursor on the inside rect will be set to the hand cursor and
// not the wait cursor
//
- Element target = (Element)evt.getTarget();
-
if (CSSUtilities.isAutoCursor(target)) {
+ holder.holdCursor(CursorManager.DEFAULT_CURSOR);
// The target's cursor value is 'auto': use the hand cursor
userAgent.setSVGCursor(CursorManager.ANCHOR_CURSOR);
}
@@ -201,8 +289,6 @@
//
// In all cases, display the href in the userAgent
//
-
- SVGAElement elt = (SVGAElement)evt.getCurrentTarget();
if (elt != null) {
String href = elt.getHref().getAnimVal();
userAgent.displayMessage(href);
@@ -216,20 +302,52 @@
public static class CursorMouseOutListener implements EventListener {
protected UserAgent userAgent;
+ protected CursorHolder holder;
- public CursorMouseOutListener(UserAgent ua) {
+ public CursorMouseOutListener(UserAgent ua, CursorHolder ch) {
userAgent = ua;
+ holder = ch;
}
public void handleEvent(Event evt) {
- if (((AbstractEvent) evt).getDefaultPrevented()) {
- return;
+ if (!(evt instanceof AbstractEvent)) return;
+ final AbstractEvent ae = (AbstractEvent)evt;
+
+ List l = ae.getDefaultActions();
+ if (l != null) {
+ Iterator i = l.iterator();
+ while (i.hasNext()) {
+ Object o = i.next();
+ if (o instanceof MouseOutDefaultActionable)
+ return; // only one anchor in default list...
+ }
}
+
+ SVGAElement elt = (SVGAElement)evt.getCurrentTarget();
+ ae.addDefaultAction(new MouseOutDefaultActionable
+ (elt, userAgent, holder));
+ }
+ }
+
+ public static class MouseOutDefaultActionable implements Runnable {
+
+ protected SVGAElement elt;
+ protected UserAgent userAgent;
+ protected CursorHolder holder;
+
+ public MouseOutDefaultActionable(SVGAElement e,
+ UserAgent ua,
+ CursorHolder ch) {
+ elt = e;
+ userAgent = ua;
+ holder = ch;
+ }
+
+ public void run() {
// No need to set the cursor on out events: this is taken care of
- // by the BridgeContext
+ // by the BridgeContext(?)
// Hide the href in the userAgent
- SVGAElement elt = (SVGAElement)evt.getCurrentTarget();
if (elt != null) {
userAgent.displayMessage("");
}
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGTextElementBridge.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGTextElementBridge.java?view=diff&rev=503215&r1=503214&r2=503215
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGTextElementBridge.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/SVGTextElementBridge.java Sat Feb 3 06:53:42 2007
@@ -918,10 +918,14 @@
} else if (ln.equals(SVG_A_TAG)) {
NodeEventTarget target = (NodeEventTarget)nodeElement;
UserAgent ua = ctx.getUserAgent();
- EventListener l = new SVGAElementBridge.AnchorListener(ua);
+ SVGAElementBridge.CursorHolder ch;
+ ch = new SVGAElementBridge.CursorHolder
+ (CursorManager.DEFAULT_CURSOR);
+ EventListener l;
+ l = new SVGAElementBridge.AnchorListener(ua, ch);
target.addEventListenerNS
- (XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_CLICK,
- l, false, null);
+ (XMLConstants.XML_EVENTS_NAMESPACE_URI,
+ SVG_EVENT_CLICK, l, false, null);
ctx.storeEventListenerNS
(target, XMLConstants.XML_EVENTS_NAMESPACE_URI,
SVG_EVENT_CLICK, l, false);
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/svg12/SVGFlowRootElementBridge.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/svg12/SVGFlowRootElementBridge.java?view=diff&rev=503215&r1=503214&r2=503215
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/svg12/SVGFlowRootElementBridge.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/bridge/svg12/SVGFlowRootElementBridge.java Sat Feb 3 06:53:42 2007
@@ -40,6 +40,7 @@
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.GVTBuilder;
import org.apache.batik.bridge.SVGTextElementBridge;
import org.apache.batik.bridge.SVGUtilities;
@@ -666,22 +667,25 @@
if (ctx.isInteractive()) {
NodeEventTarget target = (NodeEventTarget)nodeElement;
UserAgent ua = ctx.getUserAgent();
+ SVGAElementBridge.CursorHolder ch;
+ ch = new SVGAElementBridge.CursorHolder
+ (CursorManager.DEFAULT_CURSOR);
target.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI,
SVG_EVENT_CLICK,
- new SVGAElementBridge.AnchorListener(ua),
+ new SVGAElementBridge.AnchorListener(ua, ch),
false, null);
target.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI,
SVG_EVENT_MOUSEOVER,
- new SVGAElementBridge.CursorMouseOverListener(ua),
+ new SVGAElementBridge.CursorMouseOverListener(ua,ch),
false, null);
target.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI,
SVG_EVENT_MOUSEOUT,
- new SVGAElementBridge.CursorMouseOutListener(ua),
+ new SVGAElementBridge.CursorMouseOutListener(ua,ch),
false, null);
}
fillAttributedStringBuffer(ctx,
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/dom/events/AbstractEvent.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/dom/events/AbstractEvent.java?view=diff&rev=503215&r1=503214&r2=503215
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/dom/events/AbstractEvent.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/dom/events/AbstractEvent.java Sat Feb 3 06:53:42 2007
@@ -23,6 +23,9 @@
import org.w3c.dom.events.Event;
import org.w3c.dom.events.EventTarget;
+import java.util.ArrayList;
+import java.util.List;
+
/**
* The abstract <code>Event</code> root class.
*
@@ -95,6 +98,11 @@
protected Event originalEvent;
/**
+ * List of default Actionables to run at the end of bubble phase.
+ */
+ protected List defaultActions;
+
+ /**
* The number of nodes in the document this event will visit
* during capturing, bubbling and firing at the target.
* A value of 0 means to let the event be captured and bubble all
@@ -219,6 +227,19 @@
*/
public boolean getDefaultPrevented() {
return preventDefault;
+ }
+
+ /**
+ * Returns the current list of default action runnables
+ */
+ public List getDefaultActions() { return defaultActions; }
+
+ /**
+ * Adds the runnable to the list of default action runnables
+ */
+ public void addDefaultAction(Runnable rable) {
+ if (defaultActions == null) defaultActions = new ArrayList();
+ defaultActions.add(rable);
}
/**
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/dom/events/EventSupport.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/dom/events/EventSupport.java?view=diff&rev=503215&r1=503214&r2=503215
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/dom/events/EventSupport.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/dom/events/EventSupport.java Sat Feb 3 06:53:42 2007
@@ -19,6 +19,8 @@
package org.apache.batik.dom.events;
import java.util.HashSet;
+import java.util.List;
+import java.util.Iterator;
import org.apache.batik.dom.AbstractDocument;
import org.apache.batik.dom.AbstractNode;
@@ -275,6 +277,16 @@
toBeStoppedGroups);
stoppedGroups.addAll(toBeStoppedGroups);
toBeStoppedGroups.clear();
+ }
+ }
+ if (!e.getDefaultPrevented()) {
+ List runables = e.getDefaultActions();
+ if (runables != null) {
+ Iterator i = runables.iterator();
+ while (i.hasNext()) {
+ Runnable r = (Runnable)i.next();
+ r.run();
+ }
}
}
return e.getDefaultPrevented();
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/extension/svg/BatikFlowTextElementBridge.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/extension/svg/BatikFlowTextElementBridge.java?view=diff&rev=503215&r1=503214&r2=503215
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/extension/svg/BatikFlowTextElementBridge.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/extension/svg/BatikFlowTextElementBridge.java Sat Feb 3 06:53:42 2007
@@ -34,6 +34,7 @@
import org.apache.batik.bridge.BridgeContext;
import org.apache.batik.bridge.BridgeException;
import org.apache.batik.bridge.CSSUtilities;
+import org.apache.batik.bridge.CursorManager;
import org.apache.batik.bridge.SVGAElementBridge;
import org.apache.batik.bridge.SVGTextElementBridge;
import org.apache.batik.bridge.SVGUtilities;
@@ -576,22 +577,25 @@
if (ctx.isInteractive()) {
NodeEventTarget target = (NodeEventTarget)nodeElement;
UserAgent ua = ctx.getUserAgent();
+ SVGAElementBridge.CursorHolder ch;
+ ch = new SVGAElementBridge.CursorHolder
+ (CursorManager.DEFAULT_CURSOR);
target.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI,
SVG_EVENT_CLICK,
- new SVGAElementBridge.AnchorListener(ua),
+ new SVGAElementBridge.AnchorListener(ua,ch),
false, null);
target.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI,
SVG_EVENT_MOUSEOVER,
- new SVGAElementBridge.CursorMouseOverListener(ua),
+ new SVGAElementBridge.CursorMouseOverListener(ua,ch),
false, null);
target.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI,
SVG_EVENT_MOUSEOUT,
- new SVGAElementBridge.CursorMouseOutListener(ua),
+ new SVGAElementBridge.CursorMouseOutListener(ua,ch),
false, null);
}
fillAttributedStringBuffer(ctx,
Modified: xmlgraphics/batik/trunk/test-references/samples/tests/spec/linking/anchor.png
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-references/samples/tests/spec/linking/anchor.png?view=diff&rev=503215&r1=503214&r2=503215
==============================================================================
Binary files - no diff available.