javauis/m2g_qt/javasrc/org/w3c/dom/svg/SVGElement.java
changeset 80 d6dafc5d983f
parent 56 abc41079b313
equal deleted inserted replaced
78:71ad690e91f5 80:d6dafc5d983f
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 package org.w3c.dom.svg;
       
    18 
       
    19 import org.w3c.dom.DOMException;
       
    20 
       
    21 import org.w3c.dom.Element;
       
    22 import org.w3c.dom.events.EventTarget;
       
    23 
       
    24 /**
       
    25  * This interface represents an SVG element in the document tree. Element's id can be set only
       
    26  * if it does not already have an id. {@link org.w3c.dom.DOMException DOMException} with error
       
    27  * code NO_MODIFICATION_ALLOWED_ERR is raised if an attempt is made to change an existing id.
       
    28  * Elements with non-null id can be inserted, but <b>cannot be removed</b> from the DOM tree
       
    29  * (see {@link org.w3c.dom.Node#removeChild removeChild}). This interface also provides methods
       
    30  * to traverse elements in the DOM tree.
       
    31  *
       
    32  * <p>
       
    33  * This interface can also be used read and manipulate the value of "traits" associated with this
       
    34  * SVGElement. Each <i>trait</i> corresponds to an attribute or property,which is parsed and
       
    35  * understood by the element and in most cases animatable. Unlike attributes, each element has a
       
    36  * well-defined set of traits and attempting to access undefined trait is an error. Also unlike
       
    37  * attributes traits are typed and their values are normalized; for instance SVG path specification
       
    38  * is parsed and all path commands are converted to their absolute variants, it is not possible to
       
    39  * say through the value of the trait if a path command was absolute or relative. When getting and
       
    40  * setting trait values, accessor of the correct type must be used or exception will be thrown.
       
    41  * </p>
       
    42  * <p>
       
    43  * Initial trait values come from parsing corresponding attributes. If value is not specified, but
       
    44  * corresponing attribute (or property for environments where styling is supported) is inherited,
       
    45  * inherited value is returned as a result of the trait query method. If it is not inherited, default
       
    46  * value is returned. Default values are also returned in the case when there is no parent to inherit
       
    47  * from, for ex: when you create a new element, set a trait value to 'inherit', but there is no parent for
       
    48  * inheritance. It is important to note that the value which is returned is always a base value (i.e. before animation
       
    49  * is applied), and this is true for both static and animated content.
       
    50  * </p>
       
    51  * <p>
       
    52  * Setting a trait value has the same effect as changing a corresponding attribute, but trait
       
    53  * setters can operate on typed values. The value which is modified is always a base value.
       
    54  * For inheritable traits the trait value can always be set to "inherit"
       
    55  * (but querying the value will always return the actual inherited value as explained above).
       
    56  * </p>
       
    57  * <p>
       
    58  * There are two situations where the various trait setter methods (such as
       
    59  * setTrait, setFloatTrait or setPathTrait methods) consider a value
       
    60  * invalid and throw a DOMException with the INVALID_ACCESS_ERR code.
       
    61  * The first situation is when the trait value is invalid with regards to
       
    62  * its definition (for example, trying to set the "stroke-linejoin" trait
       
    63  * to "foo" would cause this exception).
       
    64  * The second situation is when the trait value is invalid with regards to
       
    65  * animations currently applied to the trait. The value is considered
       
    66  * invalid because it would put the animation, and therefore the document,
       
    67  * in an error state. For example, if a <path> element has animations on
       
    68  * its "d" attribute, trying to change the "d" attribute to a value
       
    69  * incompatible with the animations will cause the exception to happen.
       
    70  * </p>
       
    71  *
       
    72  * <h3>Traits supported in this specification, SVG Tiny 1.1 DOM</h3>
       
    73  *
       
    74  *
       
    75  * <p>The table below shows the list of attributes and properties that SVG Tiny
       
    76  * DOM 1.1 implementations must support. Each light gray section lists one or
       
    77  * multiple elements for which the subsequent attributes or properties
       
    78  * apply. Each attribute row lists the allowed getter and setter (s). The last
       
    79  * column specifies the default values that must be used for each attribute or
       
    80  * property.</p>
       
    81  * <p><b>Note:</b> For 'REQUIRED' attributes, there are two cases:
       
    82  *
       
    83  * <ul>
       
    84  *  <li>i) The document is in error, if this attribute was not present at the time of loading.</li>
       
    85  *  <li>ii) When using uDOM API, the specified default value (in parenthesis) must be used.</li>
       
    86  * </ul>
       
    87  * </p>
       
    88  *
       
    89  * <table height="1586" cellpadding="2" cellspacing="2" border="1"
       
    90  *  width="825" style="border-collapse: collapse;">
       
    91  *   <tbody>
       
    92  *     <tr>
       
    93  *       <th width="150" valign="top" bgcolor="#999999"><b>Property<br>
       
    94  *       </b> </th>
       
    95  *       <th valign="top" bgcolor="#999999"><b>Trait Getter <br>[possible return value(s)]<br>
       
    96  *       </b> </th>
       
    97  *       <th bgcolor="#999999" valign="top"><b>Trait Setter <br>[allowed value(s)]<br>
       
    98  *       </b> </th>
       
    99  *       <th bgcolor="#999999" valign="top"><b>Default Values<br>
       
   100  *       </b> </th>
       
   101  *     </tr>
       
   102  *     <tr>
       
   103  *       <td valign="top"><br>
       
   104  *       </td>
       
   105  *       <td valign="top"><br>
       
   106  *       </td>
       
   107  *       <td valign="top"><br>
       
   108  *       </td>
       
   109  *       <td valign="top"><br>
       
   110  *       </td>
       
   111  *     </tr>
       
   112  *     <tr>
       
   113  *       <td bgcolor="#cccccc" colspan="4" rowspan="1" valign="top">&lt;svg&gt;,
       
   114  *  &lt;rect&gt;, &lt;circle&gt;, &lt;ellipse&gt;, &lt;line&gt;,
       
   115  *  &lt;path&gt;, &lt;g&gt;, &lt;image&gt;, &lt;text&gt;, &lt;a&gt;, and &lt;use&gt;</td>
       
   116  *     </tr>
       
   117  *     <tr>
       
   118  *       <td width="150" valign="top">color <br>
       
   119  *       </td>
       
   120  *       <td valign="top">getRGBColorTrait [SVGRGBColor]<br>
       
   121  *       </td>
       
   122  *       <td valign="top">setTrait [inherit]<br>setRGBColorTrait [SVGRGBColor]<br>
       
   123  *       </td>
       
   124  *       <td valign="top" align="center">rgb(0,0,0)<br>
       
   125  *      </td>
       
   126  *    </tr>
       
   127  *      <tr>
       
   128  *       <td width="150" valign="top">display<br>
       
   129  *       </td>
       
   130  *       <td valign="top">getTrait [inline | none ] <br>
       
   131  *       </td>
       
   132  *       <td valign="top">setTrait [inline | none | inherit ] </td>
       
   133  *       <td valign="top" align="center">"inline"<br>
       
   134  *       </td>
       
   135  *     </tr>
       
   136  *     <tr>
       
   137  *       <td width="150" valign="top">fill<br>
       
   138  *       </td>
       
   139  *       <td valign="top">getRGBColorTrait [null, SVGRGBColor]<br>
       
   140  *       </td>
       
   141  *       <td valign="top">setRGBColorTrait [SVGRGBColor]<br>setTrait(none | currentColor | inherit)<br>
       
   142  *       </td>
       
   143  *       <td valign="top" align="center">rgb(0,0,0)<br>
       
   144  *       </td>
       
   145  *     </tr>
       
   146  *     <tr>
       
   147  *       <td width="150" valign="top">fill-rule<br>
       
   148  *       </td>
       
   149  *       <td valign="top">getTrait [nonzero | evenodd] <br>
       
   150  *       </td>
       
   151  *       <td valign="top">setTrait [nonzero | evenodd | inherit] </td>
       
   152  *       <td valign="top" align="center">"nonzero"<br>
       
   153  *       </td>
       
   154  *     </tr>
       
   155  *     <tr>
       
   156  *       <td width="150" valign="top">stroke</td>
       
   157  *      <td valign="top">getRGBColorTrait [null, SVGRGBColor]</td>
       
   158  *       <td valign="top">setRGBColorTrait [SVGRGBColor]<br>setTrait [none | currentColor | inherit]</td>
       
   159  *       <td valign="top" align="center">"none"<br>
       
   160  *       </td>
       
   161  *     </tr>
       
   162  *     <tr>
       
   163  *       <td valign="top">stroke-dashoffset</td>
       
   164  *       <td valign="top">getFloatTrait </td>
       
   165  *       <td valign="top">setTrait [inherit]<br>setFloatTrait </td>
       
   166  *       <td valign="top" align="center">0.0f<br>
       
   167  *       </td>
       
   168  *     </tr>
       
   169  *     <tr>
       
   170  *       <td valign="top">stroke-linecap</td>
       
   171  *       <td valign="top">getTrait [butt | round | square]</td>
       
   172  *       <td valign="top">setTrait [butt | round | square | inherit]</td>
       
   173  *       <td valign="top" align="center">"butt"<br>
       
   174  *       </td>
       
   175  *     </tr>
       
   176  *     <tr>
       
   177  *       <td valign="top">stroke-linejoin</td>
       
   178  *       <td valign="top">getTrait [miter | round | bevel ]</td>
       
   179  *       <td valign="top">setTrait [miter | round | bevel | inherit]</td>
       
   180  *       <td valign="top" align="center">"miter"<br>
       
   181  *       </td>
       
   182  *     </tr>
       
   183  *     <tr>
       
   184  *       <td valign="top">stroke-miterlimit</td>
       
   185  *       <td valign="top">getFloatTrait [ value &gt;= 1]</td>
       
   186  *       <td valign="top">setTrait [inherit]<br>setFloatTrait [value &gt;= 1]</td>
       
   187  *       <td valign="top" align="center">4.0f<br>
       
   188  *       </td>
       
   189  *     </tr>
       
   190  *     <tr>
       
   191  *       <td valign="top">stroke-width</td>
       
   192  *       <td valign="top">getFloatTrait [value &gt;= 0]</td>
       
   193  *       <td valign="top">setTrait [inherit]<br> setFloatTrait [value &gt;= 0]</td>
       
   194  *       <td valign="top" align="center">1.0f<br>
       
   195  *       </td>
       
   196  *     </tr>
       
   197  *     <tr>
       
   198  *       <td valign="top">visibility</td>
       
   199  *       <td valign="top">getTrait [visible | hidden]</td>
       
   200  *       <td valign="top">setTrait [visible | hidden | inherit]</td>
       
   201  *       <td valign="top" align="center">"visible"<br>
       
   202  *       </td>
       
   203  *     </tr>
       
   204  *     <tr>
       
   205  *       <td valign="top"><br>
       
   206  *       </td>
       
   207  *       <td valign="top"><br>
       
   208  *       </td>
       
   209  *       <td valign="top"><br>
       
   210  *       </td>
       
   211  *       <td valign="top"><br>
       
   212  *       </td>
       
   213  *     </tr>
       
   214  *     <tr>
       
   215  *       <td bgcolor="#cccccc" colspan="4" rowspan="1" valign="top">&lt;svg&gt;, &lt;text&gt;, &lt;g&gt;, &lt;a&gt, and &lt;use&gt;;<br>
       
   216  *      </td>
       
   217  *     </tr>
       
   218  *     <tr>
       
   219  *       <td valign="top">font-family<br>
       
   220  *       </td>
       
   221  *       <td valign="top">getTrait [single, computed font-family value]<br>
       
   222  *      </td>
       
   223  *      <td valign="top">setTrait [same syntax as font-family attribute]<br>
       
   224  *     </td>
       
   225  *      <td valign="top" align="center"> User-Agent <br>
       
   226  *      </td>
       
   227  *     </tr>
       
   228  *     <tr>
       
   229  *       <td width="150" valign="top">font-size<br>
       
   230  *       </td>
       
   231  *       <td valign="top">getFloatTrait&nbsp; [value &gt;= 0]<br>
       
   232  *     </td>
       
   233  *       <td valign="top">setFloatTrait [value &gt;= 0]<br>setTrait [inherit]<br>
       
   234  *      </td>
       
   235  *       <td valign="top" align="center"> User-Agent <br>
       
   236  *       </td>     </tr>
       
   237  *     <tr>
       
   238  *       <td width="150" valign="top">font-style<br>
       
   239  *       </td>
       
   240  *      <td valign="top">getTrait [normal | italic | oblique ] </td>
       
   241  *       <td valign="top">setTrait [normal | italic | oblique | inherit] </td>
       
   242  *       <td valign="top" align="center">"normal"<br>
       
   243  *       </td>     </tr>
       
   244  *     <tr>
       
   245  *       <td width="150" valign="top">font-weight<br>
       
   246  *       </td>
       
   247  *       <td valign="top">getTrait [100 | 200 | 300 <br> | 400 | 500 | 600 | 700 | 800 | 900 ] </td>
       
   248  *       <td valign="top">setTrait [normal | bold | bolder | lighter | 100 | 200 | 300 <br />
       
   249  *       | 400 | 500 | 600 | 700 | 800 | 900 | inherit] </td>
       
   250  *       <td valign="top" align="center">"normal"<br>
       
   251  *       </td>     </tr>
       
   252  *     <tr>
       
   253  *       <td width="150" valign="top">text-anchor<br>
       
   254  *       </td>
       
   255  *       <td valign="top">getTrait [start | middle | end]<br>
       
   256  *       </td>
       
   257  *       <td valign="top">setTrait [start | middle | end | inherit ]<br>
       
   258  *       </td>
       
   259  *       <td valign="top" align="center">"start"<br>
       
   260  *       </td>     </tr>
       
   261  *     <tr>
       
   262  *       <td width="150" colspan="4" rowspan="1" valign="top"><br>
       
   263  *       </td>
       
   264  *     </tr>
       
   265  *     <tr>
       
   266  *       <td width="150" bgcolor="#999999" valign="top"><b>Attribute<br>
       
   267  *       </b></td>
       
   268  *       <td bgcolor="#999999" valign="top"><b>Trait Getter<br>
       
   269  *       </b></td>
       
   270  *       <td bgcolor="#999999" valign="top"><b>Trait Setter<br>
       
   271  *       </b></td>
       
   272  *       <td bgcolor="#999999" valign="top"><b>Default Values<br>
       
   273  *       </b></td>
       
   274  *     </tr>
       
   275  *     <tr>
       
   276  *       <td width="150" valign="top"><br>
       
   277  *       </td>
       
   278  *       <td valign="top"><br>
       
   279  *       </td>
       
   280  *       <td valign="top"><br>
       
   281  *       </td>
       
   282  *       <td valign="top"><br>
       
   283  *       </td>
       
   284  *     </tr>
       
   285  *     <tr>
       
   286  *       <td width="150" bgcolor="#cccccc" colspan="4" rowspan="1" valign="top">
       
   287  *       &lt;rect&gt;, &lt;circle&gt;, &lt;ellipse&gt;, &lt;line&gt;, &lt;path&gt;, &lt;g&gt;,
       
   288  *       &lt;image&gt;, &lt;text&gt;, &lt;a&gt;, and &lt;use&gt;</td>
       
   289  *     </tr>
       
   290  *     <tr>
       
   291  *       <td width="150" valign="top">transform<br>
       
   292  *       </td>
       
   293  *       <td valign="top">getMatrixTrait [SVGMatrix]<br>
       
   294  *       </td>
       
   295  *      <td valign="top">setMatrixTrait [SVGMatrix]<br>
       
   296  *       </td>
       
   297  *       <td valign="top" align="center">Identity matrix<br>
       
   298  *       (1,0,0,1,0,0)<br>
       
   299  *     </tr>
       
   300  *     <tr>
       
   301  *       <td width="150" valign="top"><br>
       
   302  *       </td>
       
   303  *       <td valign="top"><br>
       
   304  *      </td>
       
   305  *      <td valign="top"><br>
       
   306  *      </td>
       
   307  *      <td valign="top"><br>
       
   308  *      </td>
       
   309  *    </tr>
       
   310  *    <tr>
       
   311  *      <td width="150" colspan="4" rowspan="1" bgcolor="#cccccc" valign="top">&lt;rect&gt;<br>
       
   312  *      </td>
       
   313  *    </tr>
       
   314  *    <tr>
       
   315  *      <td width="150" valign="top">height<br>
       
   316  *      </td>
       
   317  *      <td valign="top">getFloatTrait [ value &gt;= 0]<br>
       
   318  *      </td>
       
   319  *      <td valign="top">setFloatTrait [ value &gt;= 0]<br>
       
   320  *      </td>
       
   321  *      <td valign="top" align="center">REQUIRED<br>(0.0f)<br>
       
   322  *      </td>
       
   323  *    </tr>
       
   324  *    <tr>
       
   325  *      <td width="150" valign="top">width<br>
       
   326  *      </td>
       
   327  *      <td valign="top">getFloatTrait [ value &gt;= 0]</td>
       
   328  *      <td valign="top">setFloatTrait [ value &gt;= 0]</td>
       
   329  *      <td valign="top" align="center">REQUIRED<br>(0.0f)<br>
       
   330  *      </td>
       
   331  *    </tr>
       
   332  *    <tr>
       
   333  *      <td width="150" valign="top">x<br>
       
   334  *      </td>
       
   335  *      <td valign="top">getFloatTrait<br>
       
   336  *      </td>
       
   337  *      <td valign="top">setFloatTrait<br>
       
   338  *      </td>
       
   339  *      <td valign="top" align="center">0.0f<br>
       
   340  *      </td>
       
   341  *    </tr>
       
   342  *    <tr>
       
   343  *      <td width="150" valign="top">y<br>
       
   344  *      </td>
       
   345  *      <td valign="top">getFloatTrait<br>
       
   346  *      </td>
       
   347  *      <td valign="top">setFloatTrait<br>
       
   348  *      </td>
       
   349  *      <td valign="top" align="center">0.0f<br>
       
   350  *      </td>
       
   351  *    </tr>
       
   352  *    <tr>
       
   353  *      <td width="150" valign="top">rx<br>
       
   354  *      </td>
       
   355  *      <td valign="top">getFloatTrait [value &gt;= 0]</td>
       
   356  *      <td valign="top">setFloatTrait [value &gt;= 0]</td>
       
   357  *      <td valign="top" align="center">0.0f<br>
       
   358  *      </td>
       
   359  *    </tr>
       
   360  *    <tr>
       
   361  *      <td width="150" valign="top">ry<br>
       
   362  *      </td>
       
   363  *      <td valign="top">getFloatTrait [value &gt;= 0]<br>
       
   364  *      </td>
       
   365  *      <td valign="top">setFloatTrait [value &gt;= 0]<br>
       
   366  *      </td>
       
   367  *      <td valign="top" align="center">0.0f<br>
       
   368  *      </td>
       
   369  *    </tr>
       
   370  *    <tr>
       
   371  *      <td width="150" valign="top"><br>
       
   372  *      </td>
       
   373  *      <td valign="top"><br>
       
   374  *      </td>
       
   375  *      <td valign="top"><br>
       
   376  *      </td>
       
   377  *      <td valign="top"><br>
       
   378  *      </td>
       
   379  *    </tr>
       
   380  *    <tr>
       
   381  *      <td width="150" colspan="4" rowspan="1" bgcolor="#cccccc" valign="top">&lt;circle&gt;<br>
       
   382  *      </td>
       
   383  *    </tr>
       
   384  *    <tr>
       
   385  *      <td width="150" valign="top">cx<br>
       
   386  *      </td>
       
   387  *      <td valign="top">getFloatTrait<br>
       
   388  *      </td>
       
   389  *      <td valign="top">setFloatTrait<br>
       
   390  *      </td>
       
   391  *      <td valign="top" align="center">0.0f<br>
       
   392  *      </td>
       
   393  *    </tr>
       
   394  *    <tr>
       
   395  *      <td width="150" valign="top">cy<br>
       
   396  *      </td>
       
   397  *      <td valign="top">getFloatTrait<br>
       
   398  *      </td>
       
   399  *      <td valign="top">setFloatTrait<br>
       
   400  *      </td>
       
   401  *      <td valign="top" align="center">0.0f<br>
       
   402  *      </td>
       
   403  *    </tr>
       
   404  *    <tr>
       
   405  *      <td width="150" valign="top">r<br>
       
   406  *      </td>
       
   407  *      <td valign="top">getFloatTrait [ value &gt;= 0]<br>
       
   408  *      </td>
       
   409  *      <td valign="top">setFloatTrait [value &gt;= 0]<br>
       
   410  *      </td>
       
   411  *      <td valign="top" align="center">REQUIRED<br>(0.0f)<br>
       
   412  *      </td>
       
   413  *    </tr>
       
   414  *    <tr>
       
   415  *      <td width="150" valign="top"><br>
       
   416  *      </td>
       
   417  *      <td valign="top"><br>
       
   418  *      </td>
       
   419  *      <td valign="top"><br>
       
   420  *      </td>
       
   421  *      <td valign="top"><br>
       
   422  *      </td>
       
   423  *    </tr>
       
   424  *    <tr>
       
   425  *      <td width="150" bgcolor="#cccccc" colspan="4" rowspan="1" valign="top">&lt;ellipse&gt;<br>
       
   426  *      </td>
       
   427  *    </tr>
       
   428  *    <tr>
       
   429  *      <td width="150" valign="top">cx<br>
       
   430  *      </td>
       
   431  *      <td valign="top">getFloatTrait<br>
       
   432  *      </td>
       
   433  *      <td valign="top">setFloatTrait<br>
       
   434  *      </td>
       
   435  *      <td valign="top" align="center">0.0f<br>
       
   436  *      </td>
       
   437  *    </tr>
       
   438  *    <tr>
       
   439  *      <td width="150" valign="top">cy<br>
       
   440  *      </td>
       
   441  *      <td valign="top">getFloatTrait<br>
       
   442  *      </td>
       
   443  *      <td valign="top">setFloatTrait<br>
       
   444  *      </td>
       
   445  *      <td valign="top" align="center">0.0f<br>
       
   446  *      </td>
       
   447  *    </tr>
       
   448  *    <tr>
       
   449  *      <td width="150" valign="top">rx<br>
       
   450  *      </td>
       
   451  *      <td valign="top">getFloatTrait [value &gt;= 0]<br>
       
   452  *      </td>
       
   453  *      <td valign="top">setFloatTrait [value &gt;= 0]<br>
       
   454  *      </td>
       
   455  *      <td valign="top" align="center">REQUIRED<br>(0.0f)<br>
       
   456  *      </td>
       
   457  *    </tr>
       
   458  *    <tr>
       
   459  *      <td width="150" valign="top">ry<br>
       
   460  *      </td>
       
   461  *      <td valign="top">getFloatTrait [value &gt;= 0]<br>
       
   462  *      </td>
       
   463  *      <td valign="top">setFloatTrait [value &gt;= 0]<br>
       
   464  *      </td>
       
   465  *      <td valign="top" align="center">REQUIRED<br>(0.0f)<br>
       
   466  *      </td>
       
   467  *    </tr>
       
   468  *    <tr>
       
   469  *      <td width="150" valign="top"><br>
       
   470  *      </td>
       
   471  *      <td valign="top"><br>
       
   472  *      </td>
       
   473  *      <td valign="top"><br>
       
   474  *      </td>
       
   475  *      <td valign="top"><br>
       
   476  *      </td>
       
   477  *    </tr>
       
   478  *    <tr>
       
   479  *      <td width="150" colspan="4" rowspan="1" bgcolor="#cccccc" valign="top">&lt;line&gt;<br>
       
   480  *      </td>
       
   481  *    </tr>
       
   482  *    <tr>
       
   483  *      <td width="150" valign="top">x1<br>
       
   484  *      </td>
       
   485  *      <td valign="top">getFloatTrait<br>
       
   486  *      </td>
       
   487  *      <td valign="top">setFloatTrait<br>
       
   488  *      </td>
       
   489  *      <td valign="top" align="center">0.0f<br>
       
   490  *      </td>
       
   491  *    </tr>
       
   492  *    <tr>
       
   493  *      <td width="150" valign="top">x2<br>
       
   494  *      </td>
       
   495  *      <td valign="top">getFloatTrait<br>
       
   496  *      </td>
       
   497  *      <td valign="top">setFloatTrait<br>
       
   498  *      </td>
       
   499  *      <td valign="top" align="center">0.0f<br>
       
   500  *      </td>
       
   501  *    </tr>
       
   502  *    <tr>
       
   503  *      <td width="150" valign="top">y1<br>
       
   504  *      </td>
       
   505  *      <td valign="top">getFloatTrait<br>
       
   506  *      </td>
       
   507  *      <td valign="top">setFloatTrait<br>
       
   508  *      </td>
       
   509  *      <td valign="top" align="center">0.0f<br>
       
   510  *      </td>
       
   511  *    </tr>
       
   512  *    <tr>
       
   513  *      <td width="150" valign="top">y2<br>
       
   514  *      </td>
       
   515  *      <td valign="top">getFloatTrait<br>
       
   516  *      </td>
       
   517  *      <td valign="top">setFloatTrait<br>
       
   518  *      </td>
       
   519  *      <td valign="top" align="center">0.0f<br>
       
   520  *      </td>
       
   521  *    </tr>
       
   522  *    <tr>
       
   523  *      <td width="150" valign="top"><br>
       
   524  *      </td>
       
   525  *      <td valign="top"><br>
       
   526  *      </td>
       
   527  *      <td valign="top"><br>
       
   528  *      </td>
       
   529  *      <td valign="top"><br>
       
   530  *      </td>
       
   531  *    </tr>
       
   532  *    <tr>
       
   533  *      <td width="150" colspan="4" rowspan="1" bgcolor="#cccccc" valign="top">&lt;path&gt; (path-length is not supported)<br>
       
   534  *      </td>
       
   535  *    </tr>
       
   536  *    <tr>
       
   537  *      <td width="150" valign="top">d<br>
       
   538  *      </td>
       
   539  *      <td valign="top">getPathTrait [SVGPath]<br>
       
   540  *      </td>
       
   541  *      <td valign="top">setPathTrait [SVGPath]<br>
       
   542  *      </td>
       
   543  *      <td valign="top" align="center">REQUIRED<br>(Empty SVGPath)<br>
       
   544  *      </td>
       
   545  *    </tr>
       
   546  *    <tr>
       
   547  *      <td width="150" valign="top"><br>
       
   548  *      </td>
       
   549  *      <td valign="top"><br>
       
   550  *      </td>
       
   551  *      <td valign="top"><br>
       
   552  *      </td>
       
   553  *      <td valign="top"><br>
       
   554  *      </td>
       
   555  *    </tr>
       
   556  *    <tr>
       
   557  *      <td width="150" colspan="4" rowspan="1" bgcolor="#cccccc" valign="top">&lt;image&gt;<br>
       
   558  *      </td>
       
   559  *    </tr>
       
   560  *    <tr>
       
   561  *      <td width="150" valign="top">x<br>
       
   562  *      </td>
       
   563  *      <td valign="top">getFloatTrait <br>
       
   564  *      </td>
       
   565  *      <td valign="top">setFloatTrait<br>
       
   566  *      </td>
       
   567  *      <td valign="top" align="center">0.0f<br>
       
   568  *      </td>
       
   569  *    </tr>
       
   570  *    <tr>
       
   571  *      <td width="150" valign="top">y<br>
       
   572  *      </td>
       
   573  *      <td valign="top">getFloatTrait<br>
       
   574  *      </td>
       
   575  *      <td valign="top">setFloatTrait<br>
       
   576  *      </td>
       
   577  *      <td valign="top" align="center">0.0f<br>
       
   578  *      </td>
       
   579  *    </tr>
       
   580  *    <tr>
       
   581  *      <td width="150" valign="top">width<br>
       
   582  *      </td>
       
   583  *      <td valign="top">getFloatTrait [value &gt;= 0]<br>
       
   584  *      </td>
       
   585  *      <td valign="top">setFloatTrait [value &gt;= 0]<br>
       
   586  *      </td>
       
   587  *      <td valign="top" align="center">REQUIRED<br>(0.0f)<br>
       
   588  *      </td>
       
   589  *    </tr>
       
   590  *    <tr>
       
   591  *      <td width="150" valign="top">height<br>
       
   592  *      </td>
       
   593  *      <td valign="top">getFloatTrait [value &gt;= 0]<br>
       
   594  *      </td>
       
   595  *      <td valign="top">setFloatTrait [value &gt;= 0]<br>
       
   596  *      </td>
       
   597  *      <td valign="top" align="center">REQUIRED<br>(0.0f)<br>
       
   598  *      </td>
       
   599  *    </tr>
       
   600  *    <tr>
       
   601  *      <td width="150" valign="top">xlink:href<br>
       
   602  *      </td>
       
   603  *      <td valign="top">getTrait NS[absolute URI]<br>
       
   604  *      </td>
       
   605  *      <td valign="top">setTraitNS [non local-URI value]<br>
       
   606  *      </td>
       
   607  *      <td valign="top" align="center">REQUIRED<br>( "" )<br>
       
   608  *      </td>
       
   609  *    </tr>
       
   610  *    <tr>
       
   611  *      <td width="150" valign="top"><br>
       
   612  *      </td>
       
   613  *      <td valign="top"><br>
       
   614  *      </td>
       
   615  *      <td valign="top"><br>
       
   616  *      </td>
       
   617  *      <td valign="top"><br>
       
   618  *      </td>
       
   619  *    </tr>
       
   620  *    <tr>
       
   621  *      <td width="150" colspan="4" rowspan="1" bgcolor="#cccccc" valign="top">&lt;use&gt;<br>
       
   622  *      </td>
       
   623  *    </tr>
       
   624  *    <tr>
       
   625  *      <td width="150" valign="top">x<br>
       
   626  *      </td>
       
   627  *      <td valign="top">getFloatTrait<br>
       
   628  *      </td>
       
   629  *      <td valign="top">setFloatTrait<br>
       
   630  *      </td>
       
   631  *      <td valign="top" align="center">0.0f<br>
       
   632  *      </td>
       
   633  *    </tr>
       
   634  *    <tr>
       
   635  *      <td width="150" valign="top">y<br>
       
   636  *      </td>
       
   637  *      <td valign="top">getFloatTrait<br>
       
   638  *      </td>
       
   639  *      <td valign="top">setFloatTrait<br>
       
   640  *      </td>
       
   641  *      <td valign="top" align="center">0.0f<br>
       
   642  *      </td>
       
   643  *    </tr>
       
   644  *    <tr>
       
   645  *      <td valign="top">xlink:href<br>
       
   646  *      </td>
       
   647  *      <td valign="top">getTraitNS[absolute URI]<br>
       
   648  *      </td>
       
   649  *      <td valign="top">setTraitNS<br>
       
   650  *      </td>
       
   651  *      <td valign="top" align="center">""<br>
       
   652  *      </td>
       
   653  *    </tr>
       
   654  *    <tr>
       
   655  *      <td width="150" valign="top"><br>
       
   656  *      </td>
       
   657  *      <td valign="top"><br>
       
   658  *      </td>
       
   659  *      <td valign="top"><br>
       
   660  *      </td>
       
   661  *      <td valign="top"><br>
       
   662  *      </td>
       
   663  *    </tr>
       
   664  *    <tr>
       
   665  *    <tr>
       
   666  *      <td width="150" colspan="4" rowspan="1" bgcolor="#cccccc" valign="top">&lt;a&gt;<br>
       
   667  *      </td>
       
   668  *    </tr>
       
   669  *    <tr>
       
   670  *      <td width="150" valign="top">target<br>
       
   671  *      </td>
       
   672  *      <td valign="top">getTrait<br>
       
   673  *      </td>
       
   674  *      <td valign="top">setTrait<br>
       
   675  *      </td>
       
   676  *      <td valign="top" align="center">""<br>
       
   677  *      </td>
       
   678  *    </tr>
       
   679  *    <tr>
       
   680  *      <td valign="top">xlink:href<br>
       
   681  *      </td>
       
   682  *      <td valign="top">getTraitNS[absolute URI]<br>
       
   683  *      </td>
       
   684  *      <td valign="top">setTraitNS<br>
       
   685  *      </td>
       
   686  *      <td valign="top" align="center">""<br>
       
   687  *      </td>
       
   688  *    </tr>
       
   689  *    <tr>
       
   690  *      <td width="150" valign="top"><br>
       
   691  *      </td>
       
   692  *      <td valign="top"><br>
       
   693  *      </td>
       
   694  *      <td valign="top"><br>
       
   695  *      </td>
       
   696  *      <td valign="top"><br>
       
   697  *      </td>
       
   698  *    </tr>
       
   699  *    <tr>
       
   700  *      <td width="*" colspan="4" rowspan="1" bgcolor="#cccccc" valign="top">&lt;text&gt;<br />(Notes:
       
   701  * For 'x' and 'y', it is only possible
       
   702  * to provide floating point scalar values; an array of x or y values is not supported. <br />
       
   703  * 'rotate' attribute is not supported.)<br/>
       
   704  *      </td>
       
   705  *    </tr>
       
   706  *    <tr>
       
   707  *      <td width="150" valign="top">x<br>
       
   708  *      </td>
       
   709  *      <td valign="top">getFloatTrait<br>
       
   710  *      </td>
       
   711  *      <td valign="top">setFloatTrait<br>
       
   712  *      </td>
       
   713  *      <td valign="top" align="center">0.0f<br>
       
   714  *      </td>
       
   715  *    </tr>
       
   716  *    <tr>
       
   717  *      <td width="150" valign="top">y<br>
       
   718  *      </td>
       
   719  *      <td valign="top">getFloatTrait<br>
       
   720  *      </td>
       
   721  *      <td valign="top">setFloatTrait<br>
       
   722  *      </td>
       
   723  *      <td valign="top" align="center">0.0f<br>
       
   724  *      </td>
       
   725  *    </tr>
       
   726  *    <tr>
       
   727  *      <td width="150" valign="top">#text<br>
       
   728  *      </td>
       
   729  *      <td valign="top">getTrait [not null]<br>
       
   730  *      </td>
       
   731  *      <td valign="top">setTrait [not null]<br>
       
   732  *      </td>
       
   733  *      <td valign="top" align="center">""<br>
       
   734  *      </td>
       
   735  *    </tr>
       
   736  *    <tr>
       
   737  *      <td width="150" valign="top"><br>
       
   738  *      </td>
       
   739  *      <td valign="top"><br>
       
   740  *      </td>
       
   741  *      <td valign="top"><br>
       
   742  *      </td>
       
   743  *      <td valign="top"><br>
       
   744  *      </td>
       
   745  *    </tr>
       
   746  *    <tr>
       
   747  *      <td width="150" colspan="4" rowspan="1" bgcolor="#cccccc" valign="top">&lt;svg&gt;<br>
       
   748  *      </td>
       
   749  *    </tr>
       
   750  *    <tr>
       
   751  *      <td width="150" valign="top">version<br>
       
   752  *      </td>
       
   753  *      <td valign="top">getTrait<br>
       
   754  *      </td>
       
   755  *      <td valign="top">Not available (readonly)<br>
       
   756  *      </td>
       
   757  *      <td valign="top" align="center">"1.1"<br>
       
   758  *      </td>
       
   759  *    </tr>
       
   760  *    <tr>
       
   761  *      <td width="150" valign="top">baseProfile<br>
       
   762  *      </td>
       
   763  *      <td valign="top">getTrait<br>
       
   764  *      </td>
       
   765  *      <td valign="top">Not available (readonly)<br>
       
   766  *      </td>
       
   767  *      <td valign="top" align="center">"tiny"<br>
       
   768  *      </td>
       
   769  *    </tr>
       
   770  *    <tr>
       
   771  *      <td width="150" valign="top">viewBox<br>
       
   772  *      </td>
       
   773  *      <td valign="top">getRectTrait [null, SVGRect]<br>
       
   774  *      </td>
       
   775  *      <td valign="top">setRectTrait [SVGRect]<br>
       
   776  *      </td>
       
   777  *      <td valign="top" align="center">null<br>
       
   778  *      </td>
       
   779  *    </tr>
       
   780  *    <tr>
       
   781  *      <td width="150" valign="top">zoomAndPan<br>
       
   782  *      </td>
       
   783  *      <td valign="top">getTrait [disable | magnify]<br>
       
   784  *      </td>
       
   785  *      <td valign="top">setTrait [disable | magnify]<br>
       
   786  *      </td>
       
   787  *      <td valign="top" align="center">"magnify"<br>
       
   788  *      </td>
       
   789  *    </tr>
       
   790  *    <tr>
       
   791  *      <td width="150" valign="top"><br>
       
   792  *      </td>
       
   793  *      <td valign="top"><br>
       
   794  *      </td>
       
   795  *      <td valign="top"><br>
       
   796  *      </td>
       
   797  *      <td valign="top"><br>
       
   798  *      </td>
       
   799  *     </tr>
       
   800  *   </tbody>
       
   801  * </table>
       
   802  */
       
   803 
       
   804 public interface SVGElement extends Element, EventTarget
       
   805 {
       
   806 
       
   807     /**
       
   808      * Sets the Element's id attribute.
       
   809      * @param Id the value of Id to be set for this Element.
       
   810      * @throws DOMException with error code NO_MODIFICATION_ALLOWED_ERR is raised if an attempt is made to change an existing Id.
       
   811      * @throws DOMException with error code INVALID_ACCESS_ERR is raised if the Id is not unique i.e. if this Id already exists in the document.
       
   812      * @throws NullPointerException if <code>Id</code> is null.
       
   813      * @throws SecurityException if the application does not have the necessary privilege rights
       
   814      * to access this (SVG) content.
       
   815      */
       
   816     public void setId(String Id)
       
   817     throws DOMException;
       
   818 
       
   819     /**
       
   820      * Returns the Element's Id, null if no id specified.
       
   821      * @return the Element's Id.
       
   822      */
       
   823     public String getId();
       
   824 
       
   825     /**
       
   826      * Returns the first child element node of this element. <code>null</code> if this element has no child elements.
       
   827      * @return the first child element node of this element.
       
   828      */
       
   829     public Element getFirstElementChild();
       
   830 
       
   831     /**
       
   832      * Returns the next sibling element node of this element. <code>null</code> if this element has no element sibling
       
   833      * nodes that come after this one in the document tree.
       
   834      * @return the next sibling element node of this element.
       
   835      */
       
   836     public Element getNextElementSibling();
       
   837 
       
   838 
       
   839     /**
       
   840      * Returns the trait value as String. In SVG Tiny only certain traits can be obtained as a String value. Syntax of the
       
   841      * returned String matches the syntax of the corresponding attribute. This element is exactly equivalent to {@link org.w3c.dom.svg.SVGElement#getTraitNS getTraitNS}
       
   842      * with namespaceURI set to null.
       
   843      *
       
   844      * @param name the name of the trait to retrieve.
       
   845      * @return the trait value as String for the specified name.
       
   846      * @throws DOMException with error code NOT_SUPPORTED_ERR if the requested trait is not supported on this element or null.
       
   847      * @throws DOMException with error code TYPE_MISMATCH_ERR if requested trait's computed value cannot be converted to a String (SVG Tiny only).
       
   848      * @throws SecurityException if the application does not have the necessary privilege rights
       
   849      * to access this (SVG) content.
       
   850      */
       
   851     public String getTrait(String name)
       
   852     throws DOMException;
       
   853 
       
   854     /**
       
   855      * Same as {@link org.w3c.dom.svg.SVGElement#getTrait getTrait}, but for namespaced traits. Parameter name must be a non-qualified trait name, i.e. without prefix.
       
   856      *
       
   857      * @param namespaceURI the namespaceURI of the trait to retrieve.
       
   858      * @param name the name of the trait to retrieve.
       
   859      * @return the trait value as String for the specified name.
       
   860      * @throws DOMException with error code NOT_SUPPORTED_ERR if the requested trait is not supported on this element or null.
       
   861      * @throws DOMException with error code TYPE_MISMATCH_ERR if requested trait's computed value cannot be converted to a String (SVG Tiny only).
       
   862      * @throws SecurityException if the application does not have the necessary privilege rights
       
   863      * to access this (SVG) content.
       
   864      */
       
   865     public String getTraitNS(String namespaceURI, String name)
       
   866     throws DOMException;
       
   867 
       
   868     /**
       
   869      * Get the trait value as float.
       
   870      *
       
   871      * @param name the name of the trait to retrieve.
       
   872      * @return the trait value as float for the specified name.
       
   873      * @throws DOMException with error code NOT_SUPPORTED_ERR if the requested trait is not supported on this element or null.
       
   874      * @throws DOMException with error code TYPE_MISMATCH_ERR if requested trait's computed value cannot be converted to a float
       
   875      * @throws SecurityException if the application does not have the necessary privilege rights
       
   876      * to access this (SVG) content.
       
   877      */
       
   878     public float getFloatTrait(String name)
       
   879     throws DOMException;
       
   880 
       
   881     /**
       
   882      * Returns the trait value as {@link org.w3c.dom.svg.SVGMatrix SVGMatrix}. The returned object is a copy of the actual trait value and will not change if
       
   883      * the corresponding trait changes.
       
   884      *
       
   885      * @param name the name of the trait to retrieve.
       
   886      * @return the trait value as SVGMatrix for the specified name.
       
   887      * @throws DOMException with error code NOT_SUPPORTED_ERR if the requested trait is not supported on this element or null.
       
   888      * @throws DOMException with error code TYPE_MISMATCH_ERR if requested trait's computed value cannot be converted to {@link org.w3c.dom.svg.SVGMatrix SVGMatrix}
       
   889      * @throws SecurityException if the application does not have the necessary privilege rights
       
   890      * to access this (SVG) content.
       
   891      */
       
   892     public SVGMatrix getMatrixTrait(String name)
       
   893     throws DOMException;
       
   894 
       
   895     /**
       
   896      * Returns the trait value as {@link org.w3c.dom.svg.SVGRect SVGRect}. The returned object is a copy of the actual trait value and will not change if
       
   897      * the corresponding trait changes.
       
   898      *
       
   899      * @param name the name of the trait to retrieve.
       
   900      * @return the trait value as SVGRect for the specified name.
       
   901      * @throws DOMException with error code NOT_SUPPORTED_ERR if the requested trait is not supported on this element or null.
       
   902      * @throws DOMException with error code TYPE_MISMATCH_ERR if requested trait's computed value cannot be converted to {@link org.w3c.dom.svg.SVGRect SVGRect}
       
   903      * @throws SecurityException if the application does not have the necessary privilege rights
       
   904      * to access this (SVG) content.
       
   905      */
       
   906     public SVGRect getRectTrait(String name)
       
   907     throws DOMException;
       
   908 
       
   909     /**
       
   910      * Returns the trait value as {@link org.w3c.dom.svg.SVGPath SVGPath}. The returned object is a copy of the actual trait value and will not change if
       
   911      * the corresponding trait changes.
       
   912      *
       
   913      * @param name the name of the trait to retrieve.
       
   914      * @return the trait value as SVGPath for the specified name.
       
   915      * @throws DOMException with error code NOT_SUPPORTED_ERR if the requested trait is not supported on this element or null.
       
   916      * @throws DOMException with error code TYPE_MISMATCH_ERR if requested trait's computed value cannot be converted to {@link org.w3c.dom.svg.SVGPath SVGPath}
       
   917      * @throws SecurityException if the application does not have the necessary privilege rights
       
   918      * to access this (SVG) content.
       
   919      */
       
   920     public SVGPath getPathTrait(String name)
       
   921     throws DOMException;
       
   922 
       
   923     /**
       
   924      * Returns the trait value as {@link org.w3c.dom.svg.SVGRGBColor SVGRGBColor}. The returned object is a copy of the trait value and will not change if
       
   925      * the corresponding trait changes. If the actual trait value is not an RGBColor (i.e. "none"), this method will return null.
       
   926      *
       
   927      * @param name the name of the trait to retrieve.
       
   928      * @return the trait value as SVGRGBColor for the specified name.
       
   929      * @throws DOMException with error code NOT_SUPPORTED_ERR if the requested trait is not supported on this element or null.
       
   930      * @throws DOMException with error code TYPE_MISMATCH_ERR if requested trait's computed value cannot be converted to {@link org.w3c.dom.svg.SVGRGBColor SVGRGBColor}
       
   931      * @throws SecurityException if the application does not have the necessary privilege rights
       
   932      * to access this (SVG) content.
       
   933      */
       
   934     public SVGRGBColor getRGBColorTrait(String name)
       
   935     throws DOMException;
       
   936 
       
   937     /**
       
   938      * Set the trait value as String. In SVG Tiny only certain traits can be set through a String value. The syntax of the String
       
   939      * that should be given as a value must be the same as syntax of the corresponding XML attribute value. Exactly equivalent
       
   940      * to {@link org.w3c.dom.svg.SVGElement#setTraitNS setTraitNS} with namespaceURI attribute set to null.
       
   941      *
       
   942      * @param name the name of the trait to be set.
       
   943      * @param value the value of the trait to be set as String.
       
   944      * @throws DOMException with error code NOT_SUPPORTED_ERR if the requested trait is not supported on this element or null.
       
   945      * @throws DOMException with error code TYPE_MISMATCH_ERR if the requested trait's value cannot be specified as a String
       
   946      * @throws DOMException with error code INVALID_ACCESS_ERR if the input value is an invalid value for the given trait or null.
       
   947      * @throws DOMException with error code NO_MODIFICATION_ALLOWED_ERR: if attempt is made to change readonly trait.
       
   948      * @throws SecurityException if the application does not have the necessary privilege rights
       
   949      * to access this (SVG) content.
       
   950      */
       
   951     public void setTrait(String name, String value)
       
   952     throws DOMException;
       
   953 
       
   954     /**
       
   955      * Same as {@link org.w3c.dom.svg.SVGElement#setTrait setTrait}, but for namespaced traits. Parameter name must be a non-qualified trait name, i.e. without prefix.
       
   956      *
       
   957      * @param namespaceURI the namespaceURI of the trait to be set.
       
   958      * @param name the name of the trait to be set.
       
   959      * @param value the value of the trait to be set as String.
       
   960      * @throws DOMException with error code NOT_SUPPORTED_ERR if the requested trait is not supported on this element or null.
       
   961      * @throws DOMException with error code TYPE_MISMATCH_ERR if the requested trait's value cannot be specified as a String
       
   962      * @throws DOMException with error code INVALID_ACCESS_ERR if the input value is an invalid value for the given trait or null.
       
   963      * This error is also thrown when the &lt;use&gt; element is hooked into the document tree and the the value of xlink:href is set invalid.
       
   964      * @throws DOMException with error code NO_MODIFICATION_ALLOWED_ERR: if attempt is made to change readonly trait.
       
   965      * @throws SecurityException if the application does not have the necessary privilege rights
       
   966      * to access this (SVG) content.
       
   967      */
       
   968 
       
   969     public void setTraitNS(String namespaceURI, String name, String value)
       
   970     throws DOMException;
       
   971 
       
   972     /**
       
   973      * Set the trait value as float.
       
   974      *
       
   975      * @param name the name of the trait to be set.
       
   976      * @param value the value of the trait to be set as float.
       
   977      * @throws DOMException with error code NOT_SUPPORTED_ERR if the requested trait is not supported on this element.
       
   978      * @throws DOMException with error code TYPE_MISMATCH_ERR if the requested trait's value cannot be specified as a float
       
   979      * @throws DOMException with error code INVALID_ACCESS_ERR if the input value is an invalid value for the given trait.
       
   980      * @throws SecurityException if the application does not have the necessary privilege rights
       
   981      * to access this (SVG) content.
       
   982      */
       
   983     public void setFloatTrait(String name, float value)
       
   984     throws DOMException;
       
   985 
       
   986     /**
       
   987      * Set the trait value as {@link org.w3c.dom.svg.SVGMatrix SVGMatrix}. Values in SVGMatrix are copied in the trait so subsequent changes to the given
       
   988      * SVGMatrix have no effect on the value of the trait.
       
   989      *
       
   990      * @param name the name of the trait to be set.
       
   991      * @param matrix the value of the trait to be set as SVGMatrix.
       
   992      * @throws DOMException with error code NOT_SUPPORTED_ERR if the requested trait is not supported on this element or null.
       
   993      * @throws DOMException with error code TYPE_MISMATCH_ERR if the requested trait's value cannot be specified as an {@link org.w3c.dom.svg.SVGMatrix SVGMatrix}
       
   994      * @throws DOMException with error code INVALID_ACCESS_ERR if the input matrix value is null.
       
   995      * @throws SecurityException if the application does not have the necessary privilege rights
       
   996      * to access this (SVG) content.
       
   997      */
       
   998 
       
   999     public void setMatrixTrait(String name, SVGMatrix matrix)
       
  1000     throws DOMException;
       
  1001 
       
  1002     /**
       
  1003      * Set the trait value as {@link org.w3c.dom.svg.SVGRect SVGRect}. Values in SVGRect are copied in the trait so subsequent changes to the given
       
  1004      * SVGRect have no effect on the value of the trait.
       
  1005      *
       
  1006      * @param name the name of the trait to be set.
       
  1007      * @param rect the value of the trait to be set as SVGRect.
       
  1008      * @throws DOMException with error code NOT_SUPPORTED_ERR if the requested trait is not supported on this element or null.
       
  1009      * @throws DOMException with error code TYPE_MISMATCH_ERR if the requested trait's value cannot be specified as an {@link org.w3c.dom.svg.SVGRect SVGRect}
       
  1010      * @throws DOMException with error code INVALID_ACCESS_ERR if the input value is an invalid value for the given trait or null.
       
  1011      * SVGRect is invalid if the width or height values are set to negative.
       
  1012      * @throws SecurityException if the application does not have the necessary privilege rights
       
  1013      * to access this (SVG) content.
       
  1014      */
       
  1015 
       
  1016     public void setRectTrait(String name, SVGRect rect)
       
  1017     throws DOMException;
       
  1018 
       
  1019     /**
       
  1020      * Set the trait value as {@link org.w3c.dom.svg.SVGPath SVGPath}. Values in SVGPath are copied in the trait so subsequent changes to the given
       
  1021      * SVGPath have no effect on the value of the trait.
       
  1022      *
       
  1023      * @param name the name of the trait to be set.
       
  1024      * @param path the value of the trait to be set as SVGPath.
       
  1025      * @throws DOMException with error code NOT_SUPPORTED_ERR if the requested trait is not supported on this element or null.
       
  1026      * @throws DOMException with error code TYPE_MISMATCH_ERR if the requested trait's value cannot be specified as an {@link org.w3c.dom.svg.SVGPath SVGPath}
       
  1027      * @throws DOMException with error code INVALID_ACCESS_ERR if the input value is an invalid value for the given trait or null.
       
  1028      * SVGPath is invalid if it begins with any segment other than MOVE_TO segment. Note that an empty SVGPath is still a valid value.
       
  1029      * @throws SecurityException if the application does not have the necessary privilege rights
       
  1030      * to access this (SVG) content.
       
  1031      */
       
  1032 
       
  1033     public void setPathTrait(String name, SVGPath path)
       
  1034     throws DOMException;
       
  1035 
       
  1036     /**
       
  1037      * Set the trait value as {@link org.w3c.dom.svg.SVGRGBColor SVGRGBColor}. Values in SVGRGBColor are copied in the trait so subsequent changes to the given
       
  1038      * SVGRGBColor have no effect on the value of the trait.
       
  1039      *
       
  1040      * @param name the name of the trait to be set.
       
  1041      * @param color the value of the trait to be set as SVGRGBColor.
       
  1042      * @throws DOMException with error code NOT_SUPPORTED_ERR if the requested trait is not supported on this element or null.
       
  1043      * @throws DOMException with error code TYPE_MISMATCH_ERR if the requested trait's value cannot be specified as an {@link org.w3c.dom.svg.SVGRGBColor SVGRGBColor}
       
  1044      * @throws DOMException with error code INVALID_ACCESS_ERR if the input value is null.
       
  1045      * @throws SecurityException if the application does not have the necessary privilege rights
       
  1046      * to access this (SVG) content.
       
  1047      */
       
  1048 
       
  1049     public void setRGBColorTrait(String name, SVGRGBColor color)
       
  1050     throws DOMException;
       
  1051 }