src/java.desktop/share/classes/javax/swing/plaf/multi/doc-files/multi_tsc.html
author serb
Thu, 31 May 2018 09:52:32 -0700
changeset 50358 1ba28f0dbc33
parent 48264 efda6932a433
child 52965 fcbea0fb586c
permissions -rw-r--r--
8199150: Accessibility issues in java.desktop 8150156: Update bugs.sun.com references to bugs.java.com Reviewed-by: prr
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>Using the Multiplexing Look and Feel</title>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
     6
</head>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
     7
<!--
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
     8
 Copyright (c) 1998, 2018, 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
     9
 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
    10
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    11
 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
    12
 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
    13
 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
    14
 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
    15
 by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    17
 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
    18
 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
    19
 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
    20
 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
    21
 accompanied this code).
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    23
 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
    24
 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
    25
 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
    26
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    27
 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
    28
 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
    29
 questions.
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    30
-->
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    31
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    32
<body>
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
    33
<main role="main">
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    34
<h1>Using the Multiplexing Look and Feel</h1>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
<blockquote>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
<hr>
21254
f6d36ee3f269 8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents: 7959
diff changeset
    38
<p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
<i>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
This document is based on an article
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
originally published in
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    42
<a href="http://www.oracle.com/technetwork/java/javase/tech/articles-jsp-139072.html"
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    43
   target="_top"><em>The Swing Connection</em></a>.
21254
f6d36ee3f269 8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents: 7959
diff changeset
    44
</i>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
<hr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
</blockquote>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
The Multiplexing look and feel lets
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
you supplement an ordinary look and feel
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
(called the <em>default</em> look and feel)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
with one or more <em>auxiliary</em> look and feels.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
For example, you could
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    55
simultaneously provide text-to-speech and Braille outputs,
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    56
in addition to the ordinary visual output that a Swing-based
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
application generates,
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    58
by adding
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
two auxiliary look and feels (one for text-to-speech,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
the other for Braille)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
to the default look and feel.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
The default look and feel can be any ordinary look and feel --
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
the Java or Windows look and feel, for example --
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
and requires no modifications to work with auxiliary look and feels.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
This document has the following sections:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
<ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
<li> <a href="#overview">Overview</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
<li> <a href="#howtouse">How to Use Auxiliary Look and Feels</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
<li> <a href="#howtowrite">Tips for Writing an Auxiliary Look and Feel</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
     <ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
     <li> <a href="#dosanddonts">Dos and Don'ts</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
     <li> <a href="#uidefaults">Extending UIDefaults</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
     <li> <a href="#defaultui">Examining Other UI Objects</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
     </ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
<li> <a href="#implementation">How the Multiplexing Look and Feel is
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
     Implemented</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
<li> <a href="#custom">How to Provide a Custom Multiplexing
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
     Look and Feel</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
</ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
<p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    86
Before reading further, you should be familiar
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
with the concept of pluggable look and feels.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
For basic information, see
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    89
<a href="https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html">
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    90
  How to Set the Look and Feel</a>, a section in <em>The Java Tutorial</em>.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
For architectural details, you can read
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
<a
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    93
href="http://www.oracle.com/technetwork/java/architecture-142923.html#pluggable">
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    94
  Pluggable look-and-feel architecture</a>, a section within
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
a <em>Swing Connection</em> article.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    98
<p>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
    99
<a id="overview"></a>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   100
<hr>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   101
  <h2>Overview</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   105
