8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html

8183508: multi_tsc.html should be updated
8181289: Invalid HTML 5 in AWT/Swing docs

Reviewed-by: prr, jjg
This commit is contained in:
Sergey Bylokhov 2017-11-29 15:11:37 -08:00
parent 625c3fd013
commit f968e1a670
18 changed files with 1235 additions and 1210 deletions

View File

@ -1,5 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>AWT Threading Issues</title>
</head>
<!-- <!--
Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -23,16 +29,11 @@
questions. questions.
--> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <body>
<html>
<head>
<title></title>
</head>
<body bgcolor=white>
<h1 align=center>AWT Threading Issues</h1> <h1>AWT Threading Issues</h1>
<a name="ListenersThreads"></a> <a id="ListenersThreads"></a>
<h2>Listeners and threads</h2> <h2>Listeners and threads</h2>
Unless otherwise noted all AWT listeners are notified on the event Unless otherwise noted all AWT listeners are notified on the event
@ -41,7 +42,7 @@ during dispatching, but the changes only effect subsequent notification.
<br>For example, if a key listeners is added from another key listener, the <br>For example, if a key listeners is added from another key listener, the
newly added listener is only notified on subsequent key events. newly added listener is only notified on subsequent key events.
<a name="Autoshutdown"></a> <a id="Autoshutdown"></a>
<h2>Auto-shutdown</h2> <h2>Auto-shutdown</h2>
According to According to
@ -53,7 +54,7 @@ The virtual machine terminates all its activity and exits when
one of two things happens: one of two things happens:
<ul> <ul>
<li> All the threads that are not daemon threads terminate. <li> All the threads that are not daemon threads terminate.
<li> Some thread invokes the <code>exit</code> method of class <li> Some thread invokes the <code>exit</code> method of class
<code>Runtime</code> or class <code>System</code>, and the exit <code>Runtime</code> or class <code>System</code>, and the exit
operation is permitted by the security manager. operation is permitted by the security manager.
</ul> </ul>
@ -84,13 +85,15 @@ this machinery are as follows:
posted to the <code>EventQueue</code> can be coalesced) are posted to the <code>EventQueue</code> can be coalesced) are
dispatched: dispatched:
<ul> <ul>
<li> Sequentially. <li>
<dl><dd> That is, it is not permitted that several events from <dl><dt>Sequentially.
<dd> That is, it is not permitted that several events from
this queue are dispatched simultaneously. </dd></dl> this queue are dispatched simultaneously. </dd></dl>
<li> In the same order as they are enqueued. <li>
<dl><dd> That is, if <code>AWTEvent</code>&nbsp;A is enqueued <dl><dt>In the same order as they are enqueued.
<dd> That is, if <code>AWTEvent</code>&nbsp;A is enqueued
to the <code>EventQueue</code> before to the <code>EventQueue</code> before
<code>AWTEvent</code>&nbsp;B then event B will not be <code>AWTEvent</code>&nbsp;B then event B will not be
dispatched before event A.</dd></dl> dispatched before event A.</dd></dl>
</ul> </ul>
<li> There is at least one alive non-daemon thread while there is at <li> There is at least one alive non-daemon thread while there is at
@ -98,7 +101,7 @@ this machinery are as follows:
application (see application (see
<a href="../Component.html#isDisplayable()"><code>Component.isDisplayable</code></a>). <a href="../Component.html#isDisplayable()"><code>Component.isDisplayable</code></a>).
</ul> </ul>
The implications of the third restriction are as follows: The implications of the third restriction are as follows:
<ul> <ul>
<li> The JVM will exit if some thread invokes the <code>exit</code> <li> The JVM will exit if some thread invokes the <code>exit</code>
method of class <code>Runtime</code> or class <code>System</code> method of class <code>Runtime</code> or class <code>System</code>
@ -108,8 +111,8 @@ The implications of the third restriction are as follows:
displayable component. displayable component.
</ul> </ul>
It depends on the implementation if and when the non-daemon helper It depends on the implementation if and when the non-daemon helper
threads are terminated once all components are made undisplayable. threads are terminated once all components are made undisplayable.
The implementation-specific details are given below. The implementation-specific details are given below.
<h3> <h3>
Implementation-dependent behavior. Implementation-dependent behavior.
@ -147,7 +150,7 @@ cleanly without calling <code>System.exit</code> must:
</ul> </ul>
Note, that while an application following these recommendations will Note, that while an application following these recommendations will
exit cleanly under normal conditions, it is not guaranteed that it exit cleanly under normal conditions, it is not guaranteed that it
will exit cleanly in all cases. Two examples: will exit cleanly in all cases. Two examples:
<ul> <ul>
<li> Other packages can create displayable components for internal <li> Other packages can create displayable components for internal
needs and never make them undisplayable. See needs and never make them undisplayable. See
@ -156,7 +159,7 @@ will exit cleanly in all cases. Two examples:
<a href="http://bugs.sun.com/view_bug.do?bug_id=4671025"> <a href="http://bugs.sun.com/view_bug.do?bug_id=4671025">
4671025</a>, and 4671025</a>, and
<a href="http://bugs.sun.com/view_bug.do?bug_id=4465537"> <a href="http://bugs.sun.com/view_bug.do?bug_id=4465537">
4465537</a>. 4465537</a>.
<li> Both Microsoft Windows and X11 allow an application to send native <li> Both Microsoft Windows and X11 allow an application to send native
events to windows that belong to another application. With this events to windows that belong to another application. With this
feature it is possible to write a malicious program that will feature it is possible to write a malicious program that will
@ -165,10 +168,10 @@ will exit cleanly in all cases. Two examples:
</ul> </ul>
On the other hand, if you require the JVM to continue running even after On the other hand, if you require the JVM to continue running even after
the application has made all components undisplayable you should start a the application has made all components undisplayable you should start a
non-daemon thread that blocks forever. non-daemon thread that blocks forever.
<pre> <pre>
<...> &lt;...&gt;
Runnable r = new Runnable() { Runnable r = new Runnable() {
public void run() { public void run() {
Object o = new Object(); Object o = new Object();
@ -183,7 +186,7 @@ non-daemon thread that blocks forever.
Thread t = new Thread(r); Thread t = new Thread(r);
t.setDaemon(false); t.setDaemon(false);
t.start(); t.start();
<...> &lt;...&gt;
</pre> </pre>
<cite>The Java&trade; Virtual Machine Specification</cite> <cite>The Java&trade; Virtual Machine Specification</cite>

View File

@ -1,5 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>AWT Desktop Properties</title>
</head>
<!-- <!--
Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -23,14 +29,9 @@
questions. questions.
--> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <body>
<html>
<head>
<title></title>
</head>
<body bgcolor=white>
<h1 align=center>AWT Desktop Properties</h1> <h1>AWT Desktop Properties</h1>
The following refers to standard AWT desktop properties that The following refers to standard AWT desktop properties that
may be obtained via the may be obtained via the
@ -76,7 +77,7 @@ here, and their value types.
</table> </table>
<h2>Desktop Font Rendering Hints</h2> <h2>Desktop Font Rendering Hints</h2>
<b>Desktop Property: <A name="awt.font.desktophints">"awt.font.desktophints"</A></b> <b>Desktop Property: <a id="awt.font.desktophints">"awt.font.desktophints"</A></b>
<p> <p>
Modern desktops support various forms of text antialiasing (font smoothing). Modern desktops support various forms of text antialiasing (font smoothing).
<p> <p>
@ -116,7 +117,7 @@ An application can listen for changes in the property
using a <a href="../../beans/PropertyChangeListener.html"> using a <a href="../../beans/PropertyChangeListener.html">
<code>PropertyChangeListener</code></a> : <code>PropertyChangeListener</code></a> :
<pre><code> <pre><code>
tk.addPropertyChangeListener("awt.font.desktophints", pcl); tk.addPropertyChangeListener("awt.font.desktophints", pcl);
</code></pre> </code></pre>
Listening for changes is recommended as users can, on rare occasions, Listening for changes is recommended as users can, on rare occasions,
reconfigure a desktop environment whilst applications are running reconfigure a desktop environment whilst applications are running
@ -194,7 +195,7 @@ if (map != null) {
and dynamic updates will not be available. This is a typical behaviour if and dynamic updates will not be available. This is a typical behaviour if
the JDK does not recognise the desktop environment, or it is one which the JDK does not recognise the desktop environment, or it is one which
has no such settings. The <b>Headless</b> toolkit is one such example. has no such settings. The <b>Headless</b> toolkit is one such example.
Therefore it is important to test against null before using the map. Therefore it is important to test against null before using the map.
<br><br> <br><br>
<li>If non-null the value will be a <code>Map</code> of <li>If non-null the value will be a <code>Map</code> of
<code>RenderingHints</code> such that every key is an instance of <code>RenderingHints</code> such that every key is an instance of
@ -229,7 +230,7 @@ determine that there is a non-null return for any screen device using
the per-device property name. the per-device property name.
</ul> </ul>
<h2>Mouse Functionality</h2> <h2>Mouse Functionality</h2>
<b>Desktop Property: <A name="sun.awt.enableExtraMouseButtons">"sun.awt.enableExtraMouseButtons"</A></b> <b>Desktop Property: <a id="sun.awt.enableExtraMouseButtons">"sun.awt.enableExtraMouseButtons"</A></b>
<p> <p>
This property determines if events from extra mouse buttons (if they are exist and are This property determines if events from extra mouse buttons (if they are exist and are
enabled by the underlying operating system) are allowed to be processed and posted into enabled by the underlying operating system) are allowed to be processed and posted into
@ -245,7 +246,7 @@ Once set on application startup, it is impossible to change this value after.
Current value could also be queried using getDesktopProperty("sun.awt.enableExtraMouseButtons") Current value could also be queried using getDesktopProperty("sun.awt.enableExtraMouseButtons")
method. method.
<br> <br>
If the property is set to {@code true} then If the property is set to {@code true} then
<ul> <ul>
<li> it is still legal to create {@code MouseEvent} objects with <li> it is still legal to create {@code MouseEvent} objects with
standard buttons and, if the mouse has more standard buttons and, if the mouse has more
@ -256,13 +257,13 @@ from 0 up to {@link java.awt.MouseInfo#getNumberOfButtons() getNumberOfButtons()
and {@code Robot.mouseRelease()} methods and, if the mouse has more then three buttons, and {@code Robot.mouseRelease()} methods and, if the mouse has more then three buttons,
it is also legal to use masks for existing extended mouse buttons. it is also legal to use masks for existing extended mouse buttons.
That way, if there are more then three buttons on the mouse then it is allowed to That way, if there are more then three buttons on the mouse then it is allowed to
use button masks corresponding to the buttons use button masks corresponding to the buttons
in the range from 1 up to {@link java.awt.MouseInfo#getNumberOfButtons() getNumberOfButtons()} in the range from 1 up to {@link java.awt.MouseInfo#getNumberOfButtons() getNumberOfButtons()}
</ul> </ul>
<br> <br>
If the property is set to {@code false} then If the property is set to {@code false} then
<ul> <ul>
<li> it is legal to create {@code MouseEvent} objects with standard buttons <li> it is legal to create {@code MouseEvent} objects with standard buttons
only: {@code NOBUTTON}, {@code BUTTON1}, {@code BUTTON2} and only: {@code NOBUTTON}, {@code BUTTON1}, {@code BUTTON2} and
{@code BUTTON3} {@code BUTTON3}
<li> it is legal to use standard button masks only: <li> it is legal to use standard button masks only:

View File

@ -1,5 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>The AWT Focus Subsystem</title>
</head>
<!-- <!--
Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -23,15 +29,8 @@
questions. questions.
--> -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <body>
<h1>The AWT Focus Subsystem</h1>
<html>
<head>
<title>The AWT Focus Subsystem</title>
</head>
<body bgcolor="white">
<h1 align=center>The AWT Focus Subsystem</h1>
<p> <p>
Prior to Java 2 Standard Edition, JDK 1.4, the AWT focus subsystem Prior to Java 2 Standard Edition, JDK 1.4, the AWT focus subsystem
@ -57,8 +56,8 @@
determining the "opposite" Component involved in the focus or determining the "opposite" Component involved in the focus or
activation change. For example, when a Component received a FOCUS_LOST activation change. For example, when a Component received a FOCUS_LOST
event, it had no way of knowing which Component was gaining event, it had no way of knowing which Component was gaining
focus. Since Microsoft Windows provides this functionality for free, focus. Since Microsoft Windows provides this functionality for free,
developers migrating from Microsoft Windows C/C++ or Visual Basic to developers migrating from Microsoft Windows C/C++ or Visual Basic to
Java had been frustrated by the omission. Java had been frustrated by the omission.
<p> <p>
To address these and other deficiencies, we have designed a new focus To address these and other deficiencies, we have designed a new focus
@ -101,7 +100,7 @@
<li><a href=#Incompatibilities>Incompatibilities with Previous Releases</a> <li><a href=#Incompatibilities>Incompatibilities with Previous Releases</a>
</ul> </ul>
<a name="Overview"></a> <a id="Overview"></a>
<h3>Overview of KeyboardFocusManager</h3> <h3>Overview of KeyboardFocusManager</h3>
<p> <p>
The focus model is centralized around a single class, The focus model is centralized around a single class,
@ -160,7 +159,7 @@
define new focus cycle but only modifies the order by which its define new focus cycle but only modifies the order by which its
children are traversed "forward" and "backward". Focus traversal children are traversed "forward" and "backward". Focus traversal
policy provider can be set using policy provider can be set using
<code>setFocusTraversalPolicyProvider</code> on the Container. <code>setFocusTraversalPolicyProvider</code> on the Container.
</ol> </ol>
<p> <p>
@ -180,7 +179,7 @@
descendants. descendants.
<p> <p>
Here is an example:<br> <img src="FocusCycle.gif" align=middle Here is an example:<br> <img src="FocusCycle.gif"
alt="Three groups as described below: ABCF BDE and DGH. "><br> alt="Three groups as described below: ABCF BDE and DGH. "><br>
<p>Assume the following: <p>Assume the following:
@ -193,7 +192,7 @@
<li><b>G</b>, <b>H</b>, <b>E</b>, and <b>F</b> are all <li><b>G</b>, <b>H</b>, <b>E</b>, and <b>F</b> are all
<code>Component</code>s. <code>Component</code>s.
</ul> </ul>
There are a total of three focus cycle roots in this example: There are a total of three focus cycle roots in this example:
<ol> <ol>
@ -213,7 +212,7 @@
implementation in the <code>DefaultKeyboardFocusManager</code> class. implementation in the <code>DefaultKeyboardFocusManager</code> class.
<a name="BrowserContexts"></a> <a id="BrowserContexts"></a>
<h3>KeyboardFocusManager and Browser Contexts</h3> <h3>KeyboardFocusManager and Browser Contexts</h3>
<p> <p>
Some browsers partition applets in different code bases into separate Some browsers partition applets in different code bases into separate
@ -229,7 +228,7 @@ contexts there may be, however, there can never be more than one focus
owner, focused Window, or active Window, per ClassLoader. owner, focused Window, or active Window, per ClassLoader.
<a name="KeyEventDispatcher"></a> <a id="KeyEventDispatcher"></a>
<h3>KeyEventDispatcher and KeyEventPostProcessor</h3> <h3>KeyEventDispatcher and KeyEventPostProcessor</h3>
<p> <p>
While the user's KeyEvents should generally be delivered to the focus While the user's KeyEvents should generally be delivered to the focus
@ -272,7 +271,7 @@ Like KeyEventDispatcher, KeyboardFocusManager also implements
KeyEventPostProcessor, and similar restrictions apply to its use in KeyEventPostProcessor, and similar restrictions apply to its use in
that capacity. that capacity.
<a name="FocusEventAndWindowEvent"></a> <a id="FocusEventAndWindowEvent"></a>
<h3>FocusEvent and WindowEvent</h3> <h3>FocusEvent and WindowEvent</h3>
<p> <p>
The AWT defines the following six event types central to the focus The AWT defines the following six event types central to the focus
@ -296,7 +295,7 @@ model in two different <code>java.awt.event</code> classes:
not a Frame or Dialog) when it is no longer the active Window. not a Frame or Dialog) when it is no longer the active Window.
</ol> </ol>
<a name="EventDelivery"></a> <a id="EventDelivery"></a>
<h3>Event Delivery</h3> <h3>Event Delivery</h3>
<p> <p>
If the focus is not in java application and the user clicks on a focusable If the focus is not in java application and the user clicks on a focusable
@ -347,7 +346,7 @@ rejects the focus change. See <a href="#FocusAndVetoableChangeListener">Focus
and VetoableChangeListener</a>. and VetoableChangeListener</a>.
<a name="OppositeComponents"></a> <a id="OppositeComponents"></a>
<h3>Opposite Components and Windows</h3> <h3>Opposite Components and Windows</h3>
<p> <p>
Each event includes information about the "opposite" Component or Each event includes information about the "opposite" Component or
@ -371,7 +370,7 @@ a pure Swing application can ignore this platform restriction when
using the opposite Component of a focus change that occurred within a using the opposite Component of a focus change that occurred within a
top-level Window. top-level Window.
<a name="TemporaryFocusEvents"></a> <a id="TemporaryFocusEvents"></a>
<h3>Temporary FocusEvents</h3> <h3>Temporary FocusEvents</h3>
<p> <p>
<code>FOCUS_GAINED</code> and <code>FOCUS_LOST</code> events are <code>FOCUS_GAINED</code> and <code>FOCUS_LOST</code> events are
@ -380,7 +379,7 @@ marked as either temporary or permanent.
Temporary <code>FOCUS_LOST</code> events are sent when a Component is Temporary <code>FOCUS_LOST</code> events are sent when a Component is
losing the focus, but will regain the focus shortly. These events losing the focus, but will regain the focus shortly. These events
can be useful when focus changes are used as triggers for validation can be useful when focus changes are used as triggers for validation
of data. For instance, a text Component may want to commit its of data. For instance, a text Component may want to commit its
contents when the user begins interacting with another Component, contents when the user begins interacting with another Component,
and can accomplish this by responding to <code>FOCUS_LOST</code> events. and can accomplish this by responding to <code>FOCUS_LOST</code> events.
However, if the <code>FocusEvent</code> received is temporary, However, if the <code>FocusEvent</code> received is temporary,
@ -402,8 +401,8 @@ occur.
When a Component receives a temporary <code>FOCUS_LOST</code> event, When a Component receives a temporary <code>FOCUS_LOST</code> event,
the event's opposite Component (if any) may receive a temporary the event's opposite Component (if any) may receive a temporary
<code>FOCUS_GAINED</code> event, but could also receive a permanent <code>FOCUS_GAINED</code> event, but could also receive a permanent
<code>FOCUS_GAINED</code> event. Showing a Menu or PopupMenu, or <code>FOCUS_GAINED</code> event. Showing a Menu or PopupMenu, or
clicking or dragging a Scrollbar, should generate a temporary clicking or dragging a Scrollbar, should generate a temporary
<code>FOCUS_GAINED</code> event. Changing the focused Window, <code>FOCUS_GAINED</code> event. Changing the focused Window,
however, will yield a permanent <code>FOCUS_GAINED</code> event however, will yield a permanent <code>FOCUS_GAINED</code> event
for the new focus owner. for the new focus owner.
@ -416,7 +415,7 @@ behavior for this method can be guaranteed only for lightweight
Components. This method is not intended for general use, but exists Components. This method is not intended for general use, but exists
instead as a hook for lightweight Component libraries, such as Swing. instead as a hook for lightweight Component libraries, such as Swing.
<a name="FocusTraversal"></a> <a id="FocusTraversal"></a>
<h3>Focus Traversal</h3> <h3>Focus Traversal</h3>
<p> <p>
Each Component defines its own Set of focus traversal keys for a given Each Component defines its own Set of focus traversal keys for a given
@ -428,11 +427,11 @@ a Set is not explicitly defined for a Component, that Component
recursively inherits a Set from its parent, and ultimately from a recursively inherits a Set from its parent, and ultimately from a
context-wide default set on the current <code>KeyboardFocusManager</code>. context-wide default set on the current <code>KeyboardFocusManager</code>.
<p> <p>
Using the <code>AWTKeyStroke</code> API, client code can specify Using the <code>AWTKeyStroke</code> API, client code can specify
on which of two specific KeyEvents, <code>KEY_PRESSED</code> or on which of two specific KeyEvents, <code>KEY_PRESSED</code> or
<code>KEY_RELEASED</code>, the focus traversal operation will occur. <code>KEY_RELEASED</code>, the focus traversal operation will occur.
Regardless of which KeyEvent is specified, however, all KeyEvents Regardless of which KeyEvent is specified, however, all KeyEvents
related to the focus traversal key, including the associated related to the focus traversal key, including the associated
<code>KEY_TYPED</code> event, will be consumed, and will not be <code>KEY_TYPED</code> event, will be consumed, and will not be
dispatched to any Component. It is a runtime error to specify a dispatched to any Component. It is a runtime error to specify a
<code>KEY_TYPED</code> event as mapping to a focus traversal operation, <code>KEY_TYPED</code> event as mapping to a focus traversal operation,
@ -475,7 +474,7 @@ Components represent the next and previous Components to focus during
normal focus traversal. Thus, the current normal focus traversal. Thus, the current
<code>KeyboardFocusManager</code> maintains a reference to the <code>KeyboardFocusManager</code> maintains a reference to the
"current" focus cycle root, which is global across all contexts. The "current" focus cycle root, which is global across all contexts. The
current focus cycle root is used to resolve the ambiguity. current focus cycle root is used to resolve the ambiguity.
<p> <p>
For up-cycle traversal, the focus owner is set to the current focus For up-cycle traversal, the focus owner is set to the current focus
owner's focus cycle root, and the current focus cycle root is set to owner's focus cycle root, and the current focus cycle root is set to
@ -491,10 +490,10 @@ current focus owner. If the current focus owner is not a focus cycle
root, then no focus traversal operation occurs. root, then no focus traversal operation occurs.
<a name="FocusTraversalPolicy"></a> <a id="FocusTraversalPolicy"></a>
<h3>FocusTraversalPolicy</h3> <h3>FocusTraversalPolicy</h3>
<p> <p>
A <code>FocusTraversalPolicy</code> defines the order in which Components within A <code>FocusTraversalPolicy</code> defines the order in which Components within
a particular focus cycle root or focus traversal policy provider are a particular focus cycle root or focus traversal policy provider are
traversed. Instances of <code>FocusTraversalPolicy</code> can be shared across traversed. Instances of <code>FocusTraversalPolicy</code> can be shared across
@ -524,7 +523,7 @@ five algorithms:
</ol> </ol>
<p> <p>
A <code>FocusTraversalPolicy</code> may optionally provide an A <code>FocusTraversalPolicy</code> may optionally provide an
algorithm for the following: algorithm for the following:
<blockquote> <blockquote>
Given a Window, the "initial" Component in that Window. The initial Given a Window, the "initial" Component in that Window. The initial
@ -551,7 +550,7 @@ set, then a Container inherits its policy from its nearest focus-cycle-root
ancestor. Top-levels initialize their focus traversal policies using the context ancestor. Top-levels initialize their focus traversal policies using the context
default policy. The context default policy is established by using default policy. The context default policy is established by using
KeyboardFocusManager. <code>setDefaultFocusTraversalPolicy</code>. KeyboardFocusManager. <code>setDefaultFocusTraversalPolicy</code>.
<p> <p>
AWT provides two standard <code>FocusTraversalPolicy</code> AWT provides two standard <code>FocusTraversalPolicy</code>
implementations for use by client code. implementations for use by client code.
@ -573,14 +572,14 @@ implementations for use by client code.
<li><code>DefaultFocusTraversalPolicy</code>: A subclass of <li><code>DefaultFocusTraversalPolicy</code>: A subclass of
<code>ContainerOrderFocusTraversalPolicy</code> which redefines <code>ContainerOrderFocusTraversalPolicy</code> which redefines
the fitness test. If client code has explicitly set the the fitness test. If client code has explicitly set the
focusability of a Component by either overriding focusability of a Component by either overriding
<code>Component.isFocusTraversable()</code> or <code>Component.isFocusTraversable()</code> or
<code>Component.isFocusable()</code>, or by calling <code>Component.isFocusable()</code>, or by calling
<code>Component.setFocusable(boolean)</code>, then a <code>Component.setFocusable(boolean)</code>, then a
<code>DefaultFocusTraversalPolicy</code> behaves exactly <code>DefaultFocusTraversalPolicy</code> behaves exactly
like a <code>ContainerOrderFocusTraversalPolicy</code>. If, like a <code>ContainerOrderFocusTraversalPolicy</code>. If,
however, the Component is relying on default focusability, then a however, the Component is relying on default focusability, then a
<code>DefaultFocusTraversalPolicy</code> will reject all <code>DefaultFocusTraversalPolicy</code> will reject all
Components with non-focusable peers. Components with non-focusable peers.
<br> <br>
The focusability of a peer is implementation-dependent. Sun The focusability of a peer is implementation-dependent. Sun
@ -627,7 +626,7 @@ InternalFrameFocusTraversalPolicy.
</ol> </ol>
<p> <p>
The figure below shows an implicit focus transfer: The figure below shows an implicit focus transfer:
<br><img src="ImplicitFocusTransfer.gif" align=middle alt="Implicit focus transfer."><br> <br><img src="ImplicitFocusTransfer.gif" alt="Implicit focus transfer."><br>
Assume the following: Assume the following:
<ul> <ul>
@ -653,7 +652,7 @@ Containers by default.
All other applications, including pure AWT applications, will use All other applications, including pure AWT applications, will use
<code>DefaultFocusTraversalPolicy</code> by default. <code>DefaultFocusTraversalPolicy</code> by default.
<a name="FocusTraversalPolicyProviders"></a> <a id="FocusTraversalPolicyProviders"></a>
<h3>Focus Traversal Policy Providers</h3> <h3>Focus Traversal Policy Providers</h3>
<p> <p>
A Container that isn't a focus cycle root has an option to provide a A Container that isn't a focus cycle root has an option to provide a
@ -674,7 +673,7 @@ All other applications, including pure AWT applications, will use
If focus traversal policy provider property is set on a focus cycle root, it If focus traversal policy provider property is set on a focus cycle root, it
isn't considered a focus traversal policy provider and behaves just like any isn't considered a focus traversal policy provider and behaves just like any
other focus cycle root. other focus cycle root.
<p> <p>
The main difference between focus cycle roots and focus traversal policy The main difference between focus cycle roots and focus traversal policy
providers is that the latter allow focus to enter and leave them just as all other providers is that the latter allow focus to enter and leave them just as all other
@ -740,7 +739,7 @@ All other applications, including pure AWT applications, will use
</ul> </ul>
</ul> </ul>
<a name="ProgrammaticTraversal"></a> <a id="ProgrammaticTraversal"></a>
<h3>Programmatic Traversal</h3> <h3>Programmatic Traversal</h3>
<p> <p>
In addition to user-initiated focus traversal, client code can In addition to user-initiated focus traversal, client code can
@ -811,7 +810,7 @@ and there is no other Component to focus, then the focus owner remains
unchanged. unchanged.
<a name="Focusability"></a> <a id="Focusability"></a>
<h3>Focusability</h3> <h3>Focusability</h3>
<p> <p>
A focusable Component can become the focus owner ("focusability") and A focusable Component can become the focus owner ("focusability") and
@ -825,7 +824,7 @@ default, all Components return true from this method. Client code can
change this default by calling Component.setFocusable(boolean). change this default by calling Component.setFocusable(boolean).
<a name="FocusableWindows"></a> <a id="FocusableWindows"></a>
<h3>Focusable Windows</h3> <h3>Focusable Windows</h3>
<p> <p>
To support palette windows and input methods, client code can prevent To support palette windows and input methods, client code can prevent
@ -877,7 +876,7 @@ Since not all platforms support cross-Window focus changes (see
all such focus change requests will fail. In this case, the global all such focus change requests will fail. In this case, the global
focus owner will be cleared and the focused Window will remain unchanged. focus owner will be cleared and the focused Window will remain unchanged.
<a name="RequestingFocus"></a> <a id="RequestingFocus"></a>
<h3>Requesting Focus</h3> <h3>Requesting Focus</h3>
<p> <p>
@ -949,7 +948,7 @@ The Component class also supports variants of <code>requestFocus</code> and
a temporary state. a temporary state.
See <a href="#TemporaryFocusEvents">Temporary FocusEvents</a> See <a href="#TemporaryFocusEvents">Temporary FocusEvents</a>
<a name="FocusAndPropertyChangeListener"></a> <a id="FocusAndPropertyChangeListener"></a>
<h3>Focus and PropertyChangeListener</h3> <h3>Focus and PropertyChangeListener</h3>
<p> <p>
Client code can listen to changes in context-wide focus state, or to Client code can listen to changes in context-wide focus state, or to
@ -957,7 +956,7 @@ changes in focus-related state in Components, via
PropertyChangeListeners. PropertyChangeListeners.
<p> <p>
The <code>KeyboardFocusManager</code> supports the following properties: The <code>KeyboardFocusManager</code> supports the following properties:
<ol> <ol>
<li><code>focusOwner</code>: the focus owner <li><code>focusOwner</code>: the focus owner
<li><code>focusedWindow</code>: the focused Window <li><code>focusedWindow</code>: the focused Window
@ -977,7 +976,7 @@ The <code>KeyboardFocusManager</code> supports the following properties:
<p> <p>
A <code>PropertyChangeListener</code> installed on the current A <code>PropertyChangeListener</code> installed on the current
<code>KeyboardFocusManager</code> will only see these changes within <code>KeyboardFocusManager</code> will only see these changes within
the <code>KeyboardFocusManager</code>'s context, even though the the <code>KeyboardFocusManager</code>'s context, even though the
focus owner, focused Window, active Window, and current focus cycle focus owner, focused Window, active Window, and current focus cycle
root comprise the global focus state shared by all contexts. root comprise the global focus state shared by all contexts.
We believe this is less intrusive than requiring client code to pass We believe this is less intrusive than requiring client code to pass
@ -1001,7 +1000,7 @@ In addition to the Component properties, Container supports the
following focus-related properties: following focus-related properties:
<ol> <ol>
<li><code>downCycleFocusTraversalKeys</code>: the Container's Set of <li><code>downCycleFocusTraversalKeys</code>: the Container's Set of
<code>DOWN_CYCLE_TRAVERSAL_KEYS</code> <code>DOWN_CYCLE_TRAVERSAL_KEYS</code>
<li><code>focusTraversalPolicy</code>: the Container's focus <li><code>focusTraversalPolicy</code>: the Container's focus
traversal policy traversal policy
@ -1020,10 +1019,10 @@ Window will never see a <code>PropertyChangeEvent</code> for the
<code>focusCycleRoot</code> property. <code>focusCycleRoot</code> property.
A Window is always a focus cycle root; this property cannot change. A Window is always a focus cycle root; this property cannot change.
<p> <p>
<a name="FocusAndVetoableChangeListener"></a> <a id="FocusAndVetoableChangeListener"></a>
<h3>Focus and VetoableChangeListener</h3> <h3>Focus and VetoableChangeListener</h3>
<p> <p>
The <code>KeyboardFocusManager</code> also supports The <code>KeyboardFocusManager</code> also supports
<code>VetoableChangeListener</code>s for the following properties: <code>VetoableChangeListener</code>s for the following properties:
<ol> <ol>
@ -1054,13 +1053,13 @@ event, a <code>KeyboardFocusManager</code> is not required to search the
<code>KeyboardFocusManager</code> is free to attempt to <code>KeyboardFocusManager</code> is free to attempt to
dispatch this event and it is the responsibility of the dispatch this event and it is the responsibility of the
<code>VetoableChangeListener</code> to veto it as well. In addition, <code>VetoableChangeListener</code> to veto it as well. In addition,
during processing of the <code>FOCUS_GAINED</code> event, the during processing of the <code>FOCUS_GAINED</code> event, the
<code>KeyboardFocusManager</code> may attempt to resync the global <code>KeyboardFocusManager</code> may attempt to resync the global
focus state by synthesizing another <code>FOCUS_LOST</code> event. focus state by synthesizing another <code>FOCUS_LOST</code> event.
This event must be vetoed just as the first <code>FOCUS_LOST</code> event was. This event must be vetoed just as the first <code>FOCUS_LOST</code> event was.
<p> <p>
A <code>KeyboardFocusManager</code> may not hold any locks while A <code>KeyboardFocusManager</code> may not hold any locks while
notifying <code>PropertyChangeListener</code>s of a state change. notifying <code>PropertyChangeListener</code>s of a state change.
This requirement is relaxed for <code>VetoableChangeListeners</code>, This requirement is relaxed for <code>VetoableChangeListeners</code>,
however. Therefore, client-definied <code>VetoableChangeListener</code>s however. Therefore, client-definied <code>VetoableChangeListener</code>s
should avoid acquiring additional locks inside should avoid acquiring additional locks inside
@ -1089,13 +1088,13 @@ to anticipate this situation could lead to an infinite cycle of
vetoed focus changes and recovery attempts. vetoed focus changes and recovery attempts.
<a name="ZOrder"></a> <a id="ZOrder"></a>
<h3>Z-Order</h3> <h3>Z-Order</h3>
<p> <p>
On some native windowing systems, the Z-order of a Window can affect On some native windowing systems, the Z-order of a Window can affect
its focused or active (if applicable) state. On Microsoft Windows, the its focused or active (if applicable) state. On Microsoft Windows, the
top-most Window is naturally the focused Window as well. However, on top-most Window is naturally the focused Window as well. However, on
Solaris, many window managers use a point-to-focus model that ignores Solaris, many window managers use a point-to-focus model that ignores
Z-order in determining the focused Window. Z-order in determining the focused Window.
When focusing or activating Windows, the AWT adheres to the UI When focusing or activating Windows, the AWT adheres to the UI
@ -1114,8 +1113,8 @@ is platform-dependent. In JDK 1.4, the behavior of these methods on
Microsoft Windows and Solaris is as follows: Microsoft Windows and Solaris is as follows:
<ul> <ul>
<li><code>Window.toFront()</code>:<br> <li><code>Window.toFront()</code>:<br>
<b>Microsoft Windows</b>: The Window is moved to front, if possible. <b>Microsoft Windows</b>: The Window is moved to front, if possible.
While we will always be able to move this Window in front of other While we will always be able to move this Window in front of other
Windows in the same VM, Windows 98 and Windows 2000 do not allow an Windows in the same VM, Windows 98 and Windows 2000 do not allow an
application to bring any of its windows to the front unless one application to bring any of its windows to the front unless one
of that application's windows is already in the foreground. In of that application's windows is already in the foreground. In
@ -1129,15 +1128,15 @@ Microsoft Windows and Solaris is as follows:
window manager, the focused Window will remain unchanged. window manager, the focused Window will remain unchanged.
<li><code>Window.toBack()</code>:<br> <li><code>Window.toBack()</code>:<br>
<b>Microsoft Windows</b>: The Window is moved to back. Note however <b>Microsoft Windows</b>: The Window is moved to back. Note however
that Microsoft Windows insists that an owned Window always be in that Microsoft Windows insists that an owned Window always be in
front of all of its recursive owners. Thus, after the completion of front of all of its recursive owners. Thus, after the completion of
this operation, the Window may not be the lowest Java Window in the this operation, the Window may not be the lowest Java Window in the
Z-order. If the Window, or any of its owners, was the focused Window, Z-order. If the Window, or any of its owners, was the focused Window,
then the focused Window is reset to the top-most Window in the VM. then the focused Window is reset to the top-most Window in the VM.
<br> <br>
<b>Solaris</b>: The Window is moved to back. Like Microsoft Windows, <b>Solaris</b>: The Window is moved to back. Like Microsoft Windows,
some window managers insist than an owned Window always be in front some window managers insist than an owned Window always be in front
of all of its recursive owners. Thus, after the completion of this of all of its recursive owners. Thus, after the completion of this
operation, the Window may not be the lowest Java Window in the operation, the Window may not be the lowest Java Window in the
Z-order. If the Window was the focused Window, it will lose Z-order. If the Window was the focused Window, it will lose
@ -1156,7 +1155,7 @@ Microsoft Windows and Solaris is as follows:
<li><code>Window.hide()/Window.setVisible(false)/Window.dispose()/ <li><code>Window.hide()/Window.setVisible(false)/Window.dispose()/
Frame.setState(ICONIFIED)</code>:<br> Frame.setState(ICONIFIED)</code>:<br>
<b>Microsoft Windows</b>: If the Window was the focused Window, the focused <b>Microsoft Windows</b>: If the Window was the focused Window, the focused
Window is reset to a window chosen by the OS, or to no window. The Window is reset to a window chosen by the OS, or to no window. The
window may be in a native application, or a Java application in window may be in a native application, or a Java application in
another VM. another VM.
@ -1169,7 +1168,7 @@ Microsoft Windows and Solaris is as follows:
application in another VM. application in another VM.
</ul> </ul>
<a name="ReplacingDefaultKeyboardFocusManager"></a> <a id="ReplacingDefaultKeyboardFocusManager"></a>
<h3>Replacing DefaultKeyboardFocusManager</h3> <h3>Replacing DefaultKeyboardFocusManager</h3>
<p> <p>
<code>KeyboardFocusManager</code>s are pluggable at the browser context <code>KeyboardFocusManager</code>s are pluggable at the browser context
@ -1238,7 +1237,7 @@ focused Window:
heavyweight Container, not the focus owner. heavyweight Container, not the focus owner.
<li>A <code>FOCUS_LOST</code> event must be retargeted to the focus <li>A <code>FOCUS_LOST</code> event must be retargeted to the focus
owner. Again, this is necessary because the peer layer is owner. Again, this is necessary because the peer layer is
unaware of lightweight Components. unaware of lightweight Components.
<li>A <code>WINDOW_LOST_FOCUS</code> event must be retargeted to <li>A <code>WINDOW_LOST_FOCUS</code> event must be retargeted to
the focused Window. The implementation of the Window class the focused Window. The implementation of the Window class
may cause the native focused Window to differ from the Java may cause the native focused Window to differ from the Java
@ -1269,7 +1268,7 @@ value just set. Rejections occur in three standard cases:
to set the global focus owner to a non-focusable Component. to set the global focus owner to a non-focusable Component.
<li>If the <code>KeyboardFocusManager</code> attempts <li>If the <code>KeyboardFocusManager</code> attempts
to set the global focused Window to a non-focusable Window. to set the global focused Window to a non-focusable Window.
<li>If the change is rejected by an installed <li>If the change is rejected by an installed
<code>VetoableChangeListener</code>. <code>VetoableChangeListener</code>.
</ul> </ul>
<p> <p>
@ -1302,13 +1301,13 @@ and VetoableChangeListener</a>.
recent focus owner. recent focus owner.
<li>The <code>KeyboardFocusManager</code> must ensure that the <li>The <code>KeyboardFocusManager</code> must ensure that the
opposite Component or Window are as accurate as the native opposite Component or Window are as accurate as the native
windowing platform permits. For example, the windowing platform permits. For example, the
<code>KeyboardFocusManager</code> may need to <code>KeyboardFocusManager</code> may need to
retarget the opposite Component to a lightweight child of the retarget the opposite Component to a lightweight child of the
heavyweight initially specified by the peer layer. heavyweight initially specified by the peer layer.
<br> <br>
If the peer layer states that the opposite Component or Window is If the peer layer states that the opposite Component or Window is
<code>null</code>, it is acceptable for the <code>null</code>, it is acceptable for the
<code>KeyboardFocusManager</code> to propagate <code>KeyboardFocusManager</code> to propagate
this value. <code>null</code> indicates that it is highly this value. <code>null</code> indicates that it is highly
probably that no other Component or Window was involved probably that no other Component or Window was involved
@ -1325,7 +1324,7 @@ and VetoableChangeListener</a>.
events. events.
</ul> </ul>
<a name="Incompatibilities"></a> <a id="Incompatibilities"></a>
<h3>Incompatibilities with Previous Releases</h3> <h3>Incompatibilities with Previous Releases</h3>
<p><b>Cross-platform changes:</b> <p><b>Cross-platform changes:</b>
<ol> <ol>
@ -1343,7 +1342,7 @@ and VetoableChangeListener</a>.
<li>KeyListeners installed on <code>Component</code>s <li>KeyListeners installed on <code>Component</code>s
will no longer see <code>KeyEvent</code>s that map to focus will no longer see <code>KeyEvent</code>s that map to focus
traversal operations, and traversal operations, and
<code>Component.handleEvent()</code> will no longer be invoked <code>Component.handleEvent()</code> will no longer be invoked
for such events. Previously, AWT Components saw these events for such events. Previously, AWT Components saw these events
and had an opportunity to consume them before AWT and had an opportunity to consume them before AWT
initiated focus traversal. Code that requires this initiated focus traversal. Code that requires this
@ -1352,7 +1351,7 @@ and VetoableChangeListener</a>.
itself. Alternately, the code can use an itself. Alternately, the code can use an
<code>AWTEventListener</code> or <code>AWTEventListener</code> or
<code>KeyEventDispatcher</code> to pre-listen to all <code>KeyEventDispatcher</code> to pre-listen to all
<code>KeyEvent</code>s. <code>KeyEvent</code>s.
</ol> </ol>
<p><b>Changes specific to Microsoft Windows:</b> <p><b>Changes specific to Microsoft Windows:</b>
<ol> <ol>

View File

@ -1,5 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>The AWT Modality</title>
</head>
<!-- <!--
Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -23,19 +29,9 @@
questions. questions.
--> -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <body>
<html> <h1>The AWT Modality</h1>
<head>
<title>The AWT Modality</title>
</head>
<body bgcolor="white">
<h1 align="center">The AWT Modality</h1>
<p> <p>
This document, together with the API documentation for modality-related This document, together with the API documentation for modality-related
@ -53,7 +49,7 @@
<li><a href="#Examples">Examples</a></li> <li><a href="#Examples">Examples</a></li>
</ul> </ul>
<a name="Definitions"></a> <a id="Definitions"></a>
<h3>Definitions</h3> <h3>Definitions</h3>
<p> <p>
@ -63,7 +59,7 @@
Every window belongs to some document &mdash; its root can be found as Every window belongs to some document &mdash; its root can be found as
the closest ancestor window without an owner. the closest ancestor window without an owner.
</p><p> </p><p>
<a name="ModalBlocked"></a> <a id="ModalBlocked"></a>
<u>Modal blocked window</u> - a window, that: <u>Modal blocked window</u> - a window, that:
</p><ul> </p><ul>
<li>doesn't receive any user input events <li>doesn't receive any user input events
@ -73,7 +69,7 @@
<blockquote> <blockquote>
<hr> <hr>
<b>Warning!</b> Some window managers allow users to change the window <b>Warning!</b> Some window managers allow users to change the window
Z-order in an arbitrary way &mdash; in that case the last requirement Z-order in an arbitrary way &mdash; in that case the last requirement
may not be met. may not be met.
<hr> <hr>
</blockquote> </blockquote>
@ -87,7 +83,7 @@
then all its owned windows and child components are also excluded. then all its owned windows and child components are also excluded.
</p><p> </p><p>
<u>Scope of blocking (SB)</u> - the set of windows (instances of <u>Scope of blocking (SB)</u> - the set of windows (instances of
<code>java.awt.Window</code> and all derived classes) that are blocked by <code>java.awt.Window</code> and all derived classes) that are blocked by
the modal dialog while it is visible. the modal dialog while it is visible.
<blockquote><hr> <blockquote><hr>
<b>Note</b>: Everywhere in this document the notion of "window" is equal <b>Note</b>: Everywhere in this document the notion of "window" is equal
@ -95,7 +91,7 @@
an instance of <code>java.awt.Window</code> or any descendant class. an instance of <code>java.awt.Window</code> or any descendant class.
<hr></blockquote> <hr></blockquote>
<a name="ModalityTypes"></a> <a id="ModalityTypes"></a>
<h3>Modality types</h3> <h3>Modality types</h3>
<p> <p>
@ -159,7 +155,7 @@
dialog may have no effect until it is hidden and then shown again. dialog may have no effect until it is hidden and then shown again.
<hr></blockquote> <hr></blockquote>
<a name="ShowHideBlocking"></a> <a id="ShowHideBlocking"></a>
<h3>Show/hide blocking</h3> <h3>Show/hide blocking</h3>
<p> <p>
@ -171,7 +167,7 @@
</p><p> </p><p>
<u>Showing the modal dialog: "M"</u><br> <u>Showing the modal dialog: "M"</u><br>
When modal dialog M is shown, all the visible windows fall into one of When modal dialog M is shown, all the visible windows fall into one of
three distinct groups: three distinct groups:
<ul> <ul>
<li>Blockers of M (modal dialogs that block M and <li>Blockers of M (modal dialogs that block M and
either are in M's child hierarchy, or are not blocked by M, or have either are in M's child hierarchy, or are not blocked by M, or have
@ -260,11 +256,11 @@
If M was blocked by any other modal dialog, for example, "N", If M was blocked by any other modal dialog, for example, "N",
it becomes unblocked and it becomes unblocked and
is removed from N's blocked windows list. Then, all the windows and dialogs is removed from N's blocked windows list. Then, all the windows and dialogs
blocked by M become unblocked, and after that the same checks blocked by M become unblocked, and after that the same checks
(as in Showing the modal dialog: "M") (as in Showing the modal dialog: "M")
are performed for each of them in the order they were initially shown. are performed for each of them in the order they were initially shown.
<a name="ModalExclusion"></a> <a id="ModalExclusion"></a>
</p><h3>Modal exclusion</h3> </p><h3>Modal exclusion</h3>
<p> <p>
@ -290,7 +286,7 @@
may have no effect until it is hidden and then shown again. may have no effect until it is hidden and then shown again.
</blockquote> </blockquote>
<a name="Related"></a> <a id="Related"></a>
<h3>Related AWT features</h3> <h3>Related AWT features</h3>
<p> <p>
@ -333,21 +329,21 @@
</li></ol> </li></ol>
If the modal dialog to be hidden does not have focus, the active window remains If the modal dialog to be hidden does not have focus, the active window remains
unchanged. unchanged.
<a name="Security"></a> <a id="Security"></a>
<h3>Security</h3> <h3>Security</h3>
<p> <p>
A special <code>AWTPermission</code>, <code>"toolkitModality"</code>, A special <code>AWTPermission</code>, <code>"toolkitModality"</code>,
is required to show toolkit-modal is required to show toolkit-modal
dialogs. This would prevent, for example, blocking a browser or dialogs. This would prevent, for example, blocking a browser or
Java Web Start (JWS) by modal dialogs shown from applets. Java Web Start (JWS) by modal dialogs shown from applets.
</p><p> </p><p>
The same permission is required to exclude a window from toolkit modality. The same permission is required to exclude a window from toolkit modality.
This would prevent, for example, a dialog shown from an applet not to be This would prevent, for example, a dialog shown from an applet not to be
blocked by a browser's or JWS's modal dialog. blocked by a browser's or JWS's modal dialog.
<a name="PlatformSupport"></a> <a id="PlatformSupport"></a>
</p><h3>Platform support</h3> </p><h3>Platform support</h3>
<p> <p>
@ -366,18 +362,18 @@
and a window is marked as E-excluded, this has no effect. and a window is marked as E-excluded, this has no effect.
</li></ul> </li></ul>
<a name="Compatibility"></a> <a id="Compatibility"></a>
<h3>Compatibility</h3> <h3>Compatibility</h3>
<p> <p>
The default modality type is application-modal. It is used by the API The default modality type is application-modal. It is used by the API
calls: <code>Dialog.setModal(true)</code>, calls: <code>Dialog.setModal(true)</code>,
<code>Dialog(owner, true)</code>, etc. Prior to JDK 6 <code>Dialog(owner, true)</code>, etc. Prior to JDK 6
the default type was toolkit-modal, the default type was toolkit-modal,
but the only distinction between application- and toolkit-modality is for but the only distinction between application- and toolkit-modality is for
applets and applications launched from Java Web Start. applets and applications launched from Java Web Start.
<a name="Examples"></a> <a id="Examples"></a>
</p><h3>Examples</h3> </p><h3>Examples</h3>
<table border="0"> <table border="0">
@ -429,7 +425,7 @@
it's in the same application<br> it's in the same application<br>
<li>D<sub>i</sub> is shown<br> <li>D<sub>i</sub> is shown<br>
<li>D<sub>i</sub> becomes blocked by D<sub>ii</sub> &mdash; it's its owner<br> <li>D<sub>i</sub> becomes blocked by D<sub>ii</sub> &mdash; it's its owner<br>
<li>D<sub>iii</sub> remains unblocked &mdash; it blocks D<sub>ii</sub> and <li>D<sub>iii</sub> remains unblocked &mdash; it blocks D<sub>ii</sub> and
D<sub>ii</sub> blocks D<sub>i</sub><br> D<sub>ii</sub> blocks D<sub>i</sub><br>
</ol> </ol>
<br> <br>

View File

@ -1,8 +1,11 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!doctype html>
<html> <html lang="en">
<head> <head>
<meta charset="utf-8"/>
<title>BMP Metadata Format Specification</title>
</head>
<!-- <!--
Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -26,13 +29,8 @@ or visit www.oracle.com if you need additional information or have any
questions. questions.
--> -->
<title>BMP Metadata Format Specification</title>
</head>
<body> <body>
<center><h1> <h1>BMP Metadata Format Specification</h1>
BMP Metadata Format Specification
</h1></center>
The XML schema for the native image metadata format is as follows: The XML schema for the native image metadata format is as follows:
@ -108,7 +106,7 @@ The XML schema for the native image metadata format is as follows:
&lt;/xsd:element&gt; &lt;/xsd:element&gt;
&lt;!-- Color space --&gt; &lt;!-- Color space --&gt;
&lt;xsd:element name="ColorSpaceType" type="xsd:unsignedInt" &lt;xsd:element name="ColorSpaceType" type="xsd:unsignedInt"
minOccurs="0"/&gt; minOccurs="0"/&gt;
&lt;!-- CIE XYZ for the LCS_CALIBRATED_RGB color space --&gt; &lt;!-- CIE XYZ for the LCS_CALIBRATED_RGB color space --&gt;

View File

@ -1,8 +1,11 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!doctype html>
<html> <html lang="en">
<head> <head>
<meta charset="utf-8"/>
<title>GIF Metadata Format Specification</title>
</head>
<!-- <!--
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -26,18 +29,11 @@ or visit www.oracle.com if you need additional information or have any
questions. questions.
--> -->
<title>GIF Metadata Format Specification</title> <body>
</head>
<body bgcolor="white"> <h1>GIF Metadata Format Specification</h1>
<a id="gif_stream_metadata_format"></a>
<center><h1> <h2>GIF Stream Metadata Format Specification</h2>
GIF Metadata Format Specification
</h1></center>
<a name="gif_stream_metadata_format"></a>
<center><h2>
GIF Stream Metadata Format Specification
</h2></center>
<p> <p>
@ -59,7 +55,7 @@ images that do not have their own local color table.
<pre> <pre>
&lt;!DOCTYPE "javax_imageio_gif_stream_1.0" [ &lt;!DOCTYPE "javax_imageio_gif_stream_1.0" [
&lt;!ELEMENT "javax_imageio_gif_stream_1.0" (Version?, &lt;!ELEMENT "javax_imageio_gif_stream_1.0" (Version?,
LogicalScreenDescriptor?, GlobalColorTable?)&gt; LogicalScreenDescriptor?, GlobalColorTable?)&gt;
&lt;!ELEMENT "Version" EMPTY&gt; &lt;!ELEMENT "Version" EMPTY&gt;
@ -98,7 +94,7 @@ images that do not have their own local color table.
&lt;!-- The global color table --&gt; &lt;!-- The global color table --&gt;
&lt;!-- Min children: 2 --&gt; &lt;!-- Min children: 2 --&gt;
&lt;!-- Max children: 256 --&gt; &lt;!-- Max children: 256 --&gt;
&lt;!ATTLIST "GlobalColorTable" "sizeOfGlobalColorTable" ("2" | &lt;!ATTLIST "GlobalColorTable" "sizeOfGlobalColorTable" ("2" |
"4" | "8" | "16" | "32" | "64" | "128" | "256") #REQUIRED&gt; "4" | "8" | "16" | "32" | "64" | "128" | "256") #REQUIRED&gt;
&lt;!-- The number of entries in the global color table --&gt; &lt;!-- The number of entries in the global color table --&gt;
&lt;!ATTLIST "GlobalColorTable" "backgroundColorIndex" #CDATA &lt;!ATTLIST "GlobalColorTable" "backgroundColorIndex" #CDATA
@ -135,10 +131,8 @@ images that do not have their own local color table.
&lt;!-- Max value: 255 (inclusive) --&gt; &lt;!-- Max value: 255 (inclusive) --&gt;
]&gt; ]&gt;
</pre> </pre>
<a name="gif_image_metadata_format"></a> <a id="gif_image_metadata_format"></a>
<center><h2> <h2>GIF Image Metadata Format Specification</h2>
GIF Image Metadata Format Specification
</h2></center>
<p> <p>
The GIF image metadata format encodes the image descriptor, local The GIF image metadata format encodes the image descriptor, local
@ -180,8 +174,8 @@ advanced only on user input.
<pre> <pre>
&lt;!DOCTYPE "javax_imageio_gif_image_1.0" [ &lt;!DOCTYPE "javax_imageio_gif_image_1.0" [
&lt;!ELEMENT "javax_imageio_gif_image_1.0" (ImageDescriptor?, &lt;!ELEMENT "javax_imageio_gif_image_1.0" (ImageDescriptor?,
LocalColorTable?, GraphicControlExtension?, PlainTextExtension?, LocalColorTable?, GraphicControlExtension?, PlainTextExtension?,
ApplicationExtensions?, CommentExtensions?)&gt; ApplicationExtensions?, CommentExtensions?)&gt;
&lt;!ELEMENT "ImageDescriptor" EMPTY&gt; &lt;!ELEMENT "ImageDescriptor" EMPTY&gt;
@ -214,7 +208,7 @@ advanced only on user input.
&lt;!-- The local color table --&gt; &lt;!-- The local color table --&gt;
&lt;!-- Min children: 2 --&gt; &lt;!-- Min children: 2 --&gt;
&lt;!-- Max children: 256 --&gt; &lt;!-- Max children: 256 --&gt;
&lt;!ATTLIST "LocalColorTable" "sizeOfLocalColorTable" ("2" | &lt;!ATTLIST "LocalColorTable" "sizeOfLocalColorTable" ("2" |
"4" | "8" | "16" | "32" | "64" | "128" | "256") #REQUIRED&gt; "4" | "8" | "16" | "32" | "64" | "128" | "256") #REQUIRED&gt;
&lt;!-- The number of entries in the local color table --&gt; &lt;!-- The number of entries in the local color table --&gt;
&lt;!ATTLIST "LocalColorTable" "sortFlag" ("TRUE" | "FALSE") &lt;!ATTLIST "LocalColorTable" "sortFlag" ("TRUE" | "FALSE")
@ -246,13 +240,13 @@ advanced only on user input.
&lt;!ELEMENT "GraphicControlExtension" EMPTY&gt; &lt;!ELEMENT "GraphicControlExtension" EMPTY&gt;
&lt;!-- A graphic control extension --&gt; &lt;!-- A graphic control extension --&gt;
&lt;!ATTLIST "GraphicControlExtension" "disposalMethod" ("none" | &lt;!ATTLIST "GraphicControlExtension" "disposalMethod" ("none" |
"doNotDispose" | "restoreToBackgroundColor" | "doNotDispose" | "restoreToBackgroundColor" |
"restoreToPrevious" | "undefinedDisposalMethod4" | "restoreToPrevious" | "undefinedDisposalMethod4" |
"undefinedDisposalMethod5" | "undefinedDisposalMethod6" | "undefinedDisposalMethod5" | "undefinedDisposalMethod6" |
"undefinedDisposalMethod7") #REQUIRED&gt; "undefinedDisposalMethod7") #REQUIRED&gt;
&lt;!-- The disposal method for this frame --&gt; &lt;!-- The disposal method for this frame --&gt;
&lt;!ATTLIST "GraphicControlExtension" "userInputFlag" ("TRUE" | &lt;!ATTLIST "GraphicControlExtension" "userInputFlag" ("TRUE" |
"FALSE") #REQUIRED&gt; "FALSE") #REQUIRED&gt;
&lt;!-- True if the frame should be advanced based on user input --&gt; &lt;!-- True if the frame should be advanced based on user input --&gt;
&lt;!ATTLIST "GraphicControlExtension" "transparentColorFlag" ( &lt;!ATTLIST "GraphicControlExtension" "transparentColorFlag" (
@ -350,8 +344,7 @@ advanced only on user input.
</pre> </pre>
<p> <p>
<a name="mapping"></a> <a id="mapping"></a>
<center>
<table border=1> <table border=1>
<caption><b>Mapping of Standard to GIF Native Stream Metadata</b></caption> <caption><b>Mapping of Standard to GIF Native Stream Metadata</b></caption>
<tr> <tr>
@ -399,9 +392,7 @@ advanced only on user input.
<td>/Version@value</td> <td>/Version@value</td>
</tr> </tr>
</table> </table>
</center>
<center>
<table border=1> <table border=1>
<caption><b>Mapping of Standard to GIF Native Image Metadata</b></caption> <caption><b>Mapping of Standard to GIF Native Image Metadata</b></caption>
<tr> <tr>
@ -443,7 +434,6 @@ advanced only on user input.
"TRUE")</td> "TRUE")</td>
</tr> </tr>
</table> </table>
</center>
</body> </body>
</html> </html>

View File

@ -1,8 +1,11 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!doctype html>
<html> <html lang="en">
<head> <head>
<meta charset="utf-8"/>
<title>PNG Metadata Format Specification</title>
</head>
<!-- <!--
Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -26,14 +29,9 @@ or visit www.oracle.com if you need additional information or have any
questions. questions.
--> -->
<title>PNG Metadata Format Specification</title> <body>
</head>
<body bgcolor="white"> <h1>PNG Metadata Format Specification</h1>
<center><h1>
PNG Metadata Format Specification
</h1></center>
<p> <p>
@ -59,7 +57,7 @@ using as grayscale instead of palette color. However, if the color
type set in the metadata is "Palette", palette color will be used. type set in the metadata is "Palette", palette color will be used.
<p> <p>
If no metadata is supplied when encoding an image, the header is If no metadata is supplied when encoding an image, the header is
initialized from the image being encoded, and no optional chunks are initialized from the image being encoded, and no optional chunks are
included. included.
@ -85,7 +83,7 @@ or <code>GrayAlpha</code> image
The child nodes of the <code>bKGD</code>, <code>sBIT</code>, and The child nodes of the <code>bKGD</code>, <code>sBIT</code>, and
<code>tRNS</code> chunks must match the image's color type. <code>tRNS</code> chunks must match the image's color type.
<p> <p>
Certain chunks may meaningfully appear multiple times in a PNG file, Certain chunks may meaningfully appear multiple times in a PNG file,
in particular the text-related chunks. In order to simplify the in particular the text-related chunks. In order to simplify the
@ -104,8 +102,8 @@ written, or to determine the order of the chunks in a file being read.
<pre> <pre>
&lt;!DOCTYPE "javax_imageio_png_1.0" [ &lt;!DOCTYPE "javax_imageio_png_1.0" [
&lt;!ELEMENT "javax_imageio_png_1.0" (IHDR?, PLTE?, bKGD?, cHRM?, &lt;!ELEMENT "javax_imageio_png_1.0" (IHDR?, PLTE?, bKGD?, cHRM?,
gAMA?, hIST?, iCCP?, iTXt?, pHYS?, sBIT?, sPLT?, sRGB?, tEXt?, gAMA?, hIST?, iCCP?, iTXt?, pHYS?, sBIT?, sPLT?, sRGB?, tEXt?,
tIME?, tRNS?, zTXt?, UnknownChunks?)&gt; tIME?, tRNS?, zTXt?, UnknownChunks?)&gt;
&lt;!ELEMENT "IHDR" EMPTY&gt; &lt;!ELEMENT "IHDR" EMPTY&gt;
@ -123,7 +121,7 @@ written, or to determine the order of the chunks in a file being read.
&lt;!ATTLIST "IHDR" "bitDepth" ("1" | "2" | "4" | "8" | "16") &lt;!ATTLIST "IHDR" "bitDepth" ("1" | "2" | "4" | "8" | "16")
#REQUIRED&gt; #REQUIRED&gt;
&lt;!-- The bit depth of the image samples --&gt; &lt;!-- The bit depth of the image samples --&gt;
&lt;!ATTLIST "IHDR" "colorType" ("Grayscale" | "RGB" | "Palette" | &lt;!ATTLIST "IHDR" "colorType" ("Grayscale" | "RGB" | "Palette" |
"GrayAlpha" | "RGBAlpha") #REQUIRED&gt; "GrayAlpha" | "RGBAlpha") #REQUIRED&gt;
&lt;!-- The color type of the image --&gt; &lt;!-- The color type of the image --&gt;
&lt;!ATTLIST "IHDR" "compressionMethod" ("deflate") #REQUIRED&gt; &lt;!ATTLIST "IHDR" "compressionMethod" ("deflate") #REQUIRED&gt;
@ -318,7 +316,7 @@ written, or to determine the order of the chunks in a file being read.
&lt;!ATTLIST "pHYS" "unitSpecifier" ("unknown" | "meter") #REQUIRED&gt; &lt;!ATTLIST "pHYS" "unitSpecifier" ("unknown" | "meter") #REQUIRED&gt;
&lt;!-- The unit specifier for this chunk (i.e., meters) --&gt; &lt;!-- The unit specifier for this chunk (i.e., meters) --&gt;
&lt;!ELEMENT "sBIT" (sBIT_Grayscale | sBIT_GrayAlpha | sBIT_RGB | &lt;!ELEMENT "sBIT" (sBIT_Grayscale | sBIT_GrayAlpha | sBIT_RGB |
sBIT_RGBAlpha | sBIT_Palette)&gt; sBIT_RGBAlpha | sBIT_Palette)&gt;
&lt;!-- The sBIT chunk, containing significant bit information --&gt; &lt;!-- The sBIT chunk, containing significant bit information --&gt;
@ -437,8 +435,8 @@ written, or to determine the order of the chunks in a file being read.
&lt;!ELEMENT "sRGB" EMPTY&gt; &lt;!ELEMENT "sRGB" EMPTY&gt;
&lt;!-- The sRGB chunk, containing rendering intent information --&gt; &lt;!-- The sRGB chunk, containing rendering intent information --&gt;
&lt;!ATTLIST "sRGB" "renderingIntent" ("Perceptual" | &lt;!ATTLIST "sRGB" "renderingIntent" ("Perceptual" |
"Relative colorimetric" | "Saturation" | "Relative colorimetric" | "Saturation" |
"Absolute colorimetric") #REQUIRED&gt; "Absolute colorimetric") #REQUIRED&gt;
&lt;!-- The rendering intent --&gt; &lt;!-- The rendering intent --&gt;

View File

@ -1,8 +1,11 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!doctype html>
<html> <html lang="en">
<head> <head>
<meta charset="utf-8"/>
<title>Standard Metadata Format Specification</title>
</head>
<!-- <!--
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -26,14 +29,9 @@ or visit www.oracle.com if you need additional information or have any
questions. questions.
--> -->
<title>Standard Metadata Format Specification</title> <body>
</head>
<body bgcolor="white"> <h1>Standard (Plug-in Neutral) Metadata Format Specification</h1>
<center><h1>
Standard (Plug-in Neutral) Metadata Format Specification
</h1></center>
<p> The plug-in neutral "javax_imageio_1.0" format consists <p> The plug-in neutral "javax_imageio_1.0" format consists
of a root node named "javax_imageio_1.0" which has child of a root node named "javax_imageio_1.0" which has child
@ -44,355 +42,355 @@ following DTD:
<pre> <pre>
&lt;!DOCTYPE "javax_imageio_1.0" [ &lt;!DOCTYPE "javax_imageio_1.0" [
&lt;!ELEMENT "javax_imageio_1.0" (Chroma?, Compression?, Data?, Dimension?, &lt;!ELEMENT "javax_imageio_1.0" (Chroma?, Compression?, Data?, Dimension?,
Document?, Text?, Transparency?)&gt; Document?, Text?, Transparency?)&gt;
&lt;!ELEMENT "Chroma" (ColorSpaceType?, NumChannels?, Gamma?, &lt;!ELEMENT "Chroma" (ColorSpaceType?, NumChannels?, Gamma?,
BlackIsZero?, Palette?, BackgroundIndex?, BackgroundColor?)&gt; BlackIsZero?, Palette?, BackgroundIndex?, BackgroundColor?)&gt;
&lt;!-- Chroma (color) information --&gt; &lt;!-- Chroma (color) information --&gt;
&lt;!ELEMENT "ColorSpaceType" EMPTY&gt; &lt;!ELEMENT "ColorSpaceType" EMPTY&gt;
&lt;!-- The raw color space of the image --&gt; &lt;!-- The raw color space of the image --&gt;
&lt;!ATTLIST "ColorSpaceType" "name" ("XYZ" | "Lab" | "Luv" | &lt;!ATTLIST "ColorSpaceType" "name" ("XYZ" | "Lab" | "Luv" |
"YCbCr" | "Yxy" | "YCCK" | "PhotoYCC" | "RGB" | "GRAY" | "HSV" | "YCbCr" | "Yxy" | "YCCK" | "PhotoYCC" | "RGB" | "GRAY" | "HSV" |
"HLS" | "CMYK" | "CMY" | "2CLR" | "3CLR" | "4CLR" | "5CLR" | "HLS" | "CMYK" | "CMY" | "2CLR" | "3CLR" | "4CLR" | "5CLR" |
"6CLR" | "7CLR" | "8CLR" | "9CLR" | "ACLR" | "BCLR" | "CCLR" | "6CLR" | "7CLR" | "8CLR" | "9CLR" | "ACLR" | "BCLR" | "CCLR" |
"DCLR" | "ECLR" | "FCLR") #REQUIRED&gt; "DCLR" | "ECLR" | "FCLR") #REQUIRED&gt;
&lt;!ELEMENT "NumChannels" EMPTY&gt; &lt;!ELEMENT "NumChannels" EMPTY&gt;
&lt;!-- The number of channels in the raw image, including alpha --&gt; &lt;!-- The number of channels in the raw image, including alpha --&gt;
&lt;!ATTLIST "NumChannels" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "NumChannels" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: List of Integer --&gt; &lt;!-- Data type: List of Integer --&gt;
&lt;!ELEMENT "Gamma" EMPTY&gt; &lt;!ELEMENT "Gamma" EMPTY&gt;
&lt;!-- The image gamma --&gt; &lt;!-- The image gamma --&gt;
&lt;!ATTLIST "Gamma" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "Gamma" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: Float --&gt; &lt;!-- Data type: Float --&gt;
&lt;!ELEMENT "BlackIsZero" EMPTY&gt; &lt;!ELEMENT "BlackIsZero" EMPTY&gt;
&lt;!-- True if smaller values represent darker shades --&gt; &lt;!-- True if smaller values represent darker shades --&gt;
&lt;!ATTLIST "BlackIsZero" "value" ("TRUE" | "FALSE") "TRUE"&gt; &lt;!ATTLIST "BlackIsZero" "value" ("TRUE" | "FALSE") "TRUE"&gt;
&lt;!ELEMENT "Palette" (PaletteEntry)*&gt; &lt;!ELEMENT "Palette" (PaletteEntry)*&gt;
&lt;!-- Palette-color information --&gt; &lt;!-- Palette-color information --&gt;
&lt;!ELEMENT "PaletteEntry" EMPTY&gt; &lt;!ELEMENT "PaletteEntry" EMPTY&gt;
&lt;!-- A palette entry --&gt; &lt;!-- A palette entry --&gt;
&lt;!ATTLIST "PaletteEntry" "index" #CDATA #REQUIRED&gt; &lt;!ATTLIST "PaletteEntry" "index" #CDATA #REQUIRED&gt;
&lt;!-- The index of the palette entry --&gt; &lt;!-- The index of the palette entry --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ATTLIST "PaletteEntry" "red" #CDATA #REQUIRED&gt; &lt;!ATTLIST "PaletteEntry" "red" #CDATA #REQUIRED&gt;
&lt;!-- The red value for the palette entry --&gt; &lt;!-- The red value for the palette entry --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ATTLIST "PaletteEntry" "green" #CDATA #REQUIRED&gt; &lt;!ATTLIST "PaletteEntry" "green" #CDATA #REQUIRED&gt;
&lt;!-- The green value for the palette entry --&gt; &lt;!-- The green value for the palette entry --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ATTLIST "PaletteEntry" "blue" #CDATA #REQUIRED&gt; &lt;!ATTLIST "PaletteEntry" "blue" #CDATA #REQUIRED&gt;
&lt;!-- The blue value for the palette entry --&gt; &lt;!-- The blue value for the palette entry --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ATTLIST "PaletteEntry" "alpha" #CDATA "255"&gt; &lt;!ATTLIST "PaletteEntry" "alpha" #CDATA "255"&gt;
&lt;!-- The alpha value for the palette entry --&gt; &lt;!-- The alpha value for the palette entry --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ELEMENT "BackgroundIndex" EMPTY&gt; &lt;!ELEMENT "BackgroundIndex" EMPTY&gt;
&lt;!-- A palette index to be used as a background --&gt; &lt;!-- A palette index to be used as a background --&gt;
&lt;!ATTLIST "BackgroundIndex" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "BackgroundIndex" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ELEMENT "BackgroundColor" EMPTY&gt; &lt;!ELEMENT "BackgroundColor" EMPTY&gt;
&lt;!-- An RGB triple to be used as a background --&gt; &lt;!-- An RGB triple to be used as a background --&gt;
&lt;!ATTLIST "BackgroundColor" "red" #CDATA #REQUIRED&gt; &lt;!ATTLIST "BackgroundColor" "red" #CDATA #REQUIRED&gt;
&lt;!-- The red background value --&gt; &lt;!-- The red background value --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ATTLIST "BackgroundColor" "green" #CDATA #REQUIRED&gt; &lt;!ATTLIST "BackgroundColor" "green" #CDATA #REQUIRED&gt;
&lt;!-- The green background value --&gt; &lt;!-- The green background value --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ATTLIST "BackgroundColor" "blue" #CDATA #REQUIRED&gt; &lt;!ATTLIST "BackgroundColor" "blue" #CDATA #REQUIRED&gt;
&lt;!-- The blue background value --&gt; &lt;!-- The blue background value --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ELEMENT "Compression" (CompressionTypeName?, Lossless?, &lt;!ELEMENT "Compression" (CompressionTypeName?, Lossless?,
NumProgressiveScans?, BitRate?)&gt; NumProgressiveScans?, BitRate?)&gt;
&lt;!-- Compression information --&gt; &lt;!-- Compression information --&gt;
&lt;!ELEMENT "CompressionTypeName" EMPTY&gt; &lt;!ELEMENT "CompressionTypeName" EMPTY&gt;
&lt;!-- The name of the compression scheme in use --&gt; &lt;!-- The name of the compression scheme in use --&gt;
&lt;!ATTLIST "CompressionTypeName" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "CompressionTypeName" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ELEMENT "Lossless" EMPTY&gt; &lt;!ELEMENT "Lossless" EMPTY&gt;
&lt;!-- True if the compression scheme is lossless --&gt; &lt;!-- True if the compression scheme is lossless --&gt;
&lt;!ATTLIST "Lossless" "value" ("TRUE" | "FALSE") "TRUE"&gt; &lt;!ATTLIST "Lossless" "value" ("TRUE" | "FALSE") "TRUE"&gt;
&lt;!ELEMENT "NumProgressiveScans" EMPTY&gt; &lt;!ELEMENT "NumProgressiveScans" EMPTY&gt;
&lt;!-- The number of progressive scans used in the image encoding --&gt; &lt;!-- The number of progressive scans used in the image encoding --&gt;
&lt;!ATTLIST "NumProgressiveScans" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "NumProgressiveScans" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ELEMENT "BitRate" EMPTY&gt; &lt;!ELEMENT "BitRate" EMPTY&gt;
&lt;!-- The estimated bit rate of the compression scheme --&gt; &lt;!-- The estimated bit rate of the compression scheme --&gt;
&lt;!ATTLIST "BitRate" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "BitRate" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: Float --&gt; &lt;!-- Data type: Float --&gt;
&lt;!ELEMENT "Data" (PlanarConfiguration?, SampleFormat?, BitsPerSample?, &lt;!ELEMENT "Data" (PlanarConfiguration?, SampleFormat?, BitsPerSample?,
SignificantBitsPerSample?, SampleMSB?)&gt; SignificantBitsPerSample?, SampleMSB?)&gt;
&lt;!-- Information on the image layout --&gt; &lt;!-- Information on the image layout --&gt;
&lt;!ELEMENT "PlanarConfiguration" EMPTY&gt; &lt;!ELEMENT "PlanarConfiguration" EMPTY&gt;
&lt;!-- The organization of image samples in the stream --&gt; &lt;!-- The organization of image samples in the stream --&gt;
&lt;!ATTLIST "PlanarConfiguration" "value" ("PixelInterleaved" | &lt;!ATTLIST "PlanarConfiguration" "value" ("PixelInterleaved" |
"PlaneInterleaved" | "LineInterleaved" | "TileInterleaved") "PlaneInterleaved" | "LineInterleaved" | "TileInterleaved")
#REQUIRED&gt; #REQUIRED&gt;
&lt;!ELEMENT "SampleFormat" EMPTY&gt; &lt;!ELEMENT "SampleFormat" EMPTY&gt;
&lt;!-- The numeric format of image samples --&gt; &lt;!-- The numeric format of image samples --&gt;
&lt;!ATTLIST "SampleFormat" "value" ("SignedIntegral" | &lt;!ATTLIST "SampleFormat" "value" ("SignedIntegral" |
"UnsignedIntegral" | "Real" | "Index") #REQUIRED&gt; "UnsignedIntegral" | "Real" | "Index") #REQUIRED&gt;
&lt;!ELEMENT "BitsPerSample" EMPTY&gt; &lt;!ELEMENT "BitsPerSample" EMPTY&gt;
&lt;!-- The number of bits per sample --&gt; &lt;!-- The number of bits per sample --&gt;
&lt;!ATTLIST "BitsPerSample" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "BitsPerSample" "value" #CDATA #REQUIRED&gt;
&lt;!-- A list of integers, one per channel --&gt; &lt;!-- A list of integers, one per channel --&gt;
&lt;!-- Data type: List of Integer --&gt; &lt;!-- Data type: List of Integer --&gt;
&lt;!-- Min length: 1 --&gt; &lt;!-- Min length: 1 --&gt;
&lt;!ELEMENT "SignificantBitsPerSample" EMPTY&gt; &lt;!ELEMENT "SignificantBitsPerSample" EMPTY&gt;
&lt;!-- The number of significant bits per sample --&gt; &lt;!-- The number of significant bits per sample --&gt;
&lt;!ATTLIST "SignificantBitsPerSample" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "SignificantBitsPerSample" "value" #CDATA #REQUIRED&gt;
&lt;!-- A list of integers, one per channel --&gt; &lt;!-- A list of integers, one per channel --&gt;
&lt;!-- Data type: List of Integer --&gt; &lt;!-- Data type: List of Integer --&gt;
&lt;!-- Min length: 1 --&gt; &lt;!-- Min length: 1 --&gt;
&lt;!ELEMENT "SampleMSB" EMPTY&gt; &lt;!ELEMENT "SampleMSB" EMPTY&gt;
&lt;!-- The position of the most significant bit of each sample --&gt; &lt;!-- The position of the most significant bit of each sample --&gt;
&lt;!ATTLIST "SampleMSB" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "SampleMSB" "value" #CDATA #REQUIRED&gt;
&lt;!-- A list of integers, one per channel --&gt; &lt;!-- A list of integers, one per channel --&gt;
&lt;!-- Data type: List of Integer --&gt; &lt;!-- Data type: List of Integer --&gt;
&lt;!-- Min length: 1 --&gt; &lt;!-- Min length: 1 --&gt;
&lt;!ELEMENT "Dimension" (PixelAspectRatio?, ImageOrientation?, &lt;!ELEMENT "Dimension" (PixelAspectRatio?, ImageOrientation?,
HorizontalPixelSize?, VerticalPixelSize?, HorizontalPixelSize?, VerticalPixelSize?,
HorizontalPhysicalPixelSpacing?, VerticalPhysicalPixelSpacing?, HorizontalPhysicalPixelSpacing?, VerticalPhysicalPixelSpacing?,
HorizontalPosition?, VerticalPosition?, HorizontalPixelOffset?, HorizontalPosition?, VerticalPosition?, HorizontalPixelOffset?,
VerticalPixelOffset?, HorizontalScreenSize?, VerticalScreenSize?)&gt; VerticalPixelOffset?, HorizontalScreenSize?, VerticalScreenSize?)&gt;
&lt;!-- Dimension information --&gt; &lt;!-- Dimension information --&gt;
&lt;!ELEMENT "PixelAspectRatio" EMPTY&gt; &lt;!ELEMENT "PixelAspectRatio" EMPTY&gt;
&lt;!-- The width of a pixel divided by its height --&gt; &lt;!-- The width of a pixel divided by its height --&gt;
&lt;!ATTLIST "PixelAspectRatio" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "PixelAspectRatio" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: Float --&gt; &lt;!-- Data type: Float --&gt;
&lt;!ELEMENT "ImageOrientation" EMPTY&gt; &lt;!ELEMENT "ImageOrientation" EMPTY&gt;
&lt;!-- The desired orientation of the image in terms of flips and &lt;!-- The desired orientation of the image in terms of flips and
counter-clockwise rotations --&gt; counter-clockwise rotations --&gt;
&lt;!ATTLIST "ImageOrientation" "value" ("Normal" | "Rotate90" | &lt;!ATTLIST "ImageOrientation" "value" ("Normal" | "Rotate90" |
"Rotate180" | "Rotate270" | "FlipH" | "FlipV" | "Rotate180" | "Rotate270" | "FlipH" | "FlipV" |
"FlipHRotate90" | "FlipVRotate90") #REQUIRED&gt; "FlipHRotate90" | "FlipVRotate90") #REQUIRED&gt;
&lt;!ELEMENT "HorizontalPixelSize" EMPTY&gt; &lt;!ELEMENT "HorizontalPixelSize" EMPTY&gt;
&lt;!-- The width of a pixel, in millimeters, as it should be rendered &lt;!-- The width of a pixel, in millimeters, as it should be rendered
on media --&gt; on media --&gt;
&lt;!ATTLIST "HorizontalPixelSize" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "HorizontalPixelSize" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: Float --&gt; &lt;!-- Data type: Float --&gt;
&lt;!ELEMENT "VerticalPixelSize" EMPTY&gt; &lt;!ELEMENT "VerticalPixelSize" EMPTY&gt;
&lt;!-- The height of a pixel, in millimeters, as it should be &lt;!-- The height of a pixel, in millimeters, as it should be
rendered on media --&gt; rendered on media --&gt;
&lt;!ATTLIST "VerticalPixelSize" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "VerticalPixelSize" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: Float --&gt; &lt;!-- Data type: Float --&gt;
&lt;!ELEMENT "HorizontalPhysicalPixelSpacing" EMPTY&gt; &lt;!ELEMENT "HorizontalPhysicalPixelSpacing" EMPTY&gt;
&lt;!-- The horizontal distance in the subject of the image, in &lt;!-- The horizontal distance in the subject of the image, in
millimeters, represented by one pixel at the center of the millimeters, represented by one pixel at the center of the
image --&gt; image --&gt;
&lt;!ATTLIST "HorizontalPhysicalPixelSpacing" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "HorizontalPhysicalPixelSpacing" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: Float --&gt; &lt;!-- Data type: Float --&gt;
&lt;!ELEMENT "VerticalPhysicalPixelSpacing" EMPTY&gt; &lt;!ELEMENT "VerticalPhysicalPixelSpacing" EMPTY&gt;
&lt;!-- The vertical distance in the subject of the image, in &lt;!-- The vertical distance in the subject of the image, in
millimeters, represented by one pixel at the center of the millimeters, represented by one pixel at the center of the
image --&gt; image --&gt;
&lt;!ATTLIST "VerticalPhysicalPixelSpacing" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "VerticalPhysicalPixelSpacing" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: Float --&gt; &lt;!-- Data type: Float --&gt;
&lt;!ELEMENT "HorizontalPosition" EMPTY&gt; &lt;!ELEMENT "HorizontalPosition" EMPTY&gt;
&lt;!-- The horizontal position, in millimeters, where the image &lt;!-- The horizontal position, in millimeters, where the image
should be rendered on media --&gt; should be rendered on media --&gt;
&lt;!ATTLIST "HorizontalPosition" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "HorizontalPosition" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: Float --&gt; &lt;!-- Data type: Float --&gt;
&lt;!ELEMENT "VerticalPosition" EMPTY&gt; &lt;!ELEMENT "VerticalPosition" EMPTY&gt;
&lt;!-- The vertical position, in millimeters, where the image should &lt;!-- The vertical position, in millimeters, where the image should
be rendered on media --&gt; be rendered on media --&gt;
&lt;!ATTLIST "VerticalPosition" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "VerticalPosition" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: Float --&gt; &lt;!-- Data type: Float --&gt;
&lt;!ELEMENT "HorizontalPixelOffset" EMPTY&gt; &lt;!ELEMENT "HorizontalPixelOffset" EMPTY&gt;
&lt;!-- The horizontal position, in pixels, where the image should be &lt;!-- The horizontal position, in pixels, where the image should be
rendered onto a raster display --&gt; rendered onto a raster display --&gt;
&lt;!ATTLIST "HorizontalPixelOffset" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "HorizontalPixelOffset" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ELEMENT "VerticalPixelOffset" EMPTY&gt; &lt;!ELEMENT "VerticalPixelOffset" EMPTY&gt;
&lt;!-- The vertical position, in pixels, where the image should be &lt;!-- The vertical position, in pixels, where the image should be
rendered onto a raster display --&gt; rendered onto a raster display --&gt;
&lt;!ATTLIST "VerticalPixelOffset" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "VerticalPixelOffset" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ELEMENT "HorizontalScreenSize" EMPTY&gt; &lt;!ELEMENT "HorizontalScreenSize" EMPTY&gt;
&lt;!-- The width, in pixels, of the raster display into which the &lt;!-- The width, in pixels, of the raster display into which the
image should be rendered --&gt; image should be rendered --&gt;
&lt;!ATTLIST "HorizontalScreenSize" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "HorizontalScreenSize" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ELEMENT "VerticalScreenSize" EMPTY&gt; &lt;!ELEMENT "VerticalScreenSize" EMPTY&gt;
&lt;!-- The height, in pixels, of the raster display into which the &lt;!-- The height, in pixels, of the raster display into which the
image should be rendered --&gt; image should be rendered --&gt;
&lt;!ATTLIST "VerticalScreenSize" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "VerticalScreenSize" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ELEMENT "Document" (FormatVersion?, SubimageInterpretation?, &lt;!ELEMENT "Document" (FormatVersion?, SubimageInterpretation?,
ImageCreationTime?, ImageModificationTime?)&gt; ImageCreationTime?, ImageModificationTime?)&gt;
&lt;!-- Document information --&gt; &lt;!-- Document information --&gt;
&lt;!ELEMENT "FormatVersion" EMPTY&gt; &lt;!ELEMENT "FormatVersion" EMPTY&gt;
&lt;!-- The version of the format used by the stream --&gt; &lt;!-- The version of the format used by the stream --&gt;
&lt;!ATTLIST "FormatVersion" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "FormatVersion" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ELEMENT "SubimageInterpretation" EMPTY&gt; &lt;!ELEMENT "SubimageInterpretation" EMPTY&gt;
&lt;!-- The interpretation of this image in relation to the other &lt;!-- The interpretation of this image in relation to the other
images stored in the same stream --&gt; images stored in the same stream --&gt;
&lt;!ATTLIST "SubimageInterpretation" "value" ("Standalone" | &lt;!ATTLIST "SubimageInterpretation" "value" ("Standalone" |
"SinglePage" | "FullResolution" | "ReducedResolution" | "SinglePage" | "FullResolution" | "ReducedResolution" |
"PyramidLayer" | "Preview" | "VolumeSlice" | "ObjectView" | "PyramidLayer" | "Preview" | "VolumeSlice" | "ObjectView" |
"Panorama" | "AnimationFrame" | "TransparencyMask" | "Panorama" | "AnimationFrame" | "TransparencyMask" |
"CompositingLayer" | "SpectralSlice" | "Unknown") #REQUIRED&gt; "CompositingLayer" | "SpectralSlice" | "Unknown") #REQUIRED&gt;
&lt;!ELEMENT "ImageCreationTime" EMPTY&gt; &lt;!ELEMENT "ImageCreationTime" EMPTY&gt;
&lt;!-- The time of image creation --&gt; &lt;!-- The time of image creation --&gt;
&lt;!ATTLIST "ImageCreationTime" "year" #CDATA #REQUIRED&gt; &lt;!ATTLIST "ImageCreationTime" "year" #CDATA #REQUIRED&gt;
&lt;!-- The full year (e.g., 1967, not 67) --&gt; &lt;!-- The full year (e.g., 1967, not 67) --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ATTLIST "ImageCreationTime" "month" #CDATA #REQUIRED&gt; &lt;!ATTLIST "ImageCreationTime" "month" #CDATA #REQUIRED&gt;
&lt;!-- The month, with January = 1 --&gt; &lt;!-- The month, with January = 1 --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!-- Min value: 1 (inclusive) --&gt; &lt;!-- Min value: 1 (inclusive) --&gt;
&lt;!-- Max value: 12 (inclusive) --&gt; &lt;!-- Max value: 12 (inclusive) --&gt;
&lt;!ATTLIST "ImageCreationTime" "day" #CDATA #REQUIRED&gt; &lt;!ATTLIST "ImageCreationTime" "day" #CDATA #REQUIRED&gt;
&lt;!-- The day of the month --&gt; &lt;!-- The day of the month --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!-- Min value: 1 (inclusive) --&gt; &lt;!-- Min value: 1 (inclusive) --&gt;
&lt;!-- Max value: 31 (inclusive) --&gt; &lt;!-- Max value: 31 (inclusive) --&gt;
&lt;!ATTLIST "ImageCreationTime" "hour" #CDATA "0"&gt; &lt;!ATTLIST "ImageCreationTime" "hour" #CDATA "0"&gt;
&lt;!-- The hour from 0 to 23 --&gt; &lt;!-- The hour from 0 to 23 --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!-- Min value: 0 (inclusive) --&gt; &lt;!-- Min value: 0 (inclusive) --&gt;
&lt;!-- Max value: 23 (inclusive) --&gt; &lt;!-- Max value: 23 (inclusive) --&gt;
&lt;!ATTLIST "ImageCreationTime" "minute" #CDATA "0"&gt; &lt;!ATTLIST "ImageCreationTime" "minute" #CDATA "0"&gt;
&lt;!-- The minute from 0 to 59 --&gt; &lt;!-- The minute from 0 to 59 --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!-- Min value: 0 (inclusive) --&gt; &lt;!-- Min value: 0 (inclusive) --&gt;
&lt;!-- Max value: 59 (inclusive) --&gt; &lt;!-- Max value: 59 (inclusive) --&gt;
&lt;!ATTLIST "ImageCreationTime" "second" #CDATA "0"&gt; &lt;!ATTLIST "ImageCreationTime" "second" #CDATA "0"&gt;
&lt;!-- The second from 0 to 60 (60 = leap second) --&gt; &lt;!-- The second from 0 to 60 (60 = leap second) --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!-- Min value: 0 (inclusive) --&gt; &lt;!-- Min value: 0 (inclusive) --&gt;
&lt;!-- Max value: 60 (inclusive) --&gt; &lt;!-- Max value: 60 (inclusive) --&gt;
&lt;!ELEMENT "ImageModificationTime" EMPTY&gt; &lt;!ELEMENT "ImageModificationTime" EMPTY&gt;
&lt;!-- The time of the last image modification --&gt; &lt;!-- The time of the last image modification --&gt;
&lt;!ATTLIST "ImageModificationTime" "year" #CDATA #REQUIRED&gt; &lt;!ATTLIST "ImageModificationTime" "year" #CDATA #REQUIRED&gt;
&lt;!-- The full year (e.g., 1967, not 67) --&gt; &lt;!-- The full year (e.g., 1967, not 67) --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ATTLIST "ImageModificationTime" "month" #CDATA #REQUIRED&gt; &lt;!ATTLIST "ImageModificationTime" "month" #CDATA #REQUIRED&gt;
&lt;!-- The month, with January = 1 --&gt; &lt;!-- The month, with January = 1 --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!-- Min value: 1 (inclusive) --&gt; &lt;!-- Min value: 1 (inclusive) --&gt;
&lt;!-- Max value: 12 (inclusive) --&gt; &lt;!-- Max value: 12 (inclusive) --&gt;
&lt;!ATTLIST "ImageModificationTime" "day" #CDATA #REQUIRED&gt; &lt;!ATTLIST "ImageModificationTime" "day" #CDATA #REQUIRED&gt;
&lt;!-- The day of the month --&gt; &lt;!-- The day of the month --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!-- Min value: 1 (inclusive) --&gt; &lt;!-- Min value: 1 (inclusive) --&gt;
&lt;!-- Max value: 31 (inclusive) --&gt; &lt;!-- Max value: 31 (inclusive) --&gt;
&lt;!ATTLIST "ImageModificationTime" "hour" #CDATA "0"&gt; &lt;!ATTLIST "ImageModificationTime" "hour" #CDATA "0"&gt;
&lt;!-- The hour from 0 to 23 --&gt; &lt;!-- The hour from 0 to 23 --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!-- Min value: 0 (inclusive) --&gt; &lt;!-- Min value: 0 (inclusive) --&gt;
&lt;!-- Max value: 23 (inclusive) --&gt; &lt;!-- Max value: 23 (inclusive) --&gt;
&lt;!ATTLIST "ImageModificationTime" "minute" #CDATA "0"&gt; &lt;!ATTLIST "ImageModificationTime" "minute" #CDATA "0"&gt;
&lt;!-- The minute from 0 to 59 --&gt; &lt;!-- The minute from 0 to 59 --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!-- Min value: 0 (inclusive) --&gt; &lt;!-- Min value: 0 (inclusive) --&gt;
&lt;!-- Max value: 59 (inclusive) --&gt; &lt;!-- Max value: 59 (inclusive) --&gt;
&lt;!ATTLIST "ImageModificationTime" "second" #CDATA "0"&gt; &lt;!ATTLIST "ImageModificationTime" "second" #CDATA "0"&gt;
&lt;!-- The second from 0 to 60 (60 = leap second) --&gt; &lt;!-- The second from 0 to 60 (60 = leap second) --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!-- Min value: 0 (inclusive) --&gt; &lt;!-- Min value: 0 (inclusive) --&gt;
&lt;!-- Max value: 60 (inclusive) --&gt; &lt;!-- Max value: 60 (inclusive) --&gt;
&lt;!ELEMENT "Text" (TextEntry)*&gt; &lt;!ELEMENT "Text" (TextEntry)*&gt;
&lt;!-- Text information --&gt; &lt;!-- Text information --&gt;
&lt;!ELEMENT "TextEntry" EMPTY&gt; &lt;!ELEMENT "TextEntry" EMPTY&gt;
&lt;!-- A text entry --&gt; &lt;!-- A text entry --&gt;
&lt;!ATTLIST "TextEntry" "keyword" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TextEntry" "keyword" #CDATA #IMPLIED&gt;
&lt;!-- A keyword associated with the text entry --&gt; &lt;!-- A keyword associated with the text entry --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ATTLIST "TextEntry" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "TextEntry" "value" #CDATA #REQUIRED&gt;
&lt;!-- the text entry --&gt; &lt;!-- the text entry --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ATTLIST "TextEntry" "language" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TextEntry" "language" #CDATA #IMPLIED&gt;
&lt;!-- The language of the text --&gt; &lt;!-- The language of the text --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ATTLIST "TextEntry" "encoding" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TextEntry" "encoding" #CDATA #IMPLIED&gt;
&lt;!-- The encoding of the text --&gt; &lt;!-- The encoding of the text --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ATTLIST "TextEntry" "compression" ("none" | "lzw" | "zip" | &lt;!ATTLIST "TextEntry" "compression" ("none" | "lzw" | "zip" |
"bzip" | "other") "none"&gt; "bzip" | "other") "none"&gt;
&lt;!-- The method used to compress the text --&gt; &lt;!-- The method used to compress the text --&gt;
&lt;!ELEMENT "Transparency" (Alpha?, TransparentIndex?, &lt;!ELEMENT "Transparency" (Alpha?, TransparentIndex?,
TransparentColor?, TileTransparencies?, TileOpacities?)&gt; TransparentColor?, TileTransparencies?, TileOpacities?)&gt;
&lt;!-- Transparency information --&gt; &lt;!-- Transparency information --&gt;
&lt;!ELEMENT "Alpha" EMPTY&gt; &lt;!ELEMENT "Alpha" EMPTY&gt;
&lt;!-- The type of alpha information contained in the image --&gt; &lt;!-- The type of alpha information contained in the image --&gt;
&lt;!ATTLIST "Alpha" "value" ("none" | "premultiplied" | &lt;!ATTLIST "Alpha" "value" ("none" | "premultiplied" |
"nonpremultiplied") "none"&gt; "nonpremultiplied") "none"&gt;
&lt;!ELEMENT "TransparentIndex" EMPTY&gt; &lt;!ELEMENT "TransparentIndex" EMPTY&gt;
&lt;!-- A palette index to be treated as transparent --&gt; &lt;!-- A palette index to be treated as transparent --&gt;
&lt;!ATTLIST "TransparentIndex" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "TransparentIndex" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ELEMENT "TransparentColor" EMPTY&gt; &lt;!ELEMENT "TransparentColor" EMPTY&gt;
&lt;!-- An RGB color to be treated as transparent --&gt; &lt;!-- An RGB color to be treated as transparent --&gt;
&lt;!ATTLIST "TransparentColor" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "TransparentColor" "value" #CDATA #REQUIRED&gt;
&lt;!-- Data type: List of Integer --&gt; &lt;!-- Data type: List of Integer --&gt;
&lt;!ELEMENT "TileTransparencies" (TransparentTile)*&gt; &lt;!ELEMENT "TileTransparencies" (TransparentTile)*&gt;
&lt;!-- A list of completely transparent tiles --&gt; &lt;!-- A list of completely transparent tiles --&gt;
&lt;!ELEMENT "TransparentTile" EMPTY&gt; &lt;!ELEMENT "TransparentTile" EMPTY&gt;
&lt;!-- The index of a completely transparent tile --&gt; &lt;!-- The index of a completely transparent tile --&gt;
&lt;!ATTLIST "TransparentTile" "x" #CDATA #REQUIRED&gt; &lt;!ATTLIST "TransparentTile" "x" #CDATA #REQUIRED&gt;
&lt;!-- The tile's X index --&gt; &lt;!-- The tile's X index --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ATTLIST "TransparentTile" "y" #CDATA #REQUIRED&gt; &lt;!ATTLIST "TransparentTile" "y" #CDATA #REQUIRED&gt;
&lt;!-- The tile's Y index --&gt; &lt;!-- The tile's Y index --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ELEMENT "TileOpacities" (OpaqueTile)*&gt; &lt;!ELEMENT "TileOpacities" (OpaqueTile)*&gt;
&lt;!-- A list of completely opaque tiles --&gt; &lt;!-- A list of completely opaque tiles --&gt;
&lt;!ELEMENT "OpaqueTile" EMPTY&gt; &lt;!ELEMENT "OpaqueTile" EMPTY&gt;
&lt;!-- The index of a completely opaque tile --&gt; &lt;!-- The index of a completely opaque tile --&gt;
&lt;!ATTLIST "OpaqueTile" "x" #CDATA #REQUIRED&gt; &lt;!ATTLIST "OpaqueTile" "x" #CDATA #REQUIRED&gt;
&lt;!-- The tile's X index --&gt; &lt;!-- The tile's X index --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ATTLIST "OpaqueTile" "y" #CDATA #REQUIRED&gt; &lt;!ATTLIST "OpaqueTile" "y" #CDATA #REQUIRED&gt;
&lt;!-- The tile's Y index --&gt; &lt;!-- The tile's Y index --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
]&gt; ]&gt;
</pre> </pre>

View File

@ -1,8 +1,11 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!doctype html>
<html> <html lang="en">
<head> <head>
<meta charset="utf-8"/>
<title>TIFF Metadata Format Specification and Usage Notes</title>
</head>
<!-- <!--
Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -26,66 +29,47 @@ or visit www.oracle.com if you need additional information or have any
questions. questions.
--> -->
<title>TIFF Metadata Format Specification and Usage Notes</title> <body>
</head>
<body bgcolor="white"> <h1>TIFF Metadata Format Specification and Usage Notes</h1>
<center><h1> <a href="#Reading">Reading Images</a>
TIFF Metadata Format Specification and Usage Notes
</h1></center>
<p>
<a href="#Reading">Reading Images</a><br/>
<font size="-1">
<ul> <ul>
<li><a href="#ColorConversionRead">Color Conversion</a></li> <li><a href="#ColorConversionRead">Color Conversion</a></li>
<li><a href="#ColorSpacesRead">Color Spaces</a></li> <li><a href="#ColorSpacesRead">Color Spaces</a></li>
<li><a href="#ICCProfilesRead">ICC Profiles</a></li> <li><a href="#ICCProfilesRead">ICC Profiles</a></li>
<li><a href="#MetadataIssuesRead">Metadata Issues</a> <li><a href="#MetadataIssuesRead">Metadata Issues</a>
<font size="-2">
<ul> <ul>
<li><a href="#MapNativeStandard">Native to Standard Metadata Mapping</a></li> <li><a href="#MapNativeStandard">Native to Standard Metadata Mapping</a></li>
</ul> </ul>
</font>
</li> </li>
<li><a href="#ExifRead">Reading Exif Images</a> <li><a href="#ExifRead">Reading Exif Images</a>
<font size="-2">
<ul> <ul>
<li><a href="#ExifReadTIFF">Reading Uncompressed Exif Images</a></li> <li><a href="#ExifReadTIFF">Reading Uncompressed Exif Images</a></li>
<li><a href="#ExifReadJPEG">Reading Compressed Exif Images</a></li> <li><a href="#ExifReadJPEG">Reading Compressed Exif Images</a></li>
</ul> </ul>
</font>
</li> </li>
</ul> </ul>
</font>
<a href="#Writing">Writing Images</a><br/> <a href="#Writing">Writing Images</a><br/>
<font size="-1">
<ul> <ul>
<li><a href="#Compression">Compression</a></li> <li><a href="#Compression">Compression</a></li>
<li><a href="#ColorConversionWrite">Color Conversion</a></li> <li><a href="#ColorConversionWrite">Color Conversion</a></li>
<li><a href="#ICCProfilesWrite">ICC Profiles</a></li> <li><a href="#ICCProfilesWrite">ICC Profiles</a></li>
<li><a href="#MetadataIssuesWrite">Metadata Issues</a></li> <li><a href="#MetadataIssuesWrite">Metadata Issues</a>
<font size="-2">
<ul> <ul>
<li><a href="#MapStandardNative">Standard to Native Metadata Mapping</a></li> <li><a href="#MapStandardNative">Standard to Native Metadata Mapping</a></li>
</ul> </ul>
</font>
<li><a href="#ExifWrite">Writing Exif Images</a> <li><a href="#ExifWrite">Writing Exif Images</a>
<font size="-2">
<ul> <ul>
<li><a href="#ExifWriteTIFF">Writing Uncompressed Exif Images</a></li> <li><a href="#ExifWriteTIFF">Writing Uncompressed Exif Images</a></li>
<li><a href="#ExifWriteJPEG">Writing Compressed Exif Images</a></li> <li><a href="#ExifWriteJPEG">Writing Compressed Exif Images</a></li>
</ul> </ul>
</font>
</li> </li>
</ul> </ul>
</font>
<a href="#StreamMetadata">Native Stream Metadata Format</a><br/> <a href="#StreamMetadata">Native Stream Metadata Format</a><br/>
<a href="#ImageMetadata">Native Image Metadata Format</a> <a href="#ImageMetadata">Native Image Metadata Format</a>
</p>
<h3><a name="Reading"/>Reading Images</h3> <h3><a id="Reading">Reading Images</a></h3>
TIFF images are read by an <a href="../../ImageReader.html">ImageReader</a> TIFF images are read by an <a href="../../ImageReader.html">ImageReader</a>
which may be controlled by its public interface as well as via a supplied which may be controlled by its public interface as well as via a supplied
@ -95,14 +79,14 @@ which may be controlled by its public interface as well as via a supplied
<!-- Table? --> <!-- Table? -->
<h4><a name="ColorConversionRead"/>Color Conversion</h4> <h4><a id="ColorConversionRead">Color Conversion</a></h4>
<p>If the source image data <p>If the source image data
have photometric type CIE L*a*b* or YCbCr, and the destination color space have photometric type CIE L*a*b* or YCbCr, and the destination color space
type is RGB, then the source image data will be automatically converted to type is RGB, then the source image data will be automatically converted to
RGB using an internal color converter.</p> RGB using an internal color converter.</p>
<h4><a name="ColorSpacesRead"/>Color Spaces</h4> <h4><a id="ColorSpacesRead">Color Spaces</a></h4>
The raw color space assigned by default, i.e., in the absence of a The raw color space assigned by default, i.e., in the absence of a
user-supplied <a href="../../ImageTypeSpecifier.html">ImageTypeSpecifier</a>, user-supplied <a href="../../ImageTypeSpecifier.html">ImageTypeSpecifier</a>,
@ -112,7 +96,7 @@ will be the first among the following which applies:
<li>A color space created from the <a href="#ICCProfilesRead">ICC Profile</a> <li>A color space created from the <a href="#ICCProfilesRead">ICC Profile</a>
metadata field if it is present and compatible with the image data metadata field if it is present and compatible with the image data
layout.</li> layout.</li>
<a name="nonICCProfile"><li>sRGB if the image is monochrome/bilevel <li><a id="nonICCProfile"></a>sRGB if the image is monochrome/bilevel
(a two-level color map is created internally).</li> (a two-level color map is created internally).</li>
<li>sRGB if the image is palette-color.</li> <li>sRGB if the image is palette-color.</li>
<li>Linear RGB if the image has three samples per pixel, has photometric type <li>Linear RGB if the image has three samples per pixel, has photometric type
@ -136,7 +120,7 @@ has more than four samples per pixel regardless of the number of bits per
sample.</li> sample.</li>
</ul> </ul>
<p><a name="DefaultCMYK"/>The normalized color coordinate transformations <p><a id="DefaultCMYK"></a>The normalized color coordinate transformations
used for the default CMYK color space are defined as follows: used for the default CMYK color space are defined as follows:
<ul> <ul>
@ -160,9 +144,8 @@ if(K != 1) {
</pre> </pre>
</li> </li>
</ul> </ul>
</p>
<p><a name="GenericCS"/>The generic color space used when no other color space <p><a id="GenericCS"></a>The generic color space used when no other color space
can be inferred is provided merely to enable the data to be loaded. It is not can be inferred is provided merely to enable the data to be loaded. It is not
intended to provide accurate conversions of any kind.</p> intended to provide accurate conversions of any kind.</p>
@ -171,7 +154,7 @@ foregoing, then an <code>ImageTypeSpecifier</code> should be
supplied to the reader and should be derived from a color space which is correct supplied to the reader and should be derived from a color space which is correct
for the data in question.</p> for the data in question.</p>
<h4><a name="ICCProfilesRead"/>ICC Profiles</h4> <h4><a id="ICCProfilesRead">ICC Profiles</a></h4>
If an ICC profile is contained in the image metadata If an ICC profile is contained in the image metadata
(<a href="../../plugins/tiff/BaselineTIFFTagSet.html"> (<a href="../../plugins/tiff/BaselineTIFFTagSet.html">
@ -203,7 +186,6 @@ and set the <code>ImageTypeSpecifier</code> using
<code>ImageReadParam.setDestinationType</code>.</li> <code>ImageReadParam.setDestinationType</code>.</li>
<li>Pass the parameter object to the appropriate <code>read</code> method.</li> <li>Pass the parameter object to the appropriate <code>read</code> method.</li>
</ol> </ol>
</p>
<p>If the inferred color space not based on the ICC Profile field is compatible <p>If the inferred color space not based on the ICC Profile field is compatible
with the ICC profile-based color space, then a second with the ICC profile-based color space, then a second
@ -214,7 +196,7 @@ space will be included in the
more than one type, the first one will be based on the ICC profile and the more than one type, the first one will be based on the ICC profile and the
second on the inferred color space.</p> second on the inferred color space.</p>
<h4><a name="MetadataIssuesRead"/>Metadata Issues</h4> <h4><a id="MetadataIssuesRead">Metadata Issues</a></h4>
By default all recognized fields in the TIFF image file directory (IFD) are By default all recognized fields in the TIFF image file directory (IFD) are
loaded into the native image metadata object. Which fields are loaded may be loaded into the native image metadata object. Which fields are loaded may be
@ -244,7 +226,7 @@ object may simplify gaining access to metadata values. An instance of
object returned by the TIFF reader using the object returned by the TIFF reader using the
<code>TIFFDirectory.createFromMetadata</code> method.</p> <code>TIFFDirectory.createFromMetadata</code> method.</p>
<h5><a name="MapNativeStandard"/> <h5><a id="MapNativeStandard"></a>
Mapping of TIFF Native Image Metadata to the Standard Metadata Format</h5> Mapping of TIFF Native Image Metadata to the Standard Metadata Format</h5>
The derivation of standard metadata format The derivation of standard metadata format
@ -252,7 +234,6 @@ The derivation of standard metadata format
elements from <a href="#ImageMetadata">TIFF native image metadata</a> is given elements from <a href="#ImageMetadata">TIFF native image metadata</a> is given
in the following table. in the following table.
<p>
<table border="1"> <table border="1">
<tr> <tr>
<th>Standard Metadata Element</th> <th>Standard Metadata Element</th>
@ -261,9 +242,9 @@ in the following table.
<tr> <tr>
<td>/Chroma/ColorSpaceType@name</td> <td>/Chroma/ColorSpaceType@name</td>
<td>PhotometricInterpretation: WhiteIsZero, BlackIsZero, TransparencyMask = <td>PhotometricInterpretation: WhiteIsZero, BlackIsZero, TransparencyMask =
"GRAY"; RGB, PaletteColor => "RGB"; CMYK => "CMYK"; "GRAY"; RGB, PaletteColor =&gt; "RGB"; CMYK =&gt; "CMYK";
YCbCr => "YCbCr"; YCbCr =&gt; "YCbCr";
CIELab, ICCLab => "Lab".</td> CIELab, ICCLab =&gt; "Lab".</td>
</tr> </tr>
<tr> <tr>
<td>/Chroma/NumChannels@value</td> <td>/Chroma/NumChannels@value</td>
@ -271,7 +252,7 @@ CIELab, ICCLab => "Lab".</td>
</tr> </tr>
<tr> <tr>
<td>/Chroma/BlackIsZero@value</td> <td>/Chroma/BlackIsZero@value</td>
<td>"TRUE" <=> PhotometricInterpretation => WhiteIsZero</td> <td>"TRUE" &lt;=&gt; PhotometricInterpretation =&gt; WhiteIsZero</td>
</tr> </tr>
<tr> <tr>
<td>/Chroma/Palette</td> <td>/Chroma/Palette</td>
@ -279,28 +260,28 @@ CIELab, ICCLab => "Lab".</td>
</tr> </tr>
<tr> <tr>
<td>/Compression/CompressionTypeName@value</td> <td>/Compression/CompressionTypeName@value</td>
<td>Compression: Uncompressed => "none"; CCITT 1D => "CCITT <td>Compression: Uncompressed =&gt; "none"; CCITT 1D =&gt; "CCITT
RLE"; RLE";
Group 3 Fax => "CCITT T.4"; Group 4 Fax => "CCITT T.6"; Group 3 Fax =&gt; "CCITT T.4"; Group 4 Fax =&gt; "CCITT T.6";
LZW => "LZW"; LZW =&gt; "LZW";
JPEG => "Old JPEG"; New JPEG => "JPEG"; Zlib =>> "ZLib"; PackBits => JPEG =&gt; "Old JPEG"; New JPEG =&gt; "JPEG"; Zlib =&gt;&gt; "ZLib"; PackBits =&gt;
"PackBits"; "PackBits";
Deflate => "Deflate"; Exif JPEG => "JPEG".</td> Deflate =&gt; "Deflate"; Exif JPEG =&gt; "JPEG".</td>
</tr> </tr>
<tr> <tr>
<td>/Compression/Lossless@value</td> <td>/Compression/Lossless@value</td>
<td>Compression: JPEG or New JPEG => "FALSE"; otherwise "TRUE".</td> <td>Compression: JPEG or New JPEG =&gt; "FALSE"; otherwise "TRUE".</td>
</tr> </tr>
<tr> <tr>
<td>/Data/PlanarConfiguration@value</td> <td>/Data/PlanarConfiguration@value</td>
<td>Chunky => "PixelInterleaved"; Planar => "PlaneInterleaved".</td> <td>Chunky =&gt; "PixelInterleaved"; Planar =&gt; "PlaneInterleaved".</td>
</tr> </tr>
<tr> <tr>
<td>/Data/SampleFormat@value</td> <td>/Data/SampleFormat@value</td>
<td>PhotometricInterpretation PaletteColor => "Index"; <td>PhotometricInterpretation PaletteColor =&gt; "Index";
SampleFormat unsigned integer data => "UnsignedIntegral"; SampleFormat unsigned integer data =&gt; "UnsignedIntegral";
SampleFormat two's complement signed integer data => "SignedIntegral"; SampleFormat two's complement signed integer data =&gt; "SignedIntegral";
SampleFormat IEEE floating point data => "Real"; SampleFormat IEEE floating point data =&gt; "Real";
otherwise element not emitted. otherwise element not emitted.
</td> </td>
</tr> </tr>
@ -310,8 +291,8 @@ otherwise element not emitted.
</tr> </tr>
<tr> <tr>
<td>/Data/SampleMSB@value</td> <td>/Data/SampleMSB@value</td>
<td>FillOrder: left-to-right => space-separated list of BitsPerSample-1; <td>FillOrder: left-to-right =&gt; space-separated list of BitsPerSample-1;
right-to-left => space-separated list of 0s.</td> right-to-left =&gt; space-separated list of 0s.</td>
</tr> </tr>
<tr> <tr>
<td>/Dimension/PixelAspectRatio@value</td> <td>/Dimension/PixelAspectRatio@value</td>
@ -343,9 +324,9 @@ right-to-left => space-separated list of 0s.</td>
</tr> </tr>
<tr> <tr>
<td>/Document/SubimageInterpretation@value</td> <td>/Document/SubimageInterpretation@value</td>
<td>NewSubFileType: transparency => "TransparencyMask"; <td>NewSubFileType: transparency =&gt; "TransparencyMask";
reduced-resolution => "ReducedResolution"; reduced-resolution =&gt; "ReducedResolution";
single page => "SinglePage".</td> single page =&gt; "SinglePage".</td>
</tr> </tr>
<tr> <tr>
<td>/Document/ImageCreationTime@value</td> <td>/Document/ImageCreationTime@value</td>
@ -357,24 +338,23 @@ single page => "SinglePage".</td>
Artist, HostComputer, InkNames, Copyright: Artist, HostComputer, InkNames, Copyright:
/Text/TextEntry@keyword = field name, /Text/TextEntry@keyword = field name,
/Text/TextEntry@value = field value.<br> /Text/TextEntry@value = field value.<br>
Example: TIFF Software field => /Text/TextEntry@keyword = "Software", Example: TIFF Software field =&gt; /Text/TextEntry@keyword = "Software",
/Text/TextEntry@value = Name and version number of the software package(s) /Text/TextEntry@value = Name and version number of the software package(s)
used to create the image.</td> used to create the image.</td>
</tr> </tr>
<tr> <tr>
<td>/Transparency/Alpha@value</td> <td>/Transparency/Alpha@value</td>
<td>ExtraSamples: associated alpha => "premultiplied"; <td>ExtraSamples: associated alpha =&gt; "premultiplied";
unassociated alpha => "nonpremultiplied".</td> unassociated alpha =&gt; "nonpremultiplied".</td>
</tr> </tr>
</table> </table>
</p>
<h4><a name="ExifRead"/>Reading Exif Images</h4> <h4><a id="ExifRead">Reading Exif Images</a></h4>
The TIFF reader may be used to read an uncompressed Exif image or the The TIFF reader may be used to read an uncompressed Exif image or the
contents of the <tt>APP1</tt> marker segment of a compressed Exif image. contents of the <code>APP1</code> marker segment of a compressed Exif image.
<h5><a name="ExifReadTIFF"/>Reading Uncompressed Exif Images</h5> <h5><a id="ExifReadTIFF">Reading Uncompressed Exif Images</a></h5>
An uncompressed Exif image is a one- or two-page uncompressed TIFF image An uncompressed Exif image is a one- or two-page uncompressed TIFF image
with a specific ordering of its IFD and image data content. Each pixel with a specific ordering of its IFD and image data content. Each pixel
@ -406,12 +386,12 @@ Note that the Exif thumbnail is treated as a separate page in the TIFF
stream and not as a thumbnail, i.e., stream and not as a thumbnail, i.e.,
<code>tiffReader.hasThumbnails(0)</code> will return <code>false</code>. <code>tiffReader.hasThumbnails(0)</code> will return <code>false</code>.
<h5><a name="ExifReadJPEG"/>Reading Compressed Exif Images</h5> <h5><a id="ExifReadJPEG">Reading Compressed Exif Images</a></h5>
A compressed Exif image is a 3-band ISO/IEC 10918-1 baseline DCT JPEG stream A compressed Exif image is a 3-band ISO/IEC 10918-1 baseline DCT JPEG stream
with an inserted <tt>APP1</tt> marker segment. The parameters of the marker with an inserted <code>APP1</code> marker segment. The parameters of the marker
segment after the length are the 6-byte sequence segment after the length are the 6-byte sequence
<code>{'E',&nbsp;'x',&nbsp;'i',&nbsp;'f',&nbsp;0x00,&nbsp;0x00}</code></code> <code>{'E',&nbsp;'x',&nbsp;'i',&nbsp;'f',&nbsp;0x00,&nbsp;0x00}</code>
followed by a complete TIFF stream. The embedded TIFF stream contains a primary followed by a complete TIFF stream. The embedded TIFF stream contains a primary
IFD describing the JPEG image optionally followed by a thumbnail IFD and IFD describing the JPEG image optionally followed by a thumbnail IFD and
compressed or uncompressed thumbnail image data. Note that the embedded TIFF compressed or uncompressed thumbnail image data. Note that the embedded TIFF
@ -419,12 +399,12 @@ stream does not contain any image data associated with the primary IFD
nor any descriptive fields which duplicate information found in the JPEG nor any descriptive fields which duplicate information found in the JPEG
stream itself. stream itself.
<p>The parameter content of the <tt>APP1</tt> marker segment may be obtained <p>The parameter content of the <code>APP1</code> marker segment may be obtained
from the user object of the associated <code>Node</code> in a from the user object of the associated <code>Node</code> in a
<tt>javax_imageio_jpeg_image_1.0</tt> native image metadata tree extracted <code>javax_imageio_jpeg_image_1.0</code> native image metadata tree extracted
from the image metadata object returned by the JPEG reader. This APP1 Exif from the image metadata object returned by the JPEG reader. This APP1 Exif
node will be a child of the node named "markerSequence" and will node will be a child of the node named "markerSequence" and will
have name <tt>unknown</tt> and an attribute named <tt>MarkerTag</tt> with have name <code>unknown</code> and an attribute named <code>MarkerTag</code> with
integral value <code>0xE1</code> (<code>String</code> value integral value <code>0xE1</code> (<code>String</code> value
<code>"225"</code>). The user object of this node will be a byte array <code>"225"</code>). The user object of this node will be a byte array
which starts with the six bytes <code>{'E', 'x', 'i', 'f', '0', '0'}</code>. which starts with the six bytes <code>{'E', 'x', 'i', 'f', '0', '0'}</code>.
@ -472,9 +452,8 @@ IFDs in the embedded TIFF stream including those corresponding to empty
images. Calling <code>tiffReader.read(0,&nbsp;readParam)</code> will throw images. Calling <code>tiffReader.read(0,&nbsp;readParam)</code> will throw
an exception as the primary image in the embedded TIFF stream is always an exception as the primary image in the embedded TIFF stream is always
empty; the primary image should be obtained using the JPEG reader itself. empty; the primary image should be obtained using the JPEG reader itself.
</p>
<h3><a name="Writing"/>Writing Images</h3> <h3><a id="Writing">Writing Images</a></h3>
TIFF images are written by a <a href="../../ImageWriter.html">ImageWriter</a> which may be TIFF images are written by a <a href="../../ImageWriter.html">ImageWriter</a> which may be
controlled by its public interface as well as via a supplied controlled by its public interface as well as via a supplied
@ -482,7 +461,7 @@ controlled by its public interface as well as via a supplied
by the <code>getDefaultWriteParam()</code> method of the TIFF <code>ImageWriter</code>, by the <code>getDefaultWriteParam()</code> method of the TIFF <code>ImageWriter</code>,
the <code>canWriteTiles()</code> and <code>canWriteCompressed()</code> methods the <code>canWriteTiles()</code> and <code>canWriteCompressed()</code> methods
will return <code>true</code>; the <code>canOffsetTiles()</code> and will return <code>true</code>; the <code>canOffsetTiles()</code> and
<code>canWriteProgressive()</code> methods will return <code>false</code>.</p> <code>canWriteProgressive()</code> methods will return <code>false</code>.
The TIFF writer supports many optional capabilities including writing tiled The TIFF writer supports many optional capabilities including writing tiled
images, inserting images, writing or inserting empty images, and replacing image images, inserting images, writing or inserting empty images, and replacing image
@ -497,12 +476,12 @@ the JPEG minimum coded unit (MCU) in that dimension. If JPEG-in-TIFF
compression is being used and strips are being written, the number of compression is being used and strips are being written, the number of
rows per strip is rounded to a multiple of 8 times the maximum MCU over rows per strip is rounded to a multiple of 8 times the maximum MCU over
both dimensions.</p> both dimensions.</p>
<!-- <h4>Supported Image Types</h4> --> <!-- <h4>Supported Image Types</h4> -->
<!-- Table? --> <!-- Table? -->
<h4><a name="Compression"/>Compression</h4> <h4><a id="Compression">Compression</a></h4>
The compression type may be set via the <code>setCompressionType()</code> method of The compression type may be set via the <code>setCompressionType()</code> method of
the <code>ImageWriteParam</code> after setting the compression mode to the <code>ImageWriteParam</code> after setting the compression mode to
@ -592,21 +571,21 @@ replacement capability of the TIFF writer.
<p> If ZLib/Deflate or JPEG compression is used, the compression quality <p> If ZLib/Deflate or JPEG compression is used, the compression quality
may be set. For ZLib/Deflate the supplied floating point quality value is may be set. For ZLib/Deflate the supplied floating point quality value is
rescaled to the range <tt>[1,&nbsp;9]</tt> and truncated to an integer rescaled to the range <code>[1,&nbsp;9]</code> and truncated to an integer
to derive the Deflate compression level. For JPEG the floating point to derive the Deflate compression level. For JPEG the floating point
quality value is passed directly to the JPEG writer plug-in which quality value is passed directly to the JPEG writer plug-in which
interprets it in the usual way.</p> interprets it in the usual way.</p>
<h4><a name="ColorConversionWrite"/>Color Conversion</h4> <h4><a id="ColorConversionWrite">Color Conversion</a></h4>
<p>If the source image data <p>If the source image data
color space type is RGB, and the destination photometric type is CIE L*a*b* or color space type is RGB, and the destination photometric type is CIE L*a*b* or
YCbCr, then the source image data will be automatically converted from YCbCr, then the source image data will be automatically converted from
RGB using an internal color converter.</p> RGB using an internal color converter.</p>
<h4><a name="ICCProfilesWrite"/>ICC Profiles</h4> <h4><a id="ICCProfilesWrite">ICC Profiles</a></h4>
An <tt>ICC Profile</tt> field will be written if either: An <code>ICC Profile</code> field will be written if either:
<ul> <ul>
<li>one is present in the native image metadata <li>one is present in the native image metadata
<a href="../IIOMetadata.html">IIOMetadata</a> instance supplied to the writer, <a href="../IIOMetadata.html">IIOMetadata</a> instance supplied to the writer,
@ -614,50 +593,50 @@ or</li>
<li>the <a href="../../../../java/awt/color/ColorSpace.html">ColorSpace</a> <li>the <a href="../../../../java/awt/color/ColorSpace.html">ColorSpace</a>
of the destination <code>ImageTypeSpecifier</code> is an instance of of the destination <code>ImageTypeSpecifier</code> is an instance of
<code>ICC_ColorSpace</code> which is not one of the standard <code>ICC_ColorSpace</code> which is not one of the standard
color spaces defined by the <tt>CS_*</tt> constants in the color spaces defined by the <code>CS_*</code> constants in the
<code>ColorSpace</code> class. The destination type is set via <code>ColorSpace</code> class. The destination type is set via
<code>ImageWriteParam.setDestinationType(ImageTypeSpecifier)</code> and defaults <code>ImageWriteParam.setDestinationType(ImageTypeSpecifier)</code> and defaults
to the <code>ImageTypeSpecifier</code> of the image being written. to the <code>ImageTypeSpecifier</code> of the image being written.
</li> </li>
</ul> </ul>
<h4><a name="MetadataIssuesWrite"/>Metadata Issues</h4> <h4><a id="MetadataIssuesWrite">Metadata Issues</a></h4>
Some behavior of the writer is affected by or may affect the contents of Some behavior of the writer is affected by or may affect the contents of
the image metadata which may be supplied by the user. the image metadata which may be supplied by the user.
<p>For bilevel images, the <tt>FillOrder</tt>, and <tt>T4Options</tt> <p>For bilevel images, the <code>FillOrder</code>, and <code>T4Options</code>
fields affect the output data. The data will be filled right-to-left if fields affect the output data. The data will be filled right-to-left if
<tt>FillOrder</tt> is present with a value of 2 <code>FillOrder</code> is present with a value of 2
(<code>BaselineTIFFTagSet.FILL_ORDER_RIGHT_TO_LEFT</code>) (<code>BaselineTIFFTagSet.FILL_ORDER_RIGHT_TO_LEFT</code>)
and will be filled left-to-right otherwise. The value of <tt>T4Options</tt> and will be filled left-to-right otherwise. The value of <code>T4Options</code>
specifies whether the data should be 1D- or 2D-encoded and whether EOL specifies whether the data should be 1D- or 2D-encoded and whether EOL
padding should be used.</p> padding should be used.</p>
<p>For all images the value of the <tt>RowsPerStrip</tt> field is used <p>For all images the value of the <code>RowsPerStrip</code> field is used
to the set the number of rows per strip if the image is not tiled. The to the set the number of rows per strip if the image is not tiled. The
default number of rows per strip is either 8 or the number of rows which default number of rows per strip is either 8 or the number of rows which
would fill no more than 8 kilobytes, whichever is larger.</p> would fill no more than 8 kilobytes, whichever is larger.</p>
<p>For all images the tile dimensions may be set using the <tt>TileWidth</tt> <p>For all images the tile dimensions may be set using the <code>TileWidth</code>
and <tt>TileLength</tt> field values if the tiling mode is and <code>TileLength</code> field values if the tiling mode is
<code>ImageWriteParam.MODE_COPY_FROM_METADATA</code>. If this mode <code>ImageWriteParam.MODE_COPY_FROM_METADATA</code>. If this mode
is set but the fields are not, their respective default values are the image is set but the fields are not, their respective default values are the image
width and height.</p> width and height.</p>
<p>When using JPEG-in-TIFF compression, a <tt>JPEGTables</tt> field will be <p>When using JPEG-in-TIFF compression, a <code>JPEGTables</code> field will be
written to the IFD and abbreviated JPEG streams to each strip or tile if and written to the IFD and abbreviated JPEG streams to each strip or tile if and
only if a <tt>JPEGTables</tt> field is contained in the metadata object only if a <code>JPEGTables</code> field is contained in the metadata object
provided to the writer. If the contents of the <tt>JPEGTables</tt> field is provided to the writer. If the contents of the <code>JPEGTables</code> field is
a valid tables-only JPEG stream, then it will be used; otherwise the contents a valid tables-only JPEG stream, then it will be used; otherwise the contents
of the field will be replaced with default visually lossless tables. If no of the field will be replaced with default visually lossless tables. If no
such <tt>JPEGTables</tt> field is present in the metadata, then no such <code>JPEGTables</code> field is present in the metadata, then no
<tt>JPEGTables</tt> field will be written to the output and each strip or <code>JPEGTables</code> field will be written to the output and each strip or
tile will be written as a separate, self-contained JPEG stream.</p> tile will be written as a separate, self-contained JPEG stream.</p>
<p>When using Deflate/ZLib or LZW compression, if the image has 8 bits per <p>When using Deflate/ZLib or LZW compression, if the image has 8 bits per
sample, a horizontal differencing predictor will be used if the sample, a horizontal differencing predictor will be used if the
<tt>Predictor</tt> field is present with a value of 2 <code>Predictor</code> field is present with a value of 2
(<code>BaselineTIFFTagSet.PREDICTOR_HORIZONTAL_DIFFERENCING</code>). (<code>BaselineTIFFTagSet.PREDICTOR_HORIZONTAL_DIFFERENCING</code>).
If prediction is so requested but the image does not have If prediction is so requested but the image does not have
8 bits per sample the field will be reset to have the value 1 8 bits per sample the field will be reset to have the value 1
@ -667,30 +646,30 @@ If prediction is so requested but the image does not have
<p>Some fields may be added or modified: <p>Some fields may be added or modified:
<ul> <ul>
<li><tt>PhotometricInterpretation</tt> if not present.</li> <li><code>PhotometricInterpretation</code> if not present.</li>
<li><tt>PlanarConfiguration</tt> if this field is present with value <li><code>PlanarConfiguration</code> if this field is present with value
<tt>Planar</tt> is is reset to <tt>Chunky</tt>.</li> <code>Planar</code> is is reset to <code>Chunky</code>.</li>
<li><tt>Compression</tt> always.</li> <li><code>Compression</code> always.</li>
<li><tt>BitsPerSample</tt> if the image is not bilevel.</li> <li><code>BitsPerSample</code> if the image is not bilevel.</li>
<li><tt>SamplesPerPixel</tt> always.</li> <li><code>SamplesPerPixel</code> always.</li>
<li><tt>ExtraSamples</tt> if an alpha channel is present.</li> <li><code>ExtraSamples</code> if an alpha channel is present.</li>
<li><tt>SampleFormat</tt> if not present and the data are 16- or 32-bit <li><code>SampleFormat</code> if not present and the data are 16- or 32-bit
integers or floating point.</li> integers or floating point.</li>
<li><tt>ColorMap</tt> if the <tt>PhotometricInterpretation</tt> is <li><code>ColorMap</code> if the <code>PhotometricInterpretation</code> is
<tt>RGBPalette</tt>.</li> <code>RGBPalette</code>.</li>
<li><tt>ImageWidth</tt> and <tt>ImageLength</tt> always.</li> <li><code>ImageWidth</code> and <code>ImageLength</code> always.</li>
<li><tt>TileWidth</tt>, <tt>TileLength</tt>, <tt>TileOffsets</tt>, and <li><code>TileWidth</code>, <code>TileLength</code>, <code>TileOffsets</code>, and
<tt>TileByteCounts</tt> if a tiled image is being written.</li> <code>TileByteCounts</code> if a tiled image is being written.</li>
<li><tt>RowsPerStrip</tt>, <tt>StripOffsets</tt>, and <tt>StripByteCounts</tt> <li><code>RowsPerStrip</code>, <code>StripOffsets</code>, and <code>StripByteCounts</code>
if a tiled image is <i>not</i> being written.</li> if a tiled image is <i>not</i> being written.</li>
<li><tt>XResolution</tt>, <tt>YResolution</tt>, and <tt>ResolutionUnit</tt> <li><code>XResolution</code>, <code>YResolution</code>, and <code>ResolutionUnit</code>
if none of these is present.</li> if none of these is present.</li>
<li><tt>YCbCrSubsampling</tt> and <tt>YCbCrPositioning</tt> if the <li><code>YCbCrSubsampling</code> and <code>YCbCrPositioning</code> if the
photometric interpretation is YCbCr and the compression type is not JPEG photometric interpretation is YCbCr and the compression type is not JPEG
(only [1,&nbsp;1] subsampling and cosited positioning are supported for (only [1,&nbsp;1] subsampling and cosited positioning are supported for
non-JPEG YCbCr output).</li> non-JPEG YCbCr output).</li>
<li><tt>YCbCrSubsampling</tt>, <tt>YCbCrPositioning</tt>, and <li><code>YCbCrSubsampling</code>, <code>YCbCrPositioning</code>, and
<tt>ReferenceBlackWhite</tt>: if the compression type is JPEG and the color <code>ReferenceBlackWhite</code>: if the compression type is JPEG and the color
space is RGB these will be reset to [2,&nbsp;2] centered subsampling with no space is RGB these will be reset to [2,&nbsp;2] centered subsampling with no
headroom/footroom (0:255,128:255,128:255).</li> headroom/footroom (0:255,128:255,128:255).</li>
</ul> </ul>
@ -698,24 +677,23 @@ headroom/footroom (0:255,128:255,128:255).</li>
<p>Some fields may be removed: <p>Some fields may be removed:
<ul> <ul>
<li><tt>BitsPerSample</tt> if the image is bilevel.</li> <li><code>BitsPerSample</code> if the image is bilevel.</li>
<li><tt>ExtraSamples</tt> if the image does not have an alpha channel.</li> <li><code>ExtraSamples</code> if the image does not have an alpha channel.</li>
<li><tt>ColorMap</tt> if the photometric interpretation is not <li><code>ColorMap</code> if the photometric interpretation is not
<tt>RGBPalette</tt>.</li> <code>RGBPalette</code>.</li>
<li><tt>TileWidth</tt>, <tt>TileLength</tt>, <tt>TileOffsets</tt>, and <li><code>TileWidth</code>, <code>TileLength</code>, <code>TileOffsets</code>, and
<tt>TileByteCounts</tt> if tiling <i>is not</i> being used.</li> <code>TileByteCounts</code> if tiling <i>is not</i> being used.</li>
<li><tt>RowsPerStrip</tt>, <tt>StripOffsets</tt>, and <tt>StripByteCounts</tt> <li><code>RowsPerStrip</code>, <code>StripOffsets</code>, and <code>StripByteCounts</code>
if tiling <i>is</i> being used.</li> if tiling <i>is</i> being used.</li>
<li><tt>YCbCrSubsampling</tt>, <tt>YCbCrPositioning</tt>, and <li><code>YCbCrSubsampling</code>, <code>YCbCrPositioning</code>, and
<tt>ReferenceBlackWhite</tt> if the compression type is JPEG and the <code>ReferenceBlackWhite</code> if the compression type is JPEG and the
color space is grayscale.</li> color space is grayscale.</li>
<li><tt>JPEGProc</tt>, <tt>JPEGInterchangeFormat</tt>, <li><code>JPEGProc</code>, <code>JPEGInterchangeFormat</code>,
<tt>JPEGInterchangeFormatLength</tt>, <tt>JPEGRestartInterval</tt>, <code>JPEGInterchangeFormatLength</code>, <code>JPEGRestartInterval</code>,
<tt>JPEGLosslessPredictors</tt>, <tt>JPEGPointTransforms</tt>, <code>JPEGLosslessPredictors</code>, <code>JPEGPointTransforms</code>,
<tt>JPEGQTables</tt>, <tt>JPEGDCTables</tt>, and <code>JPEGQTables</code>, <code>JPEGDCTables</code>, and
<tt>JPEGACTables</tt> if the compression type is JPEG.</li> <code>JPEGACTables</code> if the compression type is JPEG.</li>
</ul> </ul>
</p>
<p>Other fields present in the supplied metadata are uninterpreted and will <p>Other fields present in the supplied metadata are uninterpreted and will
be written as supplied.</p> be written as supplied.</p>
@ -735,7 +713,7 @@ field to be written a <code>TIFFField</code> may be added to the
<code>IIOMetadata</code> object so obtained may then be passed to the TIFF <code>IIOMetadata</code> object so obtained may then be passed to the TIFF
writer.</p> writer.</p>
<h5><a name="MapStandardNative"/> <h5><a id="MapStandardNative"></a>
Mapping of the Standard Metadata Format to TIFF Native Image Metadata</h5> Mapping of the Standard Metadata Format to TIFF Native Image Metadata</h5>
The derivation of <a href="#ImageMetadata">TIFF native image metadata</a> The derivation of <a href="#ImageMetadata">TIFF native image metadata</a>
@ -743,7 +721,6 @@ elements from the standard metadata format
<a href="standard_metadata.html">javax_imageio_1.0</a> is <a href="standard_metadata.html">javax_imageio_1.0</a> is
given in the following table. given in the following table.
<p>
<table border="1"> <table border="1">
<tr> <tr>
<th>TIFF Field</th> <th>TIFF Field</th>
@ -754,10 +731,10 @@ given in the following table.
PhotometricInterpretation PhotometricInterpretation
</td> </td>
<td>/Chroma/ColorSpaceType@name: "GRAY" and /Chroma/BlackIsZero@value = "FALSE" <td>/Chroma/ColorSpaceType@name: "GRAY" and /Chroma/BlackIsZero@value = "FALSE"
=> WhiteIsZero; "GRAY" and /Document/SubimageInterpretation@value = =&gt; WhiteIsZero; "GRAY" and /Document/SubimageInterpretation@value =
"TransparencyMask" => TransparencyMask; "RGB" and /Chroma/Palette present => "TransparencyMask" =&gt; TransparencyMask; "RGB" and /Chroma/Palette present =&gt;
PaletteColor; "GRAY" => BlackIsZero; "RGB" => RGB; "YCbCr" => YCbCr; PaletteColor; "GRAY" =&gt; BlackIsZero; "RGB" =&gt; RGB; "YCbCr" =&gt; YCbCr;
"CMYK" => CMYK; "Lab" => CIELab.</td> "CMYK" =&gt; CMYK; "Lab" =&gt; CIELab.</td>
</tr> </tr>
<tr> <tr>
<td>SamplesPerPixel</td> <td>SamplesPerPixel</td>
@ -769,21 +746,21 @@ PaletteColor; "GRAY" => BlackIsZero; "RGB" => RGB; "YCbCr" => YCbCr;
</tr> </tr>
<tr> <tr>
<td>Compression</td> <td>Compression</td>
<td>/Compression/CompressionTypeName@value: "none" => Uncompressed; <td>/Compression/CompressionTypeName@value: "none" =&gt; Uncompressed;
"CCITT RLE" => CCITT 1D; "CCITT T.4" => Group 3 Fax; "CCITT T.6" => Group 4 "CCITT RLE" =&gt; CCITT 1D; "CCITT T.4" =&gt; Group 3 Fax; "CCITT T.6" =&gt; Group 4
Fax; "LZW" => LZW; "Old JPEG" => JPEG; "JPEG" => New JPEG; "ZLib" => ZLib; Fax; "LZW" =&gt; LZW; "Old JPEG" =&gt; JPEG; "JPEG" =&gt; New JPEG; "ZLib" =&gt; ZLib;
"PackBits" => PackBits; "Deflate" => Deflate.</td> "PackBits" =&gt; PackBits; "Deflate" =&gt; Deflate.</td>
</tr> </tr>
<tr> <tr>
<td>PlanarConfiguration</td> <td>PlanarConfiguration</td>
<td>/Data/PlanarConfiguration@value: "PixelInterleaved" => Chunky; <td>/Data/PlanarConfiguration@value: "PixelInterleaved" =&gt; Chunky;
"PlaneInterleaved" => Planar.</td> "PlaneInterleaved" =&gt; Planar.</td>
</tr> </tr>
<tr> <tr>
<td>SampleFormat</td> <td>SampleFormat</td>
<td>/Data/SampleFormat@value: "SignedIntegral" => two's complement signed <td>/Data/SampleFormat@value: "SignedIntegral" =&gt; two's complement signed
integer data; "UnsignedIntegral" => unsigned integer data; "Real" => integer data; "UnsignedIntegral" =&gt; unsigned integer data; "Real" =&gt;
IEEE floating point data; "Index" => unsigned integer data. IEEE floating point data; "Index" =&gt; unsigned integer data.
</td> </td>
</tr> </tr>
<tr> <tr>
@ -792,8 +769,8 @@ IEEE floating point data; "Index" => unsigned integer data.
</tr> </tr>
<tr> <tr>
<td>FillOrder</td> <td>FillOrder</td>
<td>/Data/SampleMSB@value: if all values in space-separated list are 0s => <td>/Data/SampleMSB@value: if all values in space-separated list are 0s =&gt;
right-to-left; otherwise => left-to-right. right-to-left; otherwise =&gt; left-to-right.
</td> </td>
</tr> </tr>
<tr> <tr>
@ -826,9 +803,9 @@ right-to-left; otherwise => left-to-right.
</tr> </tr>
<tr> <tr>
<td>NewSubFileType</td> <td>NewSubFileType</td>
<td>/Document/SubimageInterpretation@value: "TransparencyMask" => <td>/Document/SubimageInterpretation@value: "TransparencyMask" =&gt;
transparency mask; "ReducedResolution" => reduced-resolution; transparency mask; "ReducedResolution" =&gt; reduced-resolution;
"SinglePage" => single page.</td> "SinglePage" =&gt; single page.</td>
</tr> </tr>
<tr> <tr>
<td>DateTime</td> <td>DateTime</td>
@ -843,29 +820,28 @@ TIFF Fields, e.g., "Software", then the field is added with content
</tr> </tr>
<tr> <tr>
<td>ExtraSamples</td> <td>ExtraSamples</td>
<td>/Transparency/Alpha@value: "premultiplied" => associated alpha, count 1; <td>/Transparency/Alpha@value: "premultiplied" =&gt; associated alpha, count 1;
"nonpremultiplied" => unassociated alpha, count 1.</td> "nonpremultiplied" =&gt; unassociated alpha, count 1.</td>
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
<td></td> <td></td>
</tr> </tr>
</table> </table>
</p>
<h4><a name="ExifWrite"/>Writing Exif Images</h4> <h4><a id="ExifWrite">Writing Exif Images</a></h4>
The TIFF writer may be used to write an uncompressed Exif image or the The TIFF writer may be used to write an uncompressed Exif image or the
contents of the <tt>APP1</tt> marker segment of a compressed Exif image. contents of the <code>APP1</code> marker segment of a compressed Exif image.
<h5><a name="ExifWriteTIFF"/>Writing Uncompressed Exif Images</h5> <h5><a id="ExifWriteTIFF">Writing Uncompressed Exif Images</a></h5>
When writing a sequence of images each image is normally recorded as When writing a sequence of images each image is normally recorded as
{IFD,&nbsp;IFD Value,&nbsp;Image Data}. The Exif specification requires {IFD,&nbsp;IFD Value,&nbsp;Image Data}. The Exif specification requires
that an uncompressed Exif image be structured as follows: that an uncompressed Exif image be structured as follows:
<a id="ExifStructure"></a>
<ol> <ol>
<a name="ExifStructure"/>
<li>Image File Header</li> <li>Image File Header</li>
<li>Primary IFD</li> <li>Primary IFD</li>
<li>Primary IFD Value</li> <li>Primary IFD Value</li>
@ -925,9 +901,9 @@ written:
} }
</code></pre> </code></pre>
<h5><a name="ExifWriteJPEG"/>Writing Compressed Exif Images</h5> <h5><a id="ExifWriteJPEG">Writing Compressed Exif Images</a></h5>
The structure of the embedded TIFF stream in the <tt>APP1</tt> segment of a The structure of the embedded TIFF stream in the <code>APP1</code> segment of a
compressed Exif image is identical to the <a href="#ExifStructure"> compressed Exif image is identical to the <a href="#ExifStructure">
uncompressed Exif image structure</a> except that there are no primary uncompressed Exif image structure</a> except that there are no primary
image data, i.e., the primary IFD does not refer to any image data. image data, i.e., the primary IFD does not refer to any image data.
@ -1013,7 +989,7 @@ image data, i.e., the primary IFD does not refer to any image data.
Node tree = jpegImageMetadata.getAsTree(nativeFormat); Node tree = jpegImageMetadata.getAsTree(nativeFormat);
NodeList children = tree.getChildNodes(); NodeList children = tree.getChildNodes();
int numChildren = children.getLength(); int numChildren = children.getLength();
for (int i = 0; i < numChildren; i++) { for (int i = 0; i &lt; numChildren; i++) {
Node child = children.item(i); Node child = children.item(i);
if (child.getNodeName().equals("markerSequence")) { if (child.getNodeName().equals("markerSequence")) {
child.appendChild(app1Node); child.appendChild(app1Node);
@ -1032,7 +1008,7 @@ The <code>"unknown"</code> node created above would be appended to the
and written to the JPEG stream when the primary image is written using and written to the JPEG stream when the primary image is written using
the JPEG writer. the JPEG writer.
<h3><a name="StreamMetadata"/>Stream Metadata</h3> <h3><a id="StreamMetadata">Stream Metadata</a></h3>
The DTD for the TIFF native stream metadata format is as follows: The DTD for the TIFF native stream metadata format is as follows:
@ -1042,14 +1018,14 @@ The DTD for the TIFF native stream metadata format is as follows:
&lt;!ELEMENT "javax_imageio_tiff_stream_1.0" (ByteOrder)> &lt;!ELEMENT "javax_imageio_tiff_stream_1.0" (ByteOrder)>
&lt;!ELEMENT "ByteOrder" EMPTY&gt; &lt;!ELEMENT "ByteOrder" EMPTY&gt;
&lt;!-- The stream byte order --&gt; &lt;!-- The stream byte order --&gt;
&lt;!ATTLIST "ByteOrder" "value" #CDATA #REQUIRED&gt; &lt;!ATTLIST "ByteOrder" "value" #CDATA #REQUIRED&gt;
&lt;!-- One of "BIG_ENDIAN" or "LITTLE_ENDIAN" --&gt; &lt;!-- One of "BIG_ENDIAN" or "LITTLE_ENDIAN" --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
]&gt; ]&gt;
</pre> </pre>
<h3><a name="ImageMetadata"/>Image Metadata</h3> <h3><a id="ImageMetadata">Image Metadata</a></h3>
The DTD for the TIFF native image metadata format is as follows: The DTD for the TIFF native image metadata format is as follows:
@ -1059,140 +1035,140 @@ The DTD for the TIFF native image metadata format is as follows:
&lt;!ELEMENT "javax_imageio_tiff_image_1.0" (TIFFIFD)*&gt; &lt;!ELEMENT "javax_imageio_tiff_image_1.0" (TIFFIFD)*&gt;
&lt;!ELEMENT "TIFFIFD" (TIFFField | TIFFIFD)*&gt; &lt;!ELEMENT "TIFFIFD" (TIFFField | TIFFIFD)*&gt;
&lt;!-- An IFD (directory) containing fields --&gt; &lt;!-- An IFD (directory) containing fields --&gt;
&lt;!ATTLIST "TIFFIFD" "tagSets" #CDATA #REQUIRED&gt; &lt;!ATTLIST "TIFFIFD" "tagSets" #CDATA #REQUIRED&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ATTLIST "TIFFIFD" "parentTagNumber" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TIFFIFD" "parentTagNumber" #CDATA #IMPLIED&gt;
&lt;!-- The tag number of the field pointing to this IFD --&gt; &lt;!-- The tag number of the field pointing to this IFD --&gt;
&lt;!-- Data type: Integer --&gt; &lt;!-- Data type: Integer --&gt;
&lt;!ATTLIST "TIFFIFD" "parentTagName" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TIFFIFD" "parentTagName" #CDATA #IMPLIED&gt;
&lt;!-- A mnemonic name for the field pointing to this IFD, if known &lt;!-- A mnemonic name for the field pointing to this IFD, if known
--&gt; --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ELEMENT "TIFFField" (TIFFBytes | TIFFAsciis | &lt;!ELEMENT "TIFFField" (TIFFBytes | TIFFAsciis |
TIFFShorts | TIFFSShorts | TIFFLongs | TIFFSLongs | TIFFShorts | TIFFSShorts | TIFFLongs | TIFFSLongs |
TIFFRationals | TIFFSRationals | TIFFRationals | TIFFSRationals |
TIFFFloats | TIFFDoubles | TIFFUndefined)&gt; TIFFFloats | TIFFDoubles | TIFFUndefined)&gt;
&lt;!-- A field containing data --&gt; &lt;!-- A field containing data --&gt;
&lt;!ATTLIST "TIFFField" "number" #CDATA #REQUIRED&gt; &lt;!ATTLIST "TIFFField" "number" #CDATA #REQUIRED&gt;
&lt;!-- The tag number asociated with the field --&gt; &lt;!-- The tag number asociated with the field --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ATTLIST "TIFFField" "name" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TIFFField" "name" #CDATA #IMPLIED&gt;
&lt;!-- A mnemonic name associated with the field, if known --&gt; &lt;!-- A mnemonic name associated with the field, if known --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ELEMENT "TIFFBytes" (TIFFByte)*&gt; &lt;!ELEMENT "TIFFBytes" (TIFFByte)*&gt;
&lt;!-- A sequence of TIFFByte nodes --&gt; &lt;!-- A sequence of TIFFByte nodes --&gt;
&lt;!ELEMENT "TIFFByte" EMPTY&gt; &lt;!ELEMENT "TIFFByte" EMPTY&gt;
&lt;!-- An integral value between 0 and 255 --&gt; &lt;!-- An integral value between 0 and 255 --&gt;
&lt;!ATTLIST "TIFFByte" "value" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TIFFByte" "value" #CDATA #IMPLIED&gt;
&lt;!-- The value --&gt; &lt;!-- The value --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ATTLIST "TIFFByte" "description" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TIFFByte" "description" #CDATA #IMPLIED&gt;
&lt;!-- A description, if available --&gt; &lt;!-- A description, if available --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ELEMENT "TIFFAsciis" (TIFFAscii)*&gt; &lt;!ELEMENT "TIFFAsciis" (TIFFAscii)*&gt;
&lt;!-- A sequence of TIFFAscii nodes --&gt; &lt;!-- A sequence of TIFFAscii nodes --&gt;
&lt;!ELEMENT "TIFFAscii" EMPTY&gt; &lt;!ELEMENT "TIFFAscii" EMPTY&gt;
&lt;!-- A String value --&gt; &lt;!-- A String value --&gt;
&lt;!ATTLIST "TIFFAscii" "value" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TIFFAscii" "value" #CDATA #IMPLIED&gt;
&lt;!-- The value --&gt; &lt;!-- The value --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ELEMENT "TIFFShorts" (TIFFShort)*&gt; &lt;!ELEMENT "TIFFShorts" (TIFFShort)*&gt;
&lt;!-- A sequence of TIFFShort nodes --&gt; &lt;!-- A sequence of TIFFShort nodes --&gt;
&lt;!ELEMENT "TIFFShort" EMPTY&gt; &lt;!ELEMENT "TIFFShort" EMPTY&gt;
&lt;!-- An integral value between 0 and 65535 --&gt; &lt;!-- An integral value between 0 and 65535 --&gt;
&lt;!ATTLIST "TIFFShort" "value" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TIFFShort" "value" #CDATA #IMPLIED&gt;
&lt;!-- The value --&gt; &lt;!-- The value --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ATTLIST "TIFFShort" "description" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TIFFShort" "description" #CDATA #IMPLIED&gt;
&lt;!-- A description, if available --&gt; &lt;!-- A description, if available --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ELEMENT "TIFFSShorts" (TIFFSShort)*&gt; &lt;!ELEMENT "TIFFSShorts" (TIFFSShort)*&gt;
&lt;!-- A sequence of TIFFSShort nodes --&gt; &lt;!-- A sequence of TIFFSShort nodes --&gt;
&lt;!ELEMENT "TIFFSShort" EMPTY&gt; &lt;!ELEMENT "TIFFSShort" EMPTY&gt;
&lt;!-- An integral value between -32768 and 32767 --&gt; &lt;!-- An integral value between -32768 and 32767 --&gt;
&lt;!ATTLIST "TIFFSShort" "value" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TIFFSShort" "value" #CDATA #IMPLIED&gt;
&lt;!-- The value --&gt; &lt;!-- The value --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ATTLIST "TIFFSShort" "description" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TIFFSShort" "description" #CDATA #IMPLIED&gt;
&lt;!-- A description, if available --&gt; &lt;!-- A description, if available --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ELEMENT "TIFFLongs" (TIFFLong)*&gt; &lt;!ELEMENT "TIFFLongs" (TIFFLong)*&gt;
&lt;!-- A sequence of TIFFLong nodes --&gt; &lt;!-- A sequence of TIFFLong nodes --&gt;
&lt;!ELEMENT "TIFFLong" EMPTY&gt; &lt;!ELEMENT "TIFFLong" EMPTY&gt;
&lt;!-- An integral value between 0 and 4294967295 --&gt; &lt;!-- An integral value between 0 and 4294967295 --&gt;
&lt;!ATTLIST "TIFFLong" "value" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TIFFLong" "value" #CDATA #IMPLIED&gt;
&lt;!-- The value --&gt; &lt;!-- The value --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ATTLIST "TIFFLong" "description" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TIFFLong" "description" #CDATA #IMPLIED&gt;
&lt;!-- A description, if available --&gt; &lt;!-- A description, if available --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ELEMENT "TIFFSLongs" (TIFFSLong)*&gt; &lt;!ELEMENT "TIFFSLongs" (TIFFSLong)*&gt;
&lt;!-- A sequence of TIFFSLong nodes --&gt; &lt;!-- A sequence of TIFFSLong nodes --&gt;
&lt;!ELEMENT "TIFFSLong" EMPTY&gt; &lt;!ELEMENT "TIFFSLong" EMPTY&gt;
&lt;!-- An integral value between -2147483648 and 2147482647 --&gt; &lt;!-- An integral value between -2147483648 and 2147482647 --&gt;
&lt;!ATTLIST "TIFFSLong" "value" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TIFFSLong" "value" #CDATA #IMPLIED&gt;
&lt;!-- The value --&gt; &lt;!-- The value --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ATTLIST "TIFFSLong" "description" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TIFFSLong" "description" #CDATA #IMPLIED&gt;
&lt;!-- A description, if available --&gt; &lt;!-- A description, if available --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ELEMENT "TIFFRationals" (TIFFRational)*&gt; &lt;!ELEMENT "TIFFRationals" (TIFFRational)*&gt;
&lt;!-- A sequence of TIFFRational nodes --&gt; &lt;!-- A sequence of TIFFRational nodes --&gt;
&lt;!ELEMENT "TIFFRational" EMPTY&gt; &lt;!ELEMENT "TIFFRational" EMPTY&gt;
&lt;!-- A rational value consisting of an unsigned numerator and &lt;!-- A rational value consisting of an unsigned numerator and
denominator --&gt; denominator --&gt;
&lt;!ATTLIST "TIFFRational" "value" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TIFFRational" "value" #CDATA #IMPLIED&gt;
&lt;!-- The numerator and denominator, separated by a slash --&gt; &lt;!-- The numerator and denominator, separated by a slash --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ELEMENT "TIFFSRationals" (TIFFSRational)*&gt; &lt;!ELEMENT "TIFFSRationals" (TIFFSRational)*&gt;
&lt;!-- A sequence of TIFFSRational nodes --&gt; &lt;!-- A sequence of TIFFSRational nodes --&gt;
&lt;!ELEMENT "TIFFSRational" EMPTY&gt; &lt;!ELEMENT "TIFFSRational" EMPTY&gt;
&lt;!-- A rational value consisting of a signed numerator and &lt;!-- A rational value consisting of a signed numerator and
denominator --&gt; denominator --&gt;
&lt;!ATTLIST "TIFFSRational" "value" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TIFFSRational" "value" #CDATA #IMPLIED&gt;
&lt;!-- The numerator and denominator, separated by a slash --&gt; &lt;!-- The numerator and denominator, separated by a slash --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ELEMENT "TIFFFloats" (TIFFFloat)*&gt; &lt;!ELEMENT "TIFFFloats" (TIFFFloat)*&gt;
&lt;!-- A sequence of TIFFFloat nodes --&gt; &lt;!-- A sequence of TIFFFloat nodes --&gt;
&lt;!ELEMENT "TIFFFloat" EMPTY&gt; &lt;!ELEMENT "TIFFFloat" EMPTY&gt;
&lt;!-- A single-precision floating-point value --&gt; &lt;!-- A single-precision floating-point value --&gt;
&lt;!ATTLIST "TIFFFloat" "value" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TIFFFloat" "value" #CDATA #IMPLIED&gt;
&lt;!-- The value --&gt; &lt;!-- The value --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ELEMENT "TIFFDoubles" (TIFFDouble)*&gt; &lt;!ELEMENT "TIFFDoubles" (TIFFDouble)*&gt;
&lt;!-- A sequence of TIFFDouble nodes --&gt; &lt;!-- A sequence of TIFFDouble nodes --&gt;
&lt;!ELEMENT "TIFFDouble" EMPTY&gt; &lt;!ELEMENT "TIFFDouble" EMPTY&gt;
&lt;!-- A double-precision floating-point value --&gt; &lt;!-- A double-precision floating-point value --&gt;
&lt;!ATTLIST "TIFFDouble" "value" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TIFFDouble" "value" #CDATA #IMPLIED&gt;
&lt;!-- The value --&gt; &lt;!-- The value --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
&lt;!ELEMENT "TIFFUndefined" EMPTY&gt; &lt;!ELEMENT "TIFFUndefined" EMPTY&gt;
&lt;!-- Uninterpreted byte data --&gt; &lt;!-- Uninterpreted byte data --&gt;
&lt;!ATTLIST "TIFFUndefined" "value" #CDATA #IMPLIED&gt; &lt;!ATTLIST "TIFFUndefined" "value" #CDATA #IMPLIED&gt;
&lt;!-- A list of comma-separated byte values --&gt; &lt;!-- A list of comma-separated byte values --&gt;
&lt;!-- Data type: String --&gt; &lt;!-- Data type: String --&gt;
]&gt; ]&gt;
</pre> </pre>

View File

@ -1,8 +1,11 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!doctype html>
<html> <html lang="en">
<head> <head>
<meta charset="utf-8"/>
<title>WBMP Metadata Format Specification</title>
</head>
<!-- <!--
Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -26,13 +29,8 @@ or visit www.oracle.com if you need additional information or have any
questions. questions.
--> -->
<title>WBMP Metadata Format Specification</title>
</head>
<body> <body>
<center><h1> <h1>WBMP Metadata Format Specification</h1>
WBMP Metadata Format Specification
</h1></center>
The XML schema for the native image metadata format is as follows: The XML schema for the native image metadata format is as follows:

View File

@ -113,7 +113,7 @@
* *
* <h2> Standard Plug-in Notes</h2> * <h2> Standard Plug-in Notes</h2>
* *
* <h3><a name="gif_plugin_notes">Standard plug-in for GIF image format</a></h3> * <h3><a id="gif_plugin_notes">Standard plug-in for GIF image format</a></h3>
* ImageIO provides {@code ImageReader} and {@code ImageWriter}plug-ins for the * ImageIO provides {@code ImageReader} and {@code ImageWriter}plug-ins for the
* <a href="http://www.w3.org/Graphics/GIF/spec-gif89a.txt"> Graphics * <a href="http://www.w3.org/Graphics/GIF/spec-gif89a.txt"> Graphics
* Interchange Format (GIF)</a> image format. These are the "standard" GIF * Interchange Format (GIF)</a> image format. These are the "standard" GIF

View File

@ -80,7 +80,7 @@
* attribute category, and the {@code Copies} instance represents the attribute * attribute category, and the {@code Copies} instance represents the attribute
* value. * value.
* *
* <h4><a name="role"></a>Attribute Roles</h4> * <h4><a id="role"></a>Attribute Roles</h4>
* When submitting a print job to a printer, the client provides the attributes * When submitting a print job to a printer, the client provides the attributes
* describing the characteristics of the print data, such as the document name, * describing the characteristics of the print data, such as the document name,
* and how the print data should be printed, such as double-sided, five copies. * and how the print data should be printed, such as double-sided, five copies.

View File

@ -32,7 +32,7 @@
* <em>The Java Tutorial</em>. For other resources, see * <em>The Java Tutorial</em>. For other resources, see
* <a href="#related">Related Documentation</a>. * <a href="#related">Related Documentation</a>.
* *
* <h2><a name="threading">Swing's Threading Policy</a></h2> * <h2><a id="threading">Swing's Threading Policy</a></h2>
* In general Swing is not thread safe. All Swing components and related * In general Swing is not thread safe. All Swing components and related
* classes, unless otherwise documented, must be accessed on the event * classes, unless otherwise documented, must be accessed on the event
* dispatching thread. * dispatching thread.
@ -110,7 +110,7 @@
* href="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html"> * href="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">
* Concurrency in Swing</a>. * Concurrency in Swing</a>.
* *
* <h2><a name="related">Related Documentation</a></h2> * <h2><a id="related">Related Documentation</a></h2>
* For overviews, tutorials, examples, guides, and other documentation, * For overviews, tutorials, examples, guides, and other documentation,
* please see: * please see:
* <ul> * <ul>

View File

@ -1,16 +1,37 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <!doctype html>
<HTML> <html lang="en">
<HEAD> <head>
<TITLE>Using the Multiplexing Look and Feel</TITLE> <meta charset="utf-8"/>
</HEAD> <title>Using the Multiplexing Look and Feel</title>
</head>
<!--
Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
<BODY BGCOLOR="#FFFFFF" TEXT="#000000"> This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation. Oracle designates this
particular file as subject to the "Classpath" exception as provided
by Oracle in the LICENSE file that accompanied this code.
<b> This code is distributed in the hope that it will be useful, but WITHOUT
<font size=+3> ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
Using the Multiplexing Look and Feel FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
</font> version 2 for more details (a copy is included in the LICENSE file that
</b> accompanied this code).
You should have received a copy of the GNU General Public License version
2 along with this work; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
or visit www.oracle.com if you need additional information or have any
questions.
-->
<body>
<h1>Using the Multiplexing Look and Feel</h1>
<blockquote> <blockquote>
<hr> <hr>
@ -18,8 +39,8 @@ Using the Multiplexing Look and Feel
<i> <i>
This document is based on an article This document is based on an article
originally published in originally published in
<a href="http://www.oracle.com/technetwork/java/javase/tech/articles-jsp-139072.html" target="_top"><em>The Swing <a href="http://www.oracle.com/technetwork/java/javase/tech/articles-jsp-139072.html"
Connection</em></a>. target="_top"><em>The Swing Connection</em></a>.
</i> </i>
</p> </p>
<hr> <hr>
@ -31,10 +52,10 @@ you supplement an ordinary look and feel
(called the <em>default</em> look and feel) (called the <em>default</em> look and feel)
with one or more <em>auxiliary</em> look and feels. with one or more <em>auxiliary</em> look and feels.
For example, you could For example, you could
simultaneously provide text-to-speech and Braille outputs, simultaneously provide text-to-speech and Braille outputs,
in addition to the ordinary visual output that a Swing-based in addition to the ordinary visual output that a Swing-based
application generates, application generates,
by adding by adding
two auxiliary look and feels (one for text-to-speech, two auxiliary look and feels (one for text-to-speech,
the other for Braille) the other for Braille)
to the default look and feel. to the default look and feel.
@ -62,169 +83,160 @@ This document has the following sections:
</ul> </ul>
<p> <p>
Before reading further, you should be familiar Before reading further, you should be familiar
with the concept of pluggable look and feels. with the concept of pluggable look and feels.
For basic information, see For basic information, see
<a href="https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html">How to Set the Look and Feel</a>, <a href="https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html">
a section in How to Set the Look and Feel</a>, a section in <em>The Java Tutorial</em>.
<em>The Java Tutorial</em>.
For architectural details, you can read For architectural details, you can read
<a <a
href="http://www.oracle.com/technetwork/java/architecture-142923.html#pluggable">Pluggable look-and-feel architecture</a>, a section within href="http://www.oracle.com/technetwork/java/architecture-142923.html#pluggable">
Pluggable look-and-feel architecture</a>, a section within
a <em>Swing Connection</em> article. a <em>Swing Connection</em> article.
</p> </p>
<p> <p>
<a name="overview"></a> <a id="overview"></a>
<hr width=100% align=LEFT size=2> <hr>
<b> <h2>Overview</h2>
<font color="#000080" size="+2">Overview</font>
</b>
<p> <p>
The classes in the The classes in the
<code>javax.swing.plaf.multi</code> package <code>javax.swing.plaf.multi</code> package
implement a implement a
<i>multiplexing look and feel</i>. <i>multiplexing look and feel</i>.
A multiplexing look and feel transparently creates -- and A multiplexing look and feel transparently creates -- and
simultaneously supports -- UI objects from several different look and feels simultaneously supports -- UI objects from several different look and feels
in response to a component requesting its UI object in response to a component requesting its UI object
(with the <code>getUI</code> method). (with the <code>getUI</code> method).
<p> <p>
Without a multiplexing look and feel, a Without a multiplexing look and feel, a
developer who wanted to enhance a particular look and feel would developer who wanted to enhance a particular look and feel would
need to extend the classes supporting that look and feel. For example, to need to extend the classes supporting that look and feel. For example, to
add text-to-speech support to the Java look and feel without using a multiplexing add text-to-speech support to the Java look and feel without using a multiplexing
look and feel, the developer would need to create a group of look and feel, the developer would need to create a group of
classes that extend those of classes that extend those of
the Java look and feel, and add text-to-speech support to the new classes. the Java look and feel, and add text-to-speech support to the new classes.
If the developer also wanted to add text-to-speech support to other look If the developer also wanted to add text-to-speech support to other look
and feels, and feels,
such as Motif or Windows, the developers would need to create subclasses such as Motif or Windows, the developers would need to create subclasses
of those classes as well. of those classes as well.
</p> </p>
<p> <p>
This approach has at least two shortcomings: This approach has at least two shortcomings:
<ul type="DISC"> <ul>
<li>First, each subclass must use what is <li>First, each subclass must use what is
essentially a copy of the same code, potentially creating a difficult essentially a copy of the same code, potentially creating a difficult
support situation for the developer.<br></li> support situation for the developer.<br></li>
<li>Second, and more significantly for the <li>Second, and more significantly for the
end user, some application developers might force a end user, some application developers might force a
particular look and feel to be used. When this approach is used, particular look and feel to be used. When this approach is used,
the end user can't even use the enhanced look and feel.</li> the end user can't even use the enhanced look and feel.</li>
</ul> </ul>
<p> <p>
A multiplexing look and feel A multiplexing look and feel
both these problems simultaneously because it allows multiple look both these problems simultaneously because it allows multiple look
and feels to be combined. and feels to be combined.
The first problem (having to use what amounts to a second copy of the same The first problem (having to use what amounts to a second copy of the same
code) is solved because the developer can create a specialized look code) is solved because the developer can create a specialized look
and feel that can then be combined with other look and feels. and feel that can then be combined with other look and feels.
</p> </p>
<p> <p>
The second problem (having to force the use of The second problem (having to force the use of
a particular look and feel) is solved because a specialized look and feel a particular look and feel) is solved because a specialized look and feel
can be used with whatever default look and feel the can be used with whatever default look and feel the
application may have locked in place. application may have locked in place.
</p> </p>
<p> <p>
The default multiplexing look and feel implementation, The default multiplexing look and feel implementation,
represented by the <code>MultiLookAndFeel</code> class represented by the <code>MultiLookAndFeel</code> class
in the <code>javax.swing.plaf.multi</code> package, in the <code>javax.swing.plaf.multi</code> package,
is called (unsurprisingly) is called (unsurprisingly)
the Multiplexing look and feel. the Multiplexing look and feel.
<p> <p>
<a name="howtouse"></a> <a id="howtouse"></a>
<hr width=100% align=LEFT size=2> <hr>
<b> <h2>How to Use Auxiliary Look and Feels</h2>
<font color="#000080" size="+2">How to Use Auxiliary Look and Feels</font>
</b>
<p> <p>
It's easy to use auxiliary look and feels with Swing. To instruct It's easy to use auxiliary look and feels with Swing. To instruct
Swing to use the Multiplexing look and feel, all an application Swing to use the Multiplexing look and feel, all an application
has to do is modify the <code>$JDKHOME/conf/swing.properties</code> has to do is modify the <code>$JDKHOME/conf/swing.properties</code>
file to include a definition of the <code>swing.auxiliarylaf</code> file to include a definition of the <code>swing.auxiliarylaf</code>
property. Swing treats the <code>swing.auxiliarylaf</code> property. Swing treats the <code>swing.auxiliarylaf</code>
property as a comma-separated list of <code>LookAndFeel</code> property as a comma-separated list of <code>LookAndFeel</code>
subclasses that specify what auxiliary look and feels should be subclasses that specify what auxiliary look and feels should be
used in addition to the default look and feel. If at least one valid used in addition to the default look and feel. If at least one valid
<code>LookAndFeel</code> <code>LookAndFeel</code>
subclass is specified in the <code>swing.auxiliarylaf</code> subclass is specified in the <code>swing.auxiliarylaf</code>
property, Swing automatically uses the Multiplexing look and feel property, Swing automatically uses the Multiplexing look and feel
to load and support the default and auxiliary look and feels. to load and support the default and auxiliary look and feels.
</p> </p>
<p> <p>
For example, let's assume that an application For example, let's assume that an application
makes use of a look and feel that supports text-to-speech feedback, and also makes use of a look and feel that supports text-to-speech feedback, and also
uses an look and feel that adds support for a device uses an look and feel that adds support for a device
that emits perfume. that emits perfume.
Let's assume that the text-to-speech Let's assume that the text-to-speech
look and feel is named <code>com.myco.TextTalkerLookAndFeel</code>, look and feel is named <code>com.myco.TextTalkerLookAndFeel</code>,
and the look and feel that adds support for perfume and the look and feel that adds support for perfume
is named <code>com.smellco.OlfactoryLookAndFeel</code>. is named <code>com.smellco.OlfactoryLookAndFeel</code>.
</p> </p>
<p> <p>
To tell Swing to use both these look and feels To tell Swing to use both these look and feels
-- and to use a default look and feel at the same time -- your application -- and to use a default look and feel at the same time -- your application
could simply add the following line to the <code>$JDKHOME/conf/swing.properties</code> file: could simply add the following line to the <code>$JDKHOME/conf/swing.properties</code> file:
</p> </p>
<p> <p>
<code>&nbsp;&nbsp;&nbsp; <code>&nbsp;&nbsp;&nbsp;
swing.auxiliarylaf=com.myco.TextTalkerLookAndFeel,<br> swing.auxiliarylaf=com.myco.TextTalkerLookAndFeel,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; com.smellco.OlfactoryLookAndFeel</code> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; com.smellco.OlfactoryLookAndFeel</code>
</p> </p>
<p> <p>
This statement tells Swing to obtain a component's UI from the Multiplexing This statement tells Swing to obtain a component's UI from the Multiplexing
look and feel automatically, instead of obtaining it directly from look and feel automatically, instead of obtaining it directly from
the default look and feel. The resulting multiplexing UI is a small the default look and feel. The resulting multiplexing UI is a small
delegate that obtains and maintains UIs from the default and auxiliary delegate that obtains and maintains UIs from the default and auxiliary
look and feels. As a result, when a method is invoked in a multiplexing look and feels. As a result, when a method is invoked in a multiplexing
UI object, the multiplexing UI invokes the same method on each UI object, the multiplexing UI invokes the same method on each
of the UIs obtained from the default and auxiliary look and feels. of the UIs obtained from the default and auxiliary look and feels.
</p> </p>
<p> <p>
<a name="howtowrite"></a> <a id="howtowrite"></a>
<hr width=100% align=LEFT size=2> <hr>
<b> <h2>Tips for Writing an Auxiliary Look and Feel</h2>
<font color="#000080" size="+2">Tips for Writing an Auxiliary Look and Feel</font>
</b>
<p> <p>
An auxiliary look and feel is like any other look and feel, An auxiliary look and feel is like any other look and feel,
except that it doesn't have to provide the complete support except that it doesn't have to provide the complete support
that a default look and feel must. For that a default look and feel must. For
example, an auxiliary look and feel that supports just text-to-speech feedback example, an auxiliary look and feel that supports just text-to-speech feedback
doesn't need to provide any code for painting. doesn't need to provide any code for painting.
Also, it might not need to support all components -- Also, it might not need to support all components --
<code>JSeparator</code>s, for example, might be ignored. <code>JSeparator</code>s, for example, might be ignored.
<p> <p>
Auxiliary look and feels tend to be simple, Auxiliary look and feels tend to be simple,
so developing one can be easier than developing a visual so developing one can be easier than developing a visual
look and feel. look and feel.
The developer can concentrate solely The developer can concentrate solely
on providing the specialized functionality. on providing the specialized functionality.
<p> <p>
Because the primary purpose of an auxiliary look and feel is to enhance the Because the primary purpose of an auxiliary look and feel is to enhance the
default look and feel, auxiliary look and feels tend default look and feel, auxiliary look and feels tend
be nonvisual. Since an auxiliary look and feel is a genuine be nonvisual. Since an auxiliary look and feel is a genuine
look and feel, however, there is nothing to prevent it look and feel, however, there is nothing to prevent it
from rendering information on the display. from rendering information on the display.
@ -234,29 +246,26 @@ from rendering information on the display.
Just like for any other look and feel, you Just like for any other look and feel, you
implement an auxiliary look and feel implement an auxiliary look and feel
by writing a subclass of <code>javax.swing.LookAndFeel</code> by writing a subclass of <code>javax.swing.LookAndFeel</code>
and creating subclasses of the and creating subclasses of the
<code><em>Foo</em>UI</code> classes defined in <code><em>Foo</em>UI</code> classes defined in
the <code>javax.swing.plaf</code> package. the <code>javax.swing.plaf</code> package.
</p> </p>
<p> <a id="dosanddonts">
<br> <h3>Dos and Don'ts</h3>
<a name="dosanddonts">
<font color="#000080" size="+1"><b>Dos and Don'ts</b></font>
</a> </a>
</p>
<p> <p>
The following paragraphs provide some general recommendations for developing The following paragraphs provide some general recommendations for developing
auxiliary look and feels. auxiliary look and feels.
</p> </p>
<p> <p>
<font color="#000080"><b>Use the <code>installUI</code> method <h4>Use the <code>installUI</code> method
to perform all initialization, to perform all initialization,
and the <code>uninstallUI</code> method and the <code>uninstallUI</code> method
to perform all cleanup.</b></font> to perform all cleanup.</h4>
</p>
<blockquote> <blockquote>
The <code>installUI</code> and <code>uninstallUI</code> The <code>installUI</code> and <code>uninstallUI</code>
methods are invoked when a component's look and feel is set. methods are invoked when a component's look and feel is set.
@ -265,142 +274,134 @@ a chance to add listeners on the component and its data model.
Similarly, the <code>uninstallUI</code> method Similarly, the <code>uninstallUI</code> method
lets the previous UI object remove its listeners. lets the previous UI object remove its listeners.
</blockquote> </blockquote>
<p> <font color="#000080"><b>Don't extend <h4><b>Don't extend visual look and feels.</b></h4>
visual look and feels.</b></font></p>
<blockquote> <blockquote>
We recommended that you <i>don't</i> implement We recommended that you <i>don't</i> implement
UI classes of an auxiliary look and feel as subclasses of the UI classes of an auxiliary look and feel as subclasses of the
UI classes of a visual look and feel. Why not? Because they might UI classes of a visual look and feel. Why not? Because they might
accidentally inherit code that installs listeners on a component accidentally inherit code that installs listeners on a component
object or renders the component on the display. As a result, object or renders the component on the display. As a result,
your auxiliary look and feel would compete with the default look your auxiliary look and feel would compete with the default look
and feel rather than cooperating with it.<br> and feel rather than cooperating with it.<br>
<br> <br>
Instead, we recommend that the UI classes of an auxiliary look Instead, we recommend that the UI classes of an auxiliary look
and feel directly extend the abstract UI classes in the <code>javax.swing.plaf</code> and feel directly extend the abstract UI classes in the <code>javax.swing.plaf</code>
package. By using this strategy, the developer of an auxiliary package. By using this strategy, the developer of an auxiliary
look and feel can avoid competing with the default look and feel. look and feel can avoid competing with the default look and feel.
</blockquote> </blockquote>
<p> <font color="#000080"><b>Override all UI-specific methods <h4><b>Override all UI-specific methods your UI classes inherit.</b></h4>
your UI classes inherit.</b></font>
</p>
<blockquote> <blockquote>
We recommend that each UI class of We recommend that each UI class of
an auxiliary look and feel override the methods an auxiliary look and feel override the methods
defined in the <code>javax.swing.plaf</code> defined in the <code>javax.swing.plaf</code>
UI classes it descends from UI classes it descends from
The reasons for this recommendation are similar The reasons for this recommendation are similar
to those for not extending a visual look and feel. to those for not extending a visual look and feel.
For example, the <code>ComponentUI</code> For example, the <code>ComponentUI</code>
class, from which all UI classes descend, class, from which all UI classes descend,
provides a default implementation for the <code>update</code> provides a default implementation for the <code>update</code>
method. This default implementation paints on the display method. This default implementation paints on the display
if the if the
component is opaque. If a UI class from a non-visual auxiliary component is opaque. If a UI class from a non-visual auxiliary
look and feel does not override this method, all look and feel does not override this method, all
opaque components appear as blank areas on the screen! opaque components appear as blank areas on the screen!
</blockquote> </blockquote>
<p>
<br> <a id="uidefaults"></a>
<a name="uidefaults"> <h3>Extending UIDefaults</h3>
<font color="#000080" size="+1"><b>Extending UIDefaults</b></font>
</a>
<p>In many cases, you <p>In many cases, you
might want an auxiliary look and feel to be &quot;incomplete.&quot; That might want an auxiliary look and feel to be &quot;incomplete.&quot; That
is, you might not need to support the complete set is, you might not need to support the complete set
of components. of components.
For example, an auxiliary look and feel might choose For example, an auxiliary look and feel might choose
to provide a <code>ButtonUI</code> subclass but no to provide a <code>ButtonUI</code> subclass but no
<code>LabelUI</code> subclass. <code>LabelUI</code> subclass.
This This
option is allowed, and the multiplexing look and feel gracefully option is allowed, and the multiplexing look and feel gracefully
handles such situations.</p> handles such situations.</p>
<p>By default, however, Swing issues an error message when it asks <p>By default, however, Swing issues an error message when it asks
a look and feel for a UI object and the look and feel does not a look and feel for a UI object and the look and feel does not
support that UI. This message can be annoying, especially to auxiliary support that UI. This message can be annoying, especially to auxiliary
look-and-feel developers who don't want to support a particular look-and-feel developers who don't want to support a particular
component.</p> component.</p>
<p>Fortunately, you can prevent this error <p>Fortunately, you can prevent this error
message by creating a subclass of the <code>UIDefaults</code> message by creating a subclass of the <code>UIDefaults</code>
class and returning an instance of it from the class and returning an instance of it from the
<code>getDefaults</code> method <code>getDefaults</code> method
of your <code>LookAndFeel</code> class. of your <code>LookAndFeel</code> class.
For example: For example:
</p> </p>
<p><code>public class MyAuxLookAndFeel <p><code>public class MyAuxLookAndFeel
extends LookAndFeel {<br> extends LookAndFeel {<br>
    ...<br> ...<br>
    public UIDefaults getDefaults() {<br> public UIDefaults getDefaults() {<br>
        <b>UIDefaults table = <br> <b>UIDefaults table = <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
new MyAuxUIDefaults();<br> new MyAuxUIDefaults();<br>
</b>        Object[] uiDefaults = {<br> </b> Object[] uiDefaults = {<br>
          &quot;ButtonUI&quot;, &quot;MyAuxButtonUI&quot;,<br> &quot;ButtonUI&quot;, &quot;MyAuxButtonUI&quot;,<br>
          ...<br> ...<br>
        }<br> }<br>
        table.putDefaults(uiDefaults);<br> table.putDefaults(uiDefaults);<br>
        return table;<br> return table;<br>
    }<br> }<br>
}<br> }<br>
<br> <br>
<b>class MyAuxUIDefaults extends UIDefaults {<br> <b>class MyAuxUIDefaults extends UIDefaults {<br>
    protected void getUIError(String msg) {<br> protected void getUIError(String msg) {<br>
        //System.err.println<br> //System.err.println<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp; (&quot;An &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp; (&quot;An
annoying message!&quot;);<br> annoying message!&quot;);<br>
    }<br> }<br>
}</b></code></p> }</b></code></p>
<p> <p>
In the preceding example, an auxiliary look and feel named <code>MyAux</code> In the preceding example, an auxiliary look and feel named <code>MyAux</code>
creates a <code>UIDefaults</code> subclass creates a <code>UIDefaults</code> subclass
that overrides the <code>getUIError</code> that overrides the <code>getUIError</code>
method. The <code>getUIError</code> method. The <code>getUIError</code>
method is the method that is invoked when Swing cannot find a UI method is the method that is invoked when Swing cannot find a UI
object in a look and feel. By merely doing nothing in this method, object in a look and feel. By merely doing nothing in this method,
you can avoid the error message.</p> you can avoid the error message.</p>
<p> <p>
<br> <a id="defaultui"></a>
<a name="defaultui"> <h3>Examining Other UI Objects</h3>
<b><font color="#000080" size="+1">Examining Other UI Objects</font></b>
</a>
<p>In <p>In
rare instances, a UI object from an auxiliary look and feel rare instances, a UI object from an auxiliary look and feel
may be interested in the default UI object used by the component. In may be interested in the default UI object used by the component. In
these cases, the UI object from auxiliary look and feel can obtain these cases, the UI object from auxiliary look and feel can obtain
the UI from a component by calling its <code>getUI</code> the UI from a component by calling its <code>getUI</code>
method. The returned UI is an instance of one of the multiplexing method. The returned UI is an instance of one of the multiplexing
look and feel UI classes (for example, <code>MultiButtonUI</code>). look and feel UI classes (for example, <code>MultiButtonUI</code>).
The UI object from the auxiliary look and feel can call the <code>getUIs</code> The UI object from the auxiliary look and feel can call the <code>getUIs</code>
method of the returned object to obtain an array containing a complete list method of the returned object to obtain an array containing a complete list
of all UI objects handled by the multiplexing UI. The first element of all UI objects handled by the multiplexing UI. The first element
is guaranteed to be the UI created from the default look and feel. is guaranteed to be the UI created from the default look and feel.
</p> </p>
<p> <p>
<a name="implementation"></a> <a id="implementation"></a>
<hr width=100% align=LEFT size=2> <hr>
<font color="#000080" size="+2"><b>How the Multiplexing Look and Feel <h2>How the Multiplexing Look and Feel Is Implemented</h2>
Is Implemented</b></font>
<p> <p>
The Multiplexing look and feel The Multiplexing look and feel
(represented by (represented by
<code>javax.swing.plaf.multi.MultiLookAndFeel</code>) <code>javax.swing.plaf.multi.MultiLookAndFeel</code>)
is meant to be transparent to is meant to be transparent to
all developers and users. It should &quot;just work&quot; -- and all developers and users. It should &quot;just work&quot; -- and
it is used only when the user tells Swing to use an auxiliary look it is used only when the user tells Swing to use an auxiliary look
and feel.</p> and feel.</p>
<p> <p>
When the Multiplexing look and When the Multiplexing look and
feel is in use, the type of the UI object feel is in use, the type of the UI object
associated with each component associated with each component
depends on whether depends on whether
any of the auxiliary look and feels currently in use any of the auxiliary look and feels currently in use
support the component. support the component.
If so, the component's UI object is If so, the component's UI object is
@ -408,81 +409,80 @@ all developers and users.
If only the default look and feel supports the component, If only the default look and feel supports the component,
then the component gets then the component gets
a UI object from the default look and feel, a UI object from the default look and feel,
just as if no auxiliary look and feels were installed. just as if no auxiliary look and feels were installed.
<p> <p>
A multiplexing UI object A multiplexing UI object
obtains and maintains UI objects obtains and maintains UI objects
from the default and auxiliary look from the default and auxiliary look
and feels, and feels,
referring to these UIs in the following manner: referring to these UIs in the following manner:
<ul type="DISC"> <ul>
<li> The UI object from the default look <li> The UI object from the default look
and feel is always the first to be created. After that, a UI object and feel is always the first to be created. After that, a UI object
is created from each auxiliary look and feel in the order is created from each auxiliary look and feel in the order
they are specified in the <code>swing.auxiliarylaf</code> they are specified in the <code>swing.auxiliarylaf</code>
property.<br><br></li> property.<br><br></li>
<li> When a method that requests information <li> When a method that requests information
from a UI object is invoked, the multiplexing UI object from a UI object is invoked, the multiplexing UI object
invokes the method on all the UI objects, but returns invokes the method on all the UI objects, but returns
only the results from the UI for the default look and feel. only the results from the UI for the default look and feel.
For example, when the <code>getPreferredSize</code> For example, when the <code>getPreferredSize</code>
method is invoked on a multiplexing UI, the UI returns only the method is invoked on a multiplexing UI, the UI returns only the
results of invoking <code>getPreferredSize</code> results of invoking <code>getPreferredSize</code>
on the UI obtained from the default look and feel. on the UI obtained from the default look and feel.
The <code>getPreferredSize</code> method The <code>getPreferredSize</code> method
is also invoked on the UI object for each auxiliary look and feel, is also invoked on the UI object for each auxiliary look and feel,
but the return values are ignored. but the return values are ignored.
<br><br></li> <br><br></li>
<li> When a method that does not request information <li> When a method that does not request information
from the UI object is invoked, the multiplexing UI object from the UI object is invoked, the multiplexing UI object
invokes that method on all UIs -- invokes that method on all UIs --
on the UI object obtained from the default look on the UI object obtained from the default look
and feel and feel
and on all the UIs obtained from the auxiliary look and feels, and on all the UIs obtained from the auxiliary look and feels,
as well. as well.
For example, invoking the <code>installUI</code> For example, invoking the <code>installUI</code>
method on a multiplexing UI causes the multiplexing UI to invoke method on a multiplexing UI causes the multiplexing UI to invoke
<code>installUI</code> <code>installUI</code>
on the UI obtained from the default look and feel and the UIs obtained from on the UI obtained from the default look and feel and the UIs obtained from
the auxiliary factories.</li> the auxiliary factories.</li>
</ul> </ul>
<p> In all cases, the UI object obtained from <p> In all cases, the UI object obtained from
the default look and feel is acted upon first, and then the auxiliary the default look and feel is acted upon first, and then the auxiliary
look and feels are acted upon in the order they are specified in look and feels are acted upon in the order they are specified in
the <code>swing.auxiliarylaf</code> the <code>swing.auxiliarylaf</code>
property. property.
</p> </p>
<p> <p>
<a name="custom"></a> <a id="custom"></a>
<hr width=100% align=LEFT size=2> <hr>
<font color="#000080" size="+2"><b>How to Provide a Custom Multiplexing Look <h2>How to Provide a Custom Multiplexing Look and Feel</h2>
and Feel</b></font>
<p>While <p>While
we hope the behavior of the Multiplexing look and feel is we hope the behavior of the Multiplexing look and feel is
flexible enough not to require an alternative multiplexing look flexible enough not to require an alternative multiplexing look
and feel, Swing allows the user to specify another multiplexing look and feel, Swing allows the user to specify another multiplexing look
and feel to use. and feel to use.
</p> </p>
<p> To do that, all the user has to do is modify <p> To do that, all the user has to do is modify
the <code>$JDKHOME/conf/swing.properties</code> the <code>$JDKHOME/conf/swing.properties</code>
file to include a definition of the <code>swing.plaf.multiplexinglaf</code> file to include a definition of the <code>swing.plaf.multiplexinglaf</code>
property. Swing then treats the <code>swing.plaf.multiplexinglaf</code> property. Swing then treats the <code>swing.plaf.multiplexinglaf</code>
property as a <code>LookAndFeel</code> property as a <code>LookAndFeel</code>
subclass that supports multiplexing. subclass that supports multiplexing.
</p> </p>
<p> For example, if a user has a multiplexing <p> For example, if a user has a multiplexing
look and feel represented by <code>com.myco.SuperMultiLookAndFeel</code> look and feel represented by <code>com.myco.SuperMultiLookAndFeel</code>
that is a better match for their needs than the Multiplexing that is a better match for their needs than the Multiplexing
look and feel look and feel
(<code>javax.swing.plaf.multi.MultiLookAndFeel</code>), (<code>javax.swing.plaf.multi.MultiLookAndFeel</code>),
the user could include the following line in <code>$JDKHOME/conf/swing.properties</code>: the user could include the following line in <code>$JDKHOME/conf/swing.properties</code>:
</p> </p>
@ -491,12 +491,12 @@ and Feel</b></font>
</p> </p>
<p> <p>
This statement instructs Swing to use <code>com.myco.SuperMultiLookAndFeel</code> This statement instructs Swing to use <code>com.myco.SuperMultiLookAndFeel</code>
instead of <code>javax.swing.plaf.multi.MultiLookAndFeel</code>. But instead of <code>javax.swing.plaf.multi.MultiLookAndFeel</code>. But
if you use this kind of statement, be careful, because the suppliers if you use this kind of statement, be careful, because the suppliers
of auxiliary look and feels will most likely have developed and of auxiliary look and feels will most likely have developed and
tested against our Multiplexing look and feel. tested against our Multiplexing look and feel.
</p> </p>
</BODY> </body>
</HTML> </html>

View File

@ -1,8 +1,34 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!doctype html>
<html> <html lang="en">
<head> <head>
<title></title> <meta charset="utf-8"/>
<title>Nimbus colors</title>
</head> </head>
<!--
Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation. Oracle designates this
particular file as subject to the "Classpath" exception as provided
by Oracle in the LICENSE file that accompanied this code.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
version 2 for more details (a copy is included in the LICENSE file that
accompanied this code).
You should have received a copy of the GNU General Public License version
2 along with this work; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
or visit www.oracle.com if you need additional information or have any
questions.
-->
<body> <body>
<h1 id="primaryColors">Primary Colors</h1> <h1 id="primaryColors">Primary Colors</h1>
<table summary="Nimbus primary colors"> <table summary="Nimbus primary colors">

View File

@ -1,8 +1,11 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!doctype html>
<html> <html lang="en">
<head> <head>
<meta charset="utf-8"/>
<title>Component Specific Properties</title>
</head>
<!-- <!--
Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -24,16 +27,17 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
or visit www.oracle.com if you need additional information or have any or visit www.oracle.com if you need additional information or have any
questions. questions.
--> -->
</head>
<body bgcolor="white"> <body bgcolor="white">
<h3>Component Specific Properties</h3> <h3>Component Specific Properties</h3>
<p> The look, and to some degree the feel of Synth <p> The look, and to some degree the feel of Synth
can be customized by way of component specific properties. can be customized by way of component specific properties.
These properties are accessed from <a These properties are accessed from <a
href="../SynthStyle.html">SynthStyle#get</a>. Refer to <a href="synthFileFormat.html#e.property">synth file format</a> for examples of how to specify these properties in a synth configuration file.</p> href="../SynthStyle.html">SynthStyle#get</a>. Refer to <a
<p> href="synthFileFormat.html#e.property">synth file format</a> for examples
of how to specify these properties in a synth configuration file.</p>
<p>
This file specifies the expected class type each of the values This file specifies the expected class type each of the values
are to take. The behavior of supplying the wrong type is are to take. The behavior of supplying the wrong type is
unspecified: typically a <code>ClassCastException</code> is unspecified: typically a <code>ClassCastException</code> is
@ -66,7 +70,7 @@ the following properties: </p>
</tbody> </tbody>
</table> </table>
<br> <br>
<h4><a name="JButton">JButton</a></h4> <h4><a id="JButton">JButton</a></h4>
<p> JButton paints text using the TEXT_FOREGROUND ColorType. In addition <p> JButton paints text using the TEXT_FOREGROUND ColorType. In addition
to the <a href="#buttonProperties">Button properties</a>, JButton to the <a href="#buttonProperties">Button properties</a>, JButton
supports the following property: </p> supports the following property: </p>
@ -89,7 +93,7 @@ button that is receiving focus. </td>
</tbody> </tbody>
</table> </table>
<br> <br>
<h4><a name="JCheckBox">JCheckBox</a></h4> <h4><a id="JCheckBox">JCheckBox</a></h4>
<p> JCheckBox paints text using the TEXT_FOREGROUND ColorType. In <p> JCheckBox paints text using the TEXT_FOREGROUND ColorType. In
addition to the <a href="#buttonProperties">Button properties</a>, addition to the <a href="#buttonProperties">Button properties</a>,
JCheckBox supports the following property: </p> JCheckBox supports the following property: </p>
@ -111,7 +115,7 @@ JCheckBox supports the following property: </p>
</tbody> </tbody>
</table> </table>
<br> <br>
<h4><a name="JComboBox">JComboBox</a></h4> <h4><a id="JComboBox">JComboBox</a></h4>
<p> JComboBox is a composite component that consists of the following <p> JComboBox is a composite component that consists of the following
child Components: </p> child Components: </p>
<table border="1" summary="JComboBox child components"> <table border="1" summary="JComboBox child components">
@ -144,7 +148,7 @@ child Components: </p>
<tr> <tr>
<td>ComboBox.renderer</td> <td>ComboBox.renderer</td>
<td>Component </td> <td>Component </td>
<td>The renderer used for the JComboBox. This is ONLY set if <td>The renderer used for the JComboBox. This is ONLY set if
the renderer is a UIResource. </td> the renderer is a UIResource. </td>
</tr> </tr>
<tr> <tr>
@ -279,7 +283,7 @@ of the file chooser.<br>
<td style="vertical-align: top;">Icon used by the button that creates a new <td style="vertical-align: top;">Icon used by the button that creates a new
folder. folder.
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="vertical-align: top;">FileChooser.upFolderIcon<br> <td style="vertical-align: top;">FileChooser.upFolderIcon<br>
</td> </td>
@ -301,7 +305,7 @@ of the file chooser.<br>
<td style="vertical-align: top;">Icon used by the button that navigates to the <td style="vertical-align: top;">Icon used by the button that navigates to the
current user's home directory. current user's home directory.
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="vertical-align: top;">FileChooser.detailsViewIcon<br> <td style="vertical-align: top;">FileChooser.detailsViewIcon<br>
</td> </td>
@ -312,7 +316,7 @@ of the file chooser.<br>
<td style="vertical-align: top;">Icon used by the button that toggles the <td style="vertical-align: top;">Icon used by the button that toggles the
detailed files list view. detailed files list view.
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="vertical-align: top;">FileChooser.listViewIcon<br> <td style="vertical-align: top;">FileChooser.listViewIcon<br>
</td> </td>
@ -324,7 +328,7 @@ of the file chooser.<br>
regular files list view, showing only an icon and the name of each regular files list view, showing only an icon and the name of each
file and directory. file and directory.
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="vertical-align: top;">FileChooser.viewMenuIcon<br> <td style="vertical-align: top;">FileChooser.viewMenuIcon<br>
</td> </td>
@ -339,7 +343,7 @@ of the file chooser.<br>
</tbody> </tbody>
</table> </table>
<br> <br>
<h4><a name="JInternalFrame"></a>JInternalFrame</h4> <h4><a id="JInternalFrame"></a>JInternalFrame</h4>
<h5>JInternalFrame Specific Properties</h5> <h5>JInternalFrame Specific Properties</h5>
<table cellpadding="2" cellspacing="2" border="1" summary="JInternalFrame specific properties" <table cellpadding="2" cellspacing="2" border="1" summary="JInternalFrame specific properties"
style="text-align: left; width: 100%;"> style="text-align: left; width: 100%;">
@ -369,7 +373,7 @@ the system menu will be shown.<br>
</tbody> </tbody>
</table> </table>
<br> <br>
<h4><a name="JInternalFrameTitlePane"></a>JInternalFrameTitlePane</h4> <h4><a id="JInternalFrameTitlePane"></a>JInternalFrameTitlePane</h4>
<p>JInternalFrameTitlePane is the control bar located at the top of the <p>JInternalFrameTitlePane is the control bar located at the top of the
internal frame similar to that found in a frame.<br> internal frame similar to that found in a frame.<br>
</p> </p>
@ -469,7 +473,7 @@ abililty to close the internal frame.
</tbody> </tbody>
</table> </table>
<br> <br>
<h4><a name="JList">JList</a></h4> <h4><a id="JList">JList</a></h4>
<p> JList's sets the name of the renderer to List.renderer. JList <p> JList's sets the name of the renderer to List.renderer. JList
supports the following properties: </p> supports the following properties: </p>
<h5>JList Specific Properties</h5> <h5>JList Specific Properties</h5>
@ -486,7 +490,7 @@ supports the following properties: </p>
<td>Boolean</td> <td>Boolean</td>
<td>true </td> <td>true </td>
<td>If true the renderers state is not updated, and the text <td>If true the renderers state is not updated, and the text
colors come from JList's getSelectionBackground and colors come from JList's getSelectionBackground and
getSelectionForeground methods. If false, the renderer's state is getSelectionForeground methods. If false, the renderer's state is
updated and the colors will instead come from the Style. </td> updated and the colors will instead come from the Style. </td>
</tr> </tr>
@ -508,7 +512,7 @@ is not invoked. </td>
</tbody> </tbody>
</table> </table>
<br> <br>
<h4><a name="menuProperties">Menu Properties</a></h4> <h4><a id="menuProperties">Menu Properties</a></h4>
<p> The Menu classes (JCheckBoxMenuItem, JMenu, JMenuItem, and <p> The Menu classes (JCheckBoxMenuItem, JMenu, JMenuItem, and
JRadioButtonMenuItem) all support the same set of properties and behave JRadioButtonMenuItem) all support the same set of properties and behave
similarly. Each component consists of two Regions: the region similarly. Each component consists of two Regions: the region
@ -536,7 +540,7 @@ and the key, for example <code>Ctrl &lt;acceleratorDelimiter&gt; X</code>.
<td>prefix.arrowIcon</td> <td>prefix.arrowIcon</td>
<td>Icon</td> <td>Icon</td>
<td>null </td> <td>null </td>
<td>Icon drawn to the right of the text (or left when the <td>Icon drawn to the right of the text (or left when the
ComponentOrientation is right to left) of the text. This is ComponentOrientation is right to left) of the text. This is
typically only defined for JMenu. </td> typically only defined for JMenu. </td>
</tr> </tr>
@ -544,7 +548,7 @@ typically only defined for JMenu. </td>
<td>prefix.checkIcon</td> <td>prefix.checkIcon</td>
<td>Icon</td> <td>Icon</td>
<td>null </td> <td>null </td>
<td>Icon drawn to the left of the text (or right when the <td>Icon drawn to the left of the text (or right when the
ComponentOrientation is right to left) of the text. This is ComponentOrientation is right to left) of the text. This is
typically only defined for JCheckBoxMenuItem and JRadioButtonMenuItem typically only defined for JCheckBoxMenuItem and JRadioButtonMenuItem
to provide the check or radio button. </td> to provide the check or radio button. </td>
@ -561,7 +565,7 @@ of how the margin is used. </td>
<td>prefix.textIconGap</td> <td>prefix.textIconGap</td>
<td>Integer</td> <td>Integer</td>
<td>4 </td> <td>4 </td>
<td>Padding between the icon and text. Refer to the javadoc for <td>Padding between the icon and text. Refer to the javadoc for
<code>javax.swing.AbstractButton#setIconTextGap(int)</code> for details of how <code>javax.swing.AbstractButton#setIconTextGap(int)</code> for details of how
this is used. </td> this is used. </td>
</tr> </tr>
@ -593,7 +597,7 @@ RadioButtonMenuItem. </p>
</tbody> </tbody>
</table> </table>
<br> <br>
<h4><a name="JOptionPane">JOptionPane</a></h4> <h4><a id="JOptionPane">JOptionPane</a></h4>
<p> JOptionPane is a composite component and may consist of numerous child <p> JOptionPane is a composite component and may consist of numerous child
components, they are: OptionPane.button, OptionPane.label, components, they are: OptionPane.button, OptionPane.label,
OptionPane.comboBox, OptionPane.scrollPane, OptionPane.list, OptionPane.comboBox, OptionPane.scrollPane, OptionPane.list,
@ -623,7 +627,7 @@ OptionPane.textField, OptionPane.iconLabel. </p>
<td>OptionPane.buttonOrientation</td> <td>OptionPane.buttonOrientation</td>
<td>Integer </td> <td>Integer </td>
<td>SwingConstants.CENTER </td> <td>SwingConstants.CENTER </td>
<td>How the buttons should be layed out, one of <td>How the buttons should be layed out, one of
SwingConstants.LEFT, SwingConstants.RIGHT or SwingConstants.CENTER SwingConstants.LEFT, SwingConstants.RIGHT or SwingConstants.CENTER
(this will be flipped when in a right to left locale). </td> (this will be flipped when in a right to left locale). </td>
</tr> </tr>
@ -709,7 +713,7 @@ it follows the other buttons. </td>
</tbody> </tbody>
</table> </table>
<br> <br>
<h4><a name="JProgressBar"></a>JProgressBar<br> <h4><a id="JProgressBar"></a>JProgressBar<br>
</h4> </h4>
<h5>JProgressBar Specific Properties<br> <h5>JProgressBar Specific Properties<br>
</h5> </h5>
@ -749,7 +753,7 @@ the bouncing box per frame when the progress bar is indeterminate.<br>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h4><a name="JRadioButton">JRadioButton</a></h4> <h4><a id="JRadioButton">JRadioButton</a></h4>
<p> JRadioButton paints text using the TEXT_FOREGROUND ColorType. In <p> JRadioButton paints text using the TEXT_FOREGROUND ColorType. In
addition to the <a href="#buttonProperties">Button properties</a>, addition to the <a href="#buttonProperties">Button properties</a>,
JRadioButton supports the following property: </p> JRadioButton supports the following property: </p>
@ -771,7 +775,7 @@ JRadioButton supports the following property: </p>
</tbody> </tbody>
</table> </table>
<br> <br>
<h4><a name="JScrollBar">JScrollBar</a></h4> <h4><a id="JScrollBar">JScrollBar</a></h4>
<p> JScrollBar is a composite component that consists of the following <p> JScrollBar is a composite component that consists of the following
child Components: </p> child Components: </p>
<table border="1" summary="JScrollBar child components"> <table border="1" summary="JScrollBar child components">
@ -841,7 +845,7 @@ will be made equal. </td>
</tbody> </tbody>
</table> </table>
<br> <br>
<h4><a name="Separator">Separators</a></h4> <h4><a id="Separator">Separators</a></h4>
<p> All of the separator classes, JSeparator, JPopupMenu.Separator and <p> All of the separator classes, JSeparator, JPopupMenu.Separator and
JToolBar.Separator use the same property: </p> JToolBar.Separator use the same property: </p>
<table border="1" summary="Separator classes common properties"> <table border="1" summary="Separator classes common properties">
@ -856,7 +860,7 @@ JToolBar.Separator use the same property: </p>
<td>Separator.thickness</td> <td>Separator.thickness</td>
<td>Integer</td> <td>Integer</td>
<td>2 </td> <td>2 </td>
<td>Preferred width, for vertically aligned separators, or <td>Preferred width, for vertically aligned separators, or
preferred height for horizontally aligned separators. The resulting preferred height for horizontally aligned separators. The resulting
preferred size will include the Insets. </td> preferred size will include the Insets. </td>
</tr> </tr>
@ -875,20 +879,21 @@ preferred size will include the Insets. </td>
<td>ToolBar.separatorSize</td> <td>ToolBar.separatorSize</td>
<td>Dimension</td> <td>Dimension</td>
<td>null </td> <td>null </td>
<td>The value of this is passed to the <code>javax.swing.JToolBar$Separator#setSeparatorSize(java.awt.Dimension)</code> <td>The value of this is passed to the
method. If unspecified <code>setSeparatorSize</code> is not <code>javax.swing.JToolBar$Separator#setSeparatorSize(java.awt.Dimension)</code>
invoked. </td> method. If unspecified <code>setSeparatorSize</code> is not invoked.
</tr> </td>
</tr>
</tbody> </tbody>
</table> </table>
<br> <br>
<h4><a name="JScrollPane">JScrollPane</a></h4> <h4><a id="JScrollPane">JScrollPane</a></h4>
<p> <p>
JScrollPane is unique in that it provides a method for setting JScrollPane is unique in that it provides a method for setting
the Border around the JViewport with JViewport throwing an the Border around the JViewport with JViewport throwing an
IllegalArgumentException from <code>setBorder</code>. To IllegalArgumentException from <code>setBorder</code>. To
accommodate this a special border is installed on the accommodate this a special border is installed on the
<code>JScrollPane</code> that uses the <code>JScrollPane</code> that uses the
insets from the key insets from the key
<code>ScrollPane.viewportBorderInsets</code>. The <code>ScrollPane.viewportBorderInsets</code>. The
<code>SynthPainter</code> method <code>SynthPainter</code> method
@ -913,7 +918,7 @@ invoked. </td>
</tbody> </tbody>
</table> </table>
<br> <br>
<h4><a name="JSplitPane">JSplitPane</a></h4> <h4><a id="JSplitPane">JSplitPane</a></h4>
<p> JSplitPane is a composite component that will contain a divider and <p> JSplitPane is a composite component that will contain a divider and
potentially two buttons, if setOneTouchExpandable(true) has been potentially two buttons, if setOneTouchExpandable(true) has been
invoked. The two buttons will be named: invoked. The two buttons will be named:
@ -950,7 +955,7 @@ SplitPaneDivider.rightOneTouchButton. </p>
<td>SplitPane.oneTouchExpandable</td> <td>SplitPane.oneTouchExpandable</td>
<td>Boolean</td> <td>Boolean</td>
<td>null </td> <td>null </td>
<td>If non null, the value of this is passed to <td>If non null, the value of this is passed to
setOneTouchExpandable. </td> setOneTouchExpandable. </td>
</tr> </tr>
<tr> <tr>
@ -962,7 +967,7 @@ setOneTouchExpandable. </td>
</tbody> </tbody>
</table> </table>
<br> <br>
<h4><a name="JSlider"></a>JSlider</h4> <h4><a id="JSlider"></a>JSlider</h4>
<h5>JSlider Specific Properties</h5> <h5>JSlider Specific Properties</h5>
<table cellpadding="2" cellspacing="2" border="1" summary="JSlider specific properties" <table cellpadding="2" cellspacing="2" border="1" summary="JSlider specific properties"
style="text-align: left; width: 100%;"> style="text-align: left; width: 100%;">
@ -1022,7 +1027,7 @@ of the slider.<br>
</tbody> </tbody>
</table> </table>
<br> <br>
<h4><a name="JTabbedPane"></a>JTabbedPane</h4> <h4><a id="JTabbedPane"></a>JTabbedPane</h4>
<h5>JTabbedPane Specific Properties</h5> <h5>JTabbedPane Specific Properties</h5>
<table cellpadding="2" cellspacing="2" border="1" summary="JTabbedPane specific properties" <table cellpadding="2" cellspacing="2" border="1" summary="JTabbedPane specific properties"
style="text-align: left; width: 100%;"> style="text-align: left; width: 100%;">
@ -1084,8 +1089,8 @@ selected tab.<br>
</tbody> </tbody>
</table> </table>
<br> <br>
<h4><a name="JTable">JTable</a></h4> <h4><a id="JTable">JTable</a></h4>
<p> JTable sets the name of the renderer to Table.cellRenderer. <p> JTable sets the name of the renderer to Table.cellRenderer.
JTable supports the following properties: </p> JTable supports the following properties: </p>
<h5>JTable Specific Properties</h5> <h5>JTable Specific Properties</h5>
<table border="1" summary="JTable specific properties"> <table border="1" summary="JTable specific properties">
@ -1108,7 +1113,7 @@ style is used. </td>
<td>Boolean</td> <td>Boolean</td>
<td>true </td> <td>true </td>
<td>If true the renderers state is not updated, and the text <td>If true the renderers state is not updated, and the text
colors come from JTable's getSelectionBackground and colors come from JTable's getSelectionBackground and
getSelectionForeground methods. If false, the renderer's state is getSelectionForeground methods. If false, the renderer's state is
updated and the colors will instead come from the Style. </td> updated and the colors will instead come from the Style. </td>
</tr> </tr>
@ -1116,7 +1121,7 @@ updated and the colors will instead come from the Style. </td>
<td>Table.rendererUseUIBorder</td> <td>Table.rendererUseUIBorder</td>
<td>Boolean</td> <td>Boolean</td>
<td>true </td> <td>true </td>
<td>If true setBorder on the renderer will succeed <td>If true setBorder on the renderer will succeed
regardless of the border passed in, otherwise setBorder on the regardless of the border passed in, otherwise setBorder on the
renderer will only succeed if it is a Synth Border. </td> renderer will only succeed if it is a Synth Border. </td>
</tr> </tr>
@ -1129,7 +1134,7 @@ renderer will only succeed if it is a Synth Border. </td>
</tbody> </tbody>
</table> </table>
<br> <br>
<h4><a name="JTree">JTree</a></h4> <h4><a id="JTree">JTree</a></h4>
<p> JTree sets the name of the renderer to Tree.renderer, the name of <p> JTree sets the name of the renderer to Tree.renderer, the name of
the editor is Tree.cellEditor.</p> the editor is Tree.cellEditor.</p>
<h5>JTree Specific Properties</h5> <h5>JTree Specific Properties</h5>
@ -1151,7 +1156,7 @@ the editor is Tree.cellEditor.</p>
<td>Tree.drawHorizontalLines</td> <td>Tree.drawHorizontalLines</td>
<td>Boolean</td> <td>Boolean</td>
<td>true </td> <td>true </td>
<td>If true nodes have a horizontal connecting them to the <td>If true nodes have a horizontal connecting them to the
leading edge of their parent. </td> leading edge of their parent. </td>
</tr> </tr>
<tr> <tr>
@ -1198,7 +1203,7 @@ may happen along both the horizontal and vertical axis. </td>
<td>Tree.scrollsOnExpand</td> <td>Tree.scrollsOnExpand</td>
<td>Boolean</td> <td>Boolean</td>
<td>true </td> <td>true </td>
<td>Whether or not the JTree should scroll when a node is <td>Whether or not the JTree should scroll when a node is
expanded. </td> expanded. </td>
</tr> </tr>
<tr> <tr>
@ -1212,7 +1217,7 @@ and <a href="synthFileFormat.html#e.graphicsUtils">binding it</a> to the tree.</
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h4><a name="JToggleButton">JToggleButton</a></h4> <h4><a id="JToggleButton">JToggleButton</a></h4>
<p> JToggleButton paints text using the TEXT_FOREGROUND ColorType. In <p> JToggleButton paints text using the TEXT_FOREGROUND ColorType. In
addition to the <a href="#buttonProperties">Button properties</a>, addition to the <a href="#buttonProperties">Button properties</a>,
JToggleButton supports the following property: </p> JToggleButton supports the following property: </p>
@ -1234,7 +1239,7 @@ JToggleButton supports the following property: </p>
</tbody> </tbody>
</table> </table>
<br> <br>
<h4><a name="buttonProperties">Button Properties</a></h4> <h4><a id="buttonProperties">Button Properties</a></h4>
<p> Each of the Button classes (JButton, JCheckBox, JRadioButton, <p> Each of the Button classes (JButton, JCheckBox, JRadioButton,
JToggleButton and SynthArrowButton) support a similar set of properties. JToggleButton and SynthArrowButton) support a similar set of properties.
These properties are: </p> These properties are: </p>
@ -1250,23 +1255,29 @@ These properties are: </p>
<td>prefix.contentAreaFilled</td> <td>prefix.contentAreaFilled</td>
<td>Integer</td> <td>Integer</td>
<td>true </td> <td>true </td>
<td>Refer to the javadoc of <code>javax.swing.AbstractButton#contentAreaFilled(boolean)</code> for details <td>Refer to the javadoc of
of how this is used. It is up to the Painter to properly honor this <code>javax.swing.AbstractButton#contentAreaFilled(boolean)</code>
property. </td> for details of how this is used. It is up to the Painter to properly honor
</tr> this property.
</td>
</tr>
<tr> <tr>
<td>prefix.iconTextGap</td> <td>prefix.iconTextGap</td>
<td>Integer</td> <td>Integer</td>
<td>If unspecified, JButton.setIconTextGap is not invoked. </td> <td>If unspecified, JButton.setIconTextGap is not invoked.</td>
<td>Padding between the icon and text. Refer to the javadoc of <code>javax.swing.AbstractButton#setIconTextGap(int)</code> for details of how <td>Padding between the icon and text. Refer to the javadoc of
this is used. </td> <code>javax.swing.AbstractButton#setIconTextGap(int)</code>
for details of how this is used.
</td>
</tr> </tr>
<tr> <tr>
<td>prefix.margin</td> <td>prefix.margin</td>
<td>Insets</td> <td>Insets</td>
<td>Empty Insets (0, 0, 0, 0) </td> <td>Empty Insets (0, 0, 0, 0) </td>
<td>Margin for the JButton. Refer to the javadoc of <code>javax.swing.AbstractButton#setMargin(java.awt.Insets)</code> for details <td>Margin for the JButton. Refer to the javadoc of
of how the margin is used. </td> <code>javax.swing.AbstractButton#setMargin(java.awt.Insets)</code> for
details of how the margin is used.
</td>
</tr> </tr>
<tr> <tr>
<td>prefix.textShiftOffset</td> <td>prefix.textShiftOffset</td>
@ -1281,7 +1292,7 @@ the button is in a pressed state and does not have a pressed icon. </td>
<p> <code>Prefix</code> is one of: Button, CheckBox, RadioButton or <p> <code>Prefix</code> is one of: Button, CheckBox, RadioButton or
JToggleButton.<br> JToggleButton.<br>
</p> </p>
<h4><a name="textProperties"></a>Text Properties<br> <h4><a id="textProperties"></a>Text Properties<br>
</h4> </h4>
<table cellpadding="2" cellspacing="2" border="1" summary="Text properties" <table cellpadding="2" cellspacing="2" border="1" summary="Text properties"
style="text-align: left; width: 100%;"> style="text-align: left; width: 100%;">

View File

@ -1,7 +1,33 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!doctype html>
<html> <html lang="en">
<head> <head>
<title>Synth File Format</title> <meta charset="utf-8"/>
<title>Synth File Format</title>
<!--
Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation. Oracle designates this
particular file as subject to the "Classpath" exception as provided
by Oracle in the LICENSE file that accompanied this code.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
version 2 for more details (a copy is included in the LICENSE file that
accompanied this code).
You should have received a copy of the GNU General Public License version
2 along with this work; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
or visit www.oracle.com if you need additional information or have any
questions.
-->
<style type="text/css"> <style type="text/css">
div.dtd-fragment { div.dtd-fragment {
width: 100%; width: 100%;
@ -19,14 +45,17 @@ div.example {
</head> </head>
<body> <body>
<h2><a name="file">File Format</a></h2> <h2><a id="file">File Format</a></h2>
<p> <p>
Synth's file format (<a href="synth.dtd">dtd</a>) Synth's file format (<a href="synth.dtd">dtd</a>)
allows for specifying all the pieces allows for specifying all the pieces
necessary to create your own look and feel. A synth file is necessary to create your own look and feel. A synth file is
loaded by way of the <A HREF="../../../../../javax/swing/plaf/synth/SynthLookAndFeel.html#load(java.io.InputStream,%20java.lang.Class)">SynthLookAndFeel.load(InputStream, Class)</a> or loaded by way of the <A
<a href="../../../../../javax/swing/plaf/synth/SynthLookAndFeel.html#load(java.net.URL)">SynthLookAndFeel.load(URL)</a> methods. HREF="../../../../../javax/swing/plaf/synth/SynthLookAndFeel.html#load(java.io.InputStream,%20java.lang.Class)">
The following example uses the <code>load</code> method to configure SynthLookAndFeel.load(InputStream, Class)</a> or
<a href="../../../../../javax/swing/plaf/synth/SynthLookAndFeel.html#load(java.net.URL)">
SynthLookAndFeel.load(URL)</a> methods.
The following example uses the <code>load</code> method to configure
a <code>SynthLookAndFeel</code> and sets it as the current look a <code>SynthLookAndFeel</code> and sets it as the current look
and feel: and feel:
</p> </p>
@ -51,8 +80,10 @@ div.example {
</pre> </pre>
</div> </div>
<p> <p>
The method <a href="../../../../../javax/swing/plaf/synth/SynthLookAndFeel.html#load(java.net.URL)">SynthLookAndFeel.load(URL)</a> can be The method <a
used, for instance, to load a look and feel from any of the following: href="../../../../../javax/swing/plaf/synth/SynthLookAndFeel.html#load(java.net.URL)">
SynthLookAndFeel.load(URL)</a> can be used, for instance, to load a look
and feel from any of the following:
</p> </p>
<ul> <ul>
<li>File, e.g. <code>file:///C:/java/synth/laf/laf.xml</code></li> <li>File, e.g. <code>file:///C:/java/synth/laf/laf.xml</code></li>
@ -70,7 +101,7 @@ div.example {
<h3>The synth element</h3> <h3>The synth element</h3>
<div class="dtd-fragment"> <div class="dtd-fragment">
<pre class="dtd-fragment"> <pre class="dtd-fragment">
&lt;!ELEMENT <a name="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> | &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> |
<a href="#e.imagePainter">imagePainter</a> | <a href="#e.imageIcon">imageIcon</a> | <a href="#e.defaultsProperty">defaultsProperty</a>)*> <a href="#e.imagePainter">imagePainter</a> | <a href="#e.imageIcon">imageIcon</a> | <a href="#e.defaultsProperty">defaultsProperty</a>)*>
&lt;!ATTLIST synth &lt;!ATTLIST synth
<a href="#synth.version">version</a> CDATA #IMPLIED <a href="#synth.version">version</a> CDATA #IMPLIED
@ -78,7 +109,7 @@ div.example {
</pre> </pre>
</div> </div>
<p><em>Attribute definitions</em></p> <p><em>Attribute definitions</em></p>
<dl><dt><a name="synth.version"><samp>version</samp></a></dt> <dl><dt><a id="synth.version"><samp>version</samp></a></dt>
<dd>File format version, should be 1</dd> <dd>File format version, should be 1</dd>
</dl> </dl>
<p> <p>
@ -86,11 +117,11 @@ div.example {
elements that make up a SynthLookAndFeel definition. elements that make up a SynthLookAndFeel definition.
</p> </p>
<h3>The style element</h3> <h3>The style element</h3>
<div class="dtd-fragment"> <div class="dtd-fragment">
<pre class="dtd-fragment"> <pre class="dtd-fragment">
&lt;!ELEMENT <a name="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> | &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> |
<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>) | <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>) |
<a href="#e.imageIcon">imageIcon</a>)*> <a href="#e.imageIcon">imageIcon</a>)*>
&lt;!ATTLIST style &lt;!ATTLIST style
@ -101,9 +132,9 @@ div.example {
</div> </div>
<p><em>Attribute definitions</em></p> <p><em>Attribute definitions</em></p>
<dl> <dl>
<dt><a name="style.id"><samp>id</samp></a></dt> <dt><a id="style.id"><samp>id</samp></a></dt>
<dd>Unique identifier for the style.</dd> <dd>Unique identifier for the style.</dd>
<dt><a name="style.clone"><samp>clone</samp></a></dt> <dt><a id="style.clone"><samp>clone</samp></a></dt>
<dd>Identifier of a previously defined style that is copied <dd>Identifier of a previously defined style that is copied
and used for the new style. This provides a convenient and used for the new style. This provides a convenient
mechanism for overriding only a portion of an existing mechanism for overriding only a portion of an existing
@ -144,7 +175,7 @@ div.example {
<h3>The state element</h3> <h3>The state element</h3>
<div class="dtd-fragment"> <div class="dtd-fragment">
<pre class="dtd-fragment"> <pre class="dtd-fragment">
&lt;!ELEMENT <a name="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>) | &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>) |
<a href="#e.property">property</a> | <a href="#e.imageIcon">imageIcon</a>)*> <a href="#e.property">property</a> | <a href="#e.imageIcon">imageIcon</a>)*>
&lt;!ATTLIST state &lt;!ATTLIST state
<a href="#state.id">id</a> ID #IMPLIED <a href="#state.id">id</a> ID #IMPLIED
@ -156,19 +187,19 @@ div.example {
</div> </div>
<p><em>Attribute definitions</em></p> <p><em>Attribute definitions</em></p>
<dl> <dl>
<dt><a name="state.id"><samp>id</samp></a></dt> <dt><a id="state.id"><samp>id</samp></a></dt>
<dd>Unique identifier for the state.</dd> <dd>Unique identifier for the state.</dd>
<dt><a name="state.clone"><samp>clone</samp></a></dt> <dt><a id="state.clone"><samp>clone</samp></a></dt>
<dd>Identifier of a previously defined state that is copied <dd>Identifier of a previously defined state that is copied
and used for the new state.</dd> and used for the new state.</dd>
<dt><a name="state.value"><samp>value</samp></a></dt> <dt><a id="state.value"><samp>value</samp></a></dt>
<dd>Identifies the state of the Component the properties are to apply <dd>Identifies the state of the Component the properties are to apply
to. This is a list of: ENABLED, to. This is a list of: ENABLED,
MOUSE_OVER, PRESSED, DISABLED, FOCUSED, SELECTED or MOUSE_OVER, PRESSED, DISABLED, FOCUSED, SELECTED or
DEFAULT. Multiple states should DEFAULT. Multiple states should
be separated by 'and.' If you do not specify a value, the be separated by 'and.' If you do not specify a value, the
contents apply to all states. contents apply to all states.
<dt><a name="state.idref"><samp>idref</samp></a></dt> <dt><a id="state.idref"><samp>idref</samp></a></dt>
<dd>Indicates this state should be the same as a previously <dd>Indicates this state should be the same as a previously
defined state. This is useful for multiple styles that defined state. This is useful for multiple styles that
wish to share the same visual properties for a particular wish to share the same visual properties for a particular
@ -212,7 +243,7 @@ div.example {
<p> <p>
State <code>one</code> is used when the Component is SELECTED State <code>one</code> is used when the Component is SELECTED
and PRESSED, and state <code>two</code> when the Component is and PRESSED, and state <code>two</code> when the Component is
SELECTED. If the state of the Component SELECTED. If the state of the Component
contains at least SELECTED and PRESSED, state <code>one</code> will be contains at least SELECTED and PRESSED, state <code>one</code> will be
chosen, otherwise if the state is SELECTED, but not does not chosen, otherwise if the state is SELECTED, but not does not
contain PRESSED, state <code>two</code> will be used. contain PRESSED, state <code>two</code> will be used.
@ -220,7 +251,7 @@ div.example {
<h3>The font element</h3> <h3>The font element</h3>
<div class="dtd-fragment"> <div class="dtd-fragment">
<pre class="dtd-fragment"> <pre class="dtd-fragment">
&lt;!ELEMENT <a name="e.font">font</a> EMPTY> &lt;!ELEMENT <a id="e.font">font</a> EMPTY>
&lt;!ATTLIST font &lt;!ATTLIST font
<a href="#font.id">id</a> ID #IMPLIED <a href="#font.id">id</a> ID #IMPLIED
<a href="#font.idref">clone</a> IDREF #IMPLIED <a href="#font.idref">clone</a> IDREF #IMPLIED
@ -232,18 +263,18 @@ div.example {
</div> </div>
<p><em>Attribute definitions</em></p> <p><em>Attribute definitions</em></p>
<dl> <dl>
<dt><a name="font.id"><samp>id</samp></a></dt> <dt><a id="font.id"><samp>id</samp></a></dt>
<dd>Unique identifier for the Font.</dd> <dd>Unique identifier for the Font.</dd>
<dt><a name="font.idref"><samp>idref</samp></a></dt> <dt><a id="font.idref"><samp>idref</samp></a></dt>
<dd>Identifier of a previously defined font.</dd> <dd>Identifier of a previously defined font.</dd>
<dt><a name="font.name"><samp>name</samp></a></dt> <dt><a id="font.name"><samp>name</samp></a></dt>
<dd>Name of the font. <dd>Name of the font.
<dt><a name="font.style"><samp>style</samp></a></dt> <dt><a id="font.style"><samp>style</samp></a></dt>
<dd>Style of the font. This is a list of the styles defined by <dd>Style of the font. This is a list of the styles defined by
Font separated by spaces: PLAIN, BOLD or ITALIC. If Font separated by spaces: PLAIN, BOLD or ITALIC. If
unspecified PLAIN is used. unspecified PLAIN is used.
</dd> </dd>
<dt><a name="font.size"><samp>size</samp></a></dt> <dt><a id="font.size"><samp>size</samp></a></dt>
<dd>Size of the font, in pixels</dd> <dd>Size of the font, in pixels</dd>
</dl> </dl>
<p> <p>
@ -289,7 +320,7 @@ div.example {
<h3>The color element</h3> <h3>The color element</h3>
<div class="dtd-fragment"> <div class="dtd-fragment">
<pre class="dtd-fragment"> <pre class="dtd-fragment">
&lt;!ELEMENT <a name="e.color">color</a> EMPTY> &lt;!ELEMENT <a id="e.color">color</a> EMPTY>
&lt;!ATTLIST color &lt;!ATTLIST color
<a href="#color.id">id</a> ID #IMPLIED <a href="#color.id">id</a> ID #IMPLIED
<a href="#color.idref">idref</a> IDREF #IMPLIED <a href="#color.idref">idref</a> IDREF #IMPLIED
@ -300,11 +331,11 @@ div.example {
</div> </div>
<p><em>Attribute definitions</em></p> <p><em>Attribute definitions</em></p>
<dl> <dl>
<dt><a name="color.id"><samp>id</samp></a></dt> <dt><a id="color.id"><samp>id</samp></a></dt>
<dd>Unique identifier for the color.</dd> <dd>Unique identifier for the color.</dd>
<dt><a name="color.idref"><samp>idref</samp></a></dt> <dt><a id="color.idref"><samp>idref</samp></a></dt>
<dd>Identifier of a previously defined color.</dd> <dd>Identifier of a previously defined color.</dd>
<dt><a name="color.type"><samp>type</samp></a></dt> <dt><a id="color.type"><samp>type</samp></a></dt>
<dd>Describes where this color should be used. This is <dd>Describes where this color should be used. This is
typically one of the constants defined by ColorType: typically one of the constants defined by ColorType:
FOREGROUND, BACKGROUND, TEXT_FOREGROUND, TEXT_BACKGROUND FOREGROUND, BACKGROUND, TEXT_FOREGROUND, TEXT_BACKGROUND
@ -314,12 +345,12 @@ div.example {
is useful for subclasses of synth that define additional is useful for subclasses of synth that define additional
color types. color types.
</dd> </dd>
<dt><a name="color.value"><samp>value</samp></a></dt> <dt><a id="color.value"><samp>value</samp></a></dt>
<dd> <dd>
Value for the color. This accepts the following forms. Value for the color. This accepts the following forms.
<ul> <ul>
<li>The name of a constant in the <code>Color</code> class, <li>The name of a constant in the <code>Color</code> class,
for example <code> RED</code>. for example <code> RED</code>.
<li>A hex value of the form <code>#RRGGBB</code> where <li>A hex value of the form <code>#RRGGBB</code> where
<code>RR</code> gives the red component, <code>GG</code> <code>RR</code> gives the red component, <code>GG</code>
the green component and <code>BB</code> the blue the green component and <code>BB</code> the blue
@ -329,7 +360,7 @@ div.example {
<code>#AARRGGBB</code>. This is useful for alpha values <code>#AARRGGBB</code>. This is useful for alpha values
other than <code>0xFF</code>. The form other than <code>0xFF</code>. The form
<code>#ARRGGBB</code> is equivalent to <code>#ARRGGBB</code> is equivalent to
<code>#0ARRGGBB</code>. <code>#0ARRGGBB</code>.
</ul> </ul>
</dd> </dd>
</dl> </dl>
@ -366,7 +397,7 @@ div.example {
<h3>The property element</h3> <h3>The property element</h3>
<div class="dtd-fragment"> <div class="dtd-fragment">
<pre class="dtd-fragment"> <pre class="dtd-fragment">
&lt;!ELEMENT <a name="e.property">property</a> EMPTY> &lt;!ELEMENT <a id="e.property">property</a> EMPTY>
&lt;!ATTLIST property &lt;!ATTLIST property
<a href="#property.key">key</a> CDATA #REQUIRED <a href="#property.key">key</a> CDATA #REQUIRED
<a href="#property.type">type</a> (idref|boolean|dimension|insets|integer|string) "idref" <a href="#property.type">type</a> (idref|boolean|dimension|insets|integer|string) "idref"
@ -376,11 +407,11 @@ div.example {
</div> </div>
<p><em>Attribute definitions</em></p> <p><em>Attribute definitions</em></p>
<dl> <dl>
<dt><a name="property.key"><samp>key</samp></a></dt> <dt><a id="property.key"><samp>key</samp></a></dt>
<dd>Name of the property.</dd> <dd>Name of the property.</dd>
<dt><a name="property.type"><samp>type</samp></a></dt> <dt><a id="property.type"><samp>type</samp></a></dt>
<dd>Indicates the type of the property.</dd> <dd>Indicates the type of the property.</dd>
<dt><a name="property.value"><samp>value</samp></a></dt> <dt><a id="property.value"><samp>value</samp></a></dt>
<dd>Value for the property. For boolean properties this will be <dd>Value for the property. For boolean properties this will be
be true or false, for integer properties this will be a be true or false, for integer properties this will be a
valid integer, for dimensions this will be the width and valid integer, for dimensions this will be the width and
@ -438,7 +469,7 @@ div.example {
</div> </div>
<div class="dtd-fragment"> <div class="dtd-fragment">
<pre class="dtd-fragment"> <pre class="dtd-fragment">
&lt;!ELEMENT <a name="e.defaultsProperty">defaultsProperty</a> EMPTY> &lt;!ELEMENT <a id="e.defaultsProperty">defaultsProperty</a> EMPTY>
&lt;!ATTLIST defaultsProperty &lt;!ATTLIST defaultsProperty
<a href="#defaultsProperty.key">key</a> CDATA #REQUIRED <a href="#defaultsProperty.key">key</a> CDATA #REQUIRED
<a href="#defaultsProperty.type">type</a> (idref|boolean|dimension|insets|integer|string) "idref" <a href="#defaultsProperty.type">type</a> (idref|boolean|dimension|insets|integer|string) "idref"
@ -448,11 +479,11 @@ div.example {
</div> </div>
<p><em>Attribute definitions</em></p> <p><em>Attribute definitions</em></p>
<dl> <dl>
<dt><a name="defaultsProperty.key"><samp>key</samp></a></dt> <dt><a id="defaultsProperty.key"><samp>key</samp></a></dt>
<dd>Name of the property.</dd> <dd>Name of the property.</dd>
<dt><a name="defaultsProperty.type"><samp>type</samp></a></dt> <dt><a id="defaultsProperty.type"><samp>type</samp></a></dt>
<dd>Indicates the type of the property.</dd> <dd>Indicates the type of the property.</dd>
<dt><a name="defaultsProperty.value"><samp>value</samp></a></dt> <dt><a id="defaultsProperty.value"><samp>value</samp></a></dt>
<dd>Value for the property. For boolean properties this will be <dd>Value for the property. For boolean properties this will be
true or false, for integer properties this will be a true or false, for integer properties this will be a
valid integer, for dimensions this will be the width and valid integer, for dimensions this will be the width and
@ -488,7 +519,7 @@ div.example {
<h3>The graphicsUtils element</h3> <h3>The graphicsUtils element</h3>
<div class="dtd-fragment"> <div class="dtd-fragment">
<pre class="dtd-fragment"> <pre class="dtd-fragment">
&lt;!ELEMENT <a name="e.graphicsUtils">graphicsUtils</a> EMPTY> &lt;!ELEMENT <a id="e.graphicsUtils">graphicsUtils</a> EMPTY>
&lt;!ATTLIST graphicsUtils &lt;!ATTLIST graphicsUtils
<a href="#graphicsUtils.idref">idref</a> IDREF #REQUIRED <a href="#graphicsUtils.idref">idref</a> IDREF #REQUIRED
&gt; &gt;
@ -496,7 +527,7 @@ div.example {
</div> </div>
<p><em>Attribute definitions</em></p> <p><em>Attribute definitions</em></p>
<dl> <dl>
<dt><a name="graphicsUtils.idref"><samp>idref</samp></a></dt> <dt><a id="graphicsUtils.idref"><samp>idref</samp></a></dt>
<dd>Identifer of a previously defined SynthGraphicsUtils object <dd>Identifer of a previously defined SynthGraphicsUtils object
that is to be used as the SynthGraphicsUtils for the current that is to be used as the SynthGraphicsUtils for the current
<a href="#e.style">style</a>.</dd> <a href="#e.style">style</a>.</dd>
@ -520,7 +551,7 @@ div.example {
<h3>The insets element</h3> <h3>The insets element</h3>
<div class="dtd-fragment"> <div class="dtd-fragment">
<pre class="dtd-fragment"> <pre class="dtd-fragment">
&lt;!ELEMENT <a name="e.insets">insets</a> EMPTY> &lt;!ELEMENT <a id="e.insets">insets</a> EMPTY>
&lt;!ATTLIST insets &lt;!ATTLIST insets
<a href="#insets.id">id</a> ID #IMPLIED <a href="#insets.id">id</a> ID #IMPLIED
<a href="#insets.idref">idref</a> IDREF #IMPLIED <a href="#insets.idref">idref</a> IDREF #IMPLIED
@ -533,17 +564,17 @@ div.example {
</div> </div>
<p><em>Attribute definitions</em></p> <p><em>Attribute definitions</em></p>
<dl> <dl>
<dt><a name="insets.id"><samp>id</samp></a></dt> <dt><a id="insets.id"><samp>id</samp></a></dt>
<dd>Unique identifier for the Insets.</dd> <dd>Unique identifier for the Insets.</dd>
<dt><a name="insets.idref"><samp>idref</samp></a></dt> <dt><a id="insets.idref"><samp>idref</samp></a></dt>
<dd>Identifier of a previously defined Insets.</dd> <dd>Identifier of a previously defined Insets.</dd>
<dt><a name="insets.top"><samp>top</samp></a></dt> <dt><a id="insets.top"><samp>top</samp></a></dt>
<dd>Top component of the Insets.</dd> <dd>Top component of the Insets.</dd>
<dt><a name="insets.bottom"><samp>bottom</samp></a></dt> <dt><a id="insets.bottom"><samp>bottom</samp></a></dt>
<dd>Bottom component of the Insets.</dd> <dd>Bottom component of the Insets.</dd>
<dt><a name="insets.left"><samp>left</samp></a></dt> <dt><a id="insets.left"><samp>left</samp></a></dt>
<dd>Left component of the Insets.</dd> <dd>Left component of the Insets.</dd>
<dt><a name="insets.right"><samp>right</samp></a></dt> <dt><a id="insets.right"><samp>right</samp></a></dt>
<dd>Right component of the Insets.</dd> <dd>Right component of the Insets.</dd>
</dl> </dl>
<p> <p>
@ -564,7 +595,7 @@ div.example {
<h3>The bind element</h3> <h3>The bind element</h3>
<div class="dtd-fragment"> <div class="dtd-fragment">
<pre class="dtd-fragment"> <pre class="dtd-fragment">
&lt;!ELEMENT <a name="e.bind">bind</a> EMPTY> &lt;!ELEMENT <a id="e.bind">bind</a> EMPTY>
&lt;!ATTLIST bind &lt;!ATTLIST bind
<a href="#bind.style">style</a> IDREF #REQUIRED <a href="#bind.style">style</a> IDREF #REQUIRED
<a href="#bind.type">type</a> (name|region) #REQUIRED <a href="#bind.type">type</a> (name|region) #REQUIRED
@ -574,12 +605,12 @@ div.example {
</div> </div>
<p><em>Attribute definitions</em></p> <p><em>Attribute definitions</em></p>
<dl> <dl>
<dt><a name="bind.style"><samp>style</samp></a></dt> <dt><a id="bind.style"><samp>style</samp></a></dt>
<dd>Unique identifier of a previously defined style.</dd> <dd>Unique identifier of a previously defined style.</dd>
<dt><a name="bind.type"><samp>type</samp></a></dt> <dt><a id="bind.type"><samp>type</samp></a></dt>
<dd>One of name or region. For type name component.getName() is used, <dd>One of name or region. For type name component.getName() is used,
otherwise the name of the Region is used.</dd> otherwise the name of the Region is used.</dd>
<dt><a name="bind.key"><samp>key</samp></a></dt> <dt><a id="bind.key"><samp>key</samp></a></dt>
<dd>Regular expression applied to the name of the Component, or the <dd>Regular expression applied to the name of the Component, or the
name of the Region, depending upon the value of name of the Region, depending upon the value of
<a href="#bind.type">type</a>.</dd> <a href="#bind.type">type</a>.</dd>
@ -673,7 +704,7 @@ div.example {
<h3>The painter element</h3> <h3>The painter element</h3>
<div class="dtd-fragment"> <div class="dtd-fragment">
<pre class="dtd-fragment"> <pre class="dtd-fragment">
&lt;!ELEMENT <a name="e.painter">painter</a> EMPTY> &lt;!ELEMENT <a id="e.painter">painter</a> EMPTY>
&lt;!ATTLIST painter &lt;!ATTLIST painter
<a href="#painter.idref">idref</a> IDREF #IMPLIED <a href="#painter.idref">idref</a> IDREF #IMPLIED
<a href="#painter.method">method</a> CDATA #IMPLIED <a href="#painter.method">method</a> CDATA #IMPLIED
@ -683,9 +714,9 @@ div.example {
</div> </div>
<p><em>Attribute definitions</em></p> <p><em>Attribute definitions</em></p>
<dl> <dl>
<dt><a name="painter.idref"><samp>idref</samp></a></dt> <dt><a id="painter.idref"><samp>idref</samp></a></dt>
<dd>Identifier of a previously defined SynthPainter.</dd> <dd>Identifier of a previously defined SynthPainter.</dd>
<dt><a name="painter.method"><samp>method</samp></a></dt> <dt><a id="painter.method"><samp>method</samp></a></dt>
<dd>Identifies the SynthPainter method this is to be used for. The name <dd>Identifies the SynthPainter method this is to be used for. The name
corresponds to the method name of a paint method in SynthPainter corresponds to the method name of a paint method in SynthPainter
with the paint prefix dropped, the remainder is case with the paint prefix dropped, the remainder is case
@ -694,7 +725,7 @@ div.example {
'buttonBackground' or 'buttonbackground'. If this is 'buttonBackground' or 'buttonbackground'. If this is
not specified the painter is used for all methods that don't have a not specified the painter is used for all methods that don't have a
a specific painter for them.</dd> a specific painter for them.</dd>
<dt><a name="painter.direction"><samp>direction</samp></a></dt> <dt><a id="painter.direction"><samp>direction</samp></a></dt>
<dd>Identifies the direction, or orientation, this painter is to be <dd>Identifies the direction, or orientation, this painter is to be
used for. This is only useful for the SynthPainter methods that take used for. This is only useful for the SynthPainter methods that take
a direction or orientation. If this is not specified the painter is a direction or orientation. If this is not specified the painter is
@ -787,7 +818,7 @@ div.example {
<h3>The imagePainter element</h3> <h3>The imagePainter element</h3>
<div class="dtd-fragment"> <div class="dtd-fragment">
<pre class="dtd-fragment"> <pre class="dtd-fragment">
&lt;!ELEMENT <a name="e.imagePainter">imagePainter</a> EMPTY> &lt;!ELEMENT <a id="e.imagePainter">imagePainter</a> EMPTY>
&lt;!ATTLIST imagePainter &lt;!ATTLIST imagePainter
<a href="#imagePainter.id">id</a> ID #IMPLIED <a href="#imagePainter.id">id</a> ID #IMPLIED
<a href="#imagePainter.method">method</a> CDATA #IMPLIED <a href="#imagePainter.method">method</a> CDATA #IMPLIED
@ -803,9 +834,9 @@ div.example {
</div> </div>
<p><em>Attribute definitions</em></p> <p><em>Attribute definitions</em></p>
<dl> <dl>
<dt><a name="imagePainter.id"><samp>id</samp></a></dt> <dt><a id="imagePainter.id"><samp>id</samp></a></dt>
<dd>Unique identifier for the imagePainter.</dd> <dd>Unique identifier for the imagePainter.</dd>
<dt><a name="imagePainter.method"><samp>method</samp></a></dt> <dt><a id="imagePainter.method"><samp>method</samp></a></dt>
<dd>Identifies the SynthPainter method this is to be used for. The name <dd>Identifies the SynthPainter method this is to be used for. The name
corresponds to the method name of a paint method in SynthPainter corresponds to the method name of a paint method in SynthPainter
with the paint prefix dropped, the remainder is case with the paint prefix dropped, the remainder is case
@ -814,29 +845,29 @@ div.example {
'buttonBackground' or 'buttonbackground'. If this is 'buttonBackground' or 'buttonbackground'. If this is
not specified the painter is used for all methods that don't have a not specified the painter is used for all methods that don't have a
a specific painter for them.</dd> a specific painter for them.</dd>
<dt><a name="imagePainter.direction"><samp>direction</samp></a></dt> <dt><a id="imagePainter.direction"><samp>direction</samp></a></dt>
<dd>Identifies the direction, or orientation, this image is to be <dd>Identifies the direction, or orientation, this image is to be
used for. This is only useful for the SynthPainter methods that take used for. This is only useful for the SynthPainter methods that take
a direction or orientation. If this is not specified the image is a direction or orientation. If this is not specified the image is
used for all directions.</dd> used for all directions.</dd>
<dt><a name="imagePainter.path"><samp>path</samp></a></dt> <dt><a id="imagePainter.path"><samp>path</samp></a></dt>
<dd>Path to the image. Path to the image. If SynthLookAndFeel.load is <dd>Path to the image. Path to the image. If SynthLookAndFeel.load is
passed a Class this will use the Class method getResource (with with the passed a Class this will use the Class method getResource (with with the
Class suplied to the load method). If load is passed a URL this will use the Class suplied to the load method). If load is passed a URL this will use the
URL constructor URL(context, path) to resolve the path.</dd> URL constructor URL(context, path) to resolve the path.</dd>
<dt><a name="imagePainter.sourceInsets"><samp>sourceInsets</samp></a></dt> <dt><a id="imagePainter.sourceInsets"><samp>sourceInsets</samp></a></dt>
<dd>Insets on the source image. This is top, left, bottom, right with <dd>Insets on the source image. This is top, left, bottom, right with
each component separated by a space.</dd> each component separated by a space.</dd>
<dt><a name="imagePainter.destinationInsets"><samp>destinationInsets</samp></a></dt> <dt><a id="imagePainter.destinationInsets"><samp>destinationInsets</samp></a></dt>
<dd>Insets of the destination image. This is top, left, bottom, right with <dd>Insets of the destination image. This is top, left, bottom, right with
each component separated by a space. If not specified the each component separated by a space. If not specified the
<a href="#imagePainter.sourceInsets">sourceInsets</a> are used.</dd> <a href="#imagePainter.sourceInsets">sourceInsets</a> are used.</dd>
<dt><a name="imagePainter.painterCenter"><samp>paintCenter</samp></a></dt> <dt><a id="imagePainter.painterCenter"><samp>paintCenter</samp></a></dt>
<dd>Whether or not the center of the image should be drawn.</dd> <dd>Whether or not the center of the image should be drawn.</dd>
<dt><a name="imagePainter.stretch"><samp>stretch</samp></a></dt> <dt><a id="imagePainter.stretch"><samp>stretch</samp></a></dt>
<dd>Whether or not the north, south, east and west components of the <dd>Whether or not the north, south, east and west components of the
resulting image should be scaled or tiled.</dd> resulting image should be scaled or tiled.</dd>
<dt><a name="imagePainter.center"><samp>center</samp></a></dt> <dt><a id="imagePainter.center"><samp>center</samp></a></dt>
<dd>Whether or not the image is centered.</dd> <dd>Whether or not the image is centered.</dd>
</dl> </dl>
<p> <p>
@ -844,7 +875,7 @@ div.example {
painter for the current style or state that will render using painter for the current style or state that will render using
the specified image. ImagePainter offers two distinct rendering the specified image. ImagePainter offers two distinct rendering
modes. The first mode is used to center an image in the space modes. The first mode is used to center an image in the space
provided. This is provided. This is
commonly used in rendering decorations on top of a widget, for commonly used in rendering decorations on top of a widget, for
example, to specify an arrow for a scroll button use the center example, to specify an arrow for a scroll button use the center
mode. The following example illustrates this: mode. The following example illustrates this:
@ -878,12 +909,12 @@ div.example {
Refer to the description of the <a href="#e.painter">painter</a> Refer to the description of the <a href="#e.painter">painter</a>
element for details as to the precedence in choosing a painter and to element for details as to the precedence in choosing a painter and to
understand how identical painters are handled. understand how identical painters are handled.
<h3>The imageIcon element</h3> <h3>The imageIcon element</h3>
<div class="dtd-fragment"> <div class="dtd-fragment">
<pre class="dtd-fragment"> <pre class="dtd-fragment">
&lt;!ELEMENT <a name="e.imageIcon">imageIcon</a> EMPTY> &lt;!ELEMENT <a id="e.imageIcon">imageIcon</a> EMPTY>
&lt;!ATTLIST imageIcon &lt;!ATTLIST imageIcon
<a href="#imageIcon.id">id</a> ID #REQUIRED <a href="#imageIcon.id">id</a> ID #REQUIRED
<a href="#imageIcon.path">path</a> CDATA #REQUIRED <a href="#imageIcon.path">path</a> CDATA #REQUIRED
@ -892,9 +923,9 @@ div.example {
</div> </div>
<p><em>Attribute definitions</em></p> <p><em>Attribute definitions</em></p>
<dl> <dl>
<dt><a name="imageIcon.id"><samp>id</samp></a></dt> <dt><a id="imageIcon.id"><samp>id</samp></a></dt>
<dd>Unique identifier for the imageIcon.</dd> <dd>Unique identifier for the imageIcon.</dd>
<dt><a name="imageIcon.path"><samp>path</samp></a></dt> <dt><a id="imageIcon.path"><samp>path</samp></a></dt>
<dd>Path to the image. This uses the Class method <dd>Path to the image. This uses the Class method
getResource to resolve the path, with the Class supplied to getResource to resolve the path, with the Class supplied to
SynthLookAndFeel.load.</dd> SynthLookAndFeel.load.</dd>
@ -917,7 +948,7 @@ div.example {
<h3>The opaque element</h3> <h3>The opaque element</h3>
<div class="dtd-fragment"> <div class="dtd-fragment">
<pre class="dtd-fragment"> <pre class="dtd-fragment">
&lt;!ELEMENT <a name="e.opaque">opaque</a> EMPTY> &lt;!ELEMENT <a id="e.opaque">opaque</a> EMPTY>
&lt;!ATTLIST opaque &lt;!ATTLIST opaque
<a href="#opaque.value">value</a> (true|false) "true" <a href="#opaque.value">value</a> (true|false) "true"
&gt; &gt;
@ -925,7 +956,7 @@ div.example {
</div> </div>
<p><em>Attribute definitions</em></p> <p><em>Attribute definitions</em></p>
<dl> <dl>
<dt><a name="opaque.value"><samp>id</samp></a></dt> <dt><a id="opaque.value"><samp>id</samp></a></dt>
<dd>Whether or not the style should be opaque, if unspecified the style <dd>Whether or not the style should be opaque, if unspecified the style
is opaque.</dd> is opaque.</dd>
</dl> </dl>
@ -945,12 +976,14 @@ div.example {
</pre> </pre>
</div> </div>
<h3><a name="ee.beansPersistance">The beansPersistance entity</a></h3> <h3><a id="ee.beansPersistance">The beansPersistance entity</a></h3>
<p> <p>
Beans persistance can be used to embed any Object. This is Beans persistance can be used to embed any Object. This is
typically used for embedding your own Painters, but can be used typically used for embedding your own Painters, but can be used
for other arbritrary objects as well. Refer to <a for other arbritrary objects as well. Refer to <a
href="http://www.oracle.com/technetwork/java/persistence3-139471.html">http://www.oracle.com/technetwork/java/persistence3-139471.html</a> for details on beans persistance. href="http://www.oracle.com/technetwork/java/persistence3-139471.html">
http://www.oracle.com/technetwork/java/persistence3-139471.html</a>
for details on beans persistance.
<h3>Backing Style</h3> <h3>Backing Style</h3>