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:
parent
625c3fd013
commit
f968e1a670
@ -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.
|
||||
|
||||
This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,16 +29,11 @@
|
||||
questions.
|
||||
-->
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
<body bgcolor=white>
|
||||
<body>
|
||||
|
||||
<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>
|
||||
|
||||
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
|
||||
newly added listener is only notified on subsequent key events.
|
||||
|
||||
<a name="Autoshutdown"></a>
|
||||
<a id="Autoshutdown"></a>
|
||||
<h2>Auto-shutdown</h2>
|
||||
|
||||
According to
|
||||
@ -53,7 +54,7 @@ The virtual machine terminates all its activity and exits when
|
||||
one of two things happens:
|
||||
<ul>
|
||||
<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
|
||||
operation is permitted by the security manager.
|
||||
</ul>
|
||||
@ -84,13 +85,15 @@ this machinery are as follows:
|
||||
posted to the <code>EventQueue</code> can be coalesced) are
|
||||
dispatched:
|
||||
<ul>
|
||||
<li> Sequentially.
|
||||
<dl><dd> That is, it is not permitted that several events from
|
||||
<li>
|
||||
<dl><dt>Sequentially.
|
||||
<dd> That is, it is not permitted that several events from
|
||||
this queue are dispatched simultaneously. </dd></dl>
|
||||
<li> In the same order as they are enqueued.
|
||||
<dl><dd> That is, if <code>AWTEvent</code> A is enqueued
|
||||
<li>
|
||||
<dl><dt>In the same order as they are enqueued.
|
||||
<dd> That is, if <code>AWTEvent</code> A is enqueued
|
||||
to the <code>EventQueue</code> before
|
||||
<code>AWTEvent</code> B then event B will not be
|
||||
<code>AWTEvent</code> B then event B will not be
|
||||
dispatched before event A.</dd></dl>
|
||||
</ul>
|
||||
<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
|
||||
<a href="../Component.html#isDisplayable()"><code>Component.isDisplayable</code></a>).
|
||||
</ul>
|
||||
The implications of the third restriction are as follows:
|
||||
The implications of the third restriction are as follows:
|
||||
<ul>
|
||||
<li> The JVM will exit if some thread invokes the <code>exit</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.
|
||||
</ul>
|
||||
It depends on the implementation if and when the non-daemon helper
|
||||
threads are terminated once all components are made undisplayable.
|
||||
The implementation-specific details are given below.
|
||||
threads are terminated once all components are made undisplayable.
|
||||
The implementation-specific details are given below.
|
||||
|
||||
<h3>
|
||||
Implementation-dependent behavior.
|
||||
@ -147,7 +150,7 @@ cleanly without calling <code>System.exit</code> must:
|
||||
</ul>
|
||||
Note, that while an application following these recommendations will
|
||||
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>
|
||||
<li> Other packages can create displayable components for internal
|
||||
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">
|
||||
4671025</a>, and
|
||||
<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
|
||||
events to windows that belong to another application. With this
|
||||
feature it is possible to write a malicious program that will
|
||||
@ -165,10 +168,10 @@ will exit cleanly in all cases. Two examples:
|
||||
</ul>
|
||||
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
|
||||
non-daemon thread that blocks forever.
|
||||
non-daemon thread that blocks forever.
|
||||
|
||||
<pre>
|
||||
<...>
|
||||
<...>
|
||||
Runnable r = new Runnable() {
|
||||
public void run() {
|
||||
Object o = new Object();
|
||||
@ -183,7 +186,7 @@ non-daemon thread that blocks forever.
|
||||
Thread t = new Thread(r);
|
||||
t.setDaemon(false);
|
||||
t.start();
|
||||
<...>
|
||||
<...>
|
||||
</pre>
|
||||
|
||||
<cite>The Java™ Virtual Machine Specification</cite>
|
||||
|
@ -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.
|
||||
|
||||
This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,14 +29,9 @@
|
||||
questions.
|
||||
-->
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
<body bgcolor=white>
|
||||
<body>
|
||||
|
||||
<h1 align=center>AWT Desktop Properties</h1>
|
||||
<h1>AWT Desktop Properties</h1>
|
||||
|
||||
The following refers to standard AWT desktop properties that
|
||||
may be obtained via the
|
||||
@ -76,7 +77,7 @@ here, and their value types.
|
||||
</table>
|
||||
|
||||
<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>
|
||||
Modern desktops support various forms of text antialiasing (font smoothing).
|
||||
<p>
|
||||
@ -116,7 +117,7 @@ An application can listen for changes in the property
|
||||
using a <a href="../../beans/PropertyChangeListener.html">
|
||||
<code>PropertyChangeListener</code></a> :
|
||||
<pre><code>
|
||||
tk.addPropertyChangeListener("awt.font.desktophints", pcl);
|
||||
tk.addPropertyChangeListener("awt.font.desktophints", pcl);
|
||||
</code></pre>
|
||||
Listening for changes is recommended as users can, on rare occasions,
|
||||
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
|
||||
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.
|
||||
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>
|
||||
<li>If non-null the value will be a <code>Map</code> 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.
|
||||
</ul>
|
||||
<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>
|
||||
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
|
||||
@ -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")
|
||||
method.
|
||||
<br>
|
||||
If the property is set to {@code true} then
|
||||
If the property is set to {@code true} then
|
||||
<ul>
|
||||
<li> it is still legal to create {@code MouseEvent} objects with
|
||||
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,
|
||||
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
|
||||
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()}
|
||||
</ul>
|
||||
<br>
|
||||
If the property is set to {@code false} then
|
||||
If the property is set to {@code false} then
|
||||
<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
|
||||
{@code BUTTON3}
|
||||
<li> it is legal to use standard button masks only:
|
||||
|
@ -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.
|
||||
|
||||
This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,15 +29,8 @@
|
||||
questions.
|
||||
-->
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>The AWT Focus Subsystem</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white">
|
||||
<h1 align=center>The AWT Focus Subsystem</h1>
|
||||
<body>
|
||||
<h1>The AWT Focus Subsystem</h1>
|
||||
|
||||
<p>
|
||||
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
|
||||
activation change. For example, when a Component received a FOCUS_LOST
|
||||
event, it had no way of knowing which Component was gaining
|
||||
focus. Since Microsoft Windows provides this functionality for free,
|
||||
developers migrating from Microsoft Windows C/C++ or Visual Basic to
|
||||
focus. Since Microsoft Windows provides this functionality for free,
|
||||
developers migrating from Microsoft Windows C/C++ or Visual Basic to
|
||||
Java had been frustrated by the omission.
|
||||
<p>
|
||||
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>
|
||||
</ul>
|
||||
|
||||
<a name="Overview"></a>
|
||||
<a id="Overview"></a>
|
||||
<h3>Overview of KeyboardFocusManager</h3>
|
||||
<p>
|
||||
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
|
||||
children are traversed "forward" and "backward". Focus traversal
|
||||
policy provider can be set using
|
||||
<code>setFocusTraversalPolicyProvider</code> on the Container.
|
||||
<code>setFocusTraversalPolicyProvider</code> on the Container.
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
@ -180,7 +179,7 @@
|
||||
descendants.
|
||||
|
||||
<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>
|
||||
|
||||
<p>Assume the following:
|
||||
@ -193,7 +192,7 @@
|
||||
<li><b>G</b>, <b>H</b>, <b>E</b>, and <b>F</b> are all
|
||||
<code>Component</code>s.
|
||||
</ul>
|
||||
|
||||
|
||||
There are a total of three focus cycle roots in this example:
|
||||
|
||||
<ol>
|
||||
@ -213,7 +212,7 @@
|
||||
implementation in the <code>DefaultKeyboardFocusManager</code> class.
|
||||
|
||||
|
||||
<a name="BrowserContexts"></a>
|
||||
<a id="BrowserContexts"></a>
|
||||
<h3>KeyboardFocusManager and Browser Contexts</h3>
|
||||
<p>
|
||||
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.
|
||||
|
||||
|
||||
<a name="KeyEventDispatcher"></a>
|
||||
<a id="KeyEventDispatcher"></a>
|
||||
<h3>KeyEventDispatcher and KeyEventPostProcessor</h3>
|
||||
<p>
|
||||
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
|
||||
that capacity.
|
||||
|
||||
<a name="FocusEventAndWindowEvent"></a>
|
||||
<a id="FocusEventAndWindowEvent"></a>
|
||||
<h3>FocusEvent and WindowEvent</h3>
|
||||
<p>
|
||||
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.
|
||||
</ol>
|
||||
|
||||
<a name="EventDelivery"></a>
|
||||
<a id="EventDelivery"></a>
|
||||
<h3>Event Delivery</h3>
|
||||
<p>
|
||||
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>.
|
||||
|
||||
|
||||
<a name="OppositeComponents"></a>
|
||||
<a id="OppositeComponents"></a>
|
||||
<h3>Opposite Components and Windows</h3>
|
||||
<p>
|
||||
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
|
||||
top-level Window.
|
||||
|
||||
<a name="TemporaryFocusEvents"></a>
|
||||
<a id="TemporaryFocusEvents"></a>
|
||||
<h3>Temporary FocusEvents</h3>
|
||||
<p>
|
||||
<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
|
||||
losing the focus, but will regain the focus shortly. These events
|
||||
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,
|
||||
and can accomplish this by responding to <code>FOCUS_LOST</code> events.
|
||||
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,
|
||||
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. Showing a Menu or PopupMenu, or
|
||||
clicking or dragging a Scrollbar, should generate a temporary
|
||||
<code>FOCUS_GAINED</code> event. Showing a Menu or PopupMenu, or
|
||||
clicking or dragging a Scrollbar, should generate a temporary
|
||||
<code>FOCUS_GAINED</code> event. Changing the focused Window,
|
||||
however, will yield a permanent <code>FOCUS_GAINED</code> event
|
||||
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
|
||||
instead as a hook for lightweight Component libraries, such as Swing.
|
||||
|
||||
<a name="FocusTraversal"></a>
|
||||
<a id="FocusTraversal"></a>
|
||||
<h3>Focus Traversal</h3>
|
||||
<p>
|
||||
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
|
||||
context-wide default set on the current <code>KeyboardFocusManager</code>.
|
||||
<p>
|
||||
Using the <code>AWTKeyStroke</code> API, client code can specify
|
||||
on which of two specific KeyEvents, <code>KEY_PRESSED</code> or
|
||||
Using the <code>AWTKeyStroke</code> API, client code can specify
|
||||
on which of two specific KeyEvents, <code>KEY_PRESSED</code> or
|
||||
<code>KEY_RELEASED</code>, the focus traversal operation will occur.
|
||||
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
|
||||
dispatched to any Component. It is a runtime error to specify a
|
||||
<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
|
||||
<code>KeyboardFocusManager</code> maintains a reference to 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>
|
||||
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
|
||||
@ -491,10 +490,10 @@ current focus owner. If the current focus owner is not a focus cycle
|
||||
root, then no focus traversal operation occurs.
|
||||
|
||||
|
||||
<a name="FocusTraversalPolicy"></a>
|
||||
<a id="FocusTraversalPolicy"></a>
|
||||
<h3>FocusTraversalPolicy</h3>
|
||||
<p>
|
||||
|
||||
|
||||
A <code>FocusTraversalPolicy</code> defines the order in which Components within
|
||||
a particular focus cycle root or focus traversal policy provider are
|
||||
traversed. Instances of <code>FocusTraversalPolicy</code> can be shared across
|
||||
@ -524,7 +523,7 @@ five algorithms:
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
A <code>FocusTraversalPolicy</code> may optionally provide an
|
||||
A <code>FocusTraversalPolicy</code> may optionally provide an
|
||||
algorithm for the following:
|
||||
<blockquote>
|
||||
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
|
||||
default policy. The context default policy is established by using
|
||||
KeyboardFocusManager. <code>setDefaultFocusTraversalPolicy</code>.
|
||||
|
||||
|
||||
<p>
|
||||
AWT provides two standard <code>FocusTraversalPolicy</code>
|
||||
implementations for use by client code.
|
||||
@ -573,14 +572,14 @@ implementations for use by client code.
|
||||
<li><code>DefaultFocusTraversalPolicy</code>: A subclass of
|
||||
<code>ContainerOrderFocusTraversalPolicy</code> which redefines
|
||||
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.isFocusable()</code>, or by calling
|
||||
<code>Component.setFocusable(boolean)</code>, then a
|
||||
<code>Component.setFocusable(boolean)</code>, then a
|
||||
<code>DefaultFocusTraversalPolicy</code> behaves exactly
|
||||
like a <code>ContainerOrderFocusTraversalPolicy</code>. If,
|
||||
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.
|
||||
<br>
|
||||
The focusability of a peer is implementation-dependent. Sun
|
||||
@ -627,7 +626,7 @@ InternalFrameFocusTraversalPolicy.
|
||||
</ol>
|
||||
<p>
|
||||
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:
|
||||
<ul>
|
||||
@ -653,7 +652,7 @@ Containers by default.
|
||||
All other applications, including pure AWT applications, will use
|
||||
<code>DefaultFocusTraversalPolicy</code> by default.
|
||||
|
||||
<a name="FocusTraversalPolicyProviders"></a>
|
||||
<a id="FocusTraversalPolicyProviders"></a>
|
||||
<h3>Focus Traversal Policy Providers</h3>
|
||||
<p>
|
||||
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
|
||||
isn't considered a focus traversal policy provider and behaves just like any
|
||||
other focus cycle root.
|
||||
|
||||
|
||||
<p>
|
||||
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
|
||||
@ -740,7 +739,7 @@ All other applications, including pure AWT applications, will use
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<a name="ProgrammaticTraversal"></a>
|
||||
<a id="ProgrammaticTraversal"></a>
|
||||
<h3>Programmatic Traversal</h3>
|
||||
<p>
|
||||
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.
|
||||
|
||||
|
||||
<a name="Focusability"></a>
|
||||
<a id="Focusability"></a>
|
||||
<h3>Focusability</h3>
|
||||
<p>
|
||||
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).
|
||||
|
||||
|
||||
<a name="FocusableWindows"></a>
|
||||
<a id="FocusableWindows"></a>
|
||||
<h3>Focusable Windows</h3>
|
||||
<p>
|
||||
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
|
||||
focus owner will be cleared and the focused Window will remain unchanged.
|
||||
|
||||
<a name="RequestingFocus"></a>
|
||||
<a id="RequestingFocus"></a>
|
||||
<h3>Requesting Focus</h3>
|
||||
|
||||
<p>
|
||||
@ -949,7 +948,7 @@ The Component class also supports variants of <code>requestFocus</code> and
|
||||
a temporary state.
|
||||
See <a href="#TemporaryFocusEvents">Temporary FocusEvents</a>
|
||||
|
||||
<a name="FocusAndPropertyChangeListener"></a>
|
||||
<a id="FocusAndPropertyChangeListener"></a>
|
||||
<h3>Focus and PropertyChangeListener</h3>
|
||||
<p>
|
||||
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.
|
||||
<p>
|
||||
The <code>KeyboardFocusManager</code> supports the following properties:
|
||||
|
||||
|
||||
<ol>
|
||||
<li><code>focusOwner</code>: the focus owner
|
||||
<li><code>focusedWindow</code>: the focused Window
|
||||
@ -977,7 +976,7 @@ The <code>KeyboardFocusManager</code> supports the following properties:
|
||||
<p>
|
||||
A <code>PropertyChangeListener</code> installed on the current
|
||||
<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
|
||||
root comprise the global focus state shared by all contexts.
|
||||
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:
|
||||
|
||||
<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>
|
||||
<li><code>focusTraversalPolicy</code>: the Container's focus
|
||||
traversal policy
|
||||
@ -1020,10 +1019,10 @@ Window will never see a <code>PropertyChangeEvent</code> for the
|
||||
<code>focusCycleRoot</code> property.
|
||||
A Window is always a focus cycle root; this property cannot change.
|
||||
<p>
|
||||
<a name="FocusAndVetoableChangeListener"></a>
|
||||
<a id="FocusAndVetoableChangeListener"></a>
|
||||
<h3>Focus and VetoableChangeListener</h3>
|
||||
<p>
|
||||
The <code>KeyboardFocusManager</code> also supports
|
||||
The <code>KeyboardFocusManager</code> also supports
|
||||
<code>VetoableChangeListener</code>s for the following properties:
|
||||
|
||||
<ol>
|
||||
@ -1054,13 +1053,13 @@ event, a <code>KeyboardFocusManager</code> is not required to search the
|
||||
<code>KeyboardFocusManager</code> is free to attempt to
|
||||
dispatch this event and it is the responsibility of the
|
||||
<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
|
||||
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.
|
||||
<p>
|
||||
A <code>KeyboardFocusManager</code> may not hold any locks while
|
||||
notifying <code>PropertyChangeListener</code>s of a state change.
|
||||
A <code>KeyboardFocusManager</code> may not hold any locks while
|
||||
notifying <code>PropertyChangeListener</code>s of a state change.
|
||||
This requirement is relaxed for <code>VetoableChangeListeners</code>,
|
||||
however. Therefore, client-definied <code>VetoableChangeListener</code>s
|
||||
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.
|
||||
|
||||
|
||||
<a name="ZOrder"></a>
|
||||
<a id="ZOrder"></a>
|
||||
<h3>Z-Order</h3>
|
||||
<p>
|
||||
On some native windowing systems, the Z-order of a Window can affect
|
||||
its focused or active (if applicable) state. On Microsoft Windows, the
|
||||
top-most Window is naturally the focused Window as well. However, on
|
||||
Solaris, many window managers use a point-to-focus model that ignores
|
||||
its focused or active (if applicable) state. On Microsoft Windows, the
|
||||
top-most Window is naturally the focused Window as well. However, on
|
||||
Solaris, many window managers use a point-to-focus model that ignores
|
||||
Z-order in determining the focused Window.
|
||||
|
||||
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:
|
||||
<ul>
|
||||
<li><code>Window.toFront()</code>:<br>
|
||||
<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
|
||||
<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
|
||||
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
|
||||
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.
|
||||
|
||||
<li><code>Window.toBack()</code>:<br>
|
||||
<b>Microsoft Windows</b>: The Window is moved to back. Note however
|
||||
that Microsoft Windows insists that an owned Window always be in
|
||||
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
|
||||
Z-order. If the Window, or any of its owners, was the focused Window,
|
||||
<b>Microsoft Windows</b>: The Window is moved to back. Note however
|
||||
that Microsoft Windows insists that an owned Window always be in
|
||||
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
|
||||
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.
|
||||
<br>
|
||||
<b>Solaris</b>: The Window is moved to back. Like Microsoft Windows,
|
||||
some window managers insist than an owned Window always be in front
|
||||
<b>Solaris</b>: The Window is moved to back. Like Microsoft Windows,
|
||||
some window managers insist than an owned Window always be in 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
|
||||
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()/
|
||||
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 may be in a native application, or a Java application in
|
||||
another VM.
|
||||
@ -1169,7 +1168,7 @@ Microsoft Windows and Solaris is as follows:
|
||||
application in another VM.
|
||||
</ul>
|
||||
|
||||
<a name="ReplacingDefaultKeyboardFocusManager"></a>
|
||||
<a id="ReplacingDefaultKeyboardFocusManager"></a>
|
||||
<h3>Replacing DefaultKeyboardFocusManager</h3>
|
||||
<p>
|
||||
<code>KeyboardFocusManager</code>s are pluggable at the browser context
|
||||
@ -1238,7 +1237,7 @@ focused Window:
|
||||
heavyweight Container, not the focus owner.
|
||||
<li>A <code>FOCUS_LOST</code> event must be retargeted to the focus
|
||||
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
|
||||
the focused Window. The implementation of the Window class
|
||||
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.
|
||||
<li>If the <code>KeyboardFocusManager</code> attempts
|
||||
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>.
|
||||
</ul>
|
||||
<p>
|
||||
@ -1302,13 +1301,13 @@ and VetoableChangeListener</a>.
|
||||
recent focus owner.
|
||||
<li>The <code>KeyboardFocusManager</code> must ensure that the
|
||||
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
|
||||
retarget the opposite Component to a lightweight child of the
|
||||
heavyweight initially specified by the peer layer.
|
||||
<br>
|
||||
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
|
||||
this value. <code>null</code> indicates that it is highly
|
||||
probably that no other Component or Window was involved
|
||||
@ -1325,7 +1324,7 @@ and VetoableChangeListener</a>.
|
||||
events.
|
||||
</ul>
|
||||
|
||||
<a name="Incompatibilities"></a>
|
||||
<a id="Incompatibilities"></a>
|
||||
<h3>Incompatibilities with Previous Releases</h3>
|
||||
<p><b>Cross-platform changes:</b>
|
||||
<ol>
|
||||
@ -1343,7 +1342,7 @@ and VetoableChangeListener</a>.
|
||||
<li>KeyListeners installed on <code>Component</code>s
|
||||
will no longer see <code>KeyEvent</code>s that map to focus
|
||||
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
|
||||
and had an opportunity to consume them before AWT
|
||||
initiated focus traversal. Code that requires this
|
||||
@ -1352,7 +1351,7 @@ and VetoableChangeListener</a>.
|
||||
itself. Alternately, the code can use an
|
||||
<code>AWTEventListener</code> or
|
||||
<code>KeyEventDispatcher</code> to pre-listen to all
|
||||
<code>KeyEvent</code>s.
|
||||
<code>KeyEvent</code>s.
|
||||
</ol>
|
||||
<p><b>Changes specific to Microsoft Windows:</b>
|
||||
<ol>
|
||||
|
@ -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.
|
||||
|
||||
This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,19 +29,9 @@
|
||||
questions.
|
||||
-->
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<body>
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<title>The AWT Modality</title>
|
||||
|
||||
</head>
|
||||
|
||||
<body bgcolor="white">
|
||||
|
||||
<h1 align="center">The AWT Modality</h1>
|
||||
<h1>The AWT Modality</h1>
|
||||
|
||||
<p>
|
||||
This document, together with the API documentation for modality-related
|
||||
@ -53,7 +49,7 @@
|
||||
<li><a href="#Examples">Examples</a></li>
|
||||
</ul>
|
||||
|
||||
<a name="Definitions"></a>
|
||||
<a id="Definitions"></a>
|
||||
<h3>Definitions</h3>
|
||||
|
||||
<p>
|
||||
@ -63,7 +59,7 @@
|
||||
Every window belongs to some document — its root can be found as
|
||||
the closest ancestor window without an owner.
|
||||
</p><p>
|
||||
<a name="ModalBlocked"></a>
|
||||
<a id="ModalBlocked"></a>
|
||||
<u>Modal blocked window</u> - a window, that:
|
||||
</p><ul>
|
||||
<li>doesn't receive any user input events
|
||||
@ -73,7 +69,7 @@
|
||||
<blockquote>
|
||||
<hr>
|
||||
<b>Warning!</b> Some window managers allow users to change the window
|
||||
Z-order in an arbitrary way — in that case the last requirement
|
||||
Z-order in an arbitrary way — in that case the last requirement
|
||||
may not be met.
|
||||
<hr>
|
||||
</blockquote>
|
||||
@ -87,7 +83,7 @@
|
||||
then all its owned windows and child components are also excluded.
|
||||
</p><p>
|
||||
<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.
|
||||
<blockquote><hr>
|
||||
<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.
|
||||
<hr></blockquote>
|
||||
|
||||
<a name="ModalityTypes"></a>
|
||||
<a id="ModalityTypes"></a>
|
||||
<h3>Modality types</h3>
|
||||
|
||||
<p>
|
||||
@ -159,7 +155,7 @@
|
||||
dialog may have no effect until it is hidden and then shown again.
|
||||
<hr></blockquote>
|
||||
|
||||
<a name="ShowHideBlocking"></a>
|
||||
<a id="ShowHideBlocking"></a>
|
||||
<h3>Show/hide blocking</h3>
|
||||
|
||||
<p>
|
||||
@ -171,7 +167,7 @@
|
||||
</p><p>
|
||||
<u>Showing the modal dialog: "M"</u><br>
|
||||
When modal dialog M is shown, all the visible windows fall into one of
|
||||
three distinct groups:
|
||||
three distinct groups:
|
||||
<ul>
|
||||
<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
|
||||
@ -260,11 +256,11 @@
|
||||
If M was blocked by any other modal dialog, for example, "N",
|
||||
it becomes unblocked and
|
||||
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")
|
||||
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>
|
||||
@ -290,7 +286,7 @@
|
||||
may have no effect until it is hidden and then shown again.
|
||||
</blockquote>
|
||||
|
||||
<a name="Related"></a>
|
||||
<a id="Related"></a>
|
||||
<h3>Related AWT features</h3>
|
||||
|
||||
<p>
|
||||
@ -333,21 +329,21 @@
|
||||
</li></ol>
|
||||
If the modal dialog to be hidden does not have focus, the active window remains
|
||||
unchanged.
|
||||
|
||||
<a name="Security"></a>
|
||||
|
||||
<a id="Security"></a>
|
||||
<h3>Security</h3>
|
||||
|
||||
<p>
|
||||
A special <code>AWTPermission</code>, <code>"toolkitModality"</code>,
|
||||
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.
|
||||
</p><p>
|
||||
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
|
||||
blocked by a browser's or JWS's modal dialog.
|
||||
|
||||
<a name="PlatformSupport"></a>
|
||||
<a id="PlatformSupport"></a>
|
||||
</p><h3>Platform support</h3>
|
||||
|
||||
<p>
|
||||
@ -366,18 +362,18 @@
|
||||
and a window is marked as E-excluded, this has no effect.
|
||||
</li></ul>
|
||||
|
||||
<a name="Compatibility"></a>
|
||||
<a id="Compatibility"></a>
|
||||
<h3>Compatibility</h3>
|
||||
|
||||
<p>
|
||||
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
|
||||
the default type was toolkit-modal,
|
||||
but the only distinction between application- and toolkit-modality is for
|
||||
applets and applications launched from Java Web Start.
|
||||
|
||||
<a name="Examples"></a>
|
||||
<a id="Examples"></a>
|
||||
</p><h3>Examples</h3>
|
||||
|
||||
<table border="0">
|
||||
@ -429,7 +425,7 @@
|
||||
it's in the same application<br>
|
||||
<li>D<sub>i</sub> is shown<br>
|
||||
<li>D<sub>i</sub> becomes blocked by D<sub>ii</sub> — it's its owner<br>
|
||||
<li>D<sub>iii</sub> remains unblocked — it blocks D<sub>ii</sub> and
|
||||
<li>D<sub>iii</sub> remains unblocked — it blocks D<sub>ii</sub> and
|
||||
D<sub>ii</sub> blocks D<sub>i</sub><br>
|
||||
</ol>
|
||||
<br>
|
||||
|
@ -1,8 +1,11 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<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.
|
||||
|
||||
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.
|
||||
-->
|
||||
|
||||
<title>BMP Metadata Format Specification</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<center><h1>
|
||||
BMP Metadata Format Specification
|
||||
</h1></center>
|
||||
<h1>BMP Metadata Format Specification</h1>
|
||||
|
||||
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:
|
||||
</xsd:element>
|
||||
|
||||
<!-- Color space -->
|
||||
<xsd:element name="ColorSpaceType" type="xsd:unsignedInt"
|
||||
<xsd:element name="ColorSpaceType" type="xsd:unsignedInt"
|
||||
minOccurs="0"/>
|
||||
|
||||
<!-- CIE XYZ for the LCS_CALIBRATED_RGB color space -->
|
||||
|
@ -1,8 +1,11 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<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.
|
||||
|
||||
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.
|
||||
-->
|
||||
|
||||
<title>GIF Metadata Format Specification</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<body bgcolor="white">
|
||||
|
||||
<center><h1>
|
||||
GIF Metadata Format Specification
|
||||
</h1></center>
|
||||
<a name="gif_stream_metadata_format"></a>
|
||||
<center><h2>
|
||||
GIF Stream Metadata Format Specification
|
||||
</h2></center>
|
||||
<h1>GIF Metadata Format Specification</h1>
|
||||
<a id="gif_stream_metadata_format"></a>
|
||||
<h2>GIF Stream Metadata Format Specification</h2>
|
||||
|
||||
<p>
|
||||
|
||||
@ -59,7 +55,7 @@ images that do not have their own local color table.
|
||||
<pre>
|
||||
<!DOCTYPE "javax_imageio_gif_stream_1.0" [
|
||||
|
||||
<!ELEMENT "javax_imageio_gif_stream_1.0" (Version?,
|
||||
<!ELEMENT "javax_imageio_gif_stream_1.0" (Version?,
|
||||
LogicalScreenDescriptor?, GlobalColorTable?)>
|
||||
|
||||
<!ELEMENT "Version" EMPTY>
|
||||
@ -98,7 +94,7 @@ images that do not have their own local color table.
|
||||
<!-- The global color table -->
|
||||
<!-- Min children: 2 -->
|
||||
<!-- Max children: 256 -->
|
||||
<!ATTLIST "GlobalColorTable" "sizeOfGlobalColorTable" ("2" |
|
||||
<!ATTLIST "GlobalColorTable" "sizeOfGlobalColorTable" ("2" |
|
||||
"4" | "8" | "16" | "32" | "64" | "128" | "256") #REQUIRED>
|
||||
<!-- The number of entries in the global color table -->
|
||||
<!ATTLIST "GlobalColorTable" "backgroundColorIndex" #CDATA
|
||||
@ -135,10 +131,8 @@ images that do not have their own local color table.
|
||||
<!-- Max value: 255 (inclusive) -->
|
||||
]>
|
||||
</pre>
|
||||
<a name="gif_image_metadata_format"></a>
|
||||
<center><h2>
|
||||
GIF Image Metadata Format Specification
|
||||
</h2></center>
|
||||
<a id="gif_image_metadata_format"></a>
|
||||
<h2>GIF Image Metadata Format Specification</h2>
|
||||
<p>
|
||||
|
||||
The GIF image metadata format encodes the image descriptor, local
|
||||
@ -180,8 +174,8 @@ advanced only on user input.
|
||||
<pre>
|
||||
<!DOCTYPE "javax_imageio_gif_image_1.0" [
|
||||
|
||||
<!ELEMENT "javax_imageio_gif_image_1.0" (ImageDescriptor?,
|
||||
LocalColorTable?, GraphicControlExtension?, PlainTextExtension?,
|
||||
<!ELEMENT "javax_imageio_gif_image_1.0" (ImageDescriptor?,
|
||||
LocalColorTable?, GraphicControlExtension?, PlainTextExtension?,
|
||||
ApplicationExtensions?, CommentExtensions?)>
|
||||
|
||||
<!ELEMENT "ImageDescriptor" EMPTY>
|
||||
@ -214,7 +208,7 @@ advanced only on user input.
|
||||
<!-- The local color table -->
|
||||
<!-- Min children: 2 -->
|
||||
<!-- Max children: 256 -->
|
||||
<!ATTLIST "LocalColorTable" "sizeOfLocalColorTable" ("2" |
|
||||
<!ATTLIST "LocalColorTable" "sizeOfLocalColorTable" ("2" |
|
||||
"4" | "8" | "16" | "32" | "64" | "128" | "256") #REQUIRED>
|
||||
<!-- The number of entries in the local color table -->
|
||||
<!ATTLIST "LocalColorTable" "sortFlag" ("TRUE" | "FALSE")
|
||||
@ -246,13 +240,13 @@ advanced only on user input.
|
||||
|
||||
<!ELEMENT "GraphicControlExtension" EMPTY>
|
||||
<!-- A graphic control extension -->
|
||||
<!ATTLIST "GraphicControlExtension" "disposalMethod" ("none" |
|
||||
"doNotDispose" | "restoreToBackgroundColor" |
|
||||
"restoreToPrevious" | "undefinedDisposalMethod4" |
|
||||
"undefinedDisposalMethod5" | "undefinedDisposalMethod6" |
|
||||
<!ATTLIST "GraphicControlExtension" "disposalMethod" ("none" |
|
||||
"doNotDispose" | "restoreToBackgroundColor" |
|
||||
"restoreToPrevious" | "undefinedDisposalMethod4" |
|
||||
"undefinedDisposalMethod5" | "undefinedDisposalMethod6" |
|
||||
"undefinedDisposalMethod7") #REQUIRED>
|
||||
<!-- The disposal method for this frame -->
|
||||
<!ATTLIST "GraphicControlExtension" "userInputFlag" ("TRUE" |
|
||||
<!ATTLIST "GraphicControlExtension" "userInputFlag" ("TRUE" |
|
||||
"FALSE") #REQUIRED>
|
||||
<!-- True if the frame should be advanced based on user input -->
|
||||
<!ATTLIST "GraphicControlExtension" "transparentColorFlag" (
|
||||
@ -350,8 +344,7 @@ advanced only on user input.
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
<a name="mapping"></a>
|
||||
<center>
|
||||
<a id="mapping"></a>
|
||||
<table border=1>
|
||||
<caption><b>Mapping of Standard to GIF Native Stream Metadata</b></caption>
|
||||
<tr>
|
||||
@ -399,9 +392,7 @@ advanced only on user input.
|
||||
<td>/Version@value</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<center>
|
||||
<table border=1>
|
||||
<caption><b>Mapping of Standard to GIF Native Image Metadata</b></caption>
|
||||
<tr>
|
||||
@ -443,7 +434,6 @@ advanced only on user input.
|
||||
"TRUE")</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,11 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<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.
|
||||
|
||||
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.
|
||||
-->
|
||||
|
||||
<title>PNG Metadata Format Specification</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<body bgcolor="white">
|
||||
|
||||
<center><h1>
|
||||
PNG Metadata Format Specification
|
||||
</h1></center>
|
||||
<h1>PNG Metadata Format Specification</h1>
|
||||
|
||||
<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.
|
||||
|
||||
<p>
|
||||
|
||||
|
||||
If no metadata is supplied when encoding an image, the header is
|
||||
initialized from the image being encoded, and no optional chunks are
|
||||
included.
|
||||
@ -85,7 +83,7 @@ or <code>GrayAlpha</code> image
|
||||
The child nodes of the <code>bKGD</code>, <code>sBIT</code>, and
|
||||
<code>tRNS</code> chunks must match the image's color type.
|
||||
|
||||
<p>
|
||||
<p>
|
||||
|
||||
Certain chunks may meaningfully appear multiple times in a PNG file,
|
||||
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>
|
||||
<!DOCTYPE "javax_imageio_png_1.0" [
|
||||
|
||||
<!ELEMENT "javax_imageio_png_1.0" (IHDR?, PLTE?, bKGD?, cHRM?,
|
||||
gAMA?, hIST?, iCCP?, iTXt?, pHYS?, sBIT?, sPLT?, sRGB?, tEXt?,
|
||||
<!ELEMENT "javax_imageio_png_1.0" (IHDR?, PLTE?, bKGD?, cHRM?,
|
||||
gAMA?, hIST?, iCCP?, iTXt?, pHYS?, sBIT?, sPLT?, sRGB?, tEXt?,
|
||||
tIME?, tRNS?, zTXt?, UnknownChunks?)>
|
||||
|
||||
<!ELEMENT "IHDR" EMPTY>
|
||||
@ -123,7 +121,7 @@ written, or to determine the order of the chunks in a file being read.
|
||||
<!ATTLIST "IHDR" "bitDepth" ("1" | "2" | "4" | "8" | "16")
|
||||
#REQUIRED>
|
||||
<!-- The bit depth of the image samples -->
|
||||
<!ATTLIST "IHDR" "colorType" ("Grayscale" | "RGB" | "Palette" |
|
||||
<!ATTLIST "IHDR" "colorType" ("Grayscale" | "RGB" | "Palette" |
|
||||
"GrayAlpha" | "RGBAlpha") #REQUIRED>
|
||||
<!-- The color type of the image -->
|
||||
<!ATTLIST "IHDR" "compressionMethod" ("deflate") #REQUIRED>
|
||||
@ -318,7 +316,7 @@ written, or to determine the order of the chunks in a file being read.
|
||||
<!ATTLIST "pHYS" "unitSpecifier" ("unknown" | "meter") #REQUIRED>
|
||||
<!-- The unit specifier for this chunk (i.e., meters) -->
|
||||
|
||||
<!ELEMENT "sBIT" (sBIT_Grayscale | sBIT_GrayAlpha | sBIT_RGB |
|
||||
<!ELEMENT "sBIT" (sBIT_Grayscale | sBIT_GrayAlpha | sBIT_RGB |
|
||||
sBIT_RGBAlpha | sBIT_Palette)>
|
||||
<!-- The sBIT chunk, containing significant bit information -->
|
||||
|
||||
@ -437,8 +435,8 @@ written, or to determine the order of the chunks in a file being read.
|
||||
|
||||
<!ELEMENT "sRGB" EMPTY>
|
||||
<!-- The sRGB chunk, containing rendering intent information -->
|
||||
<!ATTLIST "sRGB" "renderingIntent" ("Perceptual" |
|
||||
"Relative colorimetric" | "Saturation" |
|
||||
<!ATTLIST "sRGB" "renderingIntent" ("Perceptual" |
|
||||
"Relative colorimetric" | "Saturation" |
|
||||
"Absolute colorimetric") #REQUIRED>
|
||||
<!-- The rendering intent -->
|
||||
|
||||
|
@ -1,8 +1,11 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<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.
|
||||
|
||||
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.
|
||||
-->
|
||||
|
||||
<title>Standard Metadata Format Specification</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<body bgcolor="white">
|
||||
|
||||
<center><h1>
|
||||
Standard (Plug-in Neutral) Metadata Format Specification
|
||||
</h1></center>
|
||||
<h1>Standard (Plug-in Neutral) Metadata Format Specification</h1>
|
||||
|
||||
<p> The plug-in neutral "javax_imageio_1.0" format consists
|
||||
of a root node named "javax_imageio_1.0" which has child
|
||||
@ -44,355 +42,355 @@ following DTD:
|
||||
<pre>
|
||||
<!DOCTYPE "javax_imageio_1.0" [
|
||||
|
||||
<!ELEMENT "javax_imageio_1.0" (Chroma?, Compression?, Data?, Dimension?,
|
||||
<!ELEMENT "javax_imageio_1.0" (Chroma?, Compression?, Data?, Dimension?,
|
||||
Document?, Text?, Transparency?)>
|
||||
|
||||
<!ELEMENT "Chroma" (ColorSpaceType?, NumChannels?, Gamma?,
|
||||
<!ELEMENT "Chroma" (ColorSpaceType?, NumChannels?, Gamma?,
|
||||
BlackIsZero?, Palette?, BackgroundIndex?, BackgroundColor?)>
|
||||
<!-- Chroma (color) information -->
|
||||
<!-- Chroma (color) information -->
|
||||
|
||||
<!ELEMENT "ColorSpaceType" EMPTY>
|
||||
<!-- The raw color space of the image -->
|
||||
<!ATTLIST "ColorSpaceType" "name" ("XYZ" | "Lab" | "Luv" |
|
||||
"YCbCr" | "Yxy" | "YCCK" | "PhotoYCC" | "RGB" | "GRAY" | "HSV" |
|
||||
"HLS" | "CMYK" | "CMY" | "2CLR" | "3CLR" | "4CLR" | "5CLR" |
|
||||
"6CLR" | "7CLR" | "8CLR" | "9CLR" | "ACLR" | "BCLR" | "CCLR" |
|
||||
<!-- The raw color space of the image -->
|
||||
<!ATTLIST "ColorSpaceType" "name" ("XYZ" | "Lab" | "Luv" |
|
||||
"YCbCr" | "Yxy" | "YCCK" | "PhotoYCC" | "RGB" | "GRAY" | "HSV" |
|
||||
"HLS" | "CMYK" | "CMY" | "2CLR" | "3CLR" | "4CLR" | "5CLR" |
|
||||
"6CLR" | "7CLR" | "8CLR" | "9CLR" | "ACLR" | "BCLR" | "CCLR" |
|
||||
"DCLR" | "ECLR" | "FCLR") #REQUIRED>
|
||||
|
||||
<!ELEMENT "NumChannels" EMPTY>
|
||||
<!-- The number of channels in the raw image, including alpha -->
|
||||
<!-- The number of channels in the raw image, including alpha -->
|
||||
<!ATTLIST "NumChannels" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: List of Integer -->
|
||||
|
||||
<!ELEMENT "Gamma" EMPTY>
|
||||
<!-- The image gamma -->
|
||||
<!-- The image gamma -->
|
||||
<!ATTLIST "Gamma" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: Float -->
|
||||
|
||||
<!ELEMENT "BlackIsZero" EMPTY>
|
||||
<!-- True if smaller values represent darker shades -->
|
||||
<!-- True if smaller values represent darker shades -->
|
||||
<!ATTLIST "BlackIsZero" "value" ("TRUE" | "FALSE") "TRUE">
|
||||
|
||||
<!ELEMENT "Palette" (PaletteEntry)*>
|
||||
<!-- Palette-color information -->
|
||||
<!-- Palette-color information -->
|
||||
|
||||
<!ELEMENT "PaletteEntry" EMPTY>
|
||||
<!-- A palette entry -->
|
||||
<!-- A palette entry -->
|
||||
<!ATTLIST "PaletteEntry" "index" #CDATA #REQUIRED>
|
||||
<!-- The index of the palette entry -->
|
||||
<!-- The index of the palette entry -->
|
||||
<!-- Data type: Integer -->
|
||||
<!ATTLIST "PaletteEntry" "red" #CDATA #REQUIRED>
|
||||
<!-- The red value for the palette entry -->
|
||||
<!-- The red value for the palette entry -->
|
||||
<!-- Data type: Integer -->
|
||||
<!ATTLIST "PaletteEntry" "green" #CDATA #REQUIRED>
|
||||
<!-- The green value for the palette entry -->
|
||||
<!-- The green value for the palette entry -->
|
||||
<!-- Data type: Integer -->
|
||||
<!ATTLIST "PaletteEntry" "blue" #CDATA #REQUIRED>
|
||||
<!-- The blue value for the palette entry -->
|
||||
<!-- The blue value for the palette entry -->
|
||||
<!-- Data type: Integer -->
|
||||
<!ATTLIST "PaletteEntry" "alpha" #CDATA "255">
|
||||
<!-- The alpha value for the palette entry -->
|
||||
<!-- The alpha value for the palette entry -->
|
||||
<!-- Data type: Integer -->
|
||||
|
||||
<!ELEMENT "BackgroundIndex" EMPTY>
|
||||
<!-- A palette index to be used as a background -->
|
||||
<!-- A palette index to be used as a background -->
|
||||
<!ATTLIST "BackgroundIndex" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: Integer -->
|
||||
|
||||
<!ELEMENT "BackgroundColor" EMPTY>
|
||||
<!-- An RGB triple to be used as a background -->
|
||||
<!-- An RGB triple to be used as a background -->
|
||||
<!ATTLIST "BackgroundColor" "red" #CDATA #REQUIRED>
|
||||
<!-- The red background value -->
|
||||
<!-- The red background value -->
|
||||
<!-- Data type: Integer -->
|
||||
<!ATTLIST "BackgroundColor" "green" #CDATA #REQUIRED>
|
||||
<!-- The green background value -->
|
||||
<!-- The green background value -->
|
||||
<!-- Data type: Integer -->
|
||||
<!ATTLIST "BackgroundColor" "blue" #CDATA #REQUIRED>
|
||||
<!-- The blue background value -->
|
||||
<!-- The blue background value -->
|
||||
<!-- Data type: Integer -->
|
||||
|
||||
<!ELEMENT "Compression" (CompressionTypeName?, Lossless?,
|
||||
<!ELEMENT "Compression" (CompressionTypeName?, Lossless?,
|
||||
NumProgressiveScans?, BitRate?)>
|
||||
<!-- Compression information -->
|
||||
<!-- Compression information -->
|
||||
|
||||
<!ELEMENT "CompressionTypeName" EMPTY>
|
||||
<!-- The name of the compression scheme in use -->
|
||||
<!-- The name of the compression scheme in use -->
|
||||
<!ATTLIST "CompressionTypeName" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: String -->
|
||||
|
||||
<!ELEMENT "Lossless" EMPTY>
|
||||
<!-- True if the compression scheme is lossless -->
|
||||
<!-- True if the compression scheme is lossless -->
|
||||
<!ATTLIST "Lossless" "value" ("TRUE" | "FALSE") "TRUE">
|
||||
|
||||
<!ELEMENT "NumProgressiveScans" EMPTY>
|
||||
<!-- The number of progressive scans used in the image encoding -->
|
||||
<!-- The number of progressive scans used in the image encoding -->
|
||||
<!ATTLIST "NumProgressiveScans" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: Integer -->
|
||||
|
||||
<!ELEMENT "BitRate" EMPTY>
|
||||
<!-- The estimated bit rate of the compression scheme -->
|
||||
<!-- The estimated bit rate of the compression scheme -->
|
||||
<!ATTLIST "BitRate" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: Float -->
|
||||
|
||||
<!ELEMENT "Data" (PlanarConfiguration?, SampleFormat?, BitsPerSample?,
|
||||
<!ELEMENT "Data" (PlanarConfiguration?, SampleFormat?, BitsPerSample?,
|
||||
SignificantBitsPerSample?, SampleMSB?)>
|
||||
<!-- Information on the image layout -->
|
||||
<!-- Information on the image layout -->
|
||||
|
||||
<!ELEMENT "PlanarConfiguration" EMPTY>
|
||||
<!-- The organization of image samples in the stream -->
|
||||
<!ATTLIST "PlanarConfiguration" "value" ("PixelInterleaved" |
|
||||
<!-- The organization of image samples in the stream -->
|
||||
<!ATTLIST "PlanarConfiguration" "value" ("PixelInterleaved" |
|
||||
"PlaneInterleaved" | "LineInterleaved" | "TileInterleaved")
|
||||
#REQUIRED>
|
||||
|
||||
<!ELEMENT "SampleFormat" EMPTY>
|
||||
<!-- The numeric format of image samples -->
|
||||
<!ATTLIST "SampleFormat" "value" ("SignedIntegral" |
|
||||
<!-- The numeric format of image samples -->
|
||||
<!ATTLIST "SampleFormat" "value" ("SignedIntegral" |
|
||||
"UnsignedIntegral" | "Real" | "Index") #REQUIRED>
|
||||
|
||||
<!ELEMENT "BitsPerSample" EMPTY>
|
||||
<!-- The number of bits per sample -->
|
||||
<!-- The number of bits per sample -->
|
||||
<!ATTLIST "BitsPerSample" "value" #CDATA #REQUIRED>
|
||||
<!-- A list of integers, one per channel -->
|
||||
<!-- A list of integers, one per channel -->
|
||||
<!-- Data type: List of Integer -->
|
||||
<!-- Min length: 1 -->
|
||||
|
||||
<!ELEMENT "SignificantBitsPerSample" EMPTY>
|
||||
<!-- The number of significant bits per sample -->
|
||||
<!-- The number of significant bits per sample -->
|
||||
<!ATTLIST "SignificantBitsPerSample" "value" #CDATA #REQUIRED>
|
||||
<!-- A list of integers, one per channel -->
|
||||
<!-- A list of integers, one per channel -->
|
||||
<!-- Data type: List of Integer -->
|
||||
<!-- Min length: 1 -->
|
||||
|
||||
<!ELEMENT "SampleMSB" EMPTY>
|
||||
<!-- The position of the most significant bit of each sample -->
|
||||
<!-- The position of the most significant bit of each sample -->
|
||||
<!ATTLIST "SampleMSB" "value" #CDATA #REQUIRED>
|
||||
<!-- A list of integers, one per channel -->
|
||||
<!-- A list of integers, one per channel -->
|
||||
<!-- Data type: List of Integer -->
|
||||
<!-- Min length: 1 -->
|
||||
|
||||
<!ELEMENT "Dimension" (PixelAspectRatio?, ImageOrientation?,
|
||||
HorizontalPixelSize?, VerticalPixelSize?,
|
||||
HorizontalPhysicalPixelSpacing?, VerticalPhysicalPixelSpacing?,
|
||||
HorizontalPosition?, VerticalPosition?, HorizontalPixelOffset?,
|
||||
<!ELEMENT "Dimension" (PixelAspectRatio?, ImageOrientation?,
|
||||
HorizontalPixelSize?, VerticalPixelSize?,
|
||||
HorizontalPhysicalPixelSpacing?, VerticalPhysicalPixelSpacing?,
|
||||
HorizontalPosition?, VerticalPosition?, HorizontalPixelOffset?,
|
||||
VerticalPixelOffset?, HorizontalScreenSize?, VerticalScreenSize?)>
|
||||
<!-- Dimension information -->
|
||||
<!-- Dimension information -->
|
||||
|
||||
<!ELEMENT "PixelAspectRatio" EMPTY>
|
||||
<!-- The width of a pixel divided by its height -->
|
||||
<!-- The width of a pixel divided by its height -->
|
||||
<!ATTLIST "PixelAspectRatio" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: Float -->
|
||||
|
||||
<!ELEMENT "ImageOrientation" EMPTY>
|
||||
<!-- The desired orientation of the image in terms of flips and
|
||||
counter-clockwise rotations -->
|
||||
<!ATTLIST "ImageOrientation" "value" ("Normal" | "Rotate90" |
|
||||
"Rotate180" | "Rotate270" | "FlipH" | "FlipV" |
|
||||
<!-- The desired orientation of the image in terms of flips and
|
||||
counter-clockwise rotations -->
|
||||
<!ATTLIST "ImageOrientation" "value" ("Normal" | "Rotate90" |
|
||||
"Rotate180" | "Rotate270" | "FlipH" | "FlipV" |
|
||||
"FlipHRotate90" | "FlipVRotate90") #REQUIRED>
|
||||
|
||||
<!ELEMENT "HorizontalPixelSize" EMPTY>
|
||||
<!-- The width of a pixel, in millimeters, as it should be rendered
|
||||
on media -->
|
||||
<!-- The width of a pixel, in millimeters, as it should be rendered
|
||||
on media -->
|
||||
<!ATTLIST "HorizontalPixelSize" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: Float -->
|
||||
|
||||
<!ELEMENT "VerticalPixelSize" EMPTY>
|
||||
<!-- The height of a pixel, in millimeters, as it should be
|
||||
rendered on media -->
|
||||
<!-- The height of a pixel, in millimeters, as it should be
|
||||
rendered on media -->
|
||||
<!ATTLIST "VerticalPixelSize" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: Float -->
|
||||
|
||||
<!ELEMENT "HorizontalPhysicalPixelSpacing" EMPTY>
|
||||
<!-- The horizontal distance in the subject of the image, in
|
||||
millimeters, represented by one pixel at the center of the
|
||||
image -->
|
||||
<!-- The horizontal distance in the subject of the image, in
|
||||
millimeters, represented by one pixel at the center of the
|
||||
image -->
|
||||
<!ATTLIST "HorizontalPhysicalPixelSpacing" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: Float -->
|
||||
|
||||
<!ELEMENT "VerticalPhysicalPixelSpacing" EMPTY>
|
||||
<!-- The vertical distance in the subject of the image, in
|
||||
millimeters, represented by one pixel at the center of the
|
||||
image -->
|
||||
<!-- The vertical distance in the subject of the image, in
|
||||
millimeters, represented by one pixel at the center of the
|
||||
image -->
|
||||
<!ATTLIST "VerticalPhysicalPixelSpacing" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: Float -->
|
||||
|
||||
<!ELEMENT "HorizontalPosition" EMPTY>
|
||||
<!-- The horizontal position, in millimeters, where the image
|
||||
should be rendered on media -->
|
||||
<!-- The horizontal position, in millimeters, where the image
|
||||
should be rendered on media -->
|
||||
<!ATTLIST "HorizontalPosition" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: Float -->
|
||||
|
||||
<!ELEMENT "VerticalPosition" EMPTY>
|
||||
<!-- The vertical position, in millimeters, where the image should
|
||||
be rendered on media -->
|
||||
<!-- The vertical position, in millimeters, where the image should
|
||||
be rendered on media -->
|
||||
<!ATTLIST "VerticalPosition" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: Float -->
|
||||
|
||||
<!ELEMENT "HorizontalPixelOffset" EMPTY>
|
||||
<!-- The horizontal position, in pixels, where the image should be
|
||||
rendered onto a raster display -->
|
||||
<!-- The horizontal position, in pixels, where the image should be
|
||||
rendered onto a raster display -->
|
||||
<!ATTLIST "HorizontalPixelOffset" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: Integer -->
|
||||
|
||||
<!ELEMENT "VerticalPixelOffset" EMPTY>
|
||||
<!-- The vertical position, in pixels, where the image should be
|
||||
rendered onto a raster display -->
|
||||
<!-- The vertical position, in pixels, where the image should be
|
||||
rendered onto a raster display -->
|
||||
<!ATTLIST "VerticalPixelOffset" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: Integer -->
|
||||
|
||||
<!ELEMENT "HorizontalScreenSize" EMPTY>
|
||||
<!-- The width, in pixels, of the raster display into which the
|
||||
image should be rendered -->
|
||||
<!-- The width, in pixels, of the raster display into which the
|
||||
image should be rendered -->
|
||||
<!ATTLIST "HorizontalScreenSize" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: Integer -->
|
||||
|
||||
<!ELEMENT "VerticalScreenSize" EMPTY>
|
||||
<!-- The height, in pixels, of the raster display into which the
|
||||
image should be rendered -->
|
||||
<!-- The height, in pixels, of the raster display into which the
|
||||
image should be rendered -->
|
||||
<!ATTLIST "VerticalScreenSize" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: Integer -->
|
||||
|
||||
<!ELEMENT "Document" (FormatVersion?, SubimageInterpretation?,
|
||||
<!ELEMENT "Document" (FormatVersion?, SubimageInterpretation?,
|
||||
ImageCreationTime?, ImageModificationTime?)>
|
||||
<!-- Document information -->
|
||||
<!-- Document information -->
|
||||
|
||||
<!ELEMENT "FormatVersion" EMPTY>
|
||||
<!-- The version of the format used by the stream -->
|
||||
<!-- The version of the format used by the stream -->
|
||||
<!ATTLIST "FormatVersion" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: String -->
|
||||
|
||||
<!ELEMENT "SubimageInterpretation" EMPTY>
|
||||
<!-- The interpretation of this image in relation to the other
|
||||
images stored in the same stream -->
|
||||
<!ATTLIST "SubimageInterpretation" "value" ("Standalone" |
|
||||
"SinglePage" | "FullResolution" | "ReducedResolution" |
|
||||
"PyramidLayer" | "Preview" | "VolumeSlice" | "ObjectView" |
|
||||
"Panorama" | "AnimationFrame" | "TransparencyMask" |
|
||||
<!-- The interpretation of this image in relation to the other
|
||||
images stored in the same stream -->
|
||||
<!ATTLIST "SubimageInterpretation" "value" ("Standalone" |
|
||||
"SinglePage" | "FullResolution" | "ReducedResolution" |
|
||||
"PyramidLayer" | "Preview" | "VolumeSlice" | "ObjectView" |
|
||||
"Panorama" | "AnimationFrame" | "TransparencyMask" |
|
||||
"CompositingLayer" | "SpectralSlice" | "Unknown") #REQUIRED>
|
||||
|
||||
<!ELEMENT "ImageCreationTime" EMPTY>
|
||||
<!-- The time of image creation -->
|
||||
<!-- The time of image creation -->
|
||||
<!ATTLIST "ImageCreationTime" "year" #CDATA #REQUIRED>
|
||||
<!-- The full year (e.g., 1967, not 67) -->
|
||||
<!-- The full year (e.g., 1967, not 67) -->
|
||||
<!-- Data type: Integer -->
|
||||
<!ATTLIST "ImageCreationTime" "month" #CDATA #REQUIRED>
|
||||
<!-- The month, with January = 1 -->
|
||||
<!-- The month, with January = 1 -->
|
||||
<!-- Data type: Integer -->
|
||||
<!-- Min value: 1 (inclusive) -->
|
||||
<!-- Max value: 12 (inclusive) -->
|
||||
<!ATTLIST "ImageCreationTime" "day" #CDATA #REQUIRED>
|
||||
<!-- The day of the month -->
|
||||
<!-- The day of the month -->
|
||||
<!-- Data type: Integer -->
|
||||
<!-- Min value: 1 (inclusive) -->
|
||||
<!-- Max value: 31 (inclusive) -->
|
||||
<!ATTLIST "ImageCreationTime" "hour" #CDATA "0">
|
||||
<!-- The hour from 0 to 23 -->
|
||||
<!-- The hour from 0 to 23 -->
|
||||
<!-- Data type: Integer -->
|
||||
<!-- Min value: 0 (inclusive) -->
|
||||
<!-- Max value: 23 (inclusive) -->
|
||||
<!ATTLIST "ImageCreationTime" "minute" #CDATA "0">
|
||||
<!-- The minute from 0 to 59 -->
|
||||
<!-- The minute from 0 to 59 -->
|
||||
<!-- Data type: Integer -->
|
||||
<!-- Min value: 0 (inclusive) -->
|
||||
<!-- Max value: 59 (inclusive) -->
|
||||
<!ATTLIST "ImageCreationTime" "second" #CDATA "0">
|
||||
<!-- The second from 0 to 60 (60 = leap second) -->
|
||||
<!-- The second from 0 to 60 (60 = leap second) -->
|
||||
<!-- Data type: Integer -->
|
||||
<!-- Min value: 0 (inclusive) -->
|
||||
<!-- Max value: 60 (inclusive) -->
|
||||
|
||||
<!ELEMENT "ImageModificationTime" EMPTY>
|
||||
<!-- The time of the last image modification -->
|
||||
<!-- The time of the last image modification -->
|
||||
<!ATTLIST "ImageModificationTime" "year" #CDATA #REQUIRED>
|
||||
<!-- The full year (e.g., 1967, not 67) -->
|
||||
<!-- The full year (e.g., 1967, not 67) -->
|
||||
<!-- Data type: Integer -->
|
||||
<!ATTLIST "ImageModificationTime" "month" #CDATA #REQUIRED>
|
||||
<!-- The month, with January = 1 -->
|
||||
<!-- The month, with January = 1 -->
|
||||
<!-- Data type: Integer -->
|
||||
<!-- Min value: 1 (inclusive) -->
|
||||
<!-- Max value: 12 (inclusive) -->
|
||||
<!ATTLIST "ImageModificationTime" "day" #CDATA #REQUIRED>
|
||||
<!-- The day of the month -->
|
||||
<!-- The day of the month -->
|
||||
<!-- Data type: Integer -->
|
||||
<!-- Min value: 1 (inclusive) -->
|
||||
<!-- Max value: 31 (inclusive) -->
|
||||
<!ATTLIST "ImageModificationTime" "hour" #CDATA "0">
|
||||
<!-- The hour from 0 to 23 -->
|
||||
<!-- The hour from 0 to 23 -->
|
||||
<!-- Data type: Integer -->
|
||||
<!-- Min value: 0 (inclusive) -->
|
||||
<!-- Max value: 23 (inclusive) -->
|
||||
<!ATTLIST "ImageModificationTime" "minute" #CDATA "0">
|
||||
<!-- The minute from 0 to 59 -->
|
||||
<!-- The minute from 0 to 59 -->
|
||||
<!-- Data type: Integer -->
|
||||
<!-- Min value: 0 (inclusive) -->
|
||||
<!-- Max value: 59 (inclusive) -->
|
||||
<!ATTLIST "ImageModificationTime" "second" #CDATA "0">
|
||||
<!-- The second from 0 to 60 (60 = leap second) -->
|
||||
<!-- The second from 0 to 60 (60 = leap second) -->
|
||||
<!-- Data type: Integer -->
|
||||
<!-- Min value: 0 (inclusive) -->
|
||||
<!-- Max value: 60 (inclusive) -->
|
||||
|
||||
<!ELEMENT "Text" (TextEntry)*>
|
||||
<!-- Text information -->
|
||||
<!-- Text information -->
|
||||
|
||||
<!ELEMENT "TextEntry" EMPTY>
|
||||
<!-- A text entry -->
|
||||
<!-- A text entry -->
|
||||
<!ATTLIST "TextEntry" "keyword" #CDATA #IMPLIED>
|
||||
<!-- A keyword associated with the text entry -->
|
||||
<!-- A keyword associated with the text entry -->
|
||||
<!-- Data type: String -->
|
||||
<!ATTLIST "TextEntry" "value" #CDATA #REQUIRED>
|
||||
<!-- the text entry -->
|
||||
<!-- the text entry -->
|
||||
<!-- Data type: String -->
|
||||
<!ATTLIST "TextEntry" "language" #CDATA #IMPLIED>
|
||||
<!-- The language of the text -->
|
||||
<!-- The language of the text -->
|
||||
<!-- Data type: String -->
|
||||
<!ATTLIST "TextEntry" "encoding" #CDATA #IMPLIED>
|
||||
<!-- The encoding of the text -->
|
||||
<!-- The encoding of the text -->
|
||||
<!-- Data type: String -->
|
||||
<!ATTLIST "TextEntry" "compression" ("none" | "lzw" | "zip" |
|
||||
<!ATTLIST "TextEntry" "compression" ("none" | "lzw" | "zip" |
|
||||
"bzip" | "other") "none">
|
||||
<!-- The method used to compress the text -->
|
||||
<!-- The method used to compress the text -->
|
||||
|
||||
<!ELEMENT "Transparency" (Alpha?, TransparentIndex?,
|
||||
<!ELEMENT "Transparency" (Alpha?, TransparentIndex?,
|
||||
TransparentColor?, TileTransparencies?, TileOpacities?)>
|
||||
<!-- Transparency information -->
|
||||
<!-- Transparency information -->
|
||||
|
||||
<!ELEMENT "Alpha" EMPTY>
|
||||
<!-- The type of alpha information contained in the image -->
|
||||
<!ATTLIST "Alpha" "value" ("none" | "premultiplied" |
|
||||
<!-- The type of alpha information contained in the image -->
|
||||
<!ATTLIST "Alpha" "value" ("none" | "premultiplied" |
|
||||
"nonpremultiplied") "none">
|
||||
|
||||
<!ELEMENT "TransparentIndex" EMPTY>
|
||||
<!-- A palette index to be treated as transparent -->
|
||||
<!-- A palette index to be treated as transparent -->
|
||||
<!ATTLIST "TransparentIndex" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: Integer -->
|
||||
|
||||
<!ELEMENT "TransparentColor" EMPTY>
|
||||
<!-- An RGB color to be treated as transparent -->
|
||||
<!-- An RGB color to be treated as transparent -->
|
||||
<!ATTLIST "TransparentColor" "value" #CDATA #REQUIRED>
|
||||
<!-- Data type: List of Integer -->
|
||||
|
||||
<!ELEMENT "TileTransparencies" (TransparentTile)*>
|
||||
<!-- A list of completely transparent tiles -->
|
||||
<!-- A list of completely transparent tiles -->
|
||||
|
||||
<!ELEMENT "TransparentTile" EMPTY>
|
||||
<!-- The index of a completely transparent tile -->
|
||||
<!-- The index of a completely transparent tile -->
|
||||
<!ATTLIST "TransparentTile" "x" #CDATA #REQUIRED>
|
||||
<!-- The tile's X index -->
|
||||
<!-- The tile's X index -->
|
||||
<!-- Data type: Integer -->
|
||||
<!ATTLIST "TransparentTile" "y" #CDATA #REQUIRED>
|
||||
<!-- The tile's Y index -->
|
||||
<!-- The tile's Y index -->
|
||||
<!-- Data type: Integer -->
|
||||
|
||||
<!ELEMENT "TileOpacities" (OpaqueTile)*>
|
||||
<!-- A list of completely opaque tiles -->
|
||||
<!-- A list of completely opaque tiles -->
|
||||
|
||||
<!ELEMENT "OpaqueTile" EMPTY>
|
||||
<!-- The index of a completely opaque tile -->
|
||||
<!-- The index of a completely opaque tile -->
|
||||
<!ATTLIST "OpaqueTile" "x" #CDATA #REQUIRED>
|
||||
<!-- The tile's X index -->
|
||||
<!-- The tile's X index -->
|
||||
<!-- Data type: Integer -->
|
||||
<!ATTLIST "OpaqueTile" "y" #CDATA #REQUIRED>
|
||||
<!-- The tile's Y index -->
|
||||
<!-- The tile's Y index -->
|
||||
<!-- Data type: Integer -->
|
||||
]>
|
||||
</pre>
|
||||
|
@ -1,8 +1,11 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<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.
|
||||
|
||||
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.
|
||||
-->
|
||||
|
||||
<title>TIFF Metadata Format Specification and Usage Notes</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<body bgcolor="white">
|
||||
<h1>TIFF Metadata Format Specification and Usage Notes</h1>
|
||||
|
||||
<center><h1>
|
||||
TIFF Metadata Format Specification and Usage Notes
|
||||
</h1></center>
|
||||
|
||||
<p>
|
||||
<a href="#Reading">Reading Images</a><br/>
|
||||
<font size="-1">
|
||||
<a href="#Reading">Reading Images</a>
|
||||
<ul>
|
||||
<li><a href="#ColorConversionRead">Color Conversion</a></li>
|
||||
<li><a href="#ColorSpacesRead">Color Spaces</a></li>
|
||||
<li><a href="#ICCProfilesRead">ICC Profiles</a></li>
|
||||
<li><a href="#MetadataIssuesRead">Metadata Issues</a>
|
||||
<font size="-2">
|
||||
<ul>
|
||||
<li><a href="#MapNativeStandard">Native to Standard Metadata Mapping</a></li>
|
||||
</ul>
|
||||
</font>
|
||||
</li>
|
||||
<li><a href="#ExifRead">Reading Exif Images</a>
|
||||
<font size="-2">
|
||||
<ul>
|
||||
<li><a href="#ExifReadTIFF">Reading Uncompressed Exif Images</a></li>
|
||||
<li><a href="#ExifReadJPEG">Reading Compressed Exif Images</a></li>
|
||||
</ul>
|
||||
</font>
|
||||
</li>
|
||||
</ul>
|
||||
</font>
|
||||
<a href="#Writing">Writing Images</a><br/>
|
||||
<font size="-1">
|
||||
<ul>
|
||||
<li><a href="#Compression">Compression</a></li>
|
||||
<li><a href="#ColorConversionWrite">Color Conversion</a></li>
|
||||
<li><a href="#ICCProfilesWrite">ICC Profiles</a></li>
|
||||
<li><a href="#MetadataIssuesWrite">Metadata Issues</a></li>
|
||||
<font size="-2">
|
||||
<li><a href="#MetadataIssuesWrite">Metadata Issues</a>
|
||||
<ul>
|
||||
<li><a href="#MapStandardNative">Standard to Native Metadata Mapping</a></li>
|
||||
</ul>
|
||||
</font>
|
||||
<li><a href="#ExifWrite">Writing Exif Images</a>
|
||||
<font size="-2">
|
||||
<ul>
|
||||
<li><a href="#ExifWriteTIFF">Writing Uncompressed Exif Images</a></li>
|
||||
<li><a href="#ExifWriteJPEG">Writing Compressed Exif Images</a></li>
|
||||
</ul>
|
||||
</font>
|
||||
</li>
|
||||
</ul>
|
||||
</font>
|
||||
<a href="#StreamMetadata">Native Stream Metadata Format</a><br/>
|
||||
<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>
|
||||
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? -->
|
||||
|
||||
<h4><a name="ColorConversionRead"/>Color Conversion</h4>
|
||||
<h4><a id="ColorConversionRead">Color Conversion</a></h4>
|
||||
|
||||
<p>If the source image data
|
||||
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
|
||||
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
|
||||
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>
|
||||
metadata field if it is present and compatible with the image data
|
||||
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>
|
||||
<li>sRGB if the image is palette-color.</li>
|
||||
<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>
|
||||
</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:
|
||||
|
||||
<ul>
|
||||
@ -160,9 +144,8 @@ if(K != 1) {
|
||||
</pre>
|
||||
</li>
|
||||
</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
|
||||
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
|
||||
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
|
||||
(<a href="../../plugins/tiff/BaselineTIFFTagSet.html">
|
||||
@ -203,7 +186,6 @@ and set the <code>ImageTypeSpecifier</code> using
|
||||
<code>ImageReadParam.setDestinationType</code>.</li>
|
||||
<li>Pass the parameter object to the appropriate <code>read</code> method.</li>
|
||||
</ol>
|
||||
</p>
|
||||
|
||||
<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
|
||||
@ -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
|
||||
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
|
||||
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
|
||||
<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>
|
||||
|
||||
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
|
||||
in the following table.
|
||||
|
||||
<p>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th>Standard Metadata Element</th>
|
||||
@ -261,9 +242,9 @@ in the following table.
|
||||
<tr>
|
||||
<td>/Chroma/ColorSpaceType@name</td>
|
||||
<td>PhotometricInterpretation: WhiteIsZero, BlackIsZero, TransparencyMask =
|
||||
"GRAY"; RGB, PaletteColor => "RGB"; CMYK => "CMYK";
|
||||
YCbCr => "YCbCr";
|
||||
CIELab, ICCLab => "Lab".</td>
|
||||
"GRAY"; RGB, PaletteColor => "RGB"; CMYK => "CMYK";
|
||||
YCbCr => "YCbCr";
|
||||
CIELab, ICCLab => "Lab".</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/Chroma/NumChannels@value</td>
|
||||
@ -271,7 +252,7 @@ CIELab, ICCLab => "Lab".</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/Chroma/BlackIsZero@value</td>
|
||||
<td>"TRUE" <=> PhotometricInterpretation => WhiteIsZero</td>
|
||||
<td>"TRUE" <=> PhotometricInterpretation => WhiteIsZero</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/Chroma/Palette</td>
|
||||
@ -279,28 +260,28 @@ CIELab, ICCLab => "Lab".</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/Compression/CompressionTypeName@value</td>
|
||||
<td>Compression: Uncompressed => "none"; CCITT 1D => "CCITT
|
||||
<td>Compression: Uncompressed => "none"; CCITT 1D => "CCITT
|
||||
RLE";
|
||||
Group 3 Fax => "CCITT T.4"; Group 4 Fax => "CCITT T.6";
|
||||
LZW => "LZW";
|
||||
JPEG => "Old JPEG"; New JPEG => "JPEG"; Zlib =>> "ZLib"; PackBits =>
|
||||
Group 3 Fax => "CCITT T.4"; Group 4 Fax => "CCITT T.6";
|
||||
LZW => "LZW";
|
||||
JPEG => "Old JPEG"; New JPEG => "JPEG"; Zlib =>> "ZLib"; PackBits =>
|
||||
"PackBits";
|
||||
Deflate => "Deflate"; Exif JPEG => "JPEG".</td>
|
||||
Deflate => "Deflate"; Exif JPEG => "JPEG".</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/Compression/Lossless@value</td>
|
||||
<td>Compression: JPEG or New JPEG => "FALSE"; otherwise "TRUE".</td>
|
||||
<td>Compression: JPEG or New JPEG => "FALSE"; otherwise "TRUE".</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/Data/PlanarConfiguration@value</td>
|
||||
<td>Chunky => "PixelInterleaved"; Planar => "PlaneInterleaved".</td>
|
||||
<td>Chunky => "PixelInterleaved"; Planar => "PlaneInterleaved".</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/Data/SampleFormat@value</td>
|
||||
<td>PhotometricInterpretation PaletteColor => "Index";
|
||||
SampleFormat unsigned integer data => "UnsignedIntegral";
|
||||
SampleFormat two's complement signed integer data => "SignedIntegral";
|
||||
SampleFormat IEEE floating point data => "Real";
|
||||
<td>PhotometricInterpretation PaletteColor => "Index";
|
||||
SampleFormat unsigned integer data => "UnsignedIntegral";
|
||||
SampleFormat two's complement signed integer data => "SignedIntegral";
|
||||
SampleFormat IEEE floating point data => "Real";
|
||||
otherwise element not emitted.
|
||||
</td>
|
||||
</tr>
|
||||
@ -310,8 +291,8 @@ otherwise element not emitted.
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/Data/SampleMSB@value</td>
|
||||
<td>FillOrder: left-to-right => space-separated list of BitsPerSample-1;
|
||||
right-to-left => space-separated list of 0s.</td>
|
||||
<td>FillOrder: left-to-right => space-separated list of BitsPerSample-1;
|
||||
right-to-left => space-separated list of 0s.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/Dimension/PixelAspectRatio@value</td>
|
||||
@ -343,9 +324,9 @@ right-to-left => space-separated list of 0s.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/Document/SubimageInterpretation@value</td>
|
||||
<td>NewSubFileType: transparency => "TransparencyMask";
|
||||
reduced-resolution => "ReducedResolution";
|
||||
single page => "SinglePage".</td>
|
||||
<td>NewSubFileType: transparency => "TransparencyMask";
|
||||
reduced-resolution => "ReducedResolution";
|
||||
single page => "SinglePage".</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/Document/ImageCreationTime@value</td>
|
||||
@ -357,24 +338,23 @@ single page => "SinglePage".</td>
|
||||
Artist, HostComputer, InkNames, Copyright:
|
||||
/Text/TextEntry@keyword = field name,
|
||||
/Text/TextEntry@value = field value.<br>
|
||||
Example: TIFF Software field => /Text/TextEntry@keyword = "Software",
|
||||
Example: TIFF Software field => /Text/TextEntry@keyword = "Software",
|
||||
/Text/TextEntry@value = Name and version number of the software package(s)
|
||||
used to create the image.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/Transparency/Alpha@value</td>
|
||||
<td>ExtraSamples: associated alpha => "premultiplied";
|
||||
unassociated alpha => "nonpremultiplied".</td>
|
||||
<td>ExtraSamples: associated alpha => "premultiplied";
|
||||
unassociated alpha => "nonpremultiplied".</td>
|
||||
</tr>
|
||||
</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
|
||||
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
|
||||
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.,
|
||||
<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
|
||||
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
|
||||
<code>{'E', 'x', 'i', 'f', 0x00, 0x00}</code></code>
|
||||
<code>{'E', 'x', 'i', 'f', 0x00, 0x00}</code>
|
||||
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
|
||||
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
|
||||
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
|
||||
<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
|
||||
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
|
||||
<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>.
|
||||
@ -472,9 +452,8 @@ IFDs in the embedded TIFF stream including those corresponding to empty
|
||||
images. Calling <code>tiffReader.read(0, readParam)</code> will throw
|
||||
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.
|
||||
</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
|
||||
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>,
|
||||
the <code>canWriteTiles()</code> and <code>canWriteCompressed()</code> methods
|
||||
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
|
||||
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
|
||||
rows per strip is rounded to a multiple of 8 times the maximum MCU over
|
||||
both dimensions.</p>
|
||||
|
||||
|
||||
<!-- <h4>Supported Image Types</h4> -->
|
||||
|
||||
<!-- 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 <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
|
||||
may be set. For ZLib/Deflate the supplied floating point quality value is
|
||||
rescaled to the range <tt>[1, 9]</tt> and truncated to an integer
|
||||
rescaled to the range <code>[1, 9]</code> and truncated to an integer
|
||||
to derive the Deflate compression level. For JPEG the floating point
|
||||
quality value is passed directly to the JPEG writer plug-in which
|
||||
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
|
||||
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
|
||||
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>
|
||||
<li>one is present in the native image metadata
|
||||
<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>
|
||||
of the destination <code>ImageTypeSpecifier</code> is an instance of
|
||||
<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>ImageWriteParam.setDestinationType(ImageTypeSpecifier)</code> and defaults
|
||||
to the <code>ImageTypeSpecifier</code> of the image being written.
|
||||
</li>
|
||||
</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
|
||||
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
|
||||
<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>)
|
||||
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
|
||||
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
|
||||
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>
|
||||
|
||||
<p>For all images the tile dimensions may be set using the <tt>TileWidth</tt>
|
||||
and <tt>TileLength</tt> field values if the tiling mode is
|
||||
<p>For all images the tile dimensions may be set using the <code>TileWidth</code>
|
||||
and <code>TileLength</code> field values if the tiling mode is
|
||||
<code>ImageWriteParam.MODE_COPY_FROM_METADATA</code>. If this mode
|
||||
is set but the fields are not, their respective default values are the image
|
||||
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
|
||||
only if a <tt>JPEGTables</tt> field is contained in the metadata object
|
||||
provided to the writer. If the contents of the <tt>JPEGTables</tt> field is
|
||||
only if a <code>JPEGTables</code> field is contained in the metadata object
|
||||
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
|
||||
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
|
||||
<tt>JPEGTables</tt> field will be written to the output and each strip or
|
||||
such <code>JPEGTables</code> field is present in the metadata, then no
|
||||
<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>
|
||||
|
||||
<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
|
||||
<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>).
|
||||
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
|
||||
@ -667,30 +646,30 @@ If prediction is so requested but the image does not have
|
||||
<p>Some fields may be added or modified:
|
||||
|
||||
<ul>
|
||||
<li><tt>PhotometricInterpretation</tt> if not present.</li>
|
||||
<li><tt>PlanarConfiguration</tt> if this field is present with value
|
||||
<tt>Planar</tt> is is reset to <tt>Chunky</tt>.</li>
|
||||
<li><tt>Compression</tt> always.</li>
|
||||
<li><tt>BitsPerSample</tt> if the image is not bilevel.</li>
|
||||
<li><tt>SamplesPerPixel</tt> always.</li>
|
||||
<li><tt>ExtraSamples</tt> if an alpha channel is present.</li>
|
||||
<li><tt>SampleFormat</tt> if not present and the data are 16- or 32-bit
|
||||
<li><code>PhotometricInterpretation</code> if not present.</li>
|
||||
<li><code>PlanarConfiguration</code> if this field is present with value
|
||||
<code>Planar</code> is is reset to <code>Chunky</code>.</li>
|
||||
<li><code>Compression</code> always.</li>
|
||||
<li><code>BitsPerSample</code> if the image is not bilevel.</li>
|
||||
<li><code>SamplesPerPixel</code> always.</li>
|
||||
<li><code>ExtraSamples</code> if an alpha channel is present.</li>
|
||||
<li><code>SampleFormat</code> if not present and the data are 16- or 32-bit
|
||||
integers or floating point.</li>
|
||||
<li><tt>ColorMap</tt> if the <tt>PhotometricInterpretation</tt> is
|
||||
<tt>RGBPalette</tt>.</li>
|
||||
<li><tt>ImageWidth</tt> and <tt>ImageLength</tt> always.</li>
|
||||
<li><tt>TileWidth</tt>, <tt>TileLength</tt>, <tt>TileOffsets</tt>, and
|
||||
<tt>TileByteCounts</tt> if a tiled image is being written.</li>
|
||||
<li><tt>RowsPerStrip</tt>, <tt>StripOffsets</tt>, and <tt>StripByteCounts</tt>
|
||||
<li><code>ColorMap</code> if the <code>PhotometricInterpretation</code> is
|
||||
<code>RGBPalette</code>.</li>
|
||||
<li><code>ImageWidth</code> and <code>ImageLength</code> always.</li>
|
||||
<li><code>TileWidth</code>, <code>TileLength</code>, <code>TileOffsets</code>, and
|
||||
<code>TileByteCounts</code> if a tiled image is being written.</li>
|
||||
<li><code>RowsPerStrip</code>, <code>StripOffsets</code>, and <code>StripByteCounts</code>
|
||||
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>
|
||||
<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
|
||||
(only [1, 1] subsampling and cosited positioning are supported for
|
||||
non-JPEG YCbCr output).</li>
|
||||
<li><tt>YCbCrSubsampling</tt>, <tt>YCbCrPositioning</tt>, and
|
||||
<tt>ReferenceBlackWhite</tt>: if the compression type is JPEG and the color
|
||||
<li><code>YCbCrSubsampling</code>, <code>YCbCrPositioning</code>, and
|
||||
<code>ReferenceBlackWhite</code>: if the compression type is JPEG and the color
|
||||
space is RGB these will be reset to [2, 2] centered subsampling with no
|
||||
headroom/footroom (0:255,128:255,128:255).</li>
|
||||
</ul>
|
||||
@ -698,24 +677,23 @@ headroom/footroom (0:255,128:255,128:255).</li>
|
||||
<p>Some fields may be removed:
|
||||
|
||||
<ul>
|
||||
<li><tt>BitsPerSample</tt> if the image is bilevel.</li>
|
||||
<li><tt>ExtraSamples</tt> if the image does not have an alpha channel.</li>
|
||||
<li><tt>ColorMap</tt> if the photometric interpretation is not
|
||||
<tt>RGBPalette</tt>.</li>
|
||||
<li><tt>TileWidth</tt>, <tt>TileLength</tt>, <tt>TileOffsets</tt>, and
|
||||
<tt>TileByteCounts</tt> if tiling <i>is not</i> being used.</li>
|
||||
<li><tt>RowsPerStrip</tt>, <tt>StripOffsets</tt>, and <tt>StripByteCounts</tt>
|
||||
<li><code>BitsPerSample</code> if the image is bilevel.</li>
|
||||
<li><code>ExtraSamples</code> if the image does not have an alpha channel.</li>
|
||||
<li><code>ColorMap</code> if the photometric interpretation is not
|
||||
<code>RGBPalette</code>.</li>
|
||||
<li><code>TileWidth</code>, <code>TileLength</code>, <code>TileOffsets</code>, and
|
||||
<code>TileByteCounts</code> if tiling <i>is not</i> being used.</li>
|
||||
<li><code>RowsPerStrip</code>, <code>StripOffsets</code>, and <code>StripByteCounts</code>
|
||||
if tiling <i>is</i> being used.</li>
|
||||
<li><tt>YCbCrSubsampling</tt>, <tt>YCbCrPositioning</tt>, and
|
||||
<tt>ReferenceBlackWhite</tt> if the compression type is JPEG and the
|
||||
<li><code>YCbCrSubsampling</code>, <code>YCbCrPositioning</code>, and
|
||||
<code>ReferenceBlackWhite</code> if the compression type is JPEG and the
|
||||
color space is grayscale.</li>
|
||||
<li><tt>JPEGProc</tt>, <tt>JPEGInterchangeFormat</tt>,
|
||||
<tt>JPEGInterchangeFormatLength</tt>, <tt>JPEGRestartInterval</tt>,
|
||||
<tt>JPEGLosslessPredictors</tt>, <tt>JPEGPointTransforms</tt>,
|
||||
<tt>JPEGQTables</tt>, <tt>JPEGDCTables</tt>, and
|
||||
<tt>JPEGACTables</tt> if the compression type is JPEG.</li>
|
||||
<li><code>JPEGProc</code>, <code>JPEGInterchangeFormat</code>,
|
||||
<code>JPEGInterchangeFormatLength</code>, <code>JPEGRestartInterval</code>,
|
||||
<code>JPEGLosslessPredictors</code>, <code>JPEGPointTransforms</code>,
|
||||
<code>JPEGQTables</code>, <code>JPEGDCTables</code>, and
|
||||
<code>JPEGACTables</code> if the compression type is JPEG.</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p>Other fields present in the supplied metadata are uninterpreted and will
|
||||
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
|
||||
writer.</p>
|
||||
|
||||
<h5><a name="MapStandardNative"/>
|
||||
<h5><a id="MapStandardNative"></a>
|
||||
Mapping of the Standard Metadata Format to TIFF Native Image Metadata</h5>
|
||||
|
||||
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
|
||||
given in the following table.
|
||||
|
||||
<p>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th>TIFF Field</th>
|
||||
@ -754,10 +731,10 @@ given in the following table.
|
||||
PhotometricInterpretation
|
||||
</td>
|
||||
<td>/Chroma/ColorSpaceType@name: "GRAY" and /Chroma/BlackIsZero@value = "FALSE"
|
||||
=> WhiteIsZero; "GRAY" and /Document/SubimageInterpretation@value =
|
||||
"TransparencyMask" => TransparencyMask; "RGB" and /Chroma/Palette present =>
|
||||
PaletteColor; "GRAY" => BlackIsZero; "RGB" => RGB; "YCbCr" => YCbCr;
|
||||
"CMYK" => CMYK; "Lab" => CIELab.</td>
|
||||
=> WhiteIsZero; "GRAY" and /Document/SubimageInterpretation@value =
|
||||
"TransparencyMask" => TransparencyMask; "RGB" and /Chroma/Palette present =>
|
||||
PaletteColor; "GRAY" => BlackIsZero; "RGB" => RGB; "YCbCr" => YCbCr;
|
||||
"CMYK" => CMYK; "Lab" => CIELab.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SamplesPerPixel</td>
|
||||
@ -769,21 +746,21 @@ PaletteColor; "GRAY" => BlackIsZero; "RGB" => RGB; "YCbCr" => YCbCr;
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Compression</td>
|
||||
<td>/Compression/CompressionTypeName@value: "none" => Uncompressed;
|
||||
"CCITT RLE" => CCITT 1D; "CCITT T.4" => Group 3 Fax; "CCITT T.6" => Group 4
|
||||
Fax; "LZW" => LZW; "Old JPEG" => JPEG; "JPEG" => New JPEG; "ZLib" => ZLib;
|
||||
"PackBits" => PackBits; "Deflate" => Deflate.</td>
|
||||
<td>/Compression/CompressionTypeName@value: "none" => Uncompressed;
|
||||
"CCITT RLE" => CCITT 1D; "CCITT T.4" => Group 3 Fax; "CCITT T.6" => Group 4
|
||||
Fax; "LZW" => LZW; "Old JPEG" => JPEG; "JPEG" => New JPEG; "ZLib" => ZLib;
|
||||
"PackBits" => PackBits; "Deflate" => Deflate.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PlanarConfiguration</td>
|
||||
<td>/Data/PlanarConfiguration@value: "PixelInterleaved" => Chunky;
|
||||
"PlaneInterleaved" => Planar.</td>
|
||||
<td>/Data/PlanarConfiguration@value: "PixelInterleaved" => Chunky;
|
||||
"PlaneInterleaved" => Planar.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SampleFormat</td>
|
||||
<td>/Data/SampleFormat@value: "SignedIntegral" => two's complement signed
|
||||
integer data; "UnsignedIntegral" => unsigned integer data; "Real" =>
|
||||
IEEE floating point data; "Index" => unsigned integer data.
|
||||
<td>/Data/SampleFormat@value: "SignedIntegral" => two's complement signed
|
||||
integer data; "UnsignedIntegral" => unsigned integer data; "Real" =>
|
||||
IEEE floating point data; "Index" => unsigned integer data.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -792,8 +769,8 @@ IEEE floating point data; "Index" => unsigned integer data.
|
||||
</tr>
|
||||
<tr>
|
||||
<td>FillOrder</td>
|
||||
<td>/Data/SampleMSB@value: if all values in space-separated list are 0s =>
|
||||
right-to-left; otherwise => left-to-right.
|
||||
<td>/Data/SampleMSB@value: if all values in space-separated list are 0s =>
|
||||
right-to-left; otherwise => left-to-right.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -826,9 +803,9 @@ right-to-left; otherwise => left-to-right.
|
||||
</tr>
|
||||
<tr>
|
||||
<td>NewSubFileType</td>
|
||||
<td>/Document/SubimageInterpretation@value: "TransparencyMask" =>
|
||||
transparency mask; "ReducedResolution" => reduced-resolution;
|
||||
"SinglePage" => single page.</td>
|
||||
<td>/Document/SubimageInterpretation@value: "TransparencyMask" =>
|
||||
transparency mask; "ReducedResolution" => reduced-resolution;
|
||||
"SinglePage" => single page.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DateTime</td>
|
||||
@ -843,29 +820,28 @@ TIFF Fields, e.g., "Software", then the field is added with content
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ExtraSamples</td>
|
||||
<td>/Transparency/Alpha@value: "premultiplied" => associated alpha, count 1;
|
||||
"nonpremultiplied" => unassociated alpha, count 1.</td>
|
||||
<td>/Transparency/Alpha@value: "premultiplied" => associated alpha, count 1;
|
||||
"nonpremultiplied" => unassociated alpha, count 1.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</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
|
||||
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
|
||||
{IFD, IFD Value, Image Data}. The Exif specification requires
|
||||
that an uncompressed Exif image be structured as follows:
|
||||
|
||||
<a id="ExifStructure"></a>
|
||||
<ol>
|
||||
<a name="ExifStructure"/>
|
||||
<li>Image File Header</li>
|
||||
<li>Primary IFD</li>
|
||||
<li>Primary IFD Value</li>
|
||||
@ -925,9 +901,9 @@ written:
|
||||
}
|
||||
</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">
|
||||
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.
|
||||
@ -1013,7 +989,7 @@ image data, i.e., the primary IFD does not refer to any image data.
|
||||
Node tree = jpegImageMetadata.getAsTree(nativeFormat);
|
||||
NodeList children = tree.getChildNodes();
|
||||
int numChildren = children.getLength();
|
||||
for (int i = 0; i < numChildren; i++) {
|
||||
for (int i = 0; i < numChildren; i++) {
|
||||
Node child = children.item(i);
|
||||
if (child.getNodeName().equals("markerSequence")) {
|
||||
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
|
||||
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:
|
||||
|
||||
@ -1042,14 +1018,14 @@ The DTD for the TIFF native stream metadata format is as follows:
|
||||
<!ELEMENT "javax_imageio_tiff_stream_1.0" (ByteOrder)>
|
||||
|
||||
<!ELEMENT "ByteOrder" EMPTY>
|
||||
<!-- The stream byte order -->
|
||||
<!-- The stream byte order -->
|
||||
<!ATTLIST "ByteOrder" "value" #CDATA #REQUIRED>
|
||||
<!-- One of "BIG_ENDIAN" or "LITTLE_ENDIAN" -->
|
||||
<!-- One of "BIG_ENDIAN" or "LITTLE_ENDIAN" -->
|
||||
<!-- Data type: String -->
|
||||
]>
|
||||
</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:
|
||||
|
||||
@ -1059,140 +1035,140 @@ The DTD for the TIFF native image metadata format is as follows:
|
||||
<!ELEMENT "javax_imageio_tiff_image_1.0" (TIFFIFD)*>
|
||||
|
||||
<!ELEMENT "TIFFIFD" (TIFFField | TIFFIFD)*>
|
||||
<!-- An IFD (directory) containing fields -->
|
||||
<!-- An IFD (directory) containing fields -->
|
||||
<!ATTLIST "TIFFIFD" "tagSets" #CDATA #REQUIRED>
|
||||
<!-- Data type: String -->
|
||||
<!ATTLIST "TIFFIFD" "parentTagNumber" #CDATA #IMPLIED>
|
||||
<!-- The tag number of the field pointing to this IFD -->
|
||||
<!-- The tag number of the field pointing to this IFD -->
|
||||
<!-- Data type: Integer -->
|
||||
<!ATTLIST "TIFFIFD" "parentTagName" #CDATA #IMPLIED>
|
||||
<!-- A mnemonic name for the field pointing to this IFD, if known
|
||||
-->
|
||||
<!-- A mnemonic name for the field pointing to this IFD, if known
|
||||
-->
|
||||
<!-- Data type: String -->
|
||||
|
||||
<!ELEMENT "TIFFField" (TIFFBytes | TIFFAsciis |
|
||||
TIFFShorts | TIFFSShorts | TIFFLongs | TIFFSLongs |
|
||||
TIFFRationals | TIFFSRationals |
|
||||
TIFFFloats | TIFFDoubles | TIFFUndefined)>
|
||||
<!-- A field containing data -->
|
||||
<!-- A field containing data -->
|
||||
<!ATTLIST "TIFFField" "number" #CDATA #REQUIRED>
|
||||
<!-- The tag number asociated with the field -->
|
||||
<!-- The tag number asociated with the field -->
|
||||
<!-- Data type: String -->
|
||||
<!ATTLIST "TIFFField" "name" #CDATA #IMPLIED>
|
||||
<!-- A mnemonic name associated with the field, if known -->
|
||||
<!-- A mnemonic name associated with the field, if known -->
|
||||
<!-- Data type: String -->
|
||||
|
||||
<!ELEMENT "TIFFBytes" (TIFFByte)*>
|
||||
<!-- A sequence of TIFFByte nodes -->
|
||||
<!-- A sequence of TIFFByte nodes -->
|
||||
|
||||
<!ELEMENT "TIFFByte" EMPTY>
|
||||
<!-- An integral value between 0 and 255 -->
|
||||
<!-- An integral value between 0 and 255 -->
|
||||
<!ATTLIST "TIFFByte" "value" #CDATA #IMPLIED>
|
||||
<!-- The value -->
|
||||
<!-- The value -->
|
||||
<!-- Data type: String -->
|
||||
<!ATTLIST "TIFFByte" "description" #CDATA #IMPLIED>
|
||||
<!-- A description, if available -->
|
||||
<!-- A description, if available -->
|
||||
<!-- Data type: String -->
|
||||
|
||||
<!ELEMENT "TIFFAsciis" (TIFFAscii)*>
|
||||
<!-- A sequence of TIFFAscii nodes -->
|
||||
<!-- A sequence of TIFFAscii nodes -->
|
||||
|
||||
<!ELEMENT "TIFFAscii" EMPTY>
|
||||
<!-- A String value -->
|
||||
<!-- A String value -->
|
||||
<!ATTLIST "TIFFAscii" "value" #CDATA #IMPLIED>
|
||||
<!-- The value -->
|
||||
<!-- The value -->
|
||||
<!-- Data type: String -->
|
||||
|
||||
<!ELEMENT "TIFFShorts" (TIFFShort)*>
|
||||
<!-- A sequence of TIFFShort nodes -->
|
||||
<!-- A sequence of TIFFShort nodes -->
|
||||
|
||||
<!ELEMENT "TIFFShort" EMPTY>
|
||||
<!-- An integral value between 0 and 65535 -->
|
||||
<!-- An integral value between 0 and 65535 -->
|
||||
<!ATTLIST "TIFFShort" "value" #CDATA #IMPLIED>
|
||||
<!-- The value -->
|
||||
<!-- The value -->
|
||||
<!-- Data type: String -->
|
||||
<!ATTLIST "TIFFShort" "description" #CDATA #IMPLIED>
|
||||
<!-- A description, if available -->
|
||||
<!-- A description, if available -->
|
||||
<!-- Data type: String -->
|
||||
|
||||
<!ELEMENT "TIFFSShorts" (TIFFSShort)*>
|
||||
<!-- A sequence of TIFFSShort nodes -->
|
||||
<!-- A sequence of TIFFSShort nodes -->
|
||||
|
||||
<!ELEMENT "TIFFSShort" EMPTY>
|
||||
<!-- An integral value between -32768 and 32767 -->
|
||||
<!-- An integral value between -32768 and 32767 -->
|
||||
<!ATTLIST "TIFFSShort" "value" #CDATA #IMPLIED>
|
||||
<!-- The value -->
|
||||
<!-- The value -->
|
||||
<!-- Data type: String -->
|
||||
<!ATTLIST "TIFFSShort" "description" #CDATA #IMPLIED>
|
||||
<!-- A description, if available -->
|
||||
<!-- A description, if available -->
|
||||
<!-- Data type: String -->
|
||||
|
||||
<!ELEMENT "TIFFLongs" (TIFFLong)*>
|
||||
<!-- A sequence of TIFFLong nodes -->
|
||||
<!-- A sequence of TIFFLong nodes -->
|
||||
|
||||
<!ELEMENT "TIFFLong" EMPTY>
|
||||
<!-- An integral value between 0 and 4294967295 -->
|
||||
<!-- An integral value between 0 and 4294967295 -->
|
||||
<!ATTLIST "TIFFLong" "value" #CDATA #IMPLIED>
|
||||
<!-- The value -->
|
||||
<!-- The value -->
|
||||
<!-- Data type: String -->
|
||||
<!ATTLIST "TIFFLong" "description" #CDATA #IMPLIED>
|
||||
<!-- A description, if available -->
|
||||
<!-- A description, if available -->
|
||||
<!-- Data type: String -->
|
||||
|
||||
<!ELEMENT "TIFFSLongs" (TIFFSLong)*>
|
||||
<!-- A sequence of TIFFSLong nodes -->
|
||||
<!-- A sequence of TIFFSLong nodes -->
|
||||
|
||||
<!ELEMENT "TIFFSLong" EMPTY>
|
||||
<!-- An integral value between -2147483648 and 2147482647 -->
|
||||
<!-- An integral value between -2147483648 and 2147482647 -->
|
||||
<!ATTLIST "TIFFSLong" "value" #CDATA #IMPLIED>
|
||||
<!-- The value -->
|
||||
<!-- The value -->
|
||||
<!-- Data type: String -->
|
||||
<!ATTLIST "TIFFSLong" "description" #CDATA #IMPLIED>
|
||||
<!-- A description, if available -->
|
||||
<!-- A description, if available -->
|
||||
<!-- Data type: String -->
|
||||
|
||||
<!ELEMENT "TIFFRationals" (TIFFRational)*>
|
||||
<!-- A sequence of TIFFRational nodes -->
|
||||
<!-- A sequence of TIFFRational nodes -->
|
||||
|
||||
<!ELEMENT "TIFFRational" EMPTY>
|
||||
<!-- A rational value consisting of an unsigned numerator and
|
||||
denominator -->
|
||||
<!-- A rational value consisting of an unsigned numerator and
|
||||
denominator -->
|
||||
<!ATTLIST "TIFFRational" "value" #CDATA #IMPLIED>
|
||||
<!-- The numerator and denominator, separated by a slash -->
|
||||
<!-- The numerator and denominator, separated by a slash -->
|
||||
<!-- Data type: String -->
|
||||
|
||||
<!ELEMENT "TIFFSRationals" (TIFFSRational)*>
|
||||
<!-- A sequence of TIFFSRational nodes -->
|
||||
<!-- A sequence of TIFFSRational nodes -->
|
||||
|
||||
<!ELEMENT "TIFFSRational" EMPTY>
|
||||
<!-- A rational value consisting of a signed numerator and
|
||||
denominator -->
|
||||
<!-- A rational value consisting of a signed numerator and
|
||||
denominator -->
|
||||
<!ATTLIST "TIFFSRational" "value" #CDATA #IMPLIED>
|
||||
<!-- The numerator and denominator, separated by a slash -->
|
||||
<!-- The numerator and denominator, separated by a slash -->
|
||||
<!-- Data type: String -->
|
||||
|
||||
<!ELEMENT "TIFFFloats" (TIFFFloat)*>
|
||||
<!-- A sequence of TIFFFloat nodes -->
|
||||
<!-- A sequence of TIFFFloat nodes -->
|
||||
|
||||
<!ELEMENT "TIFFFloat" EMPTY>
|
||||
<!-- A single-precision floating-point value -->
|
||||
<!-- A single-precision floating-point value -->
|
||||
<!ATTLIST "TIFFFloat" "value" #CDATA #IMPLIED>
|
||||
<!-- The value -->
|
||||
<!-- The value -->
|
||||
<!-- Data type: String -->
|
||||
|
||||
<!ELEMENT "TIFFDoubles" (TIFFDouble)*>
|
||||
<!-- A sequence of TIFFDouble nodes -->
|
||||
<!-- A sequence of TIFFDouble nodes -->
|
||||
|
||||
<!ELEMENT "TIFFDouble" EMPTY>
|
||||
<!-- A double-precision floating-point value -->
|
||||
<!-- A double-precision floating-point value -->
|
||||
<!ATTLIST "TIFFDouble" "value" #CDATA #IMPLIED>
|
||||
<!-- The value -->
|
||||
<!-- The value -->
|
||||
<!-- Data type: String -->
|
||||
|
||||
<!ELEMENT "TIFFUndefined" EMPTY>
|
||||
<!-- Uninterpreted byte data -->
|
||||
<!-- Uninterpreted byte data -->
|
||||
<!ATTLIST "TIFFUndefined" "value" #CDATA #IMPLIED>
|
||||
<!-- A list of comma-separated byte values -->
|
||||
<!-- A list of comma-separated byte values -->
|
||||
<!-- Data type: String -->
|
||||
]>
|
||||
</pre>
|
||||
|
@ -1,8 +1,11 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<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.
|
||||
|
||||
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.
|
||||
-->
|
||||
|
||||
<title>WBMP Metadata Format Specification</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<center><h1>
|
||||
WBMP Metadata Format Specification
|
||||
</h1></center>
|
||||
<h1>WBMP Metadata Format Specification</h1>
|
||||
|
||||
The XML schema for the native image metadata format is as follows:
|
||||
|
||||
|
@ -113,7 +113,7 @@
|
||||
*
|
||||
* <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
|
||||
* <a href="http://www.w3.org/Graphics/GIF/spec-gif89a.txt"> Graphics
|
||||
* Interchange Format (GIF)</a> image format. These are the "standard" GIF
|
||||
|
@ -80,7 +80,7 @@
|
||||
* attribute category, and the {@code Copies} instance represents the attribute
|
||||
* 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
|
||||
* 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.
|
||||
|
@ -32,7 +32,7 @@
|
||||
* <em>The Java Tutorial</em>. For other resources, see
|
||||
* <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
|
||||
* classes, unless otherwise documented, must be accessed on the event
|
||||
* dispatching thread.
|
||||
@ -110,7 +110,7 @@
|
||||
* href="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">
|
||||
* 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,
|
||||
* please see:
|
||||
* <ul>
|
||||
|
@ -1,16 +1,37 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Using the Multiplexing Look and Feel</TITLE>
|
||||
</HEAD>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<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>
|
||||
<font size=+3>
|
||||
Using the Multiplexing Look and Feel
|
||||
</font>
|
||||
</b>
|
||||
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>
|
||||
|
||||
<h1>Using the Multiplexing Look and Feel</h1>
|
||||
|
||||
<blockquote>
|
||||
<hr>
|
||||
@ -18,8 +39,8 @@ Using the Multiplexing Look and Feel
|
||||
<i>
|
||||
This document is based on an article
|
||||
originally published in
|
||||
<a href="http://www.oracle.com/technetwork/java/javase/tech/articles-jsp-139072.html" target="_top"><em>The Swing
|
||||
Connection</em></a>.
|
||||
<a href="http://www.oracle.com/technetwork/java/javase/tech/articles-jsp-139072.html"
|
||||
target="_top"><em>The Swing Connection</em></a>.
|
||||
</i>
|
||||
</p>
|
||||
<hr>
|
||||
@ -31,10 +52,10 @@ you supplement an ordinary look and feel
|
||||
(called the <em>default</em> look and feel)
|
||||
with one or more <em>auxiliary</em> look and feels.
|
||||
For example, you could
|
||||
simultaneously provide text-to-speech and Braille outputs,
|
||||
in addition to the ordinary visual output that a Swing-based
|
||||
simultaneously provide text-to-speech and Braille outputs,
|
||||
in addition to the ordinary visual output that a Swing-based
|
||||
application generates,
|
||||
by adding
|
||||
by adding
|
||||
two auxiliary look and feels (one for text-to-speech,
|
||||
the other for Braille)
|
||||
to the default look and feel.
|
||||
@ -62,169 +83,160 @@ This document has the following sections:
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Before reading further, you should be familiar
|
||||
Before reading further, you should be familiar
|
||||
with the concept of pluggable look and feels.
|
||||
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 section in
|
||||
<em>The Java Tutorial</em>.
|
||||
<a href="https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html">
|
||||
How to Set the Look and Feel</a>, a section in <em>The Java Tutorial</em>.
|
||||
For architectural details, you can read
|
||||
<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.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a name="overview"></a>
|
||||
<hr width=100% align=LEFT size=2>
|
||||
<b>
|
||||
<font color="#000080" size="+2">Overview</font>
|
||||
</b>
|
||||
|
||||
<p>
|
||||
<a id="overview"></a>
|
||||
<hr>
|
||||
<h2>Overview</h2>
|
||||
|
||||
<p>
|
||||
|
||||
The classes in the
|
||||
The classes in the
|
||||
<code>javax.swing.plaf.multi</code> package
|
||||
implement a
|
||||
implement a
|
||||
<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
|
||||
in response to a component requesting its UI object
|
||||
(with the <code>getUI</code> method).
|
||||
|
||||
<p>
|
||||
Without a multiplexing look and feel, a
|
||||
developer who wanted to enhance a particular look and feel would
|
||||
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
|
||||
Without a multiplexing look and feel, a
|
||||
developer who wanted to enhance a particular look and feel would
|
||||
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
|
||||
look and feel, the developer would need to create a group 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
|
||||
and feels,
|
||||
such as Motif or Windows, the developers would need to create subclasses
|
||||
and feels,
|
||||
such as Motif or Windows, the developers would need to create subclasses
|
||||
of those classes as well.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
This approach has at least two shortcomings:
|
||||
<ul type="DISC">
|
||||
<li>First, each subclass must use what is
|
||||
essentially a copy of the same code, potentially creating a difficult
|
||||
This approach has at least two shortcomings:
|
||||
<ul>
|
||||
<li>First, each subclass must use what is
|
||||
essentially a copy of the same code, potentially creating a difficult
|
||||
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
|
||||
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>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
A multiplexing look and feel
|
||||
both these problems simultaneously because it allows multiple look
|
||||
A multiplexing look and feel
|
||||
both these problems simultaneously because it allows multiple look
|
||||
and feels to be combined.
|
||||
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
|
||||
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
|
||||
and feel that can then be combined with other look and feels.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The second problem (having to force the use of
|
||||
a particular look and feel) is solved because a specialized look and feel
|
||||
can be used with whatever default look and feel the
|
||||
The second problem (having to force the use of
|
||||
a particular look and feel) is solved because a specialized look and feel
|
||||
can be used with whatever default look and feel the
|
||||
application may have locked in place.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The default multiplexing look and feel implementation,
|
||||
The default multiplexing look and feel implementation,
|
||||
represented by the <code>MultiLookAndFeel</code> class
|
||||
in the <code>javax.swing.plaf.multi</code> package,
|
||||
is called (unsurprisingly)
|
||||
is called (unsurprisingly)
|
||||
the Multiplexing look and feel.
|
||||
|
||||
<p>
|
||||
<a name="howtouse"></a>
|
||||
<hr width=100% align=LEFT size=2>
|
||||
<b>
|
||||
<font color="#000080" size="+2">How to Use Auxiliary Look and Feels</font>
|
||||
</b>
|
||||
|
||||
<p>
|
||||
<a id="howtouse"></a>
|
||||
<hr>
|
||||
<h2>How to Use Auxiliary Look and Feels</h2>
|
||||
|
||||
<p>
|
||||
It's easy to use auxiliary look and feels with Swing. To instruct
|
||||
Swing to use the Multiplexing look and feel, all an application
|
||||
It's easy to use auxiliary look and feels with Swing. To instruct
|
||||
Swing to use the Multiplexing look and feel, all an application
|
||||
has to do is modify the <code>$JDKHOME/conf/swing.properties</code>
|
||||
file to include a definition of the <code>swing.auxiliarylaf</code>
|
||||
property. Swing treats the <code>swing.auxiliarylaf</code>
|
||||
property as a comma-separated list of <code>LookAndFeel</code>
|
||||
subclasses that specify what auxiliary look and feels should be
|
||||
used in addition to the default look and feel. If at least one valid
|
||||
subclasses that specify what auxiliary look and feels should be
|
||||
used in addition to the default look and feel. If at least one valid
|
||||
<code>LookAndFeel</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.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For example, let's assume that an application
|
||||
makes use of a look and feel that supports text-to-speech feedback, and also
|
||||
For example, let's assume that an application
|
||||
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
|
||||
that emits perfume.
|
||||
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
|
||||
is named <code>com.smellco.OlfactoryLookAndFeel</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To tell Swing to use both these look and feels
|
||||
-- and to use a default look and feel at the same time -- your application
|
||||
To tell Swing to use both these look and feels
|
||||
-- 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:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<code>
|
||||
<code>
|
||||
swing.auxiliarylaf=com.myco.TextTalkerLookAndFeel,<br>
|
||||
com.smellco.OlfactoryLookAndFeel</code>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
This statement tells Swing to obtain a component's UI from the Multiplexing
|
||||
look and feel automatically, instead of obtaining it directly from
|
||||
the default look and feel. The resulting multiplexing UI is a small
|
||||
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
|
||||
UI object, the multiplexing UI invokes the same method on each
|
||||
This statement tells Swing to obtain a component's UI from the Multiplexing
|
||||
look and feel automatically, instead of obtaining it directly from
|
||||
the default look and feel. The resulting multiplexing UI is a small
|
||||
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
|
||||
UI object, the multiplexing UI invokes the same method on each
|
||||
of the UIs obtained from the default and auxiliary look and feels.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a name="howtowrite"></a>
|
||||
<hr width=100% align=LEFT size=2>
|
||||
<b>
|
||||
<font color="#000080" size="+2">Tips for Writing an Auxiliary Look and Feel</font>
|
||||
</b>
|
||||
|
||||
<p>
|
||||
<a id="howtowrite"></a>
|
||||
<hr>
|
||||
<h2>Tips for Writing an Auxiliary Look and Feel</h2>
|
||||
|
||||
<p>
|
||||
An auxiliary look and feel is like any other look and feel,
|
||||
except that it doesn't have to provide the complete support
|
||||
that a default look and feel must. For
|
||||
example, an auxiliary look and feel that supports just text-to-speech feedback
|
||||
doesn't need to provide any code for painting.
|
||||
except that it doesn't have to provide the complete support
|
||||
that a default look and feel must. For
|
||||
example, an auxiliary look and feel that supports just text-to-speech feedback
|
||||
doesn't need to provide any code for painting.
|
||||
Also, it might not need to support all components --
|
||||
<code>JSeparator</code>s, for example, might be ignored.
|
||||
|
||||
<p>
|
||||
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.
|
||||
The developer can concentrate solely
|
||||
on providing the specialized functionality.
|
||||
The developer can concentrate solely
|
||||
on providing the specialized functionality.
|
||||
|
||||
<p>
|
||||
Because the primary purpose of an auxiliary look and feel is to enhance the
|
||||
default look and feel, auxiliary look and feels tend
|
||||
Because the primary purpose of an auxiliary look and feel is to enhance the
|
||||
default look and feel, auxiliary look and feels tend
|
||||
be nonvisual. Since an auxiliary look and feel is a genuine
|
||||
look and feel, however, there is nothing to prevent it
|
||||
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
|
||||
implement an auxiliary look and feel
|
||||
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
|
||||
the <code>javax.swing.plaf</code> package.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<br>
|
||||
<a name="dosanddonts">
|
||||
<font color="#000080" size="+1"><b>Dos and Don'ts</b></font>
|
||||
<a id="dosanddonts">
|
||||
<h3>Dos and Don'ts</h3>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The following paragraphs provide some general recommendations for developing
|
||||
The following paragraphs provide some general recommendations for developing
|
||||
auxiliary look and feels.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<font color="#000080"><b>Use the <code>installUI</code> method
|
||||
<h4>Use the <code>installUI</code> method
|
||||
to perform all initialization,
|
||||
and the <code>uninstallUI</code> method
|
||||
to perform all cleanup.</b></font>
|
||||
</p>
|
||||
to perform all cleanup.</h4>
|
||||
|
||||
<blockquote>
|
||||
The <code>installUI</code> and <code>uninstallUI</code>
|
||||
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
|
||||
lets the previous UI object remove its listeners.
|
||||
</blockquote>
|
||||
<p> <font color="#000080"><b>Don't extend
|
||||
visual look and feels.</b></font></p>
|
||||
<h4><b>Don't extend visual look and feels.</b></h4>
|
||||
<blockquote>
|
||||
We recommended that you <i>don't</i> implement
|
||||
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
|
||||
accidentally inherit code that installs listeners on a component
|
||||
object or renders the component on the display. As a result,
|
||||
your auxiliary look and feel would compete with the default look
|
||||
We recommended that you <i>don't</i> implement
|
||||
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
|
||||
accidentally inherit code that installs listeners on a component
|
||||
object or renders the component on the display. As a result,
|
||||
your auxiliary look and feel would compete with the default look
|
||||
and feel rather than cooperating with it.<br>
|
||||
<br>
|
||||
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>
|
||||
package. By using this strategy, the developer of an auxiliary
|
||||
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>
|
||||
package. By using this strategy, the developer of an auxiliary
|
||||
look and feel can avoid competing with the default look and feel.
|
||||
</blockquote>
|
||||
<p> <font color="#000080"><b>Override all UI-specific methods
|
||||
your UI classes inherit.</b></font>
|
||||
</p>
|
||||
<h4><b>Override all UI-specific methods your UI classes inherit.</b></h4>
|
||||
|
||||
<blockquote>
|
||||
We recommend that each UI class of
|
||||
an auxiliary look and feel override the methods
|
||||
We recommend that each UI class of
|
||||
an auxiliary look and feel override the methods
|
||||
defined in the <code>javax.swing.plaf</code>
|
||||
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.
|
||||
For example, the <code>ComponentUI</code>
|
||||
class, from which all UI classes descend,
|
||||
provides a default implementation for the <code>update</code>
|
||||
method. This default implementation paints on the display
|
||||
if the
|
||||
component is opaque. If a UI class from a non-visual auxiliary
|
||||
look and feel does not override this method, all
|
||||
if the
|
||||
component is opaque. If a UI class from a non-visual auxiliary
|
||||
look and feel does not override this method, all
|
||||
opaque components appear as blank areas on the screen!
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br>
|
||||
<a name="uidefaults">
|
||||
<font color="#000080" size="+1"><b>Extending UIDefaults</b></font>
|
||||
</a>
|
||||
<a id="uidefaults"></a>
|
||||
<h3>Extending UIDefaults</h3>
|
||||
|
||||
<p>In many cases, you
|
||||
might want an auxiliary look and feel to be "incomplete." That
|
||||
is, you might not need to support the complete set
|
||||
<p>In many cases, you
|
||||
might want an auxiliary look and feel to be "incomplete." That
|
||||
is, you might not need to support the complete set
|
||||
of components.
|
||||
For example, an auxiliary look and feel might choose
|
||||
to provide a <code>ButtonUI</code> subclass but no
|
||||
For example, an auxiliary look and feel might choose
|
||||
to provide a <code>ButtonUI</code> subclass but no
|
||||
<code>LabelUI</code> subclass.
|
||||
This
|
||||
option is allowed, and the multiplexing look and feel gracefully
|
||||
This
|
||||
option is allowed, and the multiplexing look and feel gracefully
|
||||
handles such situations.</p>
|
||||
<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
|
||||
support that UI. This message can be annoying, especially to auxiliary
|
||||
look-and-feel developers who don't want to support a particular
|
||||
<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
|
||||
support that UI. This message can be annoying, especially to auxiliary
|
||||
look-and-feel developers who don't want to support a particular
|
||||
component.</p>
|
||||
<p>Fortunately, you can prevent this error
|
||||
message by creating a subclass of the <code>UIDefaults</code>
|
||||
class and returning an instance of it from the
|
||||
<p>Fortunately, you can prevent this error
|
||||
message by creating a subclass of the <code>UIDefaults</code>
|
||||
class and returning an instance of it from the
|
||||
<code>getDefaults</code> method
|
||||
of your <code>LookAndFeel</code> class.
|
||||
For example:
|
||||
</p>
|
||||
<p><code>public class MyAuxLookAndFeel
|
||||
<p><code>public class MyAuxLookAndFeel
|
||||
extends LookAndFeel {<br>
|
||||
...<br>
|
||||
public UIDefaults getDefaults() {<br>
|
||||
<b>UIDefaults table = <br>
|
||||
|
||||
...<br>
|
||||
public UIDefaults getDefaults() {<br>
|
||||
<b>UIDefaults table = <br>
|
||||
|
||||
new MyAuxUIDefaults();<br>
|
||||
</b> Object[] uiDefaults = {<br>
|
||||
"ButtonUI", "MyAuxButtonUI",<br>
|
||||
...<br>
|
||||
}<br>
|
||||
table.putDefaults(uiDefaults);<br>
|
||||
return table;<br>
|
||||
}<br>
|
||||
</b> Object[] uiDefaults = {<br>
|
||||
"ButtonUI", "MyAuxButtonUI",<br>
|
||||
...<br>
|
||||
}<br>
|
||||
table.putDefaults(uiDefaults);<br>
|
||||
return table;<br>
|
||||
}<br>
|
||||
}<br>
|
||||
<br>
|
||||
<b>class MyAuxUIDefaults extends UIDefaults {<br>
|
||||
protected void getUIError(String msg) {<br>
|
||||
//System.err.println<br>
|
||||
// ("An
|
||||
protected void getUIError(String msg) {<br>
|
||||
//System.err.println<br>
|
||||
// ("An
|
||||
annoying message!");<br>
|
||||
}<br>
|
||||
}<br>
|
||||
}</b></code></p>
|
||||
|
||||
<p>
|
||||
In the preceding example, an auxiliary look and feel named <code>MyAux</code>
|
||||
creates a <code>UIDefaults</code> subclass
|
||||
that overrides the <code>getUIError</code>
|
||||
method. The <code>getUIError</code>
|
||||
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,
|
||||
In the preceding example, an auxiliary look and feel named <code>MyAux</code>
|
||||
creates a <code>UIDefaults</code> subclass
|
||||
that overrides the <code>getUIError</code>
|
||||
method. The <code>getUIError</code>
|
||||
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,
|
||||
you can avoid the error message.</p>
|
||||
<p>
|
||||
<p>
|
||||
|
||||
<br>
|
||||
<a name="defaultui">
|
||||
<b><font color="#000080" size="+1">Examining Other UI Objects</font></b>
|
||||
</a>
|
||||
<a id="defaultui"></a>
|
||||
<h3>Examining Other UI Objects</h3>
|
||||
|
||||
<p>In
|
||||
rare instances, a UI object from an auxiliary look and feel
|
||||
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
|
||||
<p>In
|
||||
rare instances, a UI object from an auxiliary look and feel
|
||||
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
|
||||
the UI from a component by calling its <code>getUI</code>
|
||||
method. The returned UI is an instance of one of the multiplexing
|
||||
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>
|
||||
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
|
||||
method. The returned UI is an instance of one of the multiplexing
|
||||
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>
|
||||
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
|
||||
is guaranteed to be the UI created from the default look and feel.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a name="implementation"></a>
|
||||
<hr width=100% align=LEFT size=2>
|
||||
<font color="#000080" size="+2"><b>How the Multiplexing Look and Feel
|
||||
Is Implemented</b></font>
|
||||
<p>
|
||||
<a id="implementation"></a>
|
||||
<hr>
|
||||
<h2>How the Multiplexing Look and Feel Is Implemented</h2>
|
||||
|
||||
<p>
|
||||
The Multiplexing look and feel
|
||||
(represented by
|
||||
<code>javax.swing.plaf.multi.MultiLookAndFeel</code>)
|
||||
is meant to be transparent to
|
||||
all developers and users. It should "just work" -- and
|
||||
it is used only when the user tells Swing to use an auxiliary look
|
||||
is meant to be transparent to
|
||||
all developers and users. It should "just work" -- and
|
||||
it is used only when the user tells Swing to use an auxiliary look
|
||||
and feel.</p>
|
||||
|
||||
<p>
|
||||
When the Multiplexing look and
|
||||
feel is in use, the type of the UI object
|
||||
associated with each component
|
||||
depends on whether
|
||||
When the Multiplexing look and
|
||||
feel is in use, the type of the UI object
|
||||
associated with each component
|
||||
depends on whether
|
||||
any of the auxiliary look and feels currently in use
|
||||
support the component.
|
||||
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,
|
||||
then the component gets
|
||||
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>
|
||||
A multiplexing UI object
|
||||
obtains and maintains UI objects
|
||||
from the default and auxiliary look
|
||||
and feels,
|
||||
referring to these UIs in the following manner:
|
||||
referring to these UIs in the following manner:
|
||||
|
||||
<ul type="DISC">
|
||||
<li> The UI object from the default look
|
||||
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
|
||||
they are specified in the <code>swing.auxiliarylaf</code>
|
||||
<ul>
|
||||
<li> The UI object from the default look
|
||||
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
|
||||
they are specified in the <code>swing.auxiliarylaf</code>
|
||||
property.<br><br></li>
|
||||
|
||||
<li> When a method that requests information
|
||||
from a UI object is invoked, the multiplexing UI object
|
||||
invokes the method on all the UI objects, but returns
|
||||
<li> When a method that requests information
|
||||
from a UI object is invoked, the multiplexing UI object
|
||||
invokes the method on all the UI objects, but returns
|
||||
only the results from the UI for the default look and feel.
|
||||
For example, when the <code>getPreferredSize</code>
|
||||
method is invoked on a multiplexing UI, the UI returns only the
|
||||
results of invoking <code>getPreferredSize</code>
|
||||
For example, when the <code>getPreferredSize</code>
|
||||
method is invoked on a multiplexing UI, the UI returns only the
|
||||
results of invoking <code>getPreferredSize</code>
|
||||
on the UI obtained from the default look and feel.
|
||||
The <code>getPreferredSize</code> method
|
||||
is also invoked on the UI object for each auxiliary look and feel,
|
||||
but the return values are ignored.
|
||||
<br><br></li>
|
||||
|
||||
<li> When a method that does not request information
|
||||
from the UI object is invoked, the multiplexing UI object
|
||||
<li> When a method that does not request information
|
||||
from the UI object is invoked, the multiplexing UI object
|
||||
invokes that method on all UIs --
|
||||
on the UI object obtained from the default look
|
||||
and feel
|
||||
and on all the UIs obtained from the auxiliary look and feels,
|
||||
as well.
|
||||
For example, invoking the <code>installUI</code>
|
||||
method on a multiplexing UI causes the multiplexing UI to invoke
|
||||
<code>installUI</code>
|
||||
on the UI obtained from the default look and feel and the UIs obtained from
|
||||
as well.
|
||||
For example, invoking the <code>installUI</code>
|
||||
method on a multiplexing UI causes the multiplexing UI to invoke
|
||||
<code>installUI</code>
|
||||
on the UI obtained from the default look and feel and the UIs obtained from
|
||||
the auxiliary factories.</li>
|
||||
</ul>
|
||||
<p> In all cases, the UI object obtained from
|
||||
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
|
||||
the <code>swing.auxiliarylaf</code>
|
||||
<p> In all cases, the UI object obtained from
|
||||
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
|
||||
the <code>swing.auxiliarylaf</code>
|
||||
property.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<p>
|
||||
|
||||
<a name="custom"></a>
|
||||
<hr width=100% align=LEFT size=2>
|
||||
<font color="#000080" size="+2"><b>How to Provide a Custom Multiplexing Look
|
||||
and Feel</b></font>
|
||||
<a id="custom"></a>
|
||||
<hr>
|
||||
<h2>How to Provide a Custom Multiplexing Look and Feel</h2>
|
||||
|
||||
<p>While
|
||||
we hope the behavior of the Multiplexing look and feel is
|
||||
flexible enough not to require an alternative multiplexing look
|
||||
and feel, Swing allows the user to specify another multiplexing look
|
||||
<p>While
|
||||
we hope the behavior of the Multiplexing look and feel is
|
||||
flexible enough not to require an alternative multiplexing look
|
||||
and feel, Swing allows the user to specify another multiplexing look
|
||||
and feel to use.
|
||||
</p>
|
||||
|
||||
<p> To do that, all the user has to do is modify
|
||||
the <code>$JDKHOME/conf/swing.properties</code>
|
||||
file to include a definition of the <code>swing.plaf.multiplexinglaf</code>
|
||||
property. Swing then treats the <code>swing.plaf.multiplexinglaf</code>
|
||||
property as a <code>LookAndFeel</code>
|
||||
<p> To do that, all the user has to do is modify
|
||||
the <code>$JDKHOME/conf/swing.properties</code>
|
||||
file to include a definition of the <code>swing.plaf.multiplexinglaf</code>
|
||||
property. Swing then treats the <code>swing.plaf.multiplexinglaf</code>
|
||||
property as a <code>LookAndFeel</code>
|
||||
subclass that supports multiplexing.
|
||||
</p>
|
||||
<p> For example, if a user has a multiplexing
|
||||
look and feel represented by <code>com.myco.SuperMultiLookAndFeel</code>
|
||||
that is a better match for their needs than the Multiplexing
|
||||
look and feel
|
||||
(<code>javax.swing.plaf.multi.MultiLookAndFeel</code>),
|
||||
<p> For example, if a user has a multiplexing
|
||||
look and feel represented by <code>com.myco.SuperMultiLookAndFeel</code>
|
||||
that is a better match for their needs than the Multiplexing
|
||||
look and feel
|
||||
(<code>javax.swing.plaf.multi.MultiLookAndFeel</code>),
|
||||
the user could include the following line in <code>$JDKHOME/conf/swing.properties</code>:
|
||||
</p>
|
||||
|
||||
@ -491,12 +491,12 @@ and Feel</b></font>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
This statement instructs Swing to use <code>com.myco.SuperMultiLookAndFeel</code>
|
||||
instead of <code>javax.swing.plaf.multi.MultiLookAndFeel</code>. But
|
||||
if you use this kind of statement, be careful, because the suppliers
|
||||
of auxiliary look and feels will most likely have developed and
|
||||
This statement instructs Swing to use <code>com.myco.SuperMultiLookAndFeel</code>
|
||||
instead of <code>javax.swing.plaf.multi.MultiLookAndFeel</code>. But
|
||||
if you use this kind of statement, be careful, because the suppliers
|
||||
of auxiliary look and feels will most likely have developed and
|
||||
tested against our Multiplexing look and feel.
|
||||
</p>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,8 +1,34 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title></title>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Nimbus colors</title>
|
||||
</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>
|
||||
<h1 id="primaryColors">Primary Colors</h1>
|
||||
<table summary="Nimbus primary colors">
|
||||
|
@ -1,8 +1,11 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<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.
|
||||
|
||||
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
|
||||
or visit www.oracle.com if you need additional information or have any
|
||||
questions.
|
||||
|
||||
-->
|
||||
</head>
|
||||
|
||||
<body bgcolor="white">
|
||||
<h3>Component Specific Properties</h3>
|
||||
<p> The look, and to some degree the feel of Synth
|
||||
can be customized by way of component specific properties.
|
||||
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>
|
||||
<p>
|
||||
can be customized by way of component specific properties.
|
||||
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>
|
||||
<p>
|
||||
This file specifies the expected class type each of the values
|
||||
are to take. The behavior of supplying the wrong type is
|
||||
unspecified: typically a <code>ClassCastException</code> is
|
||||
@ -66,7 +70,7 @@ the following properties: </p>
|
||||
</tbody>
|
||||
</table>
|
||||
<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
|
||||
to the <a href="#buttonProperties">Button properties</a>, JButton
|
||||
supports the following property: </p>
|
||||
@ -89,7 +93,7 @@ button that is receiving focus. </td>
|
||||
</tbody>
|
||||
</table>
|
||||
<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
|
||||
addition to the <a href="#buttonProperties">Button properties</a>,
|
||||
JCheckBox supports the following property: </p>
|
||||
@ -111,7 +115,7 @@ JCheckBox supports the following property: </p>
|
||||
</tbody>
|
||||
</table>
|
||||
<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
|
||||
child Components: </p>
|
||||
<table border="1" summary="JComboBox child components">
|
||||
@ -144,7 +148,7 @@ child Components: </p>
|
||||
<tr>
|
||||
<td>ComboBox.renderer</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>
|
||||
</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
|
||||
folder.
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">FileChooser.upFolderIcon<br>
|
||||
</td>
|
||||
@ -301,7 +305,7 @@ of the file chooser.<br>
|
||||
<td style="vertical-align: top;">Icon used by the button that navigates to the
|
||||
current user's home directory.
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">FileChooser.detailsViewIcon<br>
|
||||
</td>
|
||||
@ -312,7 +316,7 @@ of the file chooser.<br>
|
||||
<td style="vertical-align: top;">Icon used by the button that toggles the
|
||||
detailed files list view.
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">FileChooser.listViewIcon<br>
|
||||
</td>
|
||||
@ -324,7 +328,7 @@ of the file chooser.<br>
|
||||
regular files list view, showing only an icon and the name of each
|
||||
file and directory.
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">FileChooser.viewMenuIcon<br>
|
||||
</td>
|
||||
@ -339,7 +343,7 @@ of the file chooser.<br>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<h4><a name="JInternalFrame"></a>JInternalFrame</h4>
|
||||
<h4><a id="JInternalFrame"></a>JInternalFrame</h4>
|
||||
<h5>JInternalFrame Specific Properties</h5>
|
||||
<table cellpadding="2" cellspacing="2" border="1" summary="JInternalFrame specific properties"
|
||||
style="text-align: left; width: 100%;">
|
||||
@ -369,7 +373,7 @@ the system menu will be shown.<br>
|
||||
</tbody>
|
||||
</table>
|
||||
<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
|
||||
internal frame similar to that found in a frame.<br>
|
||||
</p>
|
||||
@ -469,7 +473,7 @@ abililty to close the internal frame.
|
||||
</tbody>
|
||||
</table>
|
||||
<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
|
||||
supports the following properties: </p>
|
||||
<h5>JList Specific Properties</h5>
|
||||
@ -486,7 +490,7 @@ supports the following properties: </p>
|
||||
<td>Boolean</td>
|
||||
<td>true </td>
|
||||
<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
|
||||
updated and the colors will instead come from the Style. </td>
|
||||
</tr>
|
||||
@ -508,7 +512,7 @@ is not invoked. </td>
|
||||
</tbody>
|
||||
</table>
|
||||
<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
|
||||
JRadioButtonMenuItem) all support the same set of properties and behave
|
||||
similarly. Each component consists of two Regions: the region
|
||||
@ -536,7 +540,7 @@ and the key, for example <code>Ctrl <acceleratorDelimiter> X</code>.
|
||||
<td>prefix.arrowIcon</td>
|
||||
<td>Icon</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
|
||||
typically only defined for JMenu. </td>
|
||||
</tr>
|
||||
@ -544,7 +548,7 @@ typically only defined for JMenu. </td>
|
||||
<td>prefix.checkIcon</td>
|
||||
<td>Icon</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
|
||||
typically only defined for JCheckBoxMenuItem and JRadioButtonMenuItem
|
||||
to provide the check or radio button. </td>
|
||||
@ -561,7 +565,7 @@ of how the margin is used. </td>
|
||||
<td>prefix.textIconGap</td>
|
||||
<td>Integer</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
|
||||
this is used. </td>
|
||||
</tr>
|
||||
@ -593,7 +597,7 @@ RadioButtonMenuItem. </p>
|
||||
</tbody>
|
||||
</table>
|
||||
<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
|
||||
components, they are: OptionPane.button, OptionPane.label,
|
||||
OptionPane.comboBox, OptionPane.scrollPane, OptionPane.list,
|
||||
@ -623,7 +627,7 @@ OptionPane.textField, OptionPane.iconLabel. </p>
|
||||
<td>OptionPane.buttonOrientation</td>
|
||||
<td>Integer </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
|
||||
(this will be flipped when in a right to left locale). </td>
|
||||
</tr>
|
||||
@ -709,7 +713,7 @@ it follows the other buttons. </td>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<h4><a name="JProgressBar"></a>JProgressBar<br>
|
||||
<h4><a id="JProgressBar"></a>JProgressBar<br>
|
||||
</h4>
|
||||
<h5>JProgressBar Specific Properties<br>
|
||||
</h5>
|
||||
@ -749,7 +753,7 @@ the bouncing box per frame when the progress bar is indeterminate.<br>
|
||||
</tr>
|
||||
</tbody>
|
||||
</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
|
||||
addition to the <a href="#buttonProperties">Button properties</a>,
|
||||
JRadioButton supports the following property: </p>
|
||||
@ -771,7 +775,7 @@ JRadioButton supports the following property: </p>
|
||||
</tbody>
|
||||
</table>
|
||||
<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
|
||||
child Components: </p>
|
||||
<table border="1" summary="JScrollBar child components">
|
||||
@ -841,7 +845,7 @@ will be made equal. </td>
|
||||
</tbody>
|
||||
</table>
|
||||
<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
|
||||
JToolBar.Separator use the same property: </p>
|
||||
<table border="1" summary="Separator classes common properties">
|
||||
@ -856,7 +860,7 @@ JToolBar.Separator use the same property: </p>
|
||||
<td>Separator.thickness</td>
|
||||
<td>Integer</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 size will include the Insets. </td>
|
||||
</tr>
|
||||
@ -875,20 +879,21 @@ preferred size will include the Insets. </td>
|
||||
<td>ToolBar.separatorSize</td>
|
||||
<td>Dimension</td>
|
||||
<td>null </td>
|
||||
<td>The value of this is passed to the <code>javax.swing.JToolBar$Separator#setSeparatorSize(java.awt.Dimension)</code>
|
||||
method. If unspecified <code>setSeparatorSize</code> is not
|
||||
invoked. </td>
|
||||
</tr>
|
||||
<td>The value of this is passed to the
|
||||
<code>javax.swing.JToolBar$Separator#setSeparatorSize(java.awt.Dimension)</code>
|
||||
method. If unspecified <code>setSeparatorSize</code> is not invoked.
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<h4><a name="JScrollPane">JScrollPane</a></h4>
|
||||
<p>
|
||||
<h4><a id="JScrollPane">JScrollPane</a></h4>
|
||||
<p>
|
||||
JScrollPane is unique in that it provides a method for setting
|
||||
the Border around the JViewport with JViewport throwing an
|
||||
IllegalArgumentException from <code>setBorder</code>. To
|
||||
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
|
||||
<code>ScrollPane.viewportBorderInsets</code>. The
|
||||
<code>SynthPainter</code> method
|
||||
@ -913,7 +918,7 @@ invoked. </td>
|
||||
</tbody>
|
||||
</table>
|
||||
<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
|
||||
potentially two buttons, if setOneTouchExpandable(true) has been
|
||||
invoked. The two buttons will be named:
|
||||
@ -950,7 +955,7 @@ SplitPaneDivider.rightOneTouchButton. </p>
|
||||
<td>SplitPane.oneTouchExpandable</td>
|
||||
<td>Boolean</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>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -962,7 +967,7 @@ setOneTouchExpandable. </td>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<h4><a name="JSlider"></a>JSlider</h4>
|
||||
<h4><a id="JSlider"></a>JSlider</h4>
|
||||
<h5>JSlider Specific Properties</h5>
|
||||
<table cellpadding="2" cellspacing="2" border="1" summary="JSlider specific properties"
|
||||
style="text-align: left; width: 100%;">
|
||||
@ -1022,7 +1027,7 @@ of the slider.<br>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<h4><a name="JTabbedPane"></a>JTabbedPane</h4>
|
||||
<h4><a id="JTabbedPane"></a>JTabbedPane</h4>
|
||||
<h5>JTabbedPane Specific Properties</h5>
|
||||
<table cellpadding="2" cellspacing="2" border="1" summary="JTabbedPane specific properties"
|
||||
style="text-align: left; width: 100%;">
|
||||
@ -1084,8 +1089,8 @@ selected tab.<br>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<h4><a name="JTable">JTable</a></h4>
|
||||
<p> JTable sets the name of the renderer to Table.cellRenderer.
|
||||
<h4><a id="JTable">JTable</a></h4>
|
||||
<p> JTable sets the name of the renderer to Table.cellRenderer.
|
||||
JTable supports the following properties: </p>
|
||||
<h5>JTable Specific Properties</h5>
|
||||
<table border="1" summary="JTable specific properties">
|
||||
@ -1108,7 +1113,7 @@ style is used. </td>
|
||||
<td>Boolean</td>
|
||||
<td>true </td>
|
||||
<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
|
||||
updated and the colors will instead come from the Style. </td>
|
||||
</tr>
|
||||
@ -1116,7 +1121,7 @@ updated and the colors will instead come from the Style. </td>
|
||||
<td>Table.rendererUseUIBorder</td>
|
||||
<td>Boolean</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
|
||||
renderer will only succeed if it is a Synth Border. </td>
|
||||
</tr>
|
||||
@ -1129,7 +1134,7 @@ renderer will only succeed if it is a Synth Border. </td>
|
||||
</tbody>
|
||||
</table>
|
||||
<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
|
||||
the editor is Tree.cellEditor.</p>
|
||||
<h5>JTree Specific Properties</h5>
|
||||
@ -1151,7 +1156,7 @@ the editor is Tree.cellEditor.</p>
|
||||
<td>Tree.drawHorizontalLines</td>
|
||||
<td>Boolean</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>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -1198,7 +1203,7 @@ may happen along both the horizontal and vertical axis. </td>
|
||||
<td>Tree.scrollsOnExpand</td>
|
||||
<td>Boolean</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>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -1212,7 +1217,7 @@ and <a href="synthFileFormat.html#e.graphicsUtils">binding it</a> to the tree.</
|
||||
</tr>
|
||||
</tbody>
|
||||
</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
|
||||
addition to the <a href="#buttonProperties">Button properties</a>,
|
||||
JToggleButton supports the following property: </p>
|
||||
@ -1234,7 +1239,7 @@ JToggleButton supports the following property: </p>
|
||||
</tbody>
|
||||
</table>
|
||||
<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,
|
||||
JToggleButton and SynthArrowButton) support a similar set of properties.
|
||||
These properties are: </p>
|
||||
@ -1250,23 +1255,29 @@ These properties are: </p>
|
||||
<td>prefix.contentAreaFilled</td>
|
||||
<td>Integer</td>
|
||||
<td>true </td>
|
||||
<td>Refer to the javadoc of <code>javax.swing.AbstractButton#contentAreaFilled(boolean)</code> for details
|
||||
of how this is used. It is up to the Painter to properly honor this
|
||||
property. </td>
|
||||
</tr>
|
||||
<td>Refer to the javadoc of
|
||||
<code>javax.swing.AbstractButton#contentAreaFilled(boolean)</code>
|
||||
for details of how this is used. It is up to the Painter to properly honor
|
||||
this property.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>prefix.iconTextGap</td>
|
||||
<td>Integer</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
|
||||
this is used. </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 this is used.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>prefix.margin</td>
|
||||
<td>Insets</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
|
||||
of how the margin is used. </td>
|
||||
<td>Margin for the JButton. Refer to the javadoc of
|
||||
<code>javax.swing.AbstractButton#setMargin(java.awt.Insets)</code> for
|
||||
details of how the margin is used.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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
|
||||
JToggleButton.<br>
|
||||
</p>
|
||||
<h4><a name="textProperties"></a>Text Properties<br>
|
||||
<h4><a id="textProperties"></a>Text Properties<br>
|
||||
</h4>
|
||||
<table cellpadding="2" cellspacing="2" border="1" summary="Text properties"
|
||||
style="text-align: left; width: 100%;">
|
||||
|
@ -1,7 +1,33 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Synth File Format</title>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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">
|
||||
div.dtd-fragment {
|
||||
width: 100%;
|
||||
@ -19,14 +45,17 @@ div.example {
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2><a name="file">File Format</a></h2>
|
||||
<h2><a id="file">File Format</a></h2>
|
||||
<p>
|
||||
Synth's file format (<a href="synth.dtd">dtd</a>)
|
||||
allows for specifying all the pieces
|
||||
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
|
||||
<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
|
||||
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
|
||||
<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
|
||||
and feel:
|
||||
</p>
|
||||
@ -51,8 +80,10 @@ div.example {
|
||||
</pre>
|
||||
</div>
|
||||
<p>
|
||||
The method <a 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:
|
||||
The method <a
|
||||
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>
|
||||
<ul>
|
||||
<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>
|
||||
<div class="dtd-fragment">
|
||||
<pre class="dtd-fragment">
|
||||
<!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> |
|
||||
<!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>)*>
|
||||
<!ATTLIST synth
|
||||
<a href="#synth.version">version</a> CDATA #IMPLIED
|
||||
@ -78,7 +109,7 @@ div.example {
|
||||
</pre>
|
||||
</div>
|
||||
<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>
|
||||
</dl>
|
||||
<p>
|
||||
@ -86,11 +117,11 @@ div.example {
|
||||
elements that make up a SynthLookAndFeel definition.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<h3>The style element</h3>
|
||||
<div class="dtd-fragment">
|
||||
<pre class="dtd-fragment">
|
||||
<!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> |
|
||||
<!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.imageIcon">imageIcon</a>)*>
|
||||
<!ATTLIST style
|
||||
@ -101,9 +132,9 @@ div.example {
|
||||
</div>
|
||||
<p><em>Attribute definitions</em></p>
|
||||
<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>
|
||||
<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
|
||||
and used for the new style. This provides a convenient
|
||||
mechanism for overriding only a portion of an existing
|
||||
@ -144,7 +175,7 @@ div.example {
|
||||
<h3>The state element</h3>
|
||||
<div class="dtd-fragment">
|
||||
<pre class="dtd-fragment">
|
||||
<!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>) |
|
||||
<!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>)*>
|
||||
<!ATTLIST state
|
||||
<a href="#state.id">id</a> ID #IMPLIED
|
||||
@ -156,19 +187,19 @@ div.example {
|
||||
</div>
|
||||
<p><em>Attribute definitions</em></p>
|
||||
<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>
|
||||
<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
|
||||
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
|
||||
to. This is a list of: ENABLED,
|
||||
MOUSE_OVER, PRESSED, DISABLED, FOCUSED, SELECTED or
|
||||
DEFAULT. Multiple states should
|
||||
be separated by 'and.' If you do not specify a value, the
|
||||
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
|
||||
defined state. This is useful for multiple styles that
|
||||
wish to share the same visual properties for a particular
|
||||
@ -212,7 +243,7 @@ div.example {
|
||||
<p>
|
||||
State <code>one</code> is used when the Component is SELECTED
|
||||
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
|
||||
chosen, otherwise if the state is SELECTED, but not does not
|
||||
contain PRESSED, state <code>two</code> will be used.
|
||||
@ -220,7 +251,7 @@ div.example {
|
||||
<h3>The font element</h3>
|
||||
<div class="dtd-fragment">
|
||||
<pre class="dtd-fragment">
|
||||
<!ELEMENT <a name="e.font">font</a> EMPTY>
|
||||
<!ELEMENT <a id="e.font">font</a> EMPTY>
|
||||
<!ATTLIST font
|
||||
<a href="#font.id">id</a> ID #IMPLIED
|
||||
<a href="#font.idref">clone</a> IDREF #IMPLIED
|
||||
@ -232,18 +263,18 @@ div.example {
|
||||
</div>
|
||||
<p><em>Attribute definitions</em></p>
|
||||
<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>
|
||||
<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>
|
||||
<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.
|
||||
<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
|
||||
Font separated by spaces: PLAIN, BOLD or ITALIC. If
|
||||
unspecified PLAIN is used.
|
||||
</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>
|
||||
</dl>
|
||||
<p>
|
||||
@ -289,7 +320,7 @@ div.example {
|
||||
<h3>The color element</h3>
|
||||
<div class="dtd-fragment">
|
||||
<pre class="dtd-fragment">
|
||||
<!ELEMENT <a name="e.color">color</a> EMPTY>
|
||||
<!ELEMENT <a id="e.color">color</a> EMPTY>
|
||||
<!ATTLIST color
|
||||
<a href="#color.id">id</a> ID #IMPLIED
|
||||
<a href="#color.idref">idref</a> IDREF #IMPLIED
|
||||
@ -300,11 +331,11 @@ div.example {
|
||||
</div>
|
||||
<p><em>Attribute definitions</em></p>
|
||||
<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>
|
||||
<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>
|
||||
<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
|
||||
typically one of the constants defined by ColorType:
|
||||
FOREGROUND, BACKGROUND, TEXT_FOREGROUND, TEXT_BACKGROUND
|
||||
@ -314,12 +345,12 @@ div.example {
|
||||
is useful for subclasses of synth that define additional
|
||||
color types.
|
||||
</dd>
|
||||
<dt><a name="color.value"><samp>value</samp></a></dt>
|
||||
<dt><a id="color.value"><samp>value</samp></a></dt>
|
||||
<dd>
|
||||
Value for the color. This accepts the following forms.
|
||||
Value for the color. This accepts the following forms.
|
||||
<ul>
|
||||
<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
|
||||
<code>RR</code> gives the red component, <code>GG</code>
|
||||
the green component and <code>BB</code> the blue
|
||||
@ -329,7 +360,7 @@ div.example {
|
||||
<code>#AARRGGBB</code>. This is useful for alpha values
|
||||
other than <code>0xFF</code>. The form
|
||||
<code>#ARRGGBB</code> is equivalent to
|
||||
<code>#0ARRGGBB</code>.
|
||||
<code>#0ARRGGBB</code>.
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
@ -366,7 +397,7 @@ div.example {
|
||||
<h3>The property element</h3>
|
||||
<div class="dtd-fragment">
|
||||
<pre class="dtd-fragment">
|
||||
<!ELEMENT <a name="e.property">property</a> EMPTY>
|
||||
<!ELEMENT <a id="e.property">property</a> EMPTY>
|
||||
<!ATTLIST property
|
||||
<a href="#property.key">key</a> CDATA #REQUIRED
|
||||
<a href="#property.type">type</a> (idref|boolean|dimension|insets|integer|string) "idref"
|
||||
@ -376,11 +407,11 @@ div.example {
|
||||
</div>
|
||||
<p><em>Attribute definitions</em></p>
|
||||
<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>
|
||||
<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>
|
||||
<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
|
||||
be true or false, for integer properties this will be a
|
||||
valid integer, for dimensions this will be the width and
|
||||
@ -438,7 +469,7 @@ div.example {
|
||||
</div>
|
||||
<div class="dtd-fragment">
|
||||
<pre class="dtd-fragment">
|
||||
<!ELEMENT <a name="e.defaultsProperty">defaultsProperty</a> EMPTY>
|
||||
<!ELEMENT <a id="e.defaultsProperty">defaultsProperty</a> EMPTY>
|
||||
<!ATTLIST defaultsProperty
|
||||
<a href="#defaultsProperty.key">key</a> CDATA #REQUIRED
|
||||
<a href="#defaultsProperty.type">type</a> (idref|boolean|dimension|insets|integer|string) "idref"
|
||||
@ -448,11 +479,11 @@ div.example {
|
||||
</div>
|
||||
<p><em>Attribute definitions</em></p>
|
||||
<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>
|
||||
<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>
|
||||
<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
|
||||
true or false, for integer properties this will be a
|
||||
valid integer, for dimensions this will be the width and
|
||||
@ -488,7 +519,7 @@ div.example {
|
||||
<h3>The graphicsUtils element</h3>
|
||||
<div class="dtd-fragment">
|
||||
<pre class="dtd-fragment">
|
||||
<!ELEMENT <a name="e.graphicsUtils">graphicsUtils</a> EMPTY>
|
||||
<!ELEMENT <a id="e.graphicsUtils">graphicsUtils</a> EMPTY>
|
||||
<!ATTLIST graphicsUtils
|
||||
<a href="#graphicsUtils.idref">idref</a> IDREF #REQUIRED
|
||||
>
|
||||
@ -496,7 +527,7 @@ div.example {
|
||||
</div>
|
||||
<p><em>Attribute definitions</em></p>
|
||||
<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
|
||||
that is to be used as the SynthGraphicsUtils for the current
|
||||
<a href="#e.style">style</a>.</dd>
|
||||
@ -520,7 +551,7 @@ div.example {
|
||||
<h3>The insets element</h3>
|
||||
<div class="dtd-fragment">
|
||||
<pre class="dtd-fragment">
|
||||
<!ELEMENT <a name="e.insets">insets</a> EMPTY>
|
||||
<!ELEMENT <a id="e.insets">insets</a> EMPTY>
|
||||
<!ATTLIST insets
|
||||
<a href="#insets.id">id</a> ID #IMPLIED
|
||||
<a href="#insets.idref">idref</a> IDREF #IMPLIED
|
||||
@ -533,17 +564,17 @@ div.example {
|
||||
</div>
|
||||
<p><em>Attribute definitions</em></p>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
</dl>
|
||||
<p>
|
||||
@ -564,7 +595,7 @@ div.example {
|
||||
<h3>The bind element</h3>
|
||||
<div class="dtd-fragment">
|
||||
<pre class="dtd-fragment">
|
||||
<!ELEMENT <a name="e.bind">bind</a> EMPTY>
|
||||
<!ELEMENT <a id="e.bind">bind</a> EMPTY>
|
||||
<!ATTLIST bind
|
||||
<a href="#bind.style">style</a> IDREF #REQUIRED
|
||||
<a href="#bind.type">type</a> (name|region) #REQUIRED
|
||||
@ -574,12 +605,12 @@ div.example {
|
||||
</div>
|
||||
<p><em>Attribute definitions</em></p>
|
||||
<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>
|
||||
<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,
|
||||
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
|
||||
name of the Region, depending upon the value of
|
||||
<a href="#bind.type">type</a>.</dd>
|
||||
@ -673,7 +704,7 @@ div.example {
|
||||
<h3>The painter element</h3>
|
||||
<div class="dtd-fragment">
|
||||
<pre class="dtd-fragment">
|
||||
<!ELEMENT <a name="e.painter">painter</a> EMPTY>
|
||||
<!ELEMENT <a id="e.painter">painter</a> EMPTY>
|
||||
<!ATTLIST painter
|
||||
<a href="#painter.idref">idref</a> IDREF #IMPLIED
|
||||
<a href="#painter.method">method</a> CDATA #IMPLIED
|
||||
@ -683,9 +714,9 @@ div.example {
|
||||
</div>
|
||||
<p><em>Attribute definitions</em></p>
|
||||
<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>
|
||||
<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
|
||||
corresponds to the method name of a paint method in SynthPainter
|
||||
with the paint prefix dropped, the remainder is case
|
||||
@ -694,7 +725,7 @@ div.example {
|
||||
'buttonBackground' or 'buttonbackground'. If this is
|
||||
not specified the painter is used for all methods that don't have a
|
||||
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
|
||||
used for. This is only useful for the SynthPainter methods that take
|
||||
a direction or orientation. If this is not specified the painter is
|
||||
@ -787,7 +818,7 @@ div.example {
|
||||
<h3>The imagePainter element</h3>
|
||||
<div class="dtd-fragment">
|
||||
<pre class="dtd-fragment">
|
||||
<!ELEMENT <a name="e.imagePainter">imagePainter</a> EMPTY>
|
||||
<!ELEMENT <a id="e.imagePainter">imagePainter</a> EMPTY>
|
||||
<!ATTLIST imagePainter
|
||||
<a href="#imagePainter.id">id</a> ID #IMPLIED
|
||||
<a href="#imagePainter.method">method</a> CDATA #IMPLIED
|
||||
@ -803,9 +834,9 @@ div.example {
|
||||
</div>
|
||||
<p><em>Attribute definitions</em></p>
|
||||
<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>
|
||||
<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
|
||||
corresponds to the method name of a paint method in SynthPainter
|
||||
with the paint prefix dropped, the remainder is case
|
||||
@ -814,29 +845,29 @@ div.example {
|
||||
'buttonBackground' or 'buttonbackground'. If this is
|
||||
not specified the painter is used for all methods that don't have a
|
||||
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
|
||||
used for. This is only useful for the SynthPainter methods that take
|
||||
a direction or orientation. If this is not specified the image is
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
each component separated by a space. If not specified the
|
||||
<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>
|
||||
<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
|
||||
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>
|
||||
</dl>
|
||||
<p>
|
||||
@ -844,7 +875,7 @@ div.example {
|
||||
painter for the current style or state that will render using
|
||||
the specified image. ImagePainter offers two distinct rendering
|
||||
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
|
||||
example, to specify an arrow for a scroll button use the center
|
||||
mode. The following example illustrates this:
|
||||
@ -878,12 +909,12 @@ div.example {
|
||||
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
|
||||
understand how identical painters are handled.
|
||||
|
||||
|
||||
|
||||
<h3>The imageIcon element</h3>
|
||||
<div class="dtd-fragment">
|
||||
<pre class="dtd-fragment">
|
||||
<!ELEMENT <a name="e.imageIcon">imageIcon</a> EMPTY>
|
||||
<!ELEMENT <a id="e.imageIcon">imageIcon</a> EMPTY>
|
||||
<!ATTLIST imageIcon
|
||||
<a href="#imageIcon.id">id</a> ID #REQUIRED
|
||||
<a href="#imageIcon.path">path</a> CDATA #REQUIRED
|
||||
@ -892,9 +923,9 @@ div.example {
|
||||
</div>
|
||||
<p><em>Attribute definitions</em></p>
|
||||
<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>
|
||||
<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
|
||||
getResource to resolve the path, with the Class supplied to
|
||||
SynthLookAndFeel.load.</dd>
|
||||
@ -917,7 +948,7 @@ div.example {
|
||||
<h3>The opaque element</h3>
|
||||
<div class="dtd-fragment">
|
||||
<pre class="dtd-fragment">
|
||||
<!ELEMENT <a name="e.opaque">opaque</a> EMPTY>
|
||||
<!ELEMENT <a id="e.opaque">opaque</a> EMPTY>
|
||||
<!ATTLIST opaque
|
||||
<a href="#opaque.value">value</a> (true|false) "true"
|
||||
>
|
||||
@ -925,7 +956,7 @@ div.example {
|
||||
</div>
|
||||
<p><em>Attribute definitions</em></p>
|
||||
<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
|
||||
is opaque.</dd>
|
||||
</dl>
|
||||
@ -945,12 +976,14 @@ div.example {
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<h3><a name="ee.beansPersistance">The beansPersistance entity</a></h3>
|
||||
<h3><a id="ee.beansPersistance">The beansPersistance entity</a></h3>
|
||||
<p>
|
||||
Beans persistance can be used to embed any Object. This is
|
||||
typically used for embedding your own Painters, but can be used
|
||||
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>
|
||||
|
Loading…
Reference in New Issue
Block a user