The classes in the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
<code>javax.swing.plaf.multi</code> package
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   107
implement a
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
<i>multiplexing look and feel</i>.
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   109
A multiplexing look and feel transparently creates -- and
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
simultaneously supports -- UI objects from several different look and feels
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
in response to a component requesting its UI object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
(with the <code>getUI</code> method).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
<p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   115
Without a multiplexing look and feel, a
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   116
developer who wanted to enhance a particular look and feel would
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   117
need to extend the classes supporting that look and feel. For example, to
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   118
add text-to-speech support to the Java look and feel without using a multiplexing
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
look and feel, the developer would need to create a group of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
classes that extend those of
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   121
the Java look and feel, and add text-to-speech support to the new classes.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
If the developer also wanted to add text-to-speech support to other look
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   123
and feels,
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   124
such as Motif or Windows, the developers would need to create subclasses
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
of those classes as well.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
<p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   129
This approach has at least two shortcomings:
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   130
<ul>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   131
  <li>First, each subclass must use what is
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   132
      essentially a copy of the same code, potentially creating a difficult
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
      support situation for the developer.<br></li>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   134
  <li>Second, and more significantly for the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
      end user, some application developers might force a
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   136
      particular look and feel to be used. When this approach is used,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
      the end user can't even use the enhanced look and feel.</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
</ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
<p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   141
A multiplexing look and feel
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   142
both these problems simultaneously because it allows multiple look
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
and feels to be combined.
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   144
The first problem (having to use what amounts to a second copy of the same
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   145
code) is solved because the developer can create a specialized look
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
and feel that can then be combined with other look and feels.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
<p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   150
The second problem (having to force the use of
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   151
a particular look and feel) is solved because a specialized look and feel
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   152
can be used with whatever default look and feel the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
application may have locked in place.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
<p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   157
The default multiplexing look and feel implementation,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
represented by the <code>MultiLookAndFeel</code> class
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
in the <code>javax.swing.plaf.multi</code> package,
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   160
is called (unsurprisingly)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
the Multiplexing look and feel.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   163
<p>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   164
<a id="howtouse"></a>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   165
<hr>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   166
  <h2>How to Use Auxiliary Look and Feels</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
<p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   169
It's easy to use auxiliary look and feels with Swing. To instruct
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   170
Swing to use the Multiplexing look and feel, all an application
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   171
has to do is modify the <code>$JDKHOME/conf/swing.properties</code>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
file to include a definition of the <code>swing.auxiliarylaf</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
property. Swing treats the <code>swing.auxiliarylaf</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
property as a comma-separated list of <code>LookAndFeel</code>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   175
subclasses that specify what auxiliary look and feels should be
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   176
used in addition to the default look and feel. If at least one valid
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
<code>LookAndFeel</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
subclass is specified in the <code>swing.auxiliarylaf</code>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   179
property, Swing automatically uses the Multiplexing look and feel
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
to load and support the default and auxiliary look and feels.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
<p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   184
For example, let's assume that an application
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   185
makes use of a look and feel that supports text-to-speech feedback, and also
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
uses an look and feel that adds support for a device
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
that emits perfume.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
Let's assume that the text-to-speech
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   189
look and feel is named <code>com.myco.TextTalkerLookAndFeel</code>,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
and the look and feel that adds support for perfume
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
is named <code>com.smellco.OlfactoryLookAndFeel</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
<p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   195
To tell Swing to use both these look and feels
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   196
-- and to use a default look and feel at the same time -- your application
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   197
could simply add the following line to the <code>$JDKHOME/conf/swing.properties</code> file:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
<p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   201
<code>&nbsp;&nbsp;&nbsp;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
              swing.auxiliarylaf=com.myco.TextTalkerLookAndFeel,<br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; com.smellco.OlfactoryLookAndFeel</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
<p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   207
This statement tells Swing to obtain a component's UI from the Multiplexing
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   208
look and feel automatically, instead of obtaining it directly from
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   209
the default look and feel. The resulting multiplexing UI is a small
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   210
delegate that obtains and maintains UIs from the default and auxiliary
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   211
look and feels. As a result, when a method is invoked in a multiplexing
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   212
UI object, the multiplexing UI invokes the same method on each
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
of the UIs obtained from the default and auxiliary look and feels.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   216
<p>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   217
<a id="howtowrite"></a>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   218
<hr>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   219
  <h2>Tips for Writing an Auxiliary Look and Feel</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
