| 1 |
<?xml version="1.0" standalone="no"?> |
| 2 |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" |
| 3 |
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> |
| 4 |
|
| 5 |
<!-- |
| 6 |
|
| 7 |
Licensed to the Apache Software Foundation (ASF) under one or more |
| 8 |
contributor license agreements. See the NOTICE file distributed with |
| 9 |
this work for additional information regarding copyright ownership. |
| 10 |
The ASF licenses this file to You under the Apache License, Version 2.0 |
| 11 |
(the "License"); you may not use this file except in compliance with |
| 12 |
the License. You may obtain a copy of the License at |
| 13 |
|
| 14 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 15 |
|
| 16 |
Unless required by applicable law or agreed to in writing, software |
| 17 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 18 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 19 |
See the License for the specific language governing permissions and |
| 20 |
limitations under the License. |
| 21 |
|
| 22 |
--> |
| 23 |
<!-- ========================================================================= --> |
| 24 |
<!-- Tests support for the cursor property. --> |
| 25 |
<!-- --> |
| 26 |
<!-- @author [email protected] --> |
| 27 |
<!-- @version $Id$ --> |
| 28 |
<!-- ========================================================================= --> |
| 29 |
|
| 30 |
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| 31 |
|
| 32 |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" |
| 33 |
id="body" width="450" height="500" viewBox="0 0 450 500" > |
| 34 |
|
| 35 |
<text class="title" x="50%" y="50">Cursor Property</text> |
| 36 |
|
| 37 |
<defs> |
| 38 |
<rect x="-95" y="-16" width="190" height="20" id="cell"/> |
| 39 |
<g id="row"> |
| 40 |
<use xlink:href="#cell" /> |
| 41 |
</g> |
| 42 |
|
| 43 |
<use id="oddRow" xlink:href="#row" stroke="black" fill="white" /> |
| 44 |
<use id="evenRow" xlink:href="#row" stroke="black" fill="#eeeeee" /> |
| 45 |
<use id="oddRowCursor" xlink:href="#row" stroke="black" fill="crimson" cursor="wait"/> |
| 46 |
<use id="evenRowCursor" xlink:href="#row" stroke="black" fill="gold" cursor="wait"/> |
| 47 |
|
| 48 |
<cursor id="customCursor" x="16" y="16" xlink:href="../../resources/images/hotSpotCenter.png" /> |
| 49 |
<cursor id="customCursor2" x="32" y="0" xlink:href="../../resources/images/hotSpotNE.png" /> |
| 50 |
|
| 51 |
</defs> |
| 52 |
|
| 53 |
<g transform="translate(120, 120)" class="label" text-anchor="middle" onmouseover="cursorMoved(evt)"> |
| 54 |
<use xlink:href="#oddRow" cursor="auto"/> |
| 55 |
<text>auto</text> |
| 56 |
<g transform="translate(0,20)" cursor="crosshair"> |
| 57 |
<use xlink:href="#evenRow"/> |
| 58 |
<text>crosshair</text> |
| 59 |
</g> |
| 60 |
<g transform="translate(0,40)" cursor="default"> |
| 61 |
<use xlink:href="#oddRow"/> |
| 62 |
<text>default</text> |
| 63 |
</g> |
| 64 |
<g transform="translate(0,60)" cursor="pointer"> |
| 65 |
<use xlink:href="#evenRow"/> |
| 66 |
<text>pointer</text> |
| 67 |
</g> |
| 68 |
<g transform="translate(0,80)" cursor="move"> |
| 69 |
<use xlink:href="#oddRow"/> |
| 70 |
<text>move</text> |
| 71 |
</g> |
| 72 |
<g transform="translate(0,100)" cursor="text"> |
| 73 |
<use xlink:href="#evenRow"/> |
| 74 |
<text>text</text> |
| 75 |
</g> |
| 76 |
<g transform="translate(0,120)" cursor="wait"> |
| 77 |
<use xlink:href="#oddRow"/> |
| 78 |
<text>wait</text> |
| 79 |
</g> |
| 80 |
<g transform="translate(0,140)" cursor="help"> |
| 81 |
<use xlink:href="#evenRow"/> |
| 82 |
<text>help</text> |
| 83 |
</g> |
| 84 |
<a cursor="auto"><g transform="translate(0,160)"> |
| 85 |
<use xlink:href="#oddRow"/> |
| 86 |
<text><a> cursor=auto</text> |
| 87 |
</g></a> |
| 88 |
<a cursor="wait"><g transform="translate(0,180)"> |
| 89 |
<use xlink:href="#evenRow"/> |
| 90 |
<text><a> cursor=wait</text> |
| 91 |
</g></a> |
| 92 |
<g transform="translate(0,200)"> |
| 93 |
<use xlink:href="#oddRow"/> |
| 94 |
<text cursor="auto"><text> cursor=auto</text> |
| 95 |
</g> |
| 96 |
<g transform="translate(0,220)"> |
| 97 |
<use xlink:href="#evenRow"/> |
| 98 |
<text cursor="wait"><text> cursor=wait</text> |
| 99 |
</g> |
| 100 |
<a cursor="auto"><g transform="translate(0,240)"> |
| 101 |
<use xlink:href="#oddRow"/> |
| 102 |
<text><a>.. <text />.. <a> cursor=auto</text> |
| 103 |
</g></a> |
| 104 |
<g transform="translate(0,260)"> |
| 105 |
<use xlink:href="#evenRow"/> |
| 106 |
<a cursor="crosshair"><text><a> <text /> <a> cursor=crosshair</text></a> |
| 107 |
</g> |
| 108 |
<g transform="translate(0,280)"> |
| 109 |
<use xlink:href="#oddRow"/> |
| 110 |
<text cursor="auto"><text><a fill="blue"><a/></a><text> cursor=auto</text> |
| 111 |
</g> |
| 112 |
<g transform="translate(0,300)"> |
| 113 |
<use xlink:href="#evenRow"/> |
| 114 |
<text cursor="wait"><text><a fill="blue"><a/></a><text> cursor=wait</text> |
| 115 |
</g> |
| 116 |
</g> |
| 117 |
|
| 118 |
|
| 119 |
<g transform="translate(330, 120)" class="label" text-anchor="middle" onmouseover="cursorMoved(evt)"> |
| 120 |
<g transform="translate(0,0)" cursor="e-resize"> |
| 121 |
<use xlink:href="#oddRow"/> |
| 122 |
<text>e-resize</text> |
| 123 |
</g> |
| 124 |
|
| 125 |
<g transform="translate(0,20)" cursor="w-resize"> |
| 126 |
<use xlink:href="#evenRow"/> |
| 127 |
<text>w-resize</text> |
| 128 |
</g> |
| 129 |
<g transform="translate(0,40)" cursor="ne-resize"> |
| 130 |
<use xlink:href="#oddRow"/> |
| 131 |
<text>ne-resize</text> |
| 132 |
</g> |
| 133 |
<g transform="translate(0,60)" cursor="nw-resize"> |
| 134 |
<use xlink:href="#evenRow"/> |
| 135 |
<text>nw-resize</text> |
| 136 |
</g> |
| 137 |
<g transform="translate(0,80)" cursor="n-resize"> |
| 138 |
<use xlink:href="#oddRow"/> |
| 139 |
<text>n-resize</text> |
| 140 |
</g> |
| 141 |
<g transform="translate(0,100)" cursor="se-resize"> |
| 142 |
<use xlink:href="#evenRow"/> |
| 143 |
<text>se-resize</text> |
| 144 |
</g> |
| 145 |
<g transform="translate(0,120)" cursor="sw-resize"> |
| 146 |
<use xlink:href="#oddRow"/> |
| 147 |
<text>sw-resize</text> |
| 148 |
</g> |
| 149 |
<g transform="translate(0,140)" cursor="s-resize"> |
| 150 |
<use xlink:href="#evenRow"/> |
| 151 |
<text>s-resize</text> |
| 152 |
</g> |
| 153 |
<g transform="translate(0,160)" cursor="url(#badCustom), crosshair"> |
| 154 |
<use xlink:href="#oddRow"/> |
| 155 |
<text>Bad url, crosshair</text> |
| 156 |
</g> |
| 157 |
<g transform="translate(0,180)" cursor="url(#customCursor), wait"> |
| 158 |
<use xlink:href="#evenRow"/> |
| 159 |
<text>Good url, wait</text> |
| 160 |
</g> |
| 161 |
<g transform="translate(0,200)" cursor="url(#badCustom), url(#customCursor2), crosshair"> |
| 162 |
<use xlink:href="#oddRow"/> |
| 163 |
<text>Bad url, good url, crosshair</text> |
| 164 |
</g> |
| 165 |
|
| 166 |
<g transform="translate(0,220)"> |
| 167 |
<use xlink:href="#evenRow"/> |
| 168 |
<use xlink:href="#evenRowCursor" cursor="auto"/> |
| 169 |
<text><use cursor=auto (wait)></text> |
| 170 |
</g> |
| 171 |
<g transform="translate(0,240)"> |
| 172 |
<use xlink:href="#oddRow"/> |
| 173 |
<use xlink:href="#oddRowCursor" cursor="crosshair" /> |
| 174 |
<text><use cursor=crosshair></text> |
| 175 |
</g> |
| 176 |
|
| 177 |
<g transform="translate(0,260)"> |
| 178 |
<use xlink:href="#evenRow"/> |
| 179 |
<image x="-93" y="-14" width="186" height="16" xlink:href="cursorImage2.svg" cursor="auto"/> |
| 180 |
<text><image cursor=auto (wait)></text> |
| 181 |
</g> |
| 182 |
<g transform="translate(0,280)"> |
| 183 |
<use xlink:href="#oddRow"/> |
| 184 |
<image x="-93" y="-14" width="186" height="16" xlink:href="cursorImage.svg" cursor="crosshair"/> |
| 185 |
<text><image cursor=crosshair></text> |
| 186 |
</g> |
| 187 |
</g> |
| 188 |
|
| 189 |
<script type="text/ecmascript"><![CDATA[ |
| 190 |
function cursorMoved(evt) { |
| 191 |
if (evt.target.nodeName == "rect") { |
| 192 |
evt.target.setAttribute("fill", "gold"); |
| 193 |
} |
| 194 |
} |
| 195 |
|
| 196 |
function onDone() { |
| 197 |
if (!(regardTestInstance == null)) { |
| 198 |
regardTestInstance.scriptDone(); |
| 199 |
} else { |
| 200 |
alert("This button only works when run in the regard framework"); |
| 201 |
} |
| 202 |
} |
| 203 |
]]></script> |
| 204 |
|
| 205 |
<rect x="25" y="460" width="20" height="20" shape-rendering="crispEdges" fill="red" onclick="evt.target.setAttribute('fill', 'green')" stroke="black"/> |
| 206 |
<g id="done" transform="translate(70, 458)" cursor="pointer" onclick="onDone()"> |
| 207 |
<rect rx="5" ry="5" width="60" height="25" fill="#eeeeee" stroke="black" /> |
| 208 |
<text x="30" y="18" font-size="14" font-weight="bold" text-anchor="middle">Done</text> |
| 209 |
</g> |
| 210 |
|
| 211 |
</svg> |