src/java.desktop/share/classes/javax/swing/plaf/synth/doc-files/synthFileFormat.html
author serb
Mon, 09 Sep 2019 12:23:22 -0700
changeset 58325 d32a3b1ca84a
parent 52965 fcbea0fb586c
child 58595 fa9f28a0e175
permissions -rw-r--r--
8225372: accessibility errors in tables in java.desktop files Reviewed-by: aivanov
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
     1
<!doctype html>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
     2
<html lang="en">
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
     3
<head>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
     4
  <meta charset="utf-8"/>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
     5
  <title>Synth File Format</title>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
     6
<!--
58325
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
     7
 Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
     8
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
     9
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    10
 This code is free software; you can redistribute it and/or modify it
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    11
 under the terms of the GNU General Public License version 2 only, as
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    12
 published by the Free Software Foundation.  Oracle designates this
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    13
 particular file as subject to the "Classpath" exception as provided
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    14
 by Oracle in the LICENSE file that accompanied this code.
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    15
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    16
 This code is distributed in the hope that it will be useful, but WITHOUT
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    17
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    18
 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    19
 version 2 for more details (a copy is included in the LICENSE file that
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    20
 accompanied this code).
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    21
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    22
 You should have received a copy of the GNU General Public License version
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    23
 2 along with this work; if not, write to the Free Software Foundation,
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    24
 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    25
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    26
 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    27
 or visit www.oracle.com if you need additional information or have any
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    28
 questions.
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    29
-->
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    30
21254
f6d36ee3f269 8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents: 7959
diff changeset
    31
  <style type="text/css">
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
div.dtd-fragment {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
    width: 100%;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
    border: none;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
    background-color: #eee;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
pre.dtd-fragment {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
    margin-left: 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
div.example {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
    width: 100%;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
    color: maroon;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
  </style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
  </head>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
  <body>
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
    48
  <main role="main">
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
    49
    <h1><a id="file">File Format</a></h1>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
      Synth's file format (<a href="synth.dtd">dtd</a>)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
      allows for specifying all the pieces
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
      necessary to create your own look and feel. A synth file is
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    54
      loaded by way of the <A
52253
c2d3b6d84115 8211886: Bad/broken link in synthFileFormat.html
psadhukhan
parents: 50358
diff changeset
    55
        HREF="../../../../../javax/swing/plaf/synth/SynthLookAndFeel.html#load(java.io.InputStream,java.lang.Class)">
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    56
      SynthLookAndFeel.load(InputStream, Class)</a> or
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    57
      <a href="../../../../../javax/swing/plaf/synth/SynthLookAndFeel.html#load(java.net.URL)">
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    58
        SynthLookAndFeel.load(URL)</a> methods.
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    59
      The following example uses the <code>load</code> method to configure
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
      a <code>SynthLookAndFeel</code> and sets it as the current look
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
      and feel:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
  SynthLookAndFeel laf = new SynthLookAndFeel();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
  laf.load(MyClass.class.getResourceAsStream("laf.xml"), MyClass.class);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
  UIManager.setLookAndFeel(laf);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
      </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
    </div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
      This example loads the look and feel from an input stream, using
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
      the specified class as the resource base to resolve paths.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
      It is also possible to load a look and feel from an arbitrary URL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
      as in the following example.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
  SynthLookAndFeel laf = new SynthLookAndFeel();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
  laf.load(new URL("file:///C:/java/synth/laf/laf.xml"));
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
  UIManager.setLookAndFeel(laf);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
      </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
    </div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
    <p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    84
      The method <a
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    85
        href="../../../../../javax/swing/plaf/synth/SynthLookAndFeel.html#load(java.net.URL)">
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    86
      SynthLookAndFeel.load(URL)</a> can be used, for instance, to load a look
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    87
      and feel from any of the following:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    <ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
      <li>File, e.g. <code>file:///C:/java/synth/laf/laf.xml</code></li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
      <li>Web server, e.g. <code>http://host/laf.xml</code></li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
      <li>JAR file, e.g.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
        <code>jar:file:///C:/synth-laf.jar!/laf.xml</code></li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
      <li>Remote JAR file, e.g.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
        <code>jar:http://host/synth-laf.jar!/laf.xml</code></li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
    </ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
      While the DTD for synth is specified, the parser is not validating.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
      Parsing will fail only if a necessary attribute is not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
      specified, or of the wrong type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
   102
    <h2>The synth element</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
<div class="dtd-fragment">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
<pre class="dtd-fragment">
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   105
&lt;!ELEMENT <a id="e.synth">synth</a> ((<a href="#ee.beansPersistance">%beansPersistance;</a>) | <a href="#e.style">style</a> | <a href="#e.bind">bind</a> | <a href="#e.font">font</a> | <a href="#e.color">color</a> |
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
                 <a href="#e.imagePainter">imagePainter</a> | <a href="#e.imageIcon">imageIcon</a> | <a href="#e.defaultsProperty">defaultsProperty</a>)*>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
&lt;!ATTLIST synth
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
          <a href="#synth.version">version</a>              CDATA          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
</pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    <p><em>Attribute definitions</em></p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   113
    <dl><dt><a id="synth.version"><samp>version</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
	<dd>File format version, should be 1</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    </dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
      The <a href="#e.synth">synth</a> element contains all the other
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
      elements that make up a SynthLookAndFeel definition.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   121
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
   122
    <h2>The style element</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
<div class="dtd-fragment">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
<pre class="dtd-fragment">
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   125
&lt;!ELEMENT <a id="e.style">style</a> (<a href="#e.property">property</a> | <a href="#e.defaultsProperty">defaultsProperty</a> | <a href="#e.state">state</a> | <a href="#e.font">font</a> | <a href="#e.graphicsUtils">graphicsUtils</a> |
7959
2e05332a8f5c 6589952: Swing: dead links in API documentation
rupashka
parents: 2
diff changeset
   126
                 <a href="#e.insets">insets</a> | <a href="#e.painter">painter</a> | <a href="#e.imagePainter">imagePainter</a> | <a href="#e.opaque">opaque</a> | (<a href="#ee.beansPersistance">%beansPersistance;</a>) |
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
                 <a href="#e.imageIcon">imageIcon</a>)*>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
&lt;!ATTLIST style
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
          <a href="#style.id">id</a>              ID          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
          <a href="#style.clone">clone</a>           IDREF       #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
</pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
    <p><em>Attribute definitions</em></p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
    <dl>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   136
      <dt><a id="style.id"><samp>id</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
      <dd>Unique identifier for the style.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   138
      <dt><a id="style.clone"><samp>clone</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
      <dd>Identifier of a previously defined style that is copied
32871
f013b86386e6 6646604: Typos in documentation
serb
parents: 25859
diff changeset
   140
	    and used for the new style. This provides a convenient
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
	    mechanism for overriding only a portion of an existing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
	    style.</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    </dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
    <p>
21254
f6d36ee3f269 8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents: 7959
diff changeset
   145
      A style element corresponds to a
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
      <code>SynthStyle</code>, with the child elements specifying
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
      properties that apply to all states or state elements which
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
      contain properties specific to a particular state. The following
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
      example creates an opaque style with the id <code>button</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
      insets of 4, 4, 4, 4 and a font of Dialog 12.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
&lt;style id="button">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
  &lt;opaque value="true"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
  &lt;insets top="4" left="4" right="4" bottom="4"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
  &lt;font name="Dialog" size="12"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
      </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
    </div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
      The following example creates a new style with an id of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
      <code>clonedButton</code> that is a copy of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
      style with id <code>button</code> and has a font of Dialog,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
      14. The resulting style will be opaque, have insets of 4, 4, 4,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
      4 and a font of Dialog 14.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
&lt;style id="clonedButton" clone="button">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
  &lt;font name="Dialog" size="14"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
      </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
    </div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
   176
    <h2>The state element</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
<div class="dtd-fragment">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
<pre class="dtd-fragment">
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   179
&lt;!ELEMENT <a id="e.state">state</a> (<a href="#e.color">color</a> | <a href="#e.font">font</a> | <a href="#e.painter">painter</a> | <a href="#e.imagePainter">imagePainter</a> | (<a href="#ee.beansPersistance">%beansPersistance;</a>) |
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
                 <a href="#e.property">property</a> |  <a href="#e.imageIcon">imageIcon</a>)*>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
&lt;!ATTLIST state
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
          <a href="#state.id">id</a>              ID             #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
          <a href="#state.clone">clone</a>           IDREF          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
          <a href="#state.value">value</a>           CDATA          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
          <a href="#state.idref">idref</a>           IDREF          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
</pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
    <p><em>Attribute definitions</em></p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
    <dl>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   191
      <dt><a id="state.id"><samp>id</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
      <dd>Unique identifier for the state.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   193
      <dt><a id="state.clone"><samp>clone</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
      <dd>Identifier of a previously defined state that is copied
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
	and used for the new state.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   196
      <dt><a id="state.value"><samp>value</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
      <dd>Identifies the state of the Component the properties are to apply
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
	to. This is a list of: ENABLED,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
	MOUSE_OVER, PRESSED, DISABLED, FOCUSED, SELECTED or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
	DEFAULT. Multiple states should
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
	be separated by 'and.' If you do not specify a value, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
	contents apply to all states.
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   203
      <dt><a id="state.idref"><samp>idref</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
      <dd>Indicates this state should be the same as a previously
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
	    defined state. This is useful for multiple styles that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
	    wish to share the same visual properties for a particular
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
	    state.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
      </dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
    </dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
      The <a href="#e.state">state</a> element specifies the visual
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
      properties that are to be used for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
      a particular state of a component. For example, you could
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
      specify the background color when the Component is enabled should look
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
      different than the background color when the component is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
      disabled. Not all Components support all states. For example, a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
      <code>Panel</code> only supports the states ENABLED and DISABLED.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
      The following example creates a state with a red background that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
      will be used when the component is in an a selected and pressed state:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
    <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
&lt;state value="SELECTED AND PRESSED">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
  &lt;color value="RED" type="BACKGROUND"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
&lt;/state>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
      The state with the most individual matches will be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
      chosen. For example, the following defines two states:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
&lt;state value="SELECTED and PRESSED" id="one">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
  &lt;color value="RED" type="BACKGROUND"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
&lt;/state>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
&lt;state value="SELECTED" id="two">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
  &lt;color value="RED" type="BACKGROUND"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
&lt;/state>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
      State <code>one</code> is used when the Component is SELECTED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
      and PRESSED, and state <code>two</code> when the Component is
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   247
      SELECTED. If the state of the Component
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
      contains at least SELECTED and PRESSED, state <code>one</code> will be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
      chosen, otherwise if the state is SELECTED, but not does not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
      contain PRESSED, state <code>two</code> will be used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
   252
    <h2>The font element</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
<div class="dtd-fragment">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
<pre class="dtd-fragment">
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   255
&lt;!ELEMENT <a id="e.font">font</a> EMPTY>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
&lt;!ATTLIST font
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
          <a href="#font.id">id</a>              ID             #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
          <a href="#font.idref">clone</a>           IDREF          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
          <a href="#font.name">name</a>            CDATA          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
          <a href="#font.style">style</a>           CDATA          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
          <a href="#font.size">size</a>            CDATA          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
</pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
    <p><em>Attribute definitions</em></p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
    <dl>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   267
      <dt><a id="font.id"><samp>id</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
      <dd>Unique identifier for the Font.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   269
      <dt><a id="font.idref"><samp>idref</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
      <dd>Identifier of a previously defined font.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   271
      <dt><a id="font.name"><samp>name</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
      <dd>Name of the font.
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   273
      <dt><a id="font.style"><samp>style</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
      <dd>Style of the font. This is a list of the styles defined by
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
	Font separated by spaces: PLAIN, BOLD or ITALIC. If
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
	unspecified PLAIN is used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
      </dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   278
      <dt><a id="font.size"><samp>size</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
      <dd>Size of the font, in pixels</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
    </dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
      Defines the font for the current <a href="#e.state">state</a>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
      or <a href="#e.style">style</a>. You must
7959
2e05332a8f5c 6589952: Swing: dead links in API documentation
rupashka
parents: 2
diff changeset
   284
      specify either an <a href="#font.idref">idref</a> or a
2e05332a8f5c 6589952: Swing: dead links in API documentation
rupashka
parents: 2
diff changeset
   285
      <a href="#font.name">name</a> and <a href="#font.size">size</a>.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
      The following example creates a style with a Font of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
      Dialog 12 Bold.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
&lt;style id="test">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
  &lt;font name="DIALOG" size="12" style="BOLD"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
      The following example creates a style with a font of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
      Dialog 12 Bold that will be used if the component is ENABLED,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
      otherwise Dialog 12 Italic will be used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
&lt;style id="test">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
  &lt;font name="DIALOG" size="12" style="ITALIC"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
  &lt;state value="ENABLED">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
    &lt;font name="DIALOG" size="12" style="BOLD"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
  &lt;/state>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
      While you can supply a different font per state, in general
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
      widgets will NOT revalidate when the state changes, so that you
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
      may run into sizing problems if you try to use a font with a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
      significantly different size for different states.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
   321
    <h2>The color element</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
<div class="dtd-fragment">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
<pre class="dtd-fragment">
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   324
&lt;!ELEMENT <a id="e.color">color</a> EMPTY>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
&lt;!ATTLIST color
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
          <a href="#color.id">id</a>              ID             #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
          <a href="#color.idref">idref</a>           IDREF          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
          <a href="#color.type">type</a>            CDATA          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
          <a href="#color.value">value</a>           CDATA          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
</pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
    <p><em>Attribute definitions</em></p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
    <dl>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   335
      <dt><a id="color.id"><samp>id</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
      <dd>Unique identifier for the color.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   337
      <dt><a id="color.idref"><samp>idref</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
      <dd>Identifier of a previously defined color.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   339
      <dt><a id="color.type"><samp>type</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
      <dd>Describes where this color should be used. This is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
	    typically one of the constants defined by ColorType:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
	    FOREGROUND, BACKGROUND, TEXT_FOREGROUND, TEXT_BACKGROUND
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
	    or FOCUS. Alternatively you can specify the complete path
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
	    to a class and field, for example
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
	    javax.swing.plaf.synth.ColorType.FOREGROUND, this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
	    is useful for subclasses of synth that define additional
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
	    color types.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
      </dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   349
      <dt><a id="color.value"><samp>value</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
      <dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   351
        Value for the color. This accepts the following forms.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
        <ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
          <li>The name of a constant in the <code>Color</code> class,
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   354
            for example <code> RED</code>.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
          <li>A hex value of the form <code>#RRGGBB</code> where
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
            <code>RR</code> gives the red component, <code>GG</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
            the green component and <code>BB</code> the blue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
            component. You need not specify all color components. For
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
            example, <code>#123</code> is equivalent to <code>#000123</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
          <li>A hex value of the form <code>#ARRGGBB</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
            <code>#AARRGGBB</code>. This is useful for alpha values
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
            other than <code>0xFF</code>. The form
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
            <code>#ARRGGBB</code> is equivalent to
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   364
            <code>#0ARRGGBB</code>.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
        </ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
      </dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
    </dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
      <a href="#e.color">Color</a> defines a color and what portion of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
      the Component it should be applied to. The following example
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
      will use a background color of RED when the component is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
      enabled.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
&lt;state value="ENABLED">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
  &lt;color value="RED" type="BACKGROUND"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
&lt;/state>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
      The following example will have a red background when the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
      Component is enabled, otherwise blue.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
&lt;style id="test">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
  &lt;state value="ENABLED">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
    &lt;color value="RED" type="BACKGROUND"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
  &lt;/state>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
  &lt;state>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
    &lt;color value="#00FF00" type="BACKGROUND"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
  &lt;/state>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
   398
    <h2>The property element</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
<div class="dtd-fragment">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
<pre class="dtd-fragment">
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   401
&lt;!ELEMENT <a id="e.property">property</a> EMPTY>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
&lt;!ATTLIST property
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
          <a href="#property.key">key</a>               CDATA                                             #REQUIRED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
          <a href="#property.type">type</a>              (idref|boolean|dimension|insets|integer|string)          "idref"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
          <a href="#property.value">value</a>             CDATA                                             #REQUIRED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
</pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
    <p><em>Attribute definitions</em></p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
    <dl>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   411
      <dt><a id="property.key"><samp>key</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
      <dd>Name of the property.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   413
      <dt><a id="property.type"><samp>type</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
      <dd>Indicates the type of the property.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   415
      <dt><a id="property.value"><samp>value</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
      <dd>Value for the property. For boolean properties this will be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
	be true or false, for integer properties this will be a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
	valid integer, for dimensions this will be the width and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
	height separated by a space, for insets properties this will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
	be the top, left, bottom and right separated by a space and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
	for idref properties this will be the unique id of a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
	previously defined object.</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
    </dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
      <a href="#e.property">Property</a> elements are used to add key value pairs to a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
      <code>SynthStyle</code> that can be accessed by way of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
      <code>get</code> method. Many <code>Component</code>s use the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
      key value pairs for configuring their visual appearance. Refer to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
      <a href="componentProperties.html">property table</a> for a list of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
      properties each <code>Component</code> supports. The following
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
      creates the properties
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
      <code>ScrollBar.allowsAbsolutePositioning</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
      <code>OptionPane.minimumSize</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
      <code>ScrollPane.viewportBorderInsets</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
      <code>Tree.rowHeight</code> and <code>foreground</code> with the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
      values false, a dimensions of 262x90, an insets of 5, 5, 5, 5,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
      the integer 20 and an instance of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
      class ArrowButtonPainter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
&lt;style id="test">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
  &lt;property key="ScrollBar.allowsAbsolutePositioning" type="boolean" value="false"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
  &lt;property key="OptionPane.minimumSize" type="dimension" value="262 90"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
  &lt;property key="ScrollPane.viewportBorderInsets" type="insets" value="5 5 5 5"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
  &lt;property key="Tree.rowHeight" type="integer" value="20"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
  &lt;object class="ArrowButtonPainter" id="ArrowButtonPainter"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
  &lt;property key="foreground" type="idref" value="ArrowButtonPainter"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
      You can also specify properties that are to apply to specific
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
      states.  Whether or not the property is accessed for each state
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
      depends upon how the property is used.  For example, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
      following specifies a default icon and an icon to use while the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
      mouse is over the component.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
&lt;style id="test">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
  &lt;imageIcon id="defaultIcon" path="resources/myImage.png"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
  &lt;property key="RadioButton.icon" value="defaultIcon"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
  &lt;state value="MOUSE_OVER">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
    &lt;imageIcon id="mouseOverIcon" path="resources/myMouseOverImage.png"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
    &lt;property key="RadioButton.icon" value="mouseOverIcon"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
  &lt;/state>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
<div class="dtd-fragment">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
<pre class="dtd-fragment">
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   473
&lt;!ELEMENT <a id="e.defaultsProperty">defaultsProperty</a> EMPTY>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
&lt;!ATTLIST defaultsProperty
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
          <a href="#defaultsProperty.key">key</a>               CDATA                                             #REQUIRED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
          <a href="#defaultsProperty.type">type</a>              (idref|boolean|dimension|insets|integer|string)   "idref"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
          <a href="#defaultsProperty.value">value</a>             CDATA                                             #REQUIRED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
</pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
    <p><em>Attribute definitions</em></p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
    <dl>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   483
      <dt><a id="defaultsProperty.key"><samp>key</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
      <dd>Name of the property.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   485
      <dt><a id="defaultsProperty.type"><samp>type</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
      <dd>Indicates the type of the property.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   487
      <dt><a id="defaultsProperty.value"><samp>value</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
      <dd>Value for the property. For boolean properties this will be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
	true or false, for integer properties this will be a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
	valid integer, for dimensions this will be the width and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
	height separated by a space, for insets properties this will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
	be the top, left, bottom and right separated by a space and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
	for idref properties this will be the unique id of a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
	previously defined object.</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
    </dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
      <a href="#e.defaultsProperty">DefaultsProperty</a> elements are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
      used to define properties that will be placed in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
      <code>UIDefaults</code> table that <code>SynthLookAndFeel</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
      supplies to the <code>UIManager</code>. The following assigns the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
      the Color red to the value Table.focusCellForeground.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
&lt;style id="test">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
  &lt;object class="javax.swing.plaf.ColorUIResource" id="color">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
    &lt;int>255&lt;/int>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
    &lt;int>0&lt;/int>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
    &lt;int>0&lt;/int>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
  &lt;/object>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
  &lt;defaultsProperty key="Table.focusCellForeground" type="idref" value="color"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
      This value could then be asked by way of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
      <code>UIManager.get("Table.focusCellForeground")</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
   520
    <h2>The graphicsUtils element</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
<div class="dtd-fragment">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
<pre class="dtd-fragment">
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   523
&lt;!ELEMENT <a id="e.graphicsUtils">graphicsUtils</a> EMPTY>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
&lt;!ATTLIST graphicsUtils
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
          <a href="#graphicsUtils.idref">idref</a>           IDREF             #REQUIRED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
</pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
    <p><em>Attribute definitions</em></p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
    <dl>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   531
      <dt><a id="graphicsUtils.idref"><samp>idref</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
      <dd>Identifer of a previously defined SynthGraphicsUtils object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
	that is to be used as the SynthGraphicsUtils for the current
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
	<a href="#e.style">style</a>.</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
    </dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
      <a href="#e.graphicsUtils">GraphicsUtils</a> elements are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
      used to define the SynthGraphicsUtils that the current
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
      <a href="#e.style">style</a> will use. The following example
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
      creates a style with an instance of CustomGraphicsUtils for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
      SynthGraphicsUtils.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
&lt;style id="test">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
  &lt;object class="CustomGraphicsUtils" id="graphics"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
  &lt;graphicsUtils idref="graphics"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   549
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
   552
    <h2>The insets element</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
<div class="dtd-fragment">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
<pre class="dtd-fragment">
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   555
&lt;!ELEMENT <a id="e.insets">insets</a> EMPTY>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   556
&lt;!ATTLIST insets
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
          <a href="#insets.id">id</a>           ID             #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
          <a href="#insets.idref">idref</a>        IDREF          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
          <a href="#insets.top">top</a>          CDATA          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
          <a href="#insets.bottom">bottom</a>       CDATA          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   561
          <a href="#insets.left">left</a>         CDATA          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
          <a href="#insets.right">right</a>        CDATA          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   564
</pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
    <p><em>Attribute definitions</em></p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   567
    <dl>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   568
      <dt><a id="insets.id"><samp>id</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
      <dd>Unique identifier for the Insets.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   570
      <dt><a id="insets.idref"><samp>idref</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
      <dd>Identifier of a previously defined Insets.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   572
      <dt><a id="insets.top"><samp>top</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
      <dd>Top component of the Insets.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   574
      <dt><a id="insets.bottom"><samp>bottom</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   575
      <dd>Bottom component of the Insets.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   576
      <dt><a id="insets.left"><samp>left</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
      <dd>Left component of the Insets.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   578
      <dt><a id="insets.right"><samp>right</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
      <dd>Right component of the Insets.</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
    </dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
      <a href="#e.insets">Insets</a> elements are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
      used to define the Insets for the current <a href="#e.style">style</a>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
      The insets will be set on any Components the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
      <a href="#e.style">style</a> is associated with. The following
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
      example creates a style with insets of 1, 2, 3, 0.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   588
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   590
&lt;style id="test">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
  &lt;insets top="1" bottom="2" left="3"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   593
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   594
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   595
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
   596
    <h2>The bind element</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   597
<div class="dtd-fragment">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   598
<pre class="dtd-fragment">
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   599
&lt;!ELEMENT <a id="e.bind">bind</a> EMPTY>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   600
&lt;!ATTLIST bind
90ce3da70b43 Initial load
duke
parents:
diff changeset
   601
          <a href="#bind.style">style</a>        IDREF             #REQUIRED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   602
          <a href="#bind.type">type</a>         (name|region)     #REQUIRED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   603
          <a href="#bind.key">key</a>          CDATA             #REQUIRED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   604
&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   605
</pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   606
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   607
    <p><em>Attribute definitions</em></p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   608
    <dl>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   609
      <dt><a id="bind.style"><samp>style</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   610
      <dd>Unique identifier of a previously defined style.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   611
      <dt><a id="bind.type"><samp>type</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   612
      <dd>One of name or region. For type name component.getName() is used,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   613
	otherwise the name of the Region is used.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   614
      <dt><a id="bind.key"><samp>key</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   615
      <dd>Regular expression applied to the name of the Component, or the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   616
	name of the Region, depending upon the value of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   617
	<a href="#bind.type">type</a>.</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   618
    </dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   619
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   620
      <a href="#e.bind">Bind</a> elements specify which Regions a style
90ce3da70b43 Initial load
duke
parents:
diff changeset
   621
      is to be used for. The following example applies the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   622
      <a href="#e.style">style</a> test to any Component whose name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
      starts with <code>test</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   624
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   627
&lt;style id="test">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   628
  &lt;insets top="1" bottom="2" left="3"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   629
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   630
&lt;bind style="test" type="name" key="test.*"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   631
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   632
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   633
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   634
      Numerous styles may apply to a region, in which case each of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   635
      the matching styles is merged into a resulting style that is used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   636
      Precedence is given to styles defined later in the file. For example,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   637
      the following defines two styles, a and b. Style a is applied to any
90ce3da70b43 Initial load
duke
parents:
diff changeset
   638
      component with a name starting with test, and style b is used for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   639
      button regions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   640
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   641
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   642
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   643
&lt;style id="a">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   644
  &lt;font name="DIALOG" size="12" style="ITALIC"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   645
  &lt;insets top="1" bottom="2" left="3"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   646
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   647
&lt;bind style="a" type="name" key="test.*"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   648
&lt;style id="b">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   649
  &lt;font name="DIALOG" size="12" style="BOLD"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   650
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   651
&lt;bind style="b" type="region" key="button"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   652
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   653
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   654
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   655
      For a button with the name test this is equivalent to:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   656
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   657
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   658
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   659
&lt;style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   660
  &lt;font name="DIALOG" size="12" style="BOLD"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   661
  &lt;insets top="1" bottom="2" left="3"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   662
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   663
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   664
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   665
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   666
      Merging happens for states of a style as well.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   667
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   668
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   669
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   670
&lt;style id="a">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   671
  &lt;font name="DIALOG" size="12" style="ITALIC"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   672
  &lt;insets top="1" bottom="2" left="3"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   673
  &lt;state value="ENABLED">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   674
    &lt;object id="customPainter" class="CustomPainter"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   675
    &lt;painter idref="customPainter"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   676
  &lt;/state>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   677
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   678
&lt;bind style="a" type="name" key="test.*"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   679
&lt;style id="b">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   680
  &lt;font name="DIALOG" size="12" style="BOLD"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   681
  &lt;state value="ENABLED">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   682
    &lt;font name="Lucida" size="12" style="ITALIC"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   683
  &lt;/state>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   684
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   685
&lt;bind style="b" type="region" key="button"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   686
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   687
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   688
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   689
      For a button with the name test this is equivalent to:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   690
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   691
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   692
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   693
&lt;style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   694
  &lt;font name="DIALOG" size="12" style="BOLD"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   695
  &lt;insets top="1" bottom="2" left="3"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   696
  &lt;state value="ENABLED">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   697
    &lt;object id="customPainter" class="CustomPainter"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   698
    &lt;painter idref="customPainter"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   699
    &lt;font name="Lucida" size="12" style="ITALIC"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   700
  &lt;/state>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   701
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   702
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   703
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   704
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
   705
    <h2>The painter element</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   706
<div class="dtd-fragment">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   707
<pre class="dtd-fragment">
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   708
&lt;!ELEMENT <a id="e.painter">painter</a> EMPTY>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   709
&lt;!ATTLIST painter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   710
          <a href="#painter.idref">idref</a>                 IDREF          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   711
          <a href="#painter.method">method</a>                CDATA          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   712
          <a href="#painter.direction">direction</a>             (north|south|east|west|top|left|bottom|right|horizontal|vertical|horizontal_split|vertical_split)          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   713
&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   714
</pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   715
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   716
    <p><em>Attribute definitions</em></p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   717
    <dl>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   718
      <dt><a id="painter.idref"><samp>idref</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   719
      <dd>Identifier of a previously defined SynthPainter.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   720
      <dt><a id="painter.method"><samp>method</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   721
      <dd>Identifies the SynthPainter method this is to be used for. The name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   722
	corresponds to the method name of a paint method in SynthPainter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   723
	with the paint prefix dropped, the remainder is case
90ce3da70b43 Initial load
duke
parents:
diff changeset
   724
	insensitive (using the latin1 case folding rules).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   725
	For example SynthPainter.paintButtonBackground is identified by
90ce3da70b43 Initial load
duke
parents:
diff changeset
   726
	'buttonBackground' or 'buttonbackground'. If this is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   727
	not specified the painter is used for all methods that don't have a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   728
	a specific painter for them.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   729
      <dt><a id="painter.direction"><samp>direction</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   730
      <dd>Identifies the direction, or orientation, this painter is to be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   731
	used for. This is only useful for the SynthPainter methods that take
90ce3da70b43 Initial load
duke
parents:
diff changeset
   732
	a direction or orientation. If this is not specified the painter is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   733
	used for all directions.</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   734
    </dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   735
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   736
      <a href="#e.painter">Painter</a> defines a SynthPainter for the current
90ce3da70b43 Initial load
duke
parents:
diff changeset
   737
      style or the state of the current style. The following example
90ce3da70b43 Initial load
duke
parents:
diff changeset
   738
      binds an instance of the class <code>MyPainter</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   739
      which must be a <code>SynthPainter</code> to the style <code>test</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   740
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   741
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   742
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   743
&lt;style id="test">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   744
  &lt;object class="MyPainter" id="MyPainter"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   745
  &lt;painter idref="MyPainter"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   746
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   747
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   748
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   749
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   750
      The painter that is used for a particular method and state is determined
90ce3da70b43 Initial load
duke
parents:
diff changeset
   751
      as follows:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   752
    <ol>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   753
      <li>Painter specified for the current state, method and direction.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   754
      <li>Painter specified for the current state and method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   755
      <li>Painter specified for the current state.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   756
      <li>Painter specified for the style, method and direction.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   757
      <li>Painter specified for the style and method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   758
      <li>Painter specified for the style.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   759
    </ol>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   760
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   761
      Consider the following:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   762
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   763
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   764
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   765
&lt;style id="test">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   766
  &lt;painter idref="fallbackPainter"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   767
  &lt;painter idref="styleButtonBackgroundPainter" method="buttonBackground"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   768
  &lt;state value="SELECTED">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   769
    &lt;painter idref="stateFallbackPainter"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   770
    &lt;painter idref="stateButtonBackgroundPainter" method="buttonBackground"/>
21254
f6d36ee3f269 8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents: 7959
diff changeset
   771
  &lt;/state>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   772
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   773
      </pre>
23715
54ae9dd9df73 8039074: Tidy warnings cleanup for javax.swing
yan
parents: 21254
diff changeset
   774
    </div>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   775
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   776
      The following outlines which painter will be used for what
23715
54ae9dd9df73 8039074: Tidy warnings cleanup for javax.swing
yan
parents: 21254
diff changeset
   777
      SynthPainter method:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   778
    </p>
52965
fcbea0fb586c 8213049: Invalid HTML5 in javax.swing files
psadhukhan
parents: 52253
diff changeset
   779
    <table border=1>
58325
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   780
     <caption>Painters for SynthPainter methods</caption>
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   781
      <thead>
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   782
      <tr>
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   783
        <th scope="col">Index
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   784
        <th scope="col">State
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   785
        <th scope="col">Method
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   786
        <th scope="col">Painter
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   787
      </thead>
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   788
      <tbody>
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   789
	    <tr>
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   790
        <th scope="row">1
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   791
        <td>SELECTED
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   792
        <td>paintButtonBackground<td>stateButtonBackgroundPainter
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   793
	    <tr>
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   794
        <th scope="row">2
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   795
        <td>SELECTED
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   796
        <td>Anything but paintButtonBackground<td>stateFallbackPainter
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   797
	    <tr>
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   798
        <th scope="row">3
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   799
        <td>Anything but SELECTED
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   800
        <td>paintButtonBackground<td>styleButtonBackgroundPainter
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   801
	    <tr>
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   802
        <th scope="row">4
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   803
        <td>Anything but SELECTED
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   804
        <td>Anything but paintButtonBackground<td>fallbackPainter
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52965
diff changeset
   805
      </tbody>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   806
    </table>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   807
90ce3da70b43 Initial load
duke
parents:
diff changeset
   808
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   809
      When several identical painters are declared, they are aggregated into
90ce3da70b43 Initial load
duke
parents:
diff changeset
   810
      a single one. Two painters are identical if their <em>direction</em> and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   811
      <em>method</em> attributes values are equal. Consider the following:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   812
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   813
90ce3da70b43 Initial load
duke
parents:
diff changeset
   814
	<div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   815
	  <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   816
&lt;style id="panelStyle"&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   817
  &lt;imagePainter method="panelBackground" path="red.png" /&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   818
  &lt;imagePainter method="panelBackground" path="green.png" /&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   819
  &lt;imagePainter method="panelBackground" path="blue.png" /&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   820
&lt;/style&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   821
	  </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   822
	</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   823
90ce3da70b43 Initial load
duke
parents:
diff changeset
   824
	<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   825
	  These three painters are identical for they use the same method and the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   826
	  same direction (all directions by default). Synth aggregates these painters
90ce3da70b43 Initial load
duke
parents:
diff changeset
   827
	  to create a single one that will paint its children painters in the order
90ce3da70b43 Initial load
duke
parents:
diff changeset
   828
	  of declaration. Hence, Synth will first paint the red picture, then the green
90ce3da70b43 Initial load
duke
parents:
diff changeset
   829
	  one and finally the blue one. Each child painter can be seen as a layer of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   830
	  the aggregate painter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   831
	</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   832
	<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   833
	  Painter aggregation, or multi-layering, is very useful to reuse elements.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   834
	  Imagine you want to use an highlight effect on buttons and on selected
90ce3da70b43 Initial load
duke
parents:
diff changeset
   835
	  menu items. With painter aggregation, you just need to create a separate
90ce3da70b43 Initial load
duke
parents:
diff changeset
   836
	  highlighting painter instead of having buttons and menu items painters
90ce3da70b43 Initial load
duke
parents:
diff changeset
   837
	  handle it.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   838
	</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   839
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
   840
    <h2>The imagePainter element</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   841
<div class="dtd-fragment">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   842
<pre class="dtd-fragment">
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   843
&lt;!ELEMENT <a id="e.imagePainter">imagePainter</a> EMPTY>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   844
&lt;!ATTLIST imagePainter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   845
          <a href="#imagePainter.id">id</a>                    ID             #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   846
          <a href="#imagePainter.method">method</a>                CDATA          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   847
          <a href="#imagePainter.direction">direction</a>             (north|south|east|west|top|left|bottom|right|horizontal|vertical|horizontal_split|vertical_split)          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   848
          <a href="#imagePainter.path">path</a>                  CDATA          #REQUIRED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   849
          <a href="#imagePainter.sourceInsets">sourceInsets</a>          CDATA          #IMPLIED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   850
          <a href="#imagePainter.destinationInsets">destinationInsets</a>     CDATA          #IMPLIED
7959
2e05332a8f5c 6589952: Swing: dead links in API documentation
rupashka
parents: 2
diff changeset
   851
          <a href="#imagePainter.painterCenter">paintCenter</a>           (true|false)   "true"
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   852
          <a href="#imagePainter.stretch">stretch</a>               (true|false)   "true"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   853
          <a href="#imagePainter.center">center</a>                (true|false)   "false"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   854
&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   855
</pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   856
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   857
    <p><em>Attribute definitions</em></p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   858
    <dl>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   859
      <dt><a id="imagePainter.id"><samp>id</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   860
      <dd>Unique identifier for the imagePainter.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   861
      <dt><a id="imagePainter.method"><samp>method</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   862
      <dd>Identifies the SynthPainter method this is to be used for. The name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   863
	corresponds to the method name of a paint method in SynthPainter
90ce3da70b43 Initial load
duke
parents:
diff changeset
   864
	with the paint prefix dropped, the remainder is case
90ce3da70b43 Initial load
duke
parents:
diff changeset
   865
	insensitive (using the latin1 case folding rules).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   866
	For example SynthPainter.paintButtonBackground is identified by
90ce3da70b43 Initial load
duke
parents:
diff changeset
   867
	'buttonBackground' or 'buttonbackground'. If this is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   868
	not specified the painter is used for all methods that don't have a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   869
	a specific painter for them.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   870
      <dt><a id="imagePainter.direction"><samp>direction</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   871
      <dd>Identifies the direction, or orientation, this image is to be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   872
	used for. This is only useful for the SynthPainter methods that take
90ce3da70b43 Initial load
duke
parents:
diff changeset
   873
	a direction or orientation. If this is not specified the image is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   874
	used for all directions.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   875
      <dt><a id="imagePainter.path"><samp>path</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   876
      <dd>Path to the image. Path to the image.  If SynthLookAndFeel.load is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   877
    passed a Class this will use the Class method getResource (with with the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   878
    Class suplied to the load method). If load is passed a URL this will use the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   879
    URL constructor URL(context, path) to resolve the path.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   880
      <dt><a id="imagePainter.sourceInsets"><samp>sourceInsets</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   881
      <dd>Insets on the source image. This is top, left, bottom, right with
90ce3da70b43 Initial load
duke
parents:
diff changeset
   882
	each component separated by a space.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   883
      <dt><a id="imagePainter.destinationInsets"><samp>destinationInsets</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   884
      <dd>Insets of the destination image. This is top, left, bottom, right with
90ce3da70b43 Initial load
duke
parents:
diff changeset
   885
	each component separated by a space. If not specified the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   886
	<a href="#imagePainter.sourceInsets">sourceInsets</a> are used.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   887
      <dt><a id="imagePainter.painterCenter"><samp>paintCenter</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   888
      <dd>Whether or not the center of the image should be drawn.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   889
      <dt><a id="imagePainter.stretch"><samp>stretch</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   890
      <dd>Whether or not the north, south, east and west components of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   891
	resulting image should be scaled or tiled.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   892
      <dt><a id="imagePainter.center"><samp>center</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   893
      <dd>Whether or not the image is centered.</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   894
    </dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   895
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   896
      The <a href="#e.imagePainter">ImagePainter</a> element defines a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   897
      painter for the current style or state that will render using
90ce3da70b43 Initial load
duke
parents:
diff changeset
   898
      the specified image.  ImagePainter offers two distinct rendering
90ce3da70b43 Initial load
duke
parents:
diff changeset
   899
      modes.  The first mode is used to center an image in the space
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   900
      provided.  This is
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   901
      commonly used in rendering decorations on top of a widget, for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   902
      example, to specify an arrow for a scroll button use the center
90ce3da70b43 Initial load
duke
parents:
diff changeset
   903
      mode. The following example illustrates this:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   904
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   905
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   906
&lt;style id="test">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   907
  &lt;imagePainter path="resources/myImage.png" center="true"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   908
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   909
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   910
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   911
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   912
      The second mode is used in scaling an image to fit in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   913
      provided space.  In this mode sourceInsets is used to specify a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   914
      border around an image where the north, south, east and west
90ce3da70b43 Initial load
duke
parents:
diff changeset
   915
      edges of the border are either stretched or tiled (stretch
90ce3da70b43 Initial load
duke
parents:
diff changeset
   916
      attribute), the four corners of the border drawn in place, and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   917
      the center is stretched.  In this mode you must specify
90ce3da70b43 Initial load
duke
parents:
diff changeset
   918
      sourceInsets.  The following example illustrates an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   919
      ImagePainter that is using the image MyImage.png and insets of 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   920
      all the way around:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   921
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   922
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   923
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   924
&lt;style id="test">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   925
  &lt;imagePainter path="resources/myImage.png"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   926
                sourceInsets="2 2 2 2"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   927
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   928
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   929
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   930
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   931
      Refer to the description of the <a href="#e.painter">painter</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   932
      element for details as to the precedence in choosing a painter and to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   933
      understand how identical painters are handled.
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   934
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   935
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
   936
    <h2>The imageIcon element</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   937
<div class="dtd-fragment">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   938
<pre class="dtd-fragment">
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   939
&lt;!ELEMENT <a id="e.imageIcon">imageIcon</a> EMPTY>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   940
&lt;!ATTLIST imageIcon
90ce3da70b43 Initial load
duke
parents:
diff changeset
   941
          <a href="#imageIcon.id">id</a>                    ID             #REQUIRED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   942
          <a href="#imageIcon.path">path</a>                  CDATA          #REQUIRED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   943
&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   944
</pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   945
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   946
    <p><em>Attribute definitions</em></p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   947
    <dl>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   948
      <dt><a id="imageIcon.id"><samp>id</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   949
      <dd>Unique identifier for the imageIcon.</dd>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   950
      <dt><a id="imageIcon.path"><samp>path</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   951
      <dd>Path to the image. This uses the Class method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   952
	getResource to resolve the path, with the Class supplied to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   953
	SynthLookAndFeel.load.</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   954
    </dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   955
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   956
      <a href="#e.imageIcon">ImageIcon</a> is used to assign an Icon
90ce3da70b43 Initial load
duke
parents:
diff changeset
   957
      implementation that is wrapping an Image to a unique identifier.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   958
      This is typically used for properties that take an Icon. The following
90ce3da70b43 Initial load
duke
parents:
diff changeset
   959
      example binds an ImageIcon to the property RadioButton.icon.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   960
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   961
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   962
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   963
&lt;style id="test">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   964
  &lt;imageIcon id="icon" path="resources/myImage.png"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   965
  &lt;property key="RadioButton.icon" value="icon"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   966
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   967
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   968
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   969
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
   970
   <h2>The opaque element</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   971
<div class="dtd-fragment">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   972
<pre class="dtd-fragment">
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   973
&lt;!ELEMENT <a id="e.opaque">opaque</a> EMPTY>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   974
&lt;!ATTLIST opaque
90ce3da70b43 Initial load
duke
parents:
diff changeset
   975
          <a href="#opaque.value">value</a>              (true|false)   "true"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   976
&gt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   977
</pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   978
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   979
    <p><em>Attribute definitions</em></p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   980
    <dl>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   981
      <dt><a id="opaque.value"><samp>id</samp></a></dt>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   982
      <dd>Whether or not the style should be opaque, if unspecified the style
90ce3da70b43 Initial load
duke
parents:
diff changeset
   983
	is opaque.</dd>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   984
    </dl>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   985
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   986
      The <a href="#e.opaque">opaque</a> element indicates whether or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   987
      not any Components the style is associated with are to be made opaque.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   988
      The painter will be asked to paint regardless of the opacity
90ce3da70b43 Initial load
duke
parents:
diff changeset
   989
      of the associated Component. The following example creates a style
90ce3da70b43 Initial load
duke
parents:
diff changeset
   990
      that is not opaque.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   991
    </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   992
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   993
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   994
&lt;style id="test">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   995
  &lt;opaque value="FALSE">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   996
  &lt;painter idref="painter"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   997
&lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   998
    </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   999
</div>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1000
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
  1001
    <h2><a id="ee.beansPersistance">The beansPersistance entity</a></h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1002
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1003
      Beans persistance can be used to embed any Object. This is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1004
      typically used for embedding your own Painters, but can be used
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1005
      for other arbritrary objects as well. Refer to <a
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
  1006
        href="http://www.oracle.com/technetwork/java/persistence3-139471.html">
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
  1007
      http://www.oracle.com/technetwork/java/persistence3-139471.html</a>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
  1008
      for details on beans persistance.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1009
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1010
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
  1011
    <h2>Backing Style</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1012
    <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1013
      In creating a Synth file it's good practice to create a backing
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1014
      style that is used by all components.  This will make sure that
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1015
      any components that do not match a specific style will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1016
      a default font, foreground, background and opacity. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1017
      following example illustrates this:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1018
    <div class="example">
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1019
      <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1020
&lt;synth>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1021
  &lt;style id="backingStyle">
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1022
    &lt;opaque value="true"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1023
    &lt;font name="Dialog" size="12"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1024
    &lt;state>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1025
      &lt;color value="BLACK" type="BACKGROUND"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1026
      &lt;color value="WHITE" type="FOREGROUND"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1027
    &lt;/state>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1028
  &lt;/style>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1029
  &lt;bind style="backingStyle" type="region" key=".*"/>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1030
&lt;/synth>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1031
      </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1032
    </div>
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
  1033
  </main>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1034
  </body>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1035
</html>