An auxiliary look and feel is like any other look and feel,
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   223
except that it doesn't have to provide the complete support
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   224
that a default look and feel must. For
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   225
example, an auxiliary look and feel that supports just text-to-speech feedback
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   226
doesn't need to provide any code for painting.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
Also, it might not need to support all components --
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
<code>JSeparator</code>s, for example, might be ignored.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
Auxiliary look and feels tend to be simple,
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   232
so developing one can be easier than developing a visual
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
look and feel.
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   234
The developer can concentrate solely
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   235
on providing the specialized functionality.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
<p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   238
Because the primary purpose of an auxiliary look and feel is to enhance the
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   239
default look and feel, auxiliary look and feels tend
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
be nonvisual. Since an auxiliary look and feel is a genuine
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
look and feel, however, there is nothing to prevent it
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
from rendering information on the display.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
Just like for any other look and feel, you
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
implement an auxiliary look and feel
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
by writing a subclass of <code>javax.swing.LookAndFeel</code>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   249
and creating subclasses of the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
<code><em>Foo</em>UI</code> classes defined in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
the <code>javax.swing.plaf</code> package.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   254
<a id="dosanddonts">
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   255
  <h3>Dos and Don'ts</h3>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
<p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   259
The following paragraphs provide some general recommendations for developing
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
auxiliary look and feels.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
<p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   264
<h4>Use the <code>installUI</code> method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
to perform all initialization,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
and the <code>uninstallUI</code> method
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   267
to perform all cleanup.</h4>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   268
21254
f6d36ee3f269 8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents: 7959
diff changeset
   269
<blockquote>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
The <code>installUI</code> and <code>uninstallUI</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
methods are invoked when a component's look and feel is set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
The <code>installUI</code> method gives the new UI object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
a chance to add listeners on the component and its data model.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
Similarly, the <code>uninstallUI</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
lets the previous UI object remove its listeners.
21254
f6d36ee3f269 8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents: 7959
diff changeset
   276
</blockquote>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   277
            <h4><b>Don't extend visual look and feels.</b></h4>
21254
f6d36ee3f269 8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents: 7959
diff changeset
   278
<blockquote>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   279
               We recommended that you <i>don't</i> implement
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   280
                UI classes of an auxiliary look and feel as subclasses of the
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   281
                UI classes of a visual look and feel. Why not? Because they might
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   282
                accidentally inherit code that installs listeners on a component
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   283
                object or renders the component on the display. As a result,
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   284
                your auxiliary look and feel would compete with the default look
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
                and feel rather than cooperating with it.<br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
                <br>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   287
                Instead, we recommend that the UI classes of an auxiliary look
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   288
                and feel directly extend the abstract UI classes in the <code>javax.swing.plaf</code>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   289
                package. By using this strategy, the developer of an auxiliary
21254
f6d36ee3f269 8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents: 7959
diff changeset
   290
                look and feel can avoid competing with the default look and feel.
f6d36ee3f269 8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents: 7959
diff changeset
   291
</blockquote>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   292
            <h4><b>Override all UI-specific methods your UI classes inherit.</b></h4>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   293
21254
f6d36ee3f269 8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents: 7959
diff changeset
   294
<blockquote>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   295
               We recommend that each UI class of
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   296
                an auxiliary look and feel override the methods
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
		defined in the <code>javax.swing.plaf</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
                UI classes it descends from
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   299
		The reasons for this recommendation are similar
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
                to those for not extending a visual look and feel.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
                For example, the <code>ComponentUI</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
                class, from which all UI classes descend,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
		provides a default implementation for the <code>update</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
                method. This default implementation paints on the display
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   305
		if the
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   306
                component is opaque. If a UI class from a non-visual auxiliary
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   307
                look and feel does not override this method, all
21254
f6d36ee3f269 8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents: 7959
diff changeset
   308
                opaque components appear as blank areas on the screen!
f6d36ee3f269 8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents: 7959
diff changeset
   309
