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