| 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 DOMFocusIn, DOMFocusOut, DOMActivate --> |
| 25 |
<!-- --> |
| 26 |
<!-- @author [email protected] --> |
| 27 |
<!-- @author [email protected] --> |
| 28 |
<!-- @version $Id$ --> |
| 29 |
<!-- ========================================================================= --> |
| 30 |
|
| 31 |
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| 32 |
|
| 33 |
<svg xmlns="http://www.w3.org/2000/svg" |
| 34 |
xmlns:xlink="http://www.w3.org/1999/xlink" |
| 35 |
id="body" width="450" height="500" viewBox="0 0 450 500"> |
| 36 |
|
| 37 |
<text class="title" x="50%" y="50">DOMFocusIn, DOMFocusOut, and DOMActivate test</text> |
| 38 |
|
| 39 |
<g id="body-content"> |
| 40 |
|
| 41 |
<rect onactivate="set('orange', 'activate')" onfocusin="set('orange', 'focusin')" onfocusout="set('orange', 'focusout')" |
| 42 |
x="100" y="100" width="100" height="100" style="fill:orange" /> |
| 43 |
|
| 44 |
<rect onactivate="set('crimson', 'activate')" onfocusin="set('crimson', 'focusin')" onfocusout="set('crimson', 'focusout')" |
| 45 |
x="250" y="100" width="100" height="100" style="fill:crimson" /> |
| 46 |
|
| 47 |
<rect onactivate="set('gold', 'activate')" onfocusin="set('gold', 'focusin')" onfocusout="set('gold', 'focusout')" |
| 48 |
x="100" y="250" width="100" height="100" style="fill:gold" /> |
| 49 |
|
| 50 |
<rect onactivate="set('aaa', 'activate')" onfocusin="set('aaa', 'focusin')" onfocusout="set('aaa', 'focusout')" |
| 51 |
x="250" y="250" width="100" height="100" style="fill:#aaa" /> |
| 52 |
|
| 53 |
<circle onactivate="set('eee', 'activate')" onfocusin="set('eee', 'focusin')" onfocusout="set('eee', 'focusout')" |
| 54 |
cx="225" cy="225" r="75" style="fill:#eee" /> |
| 55 |
|
| 56 |
</g> |
| 57 |
|
| 58 |
<script type="text/ecmascript"><![CDATA[ |
| 59 |
function set(color, state) { |
| 60 |
var elt = document.getElementById(color + "." + state); |
| 61 |
elt.setAttribute("fill", "green"); |
| 62 |
} |
| 63 |
|
| 64 |
function onDone() { |
| 65 |
if (!(regardTestInstance == null)) { |
| 66 |
regardTestInstance.scriptDone(); |
| 67 |
} else { |
| 68 |
alert("This button only works when run in the regard framework"); |
| 69 |
} |
| 70 |
} |
| 71 |
]]></script> |
| 72 |
|
| 73 |
<g fill="red" stroke="black" transform="translate(40, 420)"> |
| 74 |
<g transform="translate(0,0)"> |
| 75 |
<rect id="orange.focusin" width="20" height="20" /> |
| 76 |
<rect id="orange.focusout" x="25" width="20" height="20" /> |
| 77 |
<rect id="orange.activate" x="50" width="20" height="20" /> |
| 78 |
</g> |
| 79 |
|
| 80 |
<g transform="translate(75,0)"> |
| 81 |
<rect id="crimson.focusin" width="20" height="20" /> |
| 82 |
<rect id="crimson.focusout" x="25" width="20" height="20" /> |
| 83 |
<rect id="crimson.activate" x="50" width="20" height="20" /> |
| 84 |
</g> |
| 85 |
|
| 86 |
<g transform="translate(150,0)"> |
| 87 |
<rect id="gold.focusin" width="20" height="20" /> |
| 88 |
<rect id="gold.focusout" x="25" width="20" height="20" /> |
| 89 |
<rect id="gold.activate" x="50" width="20" height="20" /> |
| 90 |
</g> |
| 91 |
|
| 92 |
<g transform="translate(225,0)"> |
| 93 |
<rect id="aaa.focusin" width="20" height="20" /> |
| 94 |
<rect id="aaa.focusout" x="25" width="20" height="20" /> |
| 95 |
<rect id="aaa.activate" x="50" width="20" height="20" /> |
| 96 |
</g> |
| 97 |
|
| 98 |
<g transform="translate(300,0)"> |
| 99 |
<rect id="eee.focusin" width="20" height="20" /> |
| 100 |
<rect id="eee.focusout" x="25" width="20" height="20" /> |
| 101 |
<rect id="eee.activate" x="50" width="20" height="20" /> |
| 102 |
</g> |
| 103 |
|
| 104 |
|
| 105 |
</g> |
| 106 |
<g id="done" transform="translate(195, 458)" cursor="pointer" onclick="onDone()"> |
| 107 |
<rect rx="5" ry="5" width="60" height="25" fill="#eeeeee" stroke="black" /> |
| 108 |
<text x="30" y="18" font-size="14" font-weight="bold" text-anchor="middle">Done</text> |
| 109 |
</g> |
| 110 |
|
| 111 |
|
| 112 |
</svg> |