</blockquote>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   310
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   311
<a id="uidefaults"></a>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   312
  <h3>Extending UIDefaults</h3>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   314
            <p>In many cases, you
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   315
              might want an auxiliary look and feel to be &quot;incomplete.&quot; That
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   316
              is, you might not need to support the complete set
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
              of components.
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   318
            For example, an auxiliary look and feel might choose
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   319
	    to provide a <code>ButtonUI</code> subclass but no
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
              <code>LabelUI</code> subclass.
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   321
	     This
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   322
              option is allowed, and the multiplexing look and feel gracefully
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
              handles such situations.</p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   324
            <p>By default, however, Swing issues an error message when it asks
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   325
              a look and feel for a UI object and the look and feel does not
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   326
              support that UI. This message can be annoying, especially to auxiliary
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   327
              look-and-feel developers who don't want to support a particular
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
              component.</p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   329
            <p>Fortunately, you can prevent this error
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   330
              message by creating a subclass of the <code>UIDefaults</code>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   331
              class and returning an instance of it from the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
	      <code>getDefaults</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
	      of your <code>LookAndFeel</code> class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
	      For example:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
	      </p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   336
            <p><code>public class MyAuxLookAndFeel
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
              extends LookAndFeel {<br>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   338
                  ...<br>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   339
                  public UIDefaults getDefaults() {<br>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   340
                      <b>UIDefaults table = <br>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   341
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
              new MyAuxUIDefaults();<br>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   343
              </b>        Object[] uiDefaults = {<br>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   344
                        &quot;ButtonUI&quot;, &quot;MyAuxButtonUI&quot;,<br>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   345
                        ...<br>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   346
                      }<br>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   347
                      table.putDefaults(uiDefaults);<br>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   348
                      return table;<br>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   349
                  }<br>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
              }<br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
              <br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
              <b>class MyAuxUIDefaults extends UIDefaults {<br>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   353
                  protected void getUIError(String msg) {<br>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   354
                      //System.err.println<br>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   355
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp; (&quot;An
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
              annoying message!&quot;);<br>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   357
                  }<br>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
              }</b></code></p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
<p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   361
In the preceding example, an auxiliary look and feel named <code>MyAux</code>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   362
              creates a <code>UIDefaults</code> subclass
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   363
              that overrides the <code>getUIError</code>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   364
              method. The <code>getUIError</code>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   365
              method is the method that is invoked when Swing cannot find a UI
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   366
              object in a look and feel. By merely doing nothing in this method,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
              you can avoid the error message.</p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   368
            <p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   370
<a id="defaultui"></a>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   371
<h3>Examining Other UI Objects</h3>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   373
            <p>In
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   374
              rare instances, a UI object from an auxiliary look and feel
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   375
              may be interested in the default UI object used by the component. In
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   376
              these cases, the UI object from auxiliary look and feel can obtain
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
              the UI from a component by calling its <code>getUI</code>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   378
              method. The returned UI is an instance of one of the multiplexing
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   379
              look and feel UI classes (for example, <code>MultiButtonUI</code>).
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   380
              The UI object from the auxiliary look and feel can call the <code>getUIs</code>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   381
              method of the returned object to obtain an array containing a complete list
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   382
              of all UI objects handled by the multiplexing UI. The first element
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
              is guaranteed to be the UI created from the default look and feel.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
	      </p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   386
<p>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   387
<a id="implementation"></a>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   388
<hr>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   389
<h2>How the Multiplexing Look and Feel Is Implemented</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
The Multiplexing look and feel
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
(represented by
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
<code>javax.swing.plaf.multi.MultiLookAndFeel</code>)
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   395
is meant to be transparent to
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   396
all developers and users. It should &quot;just work&quot; -- and
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   397
              it is used only when the user tells Swing to use an auxiliary look
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
              and feel.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
            <p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   401
              When the Multiplexing look and
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   402
              feel is in use, the type of the UI object
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   403
	      associated with each component
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   404
	      depends on whether
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
	      any of the auxiliary look and feels currently in use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
	      support the component.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
	      If so, the component's UI object is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
	      an instance of a multiplexing UI.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
	      If only the default look and feel supports the component,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
	      then the component gets
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
              a UI object from the default look and feel,
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   412
	      just as if no auxiliary look and feels were installed.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
	      <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
	      A multiplexing UI object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
              obtains and maintains UI objects
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
	      from the default and auxiliary look
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
	      and feels,
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   419
              referring to these UIs in the following manner:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   421
<ul>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   422
              <li> The UI object from the default look
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   423
                and feel is always the first to be created. After that, a UI object
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   424
                is created from each auxiliary look and feel in the order
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   425
                they are specified in the <code>swing.auxiliarylaf</code>
21254
f6d36ee3f269 8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents: 7959
diff changeset
   426
                property.<br><br></li>
f6d36ee3f269 8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents: 7959
diff changeset
   427
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   428
              <li> When a method that requests information
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   429
                from a UI object is invoked, the multiplexing UI object
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   430
		invokes the method on all the UI objects, but returns
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
                only the results from the UI for the default look and feel.
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   432
                For example, when the <code>getPreferredSize</code>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   433
                method is invoked on a multiplexing UI, the UI returns only the
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   434
                results of invoking <code>getPreferredSize</code>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
                on the UI obtained from the default look and feel.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
		The <code>getPreferredSize</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
		is also invoked on the UI object for each auxiliary look and feel,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
		but the return values are ignored.
21254
f6d36ee3f269 8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents: 7959
diff changeset
   439
                <br><br></li>
f6d36ee3f269 8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
yan
parents: 7959
diff changeset
   440
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   441
              <li> When a method that does not request information
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   442
                from the UI object is invoked, the multiplexing UI object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
                invokes that method on all UIs --
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
		on the UI object obtained from the default look
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
		and feel
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
                and on all the UIs obtained from the auxiliary look and feels,
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   447
		as well.
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   448
                For example, invoking the <code>installUI</code>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   449
                method on a multiplexing UI causes the multiplexing UI to invoke
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   450
                <code>installUI</code>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   451
                on the UI obtained from the default look and feel and the UIs obtained from
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
                the auxiliary factories.</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
            </ul>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   454
            <p> In all cases, the UI object obtained from
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   455
              the default look and feel is acted upon first, and then the auxiliary
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   456
              look and feels are acted upon in the order they are specified in
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   457
              the <code>swing.auxiliarylaf</code>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
              property.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   461
<p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   463
<a id="custom"></a>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   464
<hr>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   465
<h2>How to Provide a Custom Multiplexing Look and Feel</h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   467
            <p>While
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   468
              we hope the behavior of the Multiplexing look and feel is
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   469
              flexible enough not to require an alternative multiplexing look
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   470
              and feel, Swing allows the user to specify another multiplexing look
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
              and feel to use.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   474
            <p> To do that, all the user has to do is modify
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   475
              the <code>$JDKHOME/conf/swing.properties</code>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   476
              file to include a definition of the <code>swing.plaf.multiplexinglaf</code>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   477
              property. Swing then treats the <code>swing.plaf.multiplexinglaf</code>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   478
              property as a <code>LookAndFeel</code>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
              subclass that supports multiplexing.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
</p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   481
            <p> For example, if a user has a multiplexing
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   482
              look and feel represented by <code>com.myco.SuperMultiLookAndFeel</code>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   483
              that is a better match for their needs than the Multiplexing
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   484
              look and feel
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   485
	      (<code>javax.swing.plaf.multi.MultiLookAndFeel</code>),
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   486
              the user could include the following line in <code>$JDKHOME/conf/swing.properties</code>:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
<code>swing.plaf.multiplexinglaf = com.myco.SuperMultiLookAndFeel</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
<p>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   494
This statement instructs Swing to use <code>com.myco.SuperMultiLookAndFeel</code>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   495
instead of <code>javax.swing.plaf.multi.MultiLookAndFeel</code>. But
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   496
if you use this kind of statement, be careful, because the suppliers
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   497
of auxiliary look and feels will most likely have developed and
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
tested against our Multiplexing look and feel.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
</p>
50358
1ba28f0dbc33 8199150: Accessibility issues in java.desktop
serb
parents: 48264
diff changeset
   500
</main>
48264
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   501
</body>
efda6932a433 8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents: 47216
diff changeset
   502
</html>