mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 18:44:38 +02:00
8025824: [cleanup] Fix tidy errors and warnings in preformatted HTML files related to 2d/awt/swing
Reviewed-by: anthony, alexsch
This commit is contained in:
parent
a076cb06a6
commit
ca0d6ea6f7
40 changed files with 161 additions and 158 deletions
|
@ -1,5 +1,7 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
Classes for receiving gesture events.
|
Classes for receiving gesture events.
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
Provides classes for integrating Java applications with the native application environment.
|
Provides classes for integrating Java applications with the native application environment.
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||||
<html>
|
<html>
|
||||||
|
<head><title></title></head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
Provides classes for color spaces. It contains an
|
Provides classes for color spaces. It contains an
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||||
<html>
|
<html>
|
||||||
|
<head><title></title></head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
Provides interfaces and classes for transferring data
|
Provides interfaces and classes for transferring data
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||||
<html>
|
<html>
|
||||||
|
<head><title></title></head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
Drag and Drop is a direct manipulation gesture found in many Graphical
|
Drag and Drop is a direct manipulation gesture found in many Graphical
|
||||||
|
@ -51,18 +52,18 @@ states (not entirely sequentially):
|
||||||
associated with some presentation
|
associated with some presentation
|
||||||
element (<code>Component</code>) in the GUI, to initiate a Drag and Drop of
|
element (<code>Component</code>) in the GUI, to initiate a Drag and Drop of
|
||||||
some potentially <code>Transferable</code> data.
|
some potentially <code>Transferable</code> data.
|
||||||
<P>
|
<br><br>
|
||||||
<LI>1 or more <code>DropTarget</code>(s) come into/go out of
|
<LI>1 or more <code>DropTarget</code>(s) come into/go out of
|
||||||
existence, associated
|
existence, associated
|
||||||
with presentation elements in the GUI (Components), potentially
|
with presentation elements in the GUI (Components), potentially
|
||||||
capable of consuming <code>Transferable</code> data types.
|
capable of consuming <code>Transferable</code> data types.
|
||||||
<P>
|
<br><br>
|
||||||
<LI> A <code>DragGestureRecognizer</code> is
|
<LI> A <code>DragGestureRecognizer</code> is
|
||||||
obtained from the <code>DragSource</code> and is
|
obtained from the <code>DragSource</code> and is
|
||||||
associated with a <code>Component</code> in order
|
associated with a <code>Component</code> in order
|
||||||
to track and identify any Drag
|
to track and identify any Drag
|
||||||
initiating gesture by the user over the <code>Component</code>.
|
initiating gesture by the user over the <code>Component</code>.
|
||||||
<P>
|
<br><br>
|
||||||
<LI> A user makes a Drag gesture over the <code>Component</code>,
|
<LI> A user makes a Drag gesture over the <code>Component</code>,
|
||||||
which the registered
|
which the registered
|
||||||
<code>DragGestureRecognizer</code> detects, and notifies its
|
<code>DragGestureRecognizer</code> detects, and notifies its
|
||||||
|
@ -76,13 +77,13 @@ contains the abstract class <code>MouseDragGestureRecognizer</code> for
|
||||||
recognizing mouse device gestures. Other abstract subclasses may be
|
recognizing mouse device gestures. Other abstract subclasses may be
|
||||||
provided by the platform to support other input devices or
|
provided by the platform to support other input devices or
|
||||||
particular <code>Component</code> class semantics.
|
particular <code>Component</code> class semantics.
|
||||||
<P>
|
<br><br>
|
||||||
<LI> The <code>DragGestureListener</code> causes the
|
<LI> The <code>DragGestureListener</code> causes the
|
||||||
<code>DragSource</code> to initiate the Drag
|
<code>DragSource</code> to initiate the Drag
|
||||||
and Drop operation on behalf of the user, perhaps animating the
|
and Drop operation on behalf of the user, perhaps animating the
|
||||||
GUI Cursor and/or rendering an <code>Image</code> of the item(s) that are the
|
GUI Cursor and/or rendering an <code>Image</code> of the item(s) that are the
|
||||||
subject of the operation.
|
subject of the operation.
|
||||||
<P>
|
<br><br>
|
||||||
<LI> As the user gestures navigate over <code>Component</code>(s)
|
<LI> As the user gestures navigate over <code>Component</code>(s)
|
||||||
in the GUI with
|
in the GUI with
|
||||||
associated <code>DropTarget</code>(s), the <code>DragSource</code>
|
associated <code>DropTarget</code>(s), the <code>DragSource</code>
|
||||||
|
@ -111,11 +112,11 @@ as follows:
|
||||||
<UL>
|
<UL>
|
||||||
<LI> By the transfer "operation" selected by the user, and supported by
|
<LI> By the transfer "operation" selected by the user, and supported by
|
||||||
both the <code>DragSource</code> and <code>DropTarget</code>: Copy, Move or Reference(link).
|
both the <code>DragSource</code> and <code>DropTarget</code>: Copy, Move or Reference(link).
|
||||||
<P>
|
<br><br>
|
||||||
<LI> By the intersection of the set of data types provided by the
|
<LI> By the intersection of the set of data types provided by the
|
||||||
<code>DragSource</code> and the set of data types comprehensible by the
|
<code>DragSource</code> and the set of data types comprehensible by the
|
||||||
<code>DropTarget</code>.
|
<code>DropTarget</code>.
|
||||||
<P>
|
<br><br>
|
||||||
<LI>When the user terminates the drag operation, normally resulting in a
|
<LI>When the user terminates the drag operation, normally resulting in a
|
||||||
successful Drop, both the <code>DragSource</code> and <code>DropTarget</code>
|
successful Drop, both the <code>DragSource</code> and <code>DropTarget</code>
|
||||||
receive
|
receive
|
||||||
|
|
|
@ -23,7 +23,11 @@
|
||||||
questions.
|
questions.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
|
<head>
|
||||||
|
<title></title>
|
||||||
|
</head>
|
||||||
<body bgcolor=white>
|
<body bgcolor=white>
|
||||||
|
|
||||||
<h1 align=center>AWT Threading Issues</h1>
|
<h1 align=center>AWT Threading Issues</h1>
|
||||||
|
@ -81,13 +85,13 @@ this machinery are as follows:
|
||||||
dispatched:
|
dispatched:
|
||||||
<ul>
|
<ul>
|
||||||
<li> Sequentially.
|
<li> Sequentially.
|
||||||
<dd> That is, it is not permitted that several events from
|
<dl><dd> That is, it is not permitted that several events from
|
||||||
this queue are dispatched simultaneously.
|
this queue are dispatched simultaneously. </dd></dl>
|
||||||
<li> In the same order as they are enqueued.
|
<li> In the same order as they are enqueued.
|
||||||
<dd> That is, if <code>AWTEvent</code> A is enqueued
|
<dl><dd> That is, if <code>AWTEvent</code> A is enqueued
|
||||||
to the <code>EventQueue</code> before
|
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.
|
dispatched before event A.</dd></dl>
|
||||||
</ul>
|
</ul>
|
||||||
<li> There is at least one alive non-daemon thread while there is at
|
<li> There is at least one alive non-daemon thread while there is at
|
||||||
least one displayable AWT or Swing component within the
|
least one displayable AWT or Swing component within the
|
||||||
|
|
|
@ -23,7 +23,11 @@
|
||||||
questions.
|
questions.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
|
<head>
|
||||||
|
<title></title>
|
||||||
|
</head>
|
||||||
<body bgcolor=white>
|
<body bgcolor=white>
|
||||||
|
|
||||||
<h1 align=center>AWT Desktop Properties</h1>
|
<h1 align=center>AWT Desktop Properties</h1>
|
||||||
|
@ -51,8 +55,8 @@ unavailable for any reason, the implementation will return
|
||||||
<p>
|
<p>
|
||||||
The following table summarizes the desktop properties documented
|
The following table summarizes the desktop properties documented
|
||||||
here, and their value types.
|
here, and their value types.
|
||||||
<p>
|
<br><br>
|
||||||
<table align="center" border="0" cellspacing="0" cellpadding="2" width="%95
|
<table align="center" border="0" cellspacing="0" cellpadding="2"
|
||||||
summary="Standard AWT Desktop Properties">
|
summary="Standard AWT Desktop Properties">
|
||||||
<tr bgcolor="#ccccff">
|
<tr bgcolor="#ccccff">
|
||||||
<th valign="TOP" align="LEFT">Property Name</th>
|
<th valign="TOP" align="LEFT">Property Name</th>
|
||||||
|
@ -60,17 +64,17 @@ here, and their value types.
|
||||||
<th valign="TOP" align="LEFT">Summary Description</th>
|
<th valign="TOP" align="LEFT">Summary Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="TOP"><A href=#awt.font.desktophints>awt.font.desktophints</A</td>
|
<td valign="TOP"><A href="#awt.font.desktophints">awt.font.desktophints</A></td>
|
||||||
<td valign="TOP"><a href="../../util/Map.html">java.util.Map<a/></td>
|
<td valign="TOP"><a href="../../util/Map.html">java.util.Map</a></td>
|
||||||
<td valign="TOP">Font smoothing (text antialiasing) settings.<a/></td>
|
<td valign="TOP">Font smoothing (text antialiasing) settings.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="TOP"><A href=#"sun.awt.enableExtraMouseButtons">sun.awt.enableExtraMouseButtons</A</td>
|
<td valign="TOP"><A href="#sun.awt.enableExtraMouseButtons">sun.awt.enableExtraMouseButtons</A></td>
|
||||||
<td valign="TOP"><a href="../../lang/Boolean.html">java.lang.Boolean<a/></td>
|
<td valign="TOP"><a href="../../lang/Boolean.html">java.lang.Boolean</a></td>
|
||||||
<td valign="TOP">Controls if mouse events from extra buttons are to be generated or not<a/></td>
|
<td valign="TOP">Controls if mouse events from extra buttons are to be generated or not</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<p>
|
|
||||||
<h2>Desktop Font Rendering Hints</h2>
|
<h2>Desktop Font Rendering Hints</h2>
|
||||||
<b>Desktop Property: <A name="awt.font.desktophints">"awt.font.desktophints"</A></b>
|
<b>Desktop Property: <A name="awt.font.desktophints">"awt.font.desktophints"</A></b>
|
||||||
<p>
|
<p>
|
||||||
|
@ -84,14 +88,14 @@ This is particularly important when creating
|
||||||
<a href="../../../javax/swing/JComponent.html"> Swing components</a> which
|
<a href="../../../javax/swing/JComponent.html"> Swing components</a> which
|
||||||
are required to appear consistent with native desktop components or other
|
are required to appear consistent with native desktop components or other
|
||||||
Swing components.
|
Swing components.
|
||||||
<p>
|
|
||||||
<h3>Basic Usage</h3>
|
<h3>Basic Usage</h3>
|
||||||
The standard desktop property named
|
The standard desktop property named
|
||||||
<b>"awt.font.desktophints"</b>
|
<b>"awt.font.desktophints"</b>
|
||||||
can be used to obtain the rendering hints that best match the desktop settings.
|
can be used to obtain the rendering hints that best match the desktop settings.
|
||||||
|
|
||||||
The return value is a
|
The return value is a
|
||||||
<a href="../../util/Map.html"> Map<a/> of
|
<a href="../../util/Map.html"> Map</a> of
|
||||||
<a href="../RenderingHints.html"> <code>RenderingHints</code></a> which
|
<a href="../RenderingHints.html"> <code>RenderingHints</code></a> which
|
||||||
can be directly applied to a <code>Graphics2D</code>.
|
can be directly applied to a <code>Graphics2D</code>.
|
||||||
<p>
|
<p>
|
||||||
|
@ -105,7 +109,7 @@ if (map != null) {
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h3>Advanced Usage Tips</h3>
|
<h3>Advanced Usage Tips</h3>
|
||||||
<p>
|
|
||||||
<h4>Listening for changes</h4>
|
<h4>Listening for changes</h4>
|
||||||
<p>
|
<p>
|
||||||
An application can listen for changes in the property
|
An application can listen for changes in the property
|
||||||
|
@ -161,7 +165,7 @@ RenderingHints getRenderingHints(Graphics2D g2d,
|
||||||
if (hintsToSave.size() == 0) {
|
if (hintsToSave.size() == 0) {
|
||||||
return savedHints;
|
return savedHints;
|
||||||
}
|
}
|
||||||
/* RenderingHints.keySet() returns Set<Object> */
|
/* RenderingHints.keySet() returns Set<Object> */
|
||||||
for (Object o : hintsToSave.keySet()) {
|
for (Object o : hintsToSave.keySet()) {
|
||||||
RenderingHints.Key key = (RenderingHints.Key)o;
|
RenderingHints.Key key = (RenderingHints.Key)o;
|
||||||
Object value = g2d.getRenderingHint(key);
|
Object value = g2d.getRenderingHint(key);
|
||||||
|
@ -185,17 +189,17 @@ if (map != null) {
|
||||||
<h3>Details</h3>
|
<h3>Details</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>The return value will always be null or a <code>Map</code>
|
<li>The return value will always be null or a <code>Map</code>
|
||||||
<p>
|
<br><br>
|
||||||
<li>If the return value is null, then no desktop properties are available,
|
<li>If the return value is null, then no desktop properties are available,
|
||||||
and dynamic updates will not be available. This is a typical behaviour if
|
and dynamic updates will not be available. This is a typical behaviour if
|
||||||
the JDK does not recognise the desktop environment, or it is one which
|
the JDK does not recognise the desktop environment, or it is one which
|
||||||
has no such settings. The <b>Headless</b> toolkit is one such example.
|
has no such settings. The <b>Headless</b> toolkit is one such example.
|
||||||
Therefore it is important to test against null before using the map.
|
Therefore it is important to test against null before using the map.
|
||||||
<p>
|
<br><br>
|
||||||
<li>If non-null the value will be a <code>Map</code> of
|
<li>If non-null the value will be a <code>Map</code> of
|
||||||
<code>RenderingHints</code> such that every key is an instance of
|
<code>RenderingHints</code> such that every key is an instance of
|
||||||
<code>RenderingHints.Key</code> and the value is a legal value for that key.
|
<code>RenderingHints.Key</code> and the value is a legal value for that key.
|
||||||
<p>
|
<br><br>
|
||||||
<li>The map may contain the default value for a hint. This is
|
<li>The map may contain the default value for a hint. This is
|
||||||
needed in the event there is a previously a non-default value for the hint
|
needed in the event there is a previously a non-default value for the hint
|
||||||
set on the <code>Graphics2D</code>. If the map did not contain
|
set on the <code>Graphics2D</code>. If the map did not contain
|
||||||
|
@ -204,7 +208,7 @@ the previous hint which may not correspond to the desktop setting.
|
||||||
<p>
|
<p>
|
||||||
An application can use <code>setRenderingHints(Map)</code> to reinitialise
|
An application can use <code>setRenderingHints(Map)</code> to reinitialise
|
||||||
all hints, but this would affect unrelated hints too.
|
all hints, but this would affect unrelated hints too.
|
||||||
<p>
|
<br><br>
|
||||||
<li>A multi-screen desktop may support per-screen device settings in which
|
<li>A multi-screen desktop may support per-screen device settings in which
|
||||||
case the returned value is for the default screen of the desktop.
|
case the returned value is for the default screen of the desktop.
|
||||||
An application may want to use the settings for the screen on
|
An application may want to use the settings for the screen on
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title align=center>The AWT Focus Subsystem</title>
|
<title>The AWT Focus Subsystem</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
@ -660,16 +660,16 @@ All other applications, including pure AWT applications, will use
|
||||||
FocusTraversalPolicy of its own. To do so, one needs to set Container's focus
|
FocusTraversalPolicy of its own. To do so, one needs to set Container's focus
|
||||||
traversal policy provider property to <code>true</code> with the call to
|
traversal policy provider property to <code>true</code> with the call to
|
||||||
|
|
||||||
<ul>
|
<blockquote>
|
||||||
<code>Container.setFocusTraversalPolicyProvider(boolean)</code>
|
<code>Container.setFocusTraversalPolicyProvider(boolean)</code>
|
||||||
</ul>
|
</blockquote>
|
||||||
|
|
||||||
To determine whether a Container is a focus traversal policy provider, the
|
To determine whether a Container is a focus traversal policy provider, the
|
||||||
following method should be used:
|
following method should be used:
|
||||||
|
|
||||||
<ul>
|
<blockquote>
|
||||||
<code>Container.isFocusTraversalPolicyProvider()</code>
|
<code>Container.isFocusTraversalPolicyProvider()</code>
|
||||||
</ul>
|
</blockquote>
|
||||||
|
|
||||||
If focus traversal policy provider property is set on a focus cycle root, it
|
If focus traversal policy provider property is set on a focus cycle root, it
|
||||||
isn't considered a focus traversal policy provider and behaves just like any
|
isn't considered a focus traversal policy provider and behaves just like any
|
||||||
|
@ -750,10 +750,10 @@ traversals. The preferred way to initiate a programmatic traversal is
|
||||||
to use one of the following methods on <code>KeyboardFocusManager</code>:
|
to use one of the following methods on <code>KeyboardFocusManager</code>:
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<code>KeyboardFocusManager.focusNextComponent()</code>
|
<li><code>KeyboardFocusManager.focusNextComponent()</code>
|
||||||
<code>KeyboardFocusManager.focusPreviousComponent()</code>
|
<li><code>KeyboardFocusManager.focusPreviousComponent()</code>
|
||||||
<code>KeyboardFocusManager.upFocusCycle()</code>
|
<li><code>KeyboardFocusManager.upFocusCycle()</code>
|
||||||
<code>KeyboardFocusManager.downFocusCycle()</code>
|
<li><code>KeyboardFocusManager.downFocusCycle()</code>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
@ -1149,7 +1149,7 @@ Microsoft Windows and Solaris is as follows:
|
||||||
<b>Microsoft Windows</b>: The Window is moved to front and becomes the focused
|
<b>Microsoft Windows</b>: The Window is moved to front and becomes the focused
|
||||||
Window.
|
Window.
|
||||||
<br>
|
<br>
|
||||||
</b>Solaris</b>: The Window is moved to front. In a point-to-focus focus
|
<b>Solaris</b>: The Window is moved to front. In a point-to-focus focus
|
||||||
window manager, the Window will be focused if it is now the
|
window manager, the Window will be focused if it is now the
|
||||||
top-most Window under the cursor. In a click-to-focus window
|
top-most Window under the cursor. In a click-to-focus window
|
||||||
manager, the Window will become the focused Window.
|
manager, the Window will become the focused Window.
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
modality features and how to use them. It contains the following sections:
|
modality features and how to use them. It contains the following sections:
|
||||||
</p><ul>
|
</p><ul>
|
||||||
<li><a href="#Definitions">Definitions</a></li>
|
<li><a href="#Definitions">Definitions</a></li>
|
||||||
</li><li><a href="#ModalityTypes">Modality types</a></li>
|
<li><a href="#ModalityTypes">Modality types</a></li>
|
||||||
<li><a href="#ShowHideBlocking">Show/hide blocking</a></li>
|
<li><a href="#ShowHideBlocking">Show/hide blocking</a></li>
|
||||||
<li><a href="#ModalExclusion">Modal exclusion</a></li>
|
<li><a href="#ModalExclusion">Modal exclusion</a></li>
|
||||||
<li><a href="#Related">Related AWT features</a></li>
|
<li><a href="#Related">Related AWT features</a></li>
|
||||||
|
@ -54,13 +54,13 @@
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a name="Definitions"></a>
|
<a name="Definitions"></a>
|
||||||
</p><h3>Definitions</h3>
|
<h3>Definitions</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<u>Document</u> - a window without an owner that, together with
|
<u>Document</u> - a window without an owner that, together with
|
||||||
all its child hierarchy, may be operated on as a single self-contained
|
all its child hierarchy, may be operated on as a single self-contained
|
||||||
document.
|
document.
|
||||||
Every window belongs to some document — its root can be found as
|
Every window belongs to some document — its root can be found as
|
||||||
the closest ancestor window without an owner.
|
the closest ancestor window without an owner.
|
||||||
</p><p>
|
</p><p>
|
||||||
<a name="ModalBlocked"></a>
|
<a name="ModalBlocked"></a>
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<hr>
|
<hr>
|
||||||
<b>Warning!</b> Some window managers allow users to change the window
|
<b>Warning!</b> Some window managers allow users to change the window
|
||||||
Z-order in an arbitrary way — in that case the last requirement
|
Z-order in an arbitrary way — in that case the last requirement
|
||||||
may not be met.
|
may not be met.
|
||||||
<hr>
|
<hr>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
@ -92,12 +92,12 @@
|
||||||
</p><p>
|
</p><p>
|
||||||
<blockquote><hr>
|
<blockquote><hr>
|
||||||
<b>Note</b>: Everywhere in this document the notion of "window" is equal
|
<b>Note</b>: Everywhere in this document the notion of "window" is equal
|
||||||
to a top-level window in the Java programming language — in other words
|
to a top-level window in the Java programming language — in other words
|
||||||
an instance of <code>java.awt.Window</code> or any descendant class.
|
an instance of <code>java.awt.Window</code> or any descendant class.
|
||||||
<hr></blockquote>
|
<hr></blockquote>
|
||||||
|
|
||||||
<a name="ModalityTypes"></a>
|
<a name="ModalityTypes"></a>
|
||||||
</p><h3>Modality types</h3>
|
<h3>Modality types</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
There are four supported modality types :
|
There are four supported modality types :
|
||||||
|
@ -163,11 +163,11 @@
|
||||||
<hr></blockquote>
|
<hr></blockquote>
|
||||||
|
|
||||||
<a name="ShowHideBlocking"></a>
|
<a name="ShowHideBlocking"></a>
|
||||||
</p><h3>Show/hide blocking</h3>
|
<h3>Show/hide blocking</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<u>Showing the window or modeless dialog: "F"</u><br>
|
<u>Showing the window or modeless dialog: "F"</u><br>
|
||||||
All the visible modal dialogs are looked through — if F is from the SB
|
All the visible modal dialogs are looked through — if F is from the SB
|
||||||
of one of them, it becomes blocked by it. If there are several such
|
of one of them, it becomes blocked by it. If there are several such
|
||||||
dialogs, the first shown is used. If no such dialogs exist, F remains
|
dialogs, the first shown is used. If no such dialogs exist, F remains
|
||||||
unblocked.
|
unblocked.
|
||||||
|
@ -185,7 +185,7 @@
|
||||||
dialogs outside M's SB and modal dialogs outside M's SB that do not
|
dialogs outside M's SB and modal dialogs outside M's SB that do not
|
||||||
block M).
|
block M).
|
||||||
</ul>
|
</ul>
|
||||||
</p><p>
|
<p>
|
||||||
After the modal dialog M is shown, it becomes blocked by the first shown
|
After the modal dialog M is shown, it becomes blocked by the first shown
|
||||||
dialog from the first group (if there are any), all the windows from the
|
dialog from the first group (if there are any), all the windows from the
|
||||||
second one become blocked by M, and all the windows from the third group
|
second one become blocked by M, and all the windows from the third group
|
||||||
|
@ -197,12 +197,12 @@
|
||||||
</p><p>
|
</p><p>
|
||||||
<u>Showing the document-modal dialog: "M"</u><br>
|
<u>Showing the document-modal dialog: "M"</u><br>
|
||||||
All the visible application- and toolkit-modal dialogs are looked
|
All the visible application- and toolkit-modal dialogs are looked
|
||||||
through — if M is from the SB of one of them,
|
through — if M is from the SB of one of them,
|
||||||
it becomes blocked by it. If there are several such dialogs,
|
it becomes blocked by it. If there are several such dialogs,
|
||||||
the first shown is used. If no such dialogs exist, M remains unblocked.
|
the first shown is used. If no such dialogs exist, M remains unblocked.
|
||||||
</p><p>
|
</p><p>
|
||||||
<u>Showing the application-modal dialog: "M"</u><br>
|
<u>Showing the application-modal dialog: "M"</u><br>
|
||||||
All the visible toolkit-modal dialogs are looked through —
|
All the visible toolkit-modal dialogs are looked through —
|
||||||
if M is from the SB of one of them, it becomes blocked by it.
|
if M is from the SB of one of them, it becomes blocked by it.
|
||||||
If there are several such dialogs, the first shown is used.
|
If there are several such dialogs, the first shown is used.
|
||||||
If no such dialogs exist, M remains unblocked.
|
If no such dialogs exist, M remains unblocked.
|
||||||
|
@ -212,7 +212,7 @@
|
||||||
</p><p>
|
</p><p>
|
||||||
<!-- <center> -->
|
<!-- <center> -->
|
||||||
</p>
|
</p>
|
||||||
<table border="1" cols="5" rows="5">
|
<table border="1">
|
||||||
<caption>The Standard Blocking Matrix</caption>
|
<caption>The Standard Blocking Matrix</caption>
|
||||||
<tbody><tr align="center">
|
<tbody><tr align="center">
|
||||||
<td align="center">current/shown</td>
|
<td align="center">current/shown</td>
|
||||||
|
@ -293,11 +293,10 @@
|
||||||
<hr>
|
<hr>
|
||||||
<b>Implementation note</b>: Changing the modal exclusion type for a visible window
|
<b>Implementation note</b>: Changing the modal exclusion type for a visible window
|
||||||
may have no effect until it is hidden and then shown again.
|
may have no effect until it is hidden and then shown again.
|
||||||
</hr>
|
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<a name="Related"</a>
|
<a name="Related"></a>
|
||||||
</p><h3>Related AWT features</h3>
|
<h3>Related AWT features</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<u>Always-On-Top</u><br>
|
<u>Always-On-Top</u><br>
|
||||||
|
@ -315,16 +314,16 @@
|
||||||
<p>
|
<p>
|
||||||
<u>Minimizing, maximizing and closing blocked windows</u><br>
|
<u>Minimizing, maximizing and closing blocked windows</u><br>
|
||||||
When a modal dialog blocks a window, the user may not be able to maximize or
|
When a modal dialog blocks a window, the user may not be able to maximize or
|
||||||
minimize the blocked window— however, the actual behavior is unspecified
|
minimize the blocked window— however, the actual behavior is unspecified
|
||||||
and platform-dependent. In any case, the user can't close the blocked window
|
and platform-dependent. In any case, the user can't close the blocked window
|
||||||
interactively— but it can be closed programmatically by calling the
|
interactively— but it can be closed programmatically by calling the
|
||||||
<code>setVisible(false)</code> or <code>dispose()</code> methods on the blocked
|
<code>setVisible(false)</code> or <code>dispose()</code> methods on the blocked
|
||||||
window.
|
window.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<u>Blocked windows activations</u><br>
|
<u>Blocked windows activations</u><br>
|
||||||
When the user selects a blocked window, it may be brought to the front, along
|
When the user selects a blocked window, it may be brought to the front, along
|
||||||
with the blocking modal dialog which would then become the active window—
|
with the blocking modal dialog which would then become the active window—
|
||||||
however, the actual behavior is unspecified and platform-dependent.
|
however, the actual behavior is unspecified and platform-dependent.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
@ -339,9 +338,9 @@
|
||||||
</li></ol>
|
</li></ol>
|
||||||
If the modal dialog to be hidden does not have focus, the active window remains
|
If the modal dialog to be hidden does not have focus, the active window remains
|
||||||
unchanged.
|
unchanged.
|
||||||
</p>
|
|
||||||
<a name="Security"></a>
|
<a name="Security"></a>
|
||||||
</p><h3>Security</h3>
|
<h3>Security</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
A special <code>AWTPermission</code>, <code>"toolkitModality"</code>,
|
A special <code>AWTPermission</code>, <code>"toolkitModality"</code>,
|
||||||
|
@ -386,35 +385,35 @@
|
||||||
<a name="Examples"></a>
|
<a name="Examples"></a>
|
||||||
</p><h3>Examples</h3>
|
</p><h3>Examples</h3>
|
||||||
|
|
||||||
<table cols="2" border="0">
|
<table border="0">
|
||||||
<tbody><tr>
|
<tbody><tr>
|
||||||
<td align="left" valign="center">
|
<td align="left" >
|
||||||
<ol>
|
<ol>
|
||||||
<li>Frame "F" is shown<br>
|
<li>Frame "F" is shown<br>
|
||||||
<li>Document-modal dialog "D<sub>i</sub>" is shown<br>
|
<li>Document-modal dialog "D<sub>i</sub>" is shown<br>
|
||||||
<li>F becomes blocked by D<sub>i</sub> — it's in the same document<br>
|
<li>F becomes blocked by D<sub>i</sub> — it's in the same document<br>
|
||||||
<li>Document-modal dialog "D<sub>ii</sub>" is shown<br>
|
<li>Document-modal dialog "D<sub>ii</sub>" is shown<br>
|
||||||
<li>D<sub>i</sub> becomes blocked by D<sub>ii</sub> — it's in the
|
<li>D<sub>i</sub> becomes blocked by D<sub>ii</sub> — it's in the
|
||||||
same document<br>
|
same document<br>
|
||||||
</ol>
|
</ol>
|
||||||
<br>
|
<br>
|
||||||
</td>
|
</td>
|
||||||
<td align="center" valign="center">
|
<td align="center">
|
||||||
<img src="modal-example1.gif">
|
<img src="modal-example1.gif">
|
||||||
<br>
|
<br>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left" valign="center">
|
<td align="left">
|
||||||
<ol>
|
<ol>
|
||||||
<li>Frame "F" is shown<br>
|
<li>Frame "F" is shown<br>
|
||||||
<li>Document-modal dialog "D<sub>i</sub>" is shown<br>
|
<li>Document-modal dialog "D<sub>i</sub>" is shown<br>
|
||||||
<li>F becomes blocked by D<sub>i</sub> — it's in the same document<br>
|
<li>F becomes blocked by D<sub>i</sub> — it's in the same document<br>
|
||||||
<li>Document-modal dialog "D<sub>ii</sub>" is shown<br>
|
<li>Document-modal dialog "D<sub>ii</sub>" is shown<br>
|
||||||
<li>D<sub>i</sub> becomes blocked by D<sub>ii</sub> —
|
<li>D<sub>i</sub> becomes blocked by D<sub>ii</sub> —
|
||||||
it's in the same document<br>
|
it's in the same document<br>
|
||||||
<li>D<sub>i</sub> is hidden<br>
|
<li>D<sub>i</sub> is hidden<br>
|
||||||
<li>F becomes blocked by D<sub>ii</sub> — it's in the same document<br>
|
<li>F becomes blocked by D<sub>ii</sub> — it's in the same document<br>
|
||||||
</ol>
|
</ol>
|
||||||
<br>
|
<br>
|
||||||
</td>
|
</td>
|
||||||
|
@ -424,45 +423,45 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left" valign="center">
|
<td align="left">
|
||||||
<ol>
|
<ol>
|
||||||
<li>Frame "F" is shown<br>
|
<li>Frame "F" is shown<br>
|
||||||
<li>Toolkit-modal dialog "D<sub>i</sub>" is created, but not shown<br>
|
<li>Toolkit-modal dialog "D<sub>i</sub>" is created, but not shown<br>
|
||||||
<li>Document-modal dialog "D<sub>ii</sub>" is shown<br>
|
<li>Document-modal dialog "D<sub>ii</sub>" is shown<br>
|
||||||
<li>F becomes blocked by D<sub>ii</sub> — it's in the same document<br>
|
<li>F becomes blocked by D<sub>ii</sub> — it's in the same document<br>
|
||||||
<li>Application-modal dialog "D<sub>iii</sub>" is shown<br>
|
<li>Application-modal dialog "D<sub>iii</sub>" is shown<br>
|
||||||
<li>D<sub>ii</sub> becomes blocked by D<sub>iii</sub> —
|
<li>D<sub>ii</sub> becomes blocked by D<sub>iii</sub> —
|
||||||
it's in the same application<br>
|
it's in the same application<br>
|
||||||
<li>D<sub>i</sub> is shown<br>
|
<li>D<sub>i</sub> is shown<br>
|
||||||
<li>D<sub>i</sub> becomes blocked by D<sub>ii</sub> — it's its owner<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>
|
D<sub>ii</sub> blocks D<sub>i</sub><br>
|
||||||
</ol>
|
</ol>
|
||||||
<br>
|
<br>
|
||||||
</td>
|
</td>
|
||||||
<td align="center" valign="center">
|
<td align="center">
|
||||||
<img src="modal-example3.gif">
|
<img src="modal-example3.gif">
|
||||||
<br>
|
<br>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left" valign="center">
|
<td align="left">
|
||||||
<ol>
|
<ol>
|
||||||
<li>Frame "F" is shown<br>
|
<li>Frame "F" is shown<br>
|
||||||
<li>Toolkit-modal dialog "D<sub>i</sub>" is created, but not shown<br>
|
<li>Toolkit-modal dialog "D<sub>i</sub>" is created, but not shown<br>
|
||||||
<li>Document-modal dialog "D<sub>ii</sub>" is shown<br>
|
<li>Document-modal dialog "D<sub>ii</sub>" is shown<br>
|
||||||
<li>F becomes blocked by D<sub>ii</sub> — it's in the same document<br>
|
<li>F becomes blocked by D<sub>ii</sub> — it's in the same document<br>
|
||||||
<li>Application-modal dialog "D<sub>iii</sub>" is shown<br>
|
<li>Application-modal dialog "D<sub>iii</sub>" is shown<br>
|
||||||
<li>D<sub>ii</sub> becomes blocked by D<sub>iii</sub> — it's in the
|
<li>D<sub>ii</sub> becomes blocked by D<sub>iii</sub> — it's in the
|
||||||
same application<br>
|
same application<br>
|
||||||
<li>D<sub>i</sub> is shown<br>
|
<li>D<sub>i</sub> is shown<br>
|
||||||
<li>D<sub>iii</sub> becomes blocked by D<sub>i</sub> — D<sub>i</sub>
|
<li>D<sub>iii</sub> becomes blocked by D<sub>i</sub> — D<sub>i</sub>
|
||||||
is not blocked<br>
|
is not blocked<br>
|
||||||
<li>D<sub>i</sub> remains unblocked<br>
|
<li>D<sub>i</sub> remains unblocked<br>
|
||||||
</ol>
|
</ol>
|
||||||
<br>
|
<br>
|
||||||
</td>
|
</td>
|
||||||
<td align="center" valign="center">
|
<td align="center">
|
||||||
<img src="modal-example4.gif">
|
<img src="modal-example4.gif">
|
||||||
<br>
|
<br>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||||
<html>
|
<html>
|
||||||
|
<head><title></title></head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
Provides interfaces and classes for dealing with different
|
Provides interfaces and classes for dealing with different
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||||
<html>
|
<html>
|
||||||
|
<head><title></title></head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
Provides classes and interface relating to fonts. It
|
Provides classes and interface relating to fonts. It
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||||
<html>
|
<html>
|
||||||
|
<head><title></title></head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
Provides the Java 2D classes for defining and performing operations
|
Provides the Java 2D classes for defining and performing operations
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||||
<html>
|
<html>
|
||||||
|
<head><title></title></head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
Provides classes for creating and modifying images.
|
Provides classes for creating and modifying images.
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||||
<html>
|
<html>
|
||||||
|
<head><title></title></head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
Provides classes and interfaces for producing
|
Provides classes and interfaces for producing
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||||
<html>
|
<html>
|
||||||
|
<head><title></title></head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
Contains all of the classes for creating user
|
Contains all of the classes for creating user
|
||||||
|
@ -53,7 +54,7 @@ If the bounds of a Component object exceed a platform limit,
|
||||||
there is no way to properly arrange them within a Container object.
|
there is no way to properly arrange them within a Container object.
|
||||||
The object's bounds are defined by any object's coordinate
|
The object's bounds are defined by any object's coordinate
|
||||||
in combination with its size on a respective axis.
|
in combination with its size on a respective axis.
|
||||||
<p>
|
|
||||||
|
|
||||||
<h2>Additional Specification</h2>
|
<h2>Additional Specification</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||||
<html>
|
<html>
|
||||||
|
<head><title></title></head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
Provides classes and interfaces for a general printing API. The
|
Provides classes and interfaces for a general printing API. The
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>javax.print.attribute package</title>
|
<title>javax.print.attribute package</title>
|
||||||
|
@ -30,7 +31,6 @@ questions.
|
||||||
Provides classes and interfaces
|
Provides classes and interfaces
|
||||||
that describe the types of Java<sup><font size="-2">TM</font></sup> Print
|
that describe the types of Java<sup><font size="-2">TM</font></sup> Print
|
||||||
Service attributes and how they can be collected into attribute sets.
|
Service attributes and how they can be collected into attribute sets.
|
||||||
<P>
|
|
||||||
<H3>What is an Attribute?</H3>
|
<H3>What is an Attribute?</H3>
|
||||||
When setting up a print job,
|
When setting up a print job,
|
||||||
a client specifies two things:
|
a client specifies two things:
|
||||||
|
@ -71,7 +71,6 @@ of the results of a print job. The print job determines the manner in
|
||||||
which it achieves the results specified by the processing instructions.
|
which it achieves the results specified by the processing instructions.
|
||||||
Representing processing instructions as descriptive items
|
Representing processing instructions as descriptive items
|
||||||
provides more flexibility for implementing print jobs.
|
provides more flexibility for implementing print jobs.
|
||||||
<P>
|
|
||||||
<h4>Attribute Categories and Values</h4>
|
<h4>Attribute Categories and Values</h4>
|
||||||
Each printer has a set of capabilities, such as the ability to print on
|
Each printer has a set of capabilities, such as the ability to print on
|
||||||
different paper sizes or the ability to print more than one copy. Each of
|
different paper sizes or the ability to print more than one copy. Each of
|
||||||
|
@ -222,7 +221,6 @@ one concrete implementation of each of the attribute set subinterfaces:
|
||||||
All of these classes extend <A HREF="HashAttributeSet.html">HashAttributeSet</A>
|
All of these classes extend <A HREF="HashAttributeSet.html">HashAttributeSet</A>
|
||||||
and enforce the restriction that the attribute set is only allowed to contain
|
and enforce the restriction that the attribute set is only allowed to contain
|
||||||
the corresponding kind of attribute.
|
the corresponding kind of attribute.
|
||||||
<P>
|
|
||||||
<H3>Attribute Class Design</H3>
|
<H3>Attribute Class Design</H3>
|
||||||
An attribute value is a small, atomic data item,
|
An attribute value is a small, atomic data item,
|
||||||
such as an integer or an enumerated value. The Java Print Service API
|
such as an integer or an enumerated value. The Java Print Service API
|
||||||
|
@ -299,8 +297,8 @@ certain contexts also implements one or more subinterfaces of
|
||||||
<code>Attribute</code>. Most attribute classes also extend the appropriate
|
<code>Attribute</code>. Most attribute classes also extend the appropriate
|
||||||
abstract syntax class to get the implementation. Consider the
|
abstract syntax class to get the implementation. Consider the
|
||||||
<code>Sides</code> attribute class:
|
<code>Sides</code> attribute class:
|
||||||
<pre>
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
|
<pre>
|
||||||
public class Sides
|
public class Sides
|
||||||
extends EnumSyntax
|
extends EnumSyntax
|
||||||
implements DocAttribute, PrintRequestAttribute, PrintJobAttribute
|
implements DocAttribute, PrintRequestAttribute, PrintJobAttribute
|
||||||
|
@ -311,8 +309,8 @@ public class Sides
|
||||||
}
|
}
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
</blockquote>
|
|
||||||
</pre>
|
</pre>
|
||||||
|
</blockquote>
|
||||||
<p>
|
<p>
|
||||||
Since every attribute class implements <code>Attribute</code>, every attribute
|
Since every attribute class implements <code>Attribute</code>, every attribute
|
||||||
class must provide an implementation for the
|
class must provide an implementation for the
|
||||||
|
@ -363,9 +361,8 @@ because print-request attributes are the types of attributes that
|
||||||
client usually specifies. This example demonstrates creating an attribute
|
client usually specifies. This example demonstrates creating an attribute
|
||||||
set of print-request attributes and locating a printer that can
|
set of print-request attributes and locating a printer that can
|
||||||
print the document according to the specified attributes:
|
print the document according to the specified attributes:
|
||||||
<p>
|
|
||||||
<pre>
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
|
<pre>
|
||||||
|
|
||||||
FileInputStream psStream;
|
FileInputStream psStream;
|
||||||
try {
|
try {
|
||||||
|
@ -392,8 +389,8 @@ if (services.length > 0) {
|
||||||
job.print(myDoc, aset);
|
job.print(myDoc, aset);
|
||||||
} catch (PrintException pe) {}
|
} catch (PrintException pe) {}
|
||||||
}
|
}
|
||||||
</blockquote>
|
|
||||||
</pre>
|
</pre>
|
||||||
|
</blockquote>
|
||||||
<P>
|
<P>
|
||||||
Please note: In the javax.print APIs, a null reference parameter to methods
|
Please note: In the javax.print APIs, a null reference parameter to methods
|
||||||
is incorrect unless explicitly documented on the method as having a meaningful
|
is incorrect unless explicitly documented on the method as having a meaningful
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>javax.print.attribute.standard package</title>
|
<title>javax.print.attribute.standard package</title>
|
||||||
|
@ -199,7 +200,6 @@ never appear in attribute sets,
|
||||||
so there is no restricted <A HREF="../AttributeSet.html">
|
so there is no restricted <A HREF="../AttributeSet.html">
|
||||||
AttributeSet</A>
|
AttributeSet</A>
|
||||||
subinterface for them.
|
subinterface for them.
|
||||||
<P>
|
|
||||||
|
|
||||||
<H4>Attribute Table</H4>
|
<H4>Attribute Table</H4>
|
||||||
The table below lists all the printing attributes.
|
The table below lists all the printing attributes.
|
||||||
|
@ -213,7 +213,6 @@ the column marked "SupportedValuesAttribute"
|
||||||
lists the supported-values attribute class, if any,
|
lists the supported-values attribute class, if any,
|
||||||
with which a print service
|
with which a print service
|
||||||
indicates the supported values for that attribute category.
|
indicates the supported values for that attribute category.
|
||||||
<P>
|
|
||||||
<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=1 SUMMARY="Lists all printing attributes as described in above text">
|
<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=1 SUMMARY="Lists all printing attributes as described in above text">
|
||||||
<TR BGCOLOR="#E5E5E5">
|
<TR BGCOLOR="#E5E5E5">
|
||||||
<TH VALIGN="bottom">Attribute Class</TH>
|
<TH VALIGN="bottom">Attribute Class</TH>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>javax.print.event package</title>
|
<title>javax.print.event package</title>
|
||||||
|
@ -30,7 +31,7 @@ questions.
|
||||||
Package javax.print.event contains event classes and listener interfaces.
|
Package javax.print.event contains event classes and listener interfaces.
|
||||||
<p>
|
<p>
|
||||||
They may be used to monitor both print services (such as printers going
|
They may be used to monitor both print services (such as printers going
|
||||||
on-line & off-line), and the progress of a specific print job.
|
on-line & off-line), and the progress of a specific print job.
|
||||||
<P>
|
<P>
|
||||||
Please note: In the javax.print APIs, a null reference parameter to methods
|
Please note: In the javax.print APIs, a null reference parameter to methods
|
||||||
is incorrect unless explicitly documented on the method as having a meaningful
|
is incorrect unless explicitly documented on the method as having a meaningful
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>javax.print package</title>
|
<title>javax.print package</title>
|
||||||
|
@ -52,7 +53,7 @@ such as IPP printers or JINI printers, a print-service provider can write
|
||||||
implementations of <code>PrintServiceLookup</code>. The print-service provider
|
implementations of <code>PrintServiceLookup</code>. The print-service provider
|
||||||
can dynamically install these <code>PrintServiceLookup</code> implementations
|
can dynamically install these <code>PrintServiceLookup</code> implementations
|
||||||
using the
|
using the
|
||||||
<a href="../../../technotes/guides/jar/jar.html#Service Provider">
|
<a href="../../../technotes/guides/jar/jar.html#Service%20Provider">
|
||||||
SPI JAR file specification</a>.
|
SPI JAR file specification</a>.
|
||||||
|
|
||||||
<h3>Attribute Definitions</h3>
|
<h3>Attribute Definitions</h3>
|
||||||
|
@ -105,9 +106,8 @@ Service API: locating printers that can print five double-sided copies
|
||||||
of a Postscript document on size A4 paper, creating a print job from
|
of a Postscript document on size A4 paper, creating a print job from
|
||||||
one of the returned print services, and calling print.
|
one of the returned print services, and calling print.
|
||||||
|
|
||||||
<p>
|
|
||||||
<pre>
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
|
<pre>
|
||||||
FileInputStream psStream;
|
FileInputStream psStream;
|
||||||
try {
|
try {
|
||||||
psStream = new FileInputStream("file.ps");
|
psStream = new FileInputStream("file.ps");
|
||||||
|
@ -132,8 +132,8 @@ if (services.length > 0) {
|
||||||
job.print(myDoc, aset);
|
job.print(myDoc, aset);
|
||||||
} catch (PrintException pe) {}
|
} catch (PrintException pe) {}
|
||||||
}
|
}
|
||||||
</blockquote>
|
|
||||||
</pre>
|
</pre>
|
||||||
|
</blockquote>
|
||||||
<P>
|
<P>
|
||||||
Please note: In the javax.print APIs, a null reference parameter to methods
|
Please note: In the javax.print APIs, a null reference parameter to methods
|
||||||
is incorrect unless explicitly documented on the method as having a meaningful
|
is incorrect unless explicitly documented on the method as having a meaningful
|
||||||
|
|
|
@ -25,7 +25,7 @@ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
or visit www.oracle.com if you need additional information or have any
|
or visit www.oracle.com if you need additional information or have any
|
||||||
questions.
|
questions.
|
||||||
-->
|
-->
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
or visit www.oracle.com if you need additional information or have any
|
or visit www.oracle.com if you need additional information or have any
|
||||||
questions.
|
questions.
|
||||||
-->
|
-->
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
or visit www.oracle.com if you need additional information or have any
|
or visit www.oracle.com if you need additional information or have any
|
||||||
questions.
|
questions.
|
||||||
-->
|
-->
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
or visit www.oracle.com if you need additional information or have any
|
or visit www.oracle.com if you need additional information or have any
|
||||||
questions.
|
questions.
|
||||||
-->
|
-->
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
|
@ -25,7 +25,7 @@ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
or visit www.oracle.com if you need additional information or have any
|
or visit www.oracle.com if you need additional information or have any
|
||||||
questions.
|
questions.
|
||||||
-->
|
-->
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
or visit www.oracle.com if you need additional information or have any
|
or visit www.oracle.com if you need additional information or have any
|
||||||
questions.
|
questions.
|
||||||
-->
|
-->
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
|
|
|
@ -14,14 +14,14 @@ Using the Multiplexing Look and Feel
|
||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<hr>
|
<hr>
|
||||||
<i>
|
|
||||||
<p>
|
<p>
|
||||||
|
<i>
|
||||||
This document is based on an article
|
This document is based on an article
|
||||||
originally published in
|
originally published in
|
||||||
<a href="http://java.sun.com/products/jfc/tsc/" target="_top"><em>The Swing
|
<a href="http://java.sun.com/products/jfc/tsc/" target="_top"><em>The Swing
|
||||||
Connection</em></a>.
|
Connection</em></a>.
|
||||||
</p>
|
|
||||||
</i>
|
</i>
|
||||||
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
|
@ -43,7 +43,6 @@ the Java or Windows look and feel, for example --
|
||||||
and requires no modifications to work with auxiliary look and feels.
|
and requires no modifications to work with auxiliary look and feels.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
This document has the following sections:
|
This document has the following sections:
|
||||||
|
@ -76,14 +75,12 @@ a <em>Swing Connection</em> article.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a name="overview">
|
<a name="overview"></a>
|
||||||
<hr width=100% align=LEFT size=2>
|
<hr width=100% align=LEFT size=2>
|
||||||
</a>
|
|
||||||
<b>
|
<b>
|
||||||
<font color="#000080" size="+2">Overview</font>
|
<font color="#000080" size="+2">Overview</font>
|
||||||
</b>
|
</b>
|
||||||
|
|
||||||
<p></p>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
|
@ -146,14 +143,12 @@ is called (unsurprisingly)
|
||||||
the Multiplexing look and feel.
|
the Multiplexing look and feel.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a name="howtouse">
|
<a name="howtouse"></a>
|
||||||
<hr width=100% align=LEFT size=2>
|
<hr width=100% align=LEFT size=2>
|
||||||
</a>
|
|
||||||
<b>
|
<b>
|
||||||
<font color="#000080" size="+2">How to Use Auxiliary Look and Feels</font>
|
<font color="#000080" size="+2">How to Use Auxiliary Look and Feels</font>
|
||||||
</b>
|
</b>
|
||||||
|
|
||||||
<p></p>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
It's easy to use auxiliary look and feels with Swing. To instruct
|
It's easy to use auxiliary look and feels with Swing. To instruct
|
||||||
|
@ -204,14 +199,12 @@ of the UIs obtained from the default and auxiliary look and feels.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a name="howtowrite">
|
<a name="howtowrite"></a>
|
||||||
<hr width=100% align=LEFT size=2>
|
<hr width=100% align=LEFT size=2>
|
||||||
</a>
|
|
||||||
<b>
|
<b>
|
||||||
<font color="#000080" size="+2">Tips for Writing an Auxiliary Look and Feel</font>
|
<font color="#000080" size="+2">Tips for Writing an Auxiliary Look and Feel</font>
|
||||||
</b>
|
</b>
|
||||||
|
|
||||||
<p></p>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
An auxiliary look and feel is like any other look and feel,
|
An auxiliary look and feel is like any other look and feel,
|
||||||
|
@ -252,7 +245,6 @@ the <code>javax.swing.plaf</code> package.
|
||||||
<font color="#000080" size="+1"><b>Dos and Don'ts</b></font>
|
<font color="#000080" size="+1"><b>Dos and Don'ts</b></font>
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<p></p>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The following paragraphs provide some general recommendations for developing
|
The following paragraphs provide some general recommendations for developing
|
||||||
|
@ -264,22 +256,19 @@ auxiliary look and feels.
|
||||||
to perform all initialization,
|
to perform all initialization,
|
||||||
and the <code>uninstallUI</code> method
|
and the <code>uninstallUI</code> method
|
||||||
to perform all cleanup.</b></font>
|
to perform all cleanup.</b></font>
|
||||||
</font>
|
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<blockquote>
|
||||||
<p>
|
|
||||||
The <code>installUI</code> and <code>uninstallUI</code>
|
The <code>installUI</code> and <code>uninstallUI</code>
|
||||||
methods are invoked when a component's look and feel is set.
|
methods are invoked when a component's look and feel is set.
|
||||||
The <code>installUI</code> method gives the new UI object
|
The <code>installUI</code> method gives the new UI object
|
||||||
a chance to add listeners on the component and its data model.
|
a chance to add listeners on the component and its data model.
|
||||||
Similarly, the <code>uninstallUI</code> method
|
Similarly, the <code>uninstallUI</code> method
|
||||||
lets the previous UI object remove its listeners.
|
lets the previous UI object remove its listeners.
|
||||||
</p>
|
</blockquote>
|
||||||
</ul>
|
|
||||||
<p> <font color="#000080"><b>Don't extend
|
<p> <font color="#000080"><b>Don't extend
|
||||||
visual look and feels.</b></font></p>
|
visual look and feels.</b></font></p>
|
||||||
<ul>
|
<blockquote>
|
||||||
<p> We recommended that you <i>don't</i> implement
|
We recommended that you <i>don't</i> implement
|
||||||
UI classes of an auxiliary look and feel as subclasses of the
|
UI classes of an auxiliary look and feel as subclasses of the
|
||||||
UI classes of a visual look and feel. Why not? Because they might
|
UI classes of a visual look and feel. Why not? Because they might
|
||||||
accidentally inherit code that installs listeners on a component
|
accidentally inherit code that installs listeners on a component
|
||||||
|
@ -290,13 +279,13 @@ lets the previous UI object remove its listeners.
|
||||||
Instead, we recommend that the UI classes of an auxiliary look
|
Instead, we recommend that the UI classes of an auxiliary look
|
||||||
and feel directly extend the abstract UI classes in the <code>javax.swing.plaf</code>
|
and feel directly extend the abstract UI classes in the <code>javax.swing.plaf</code>
|
||||||
package. By using this strategy, the developer of an auxiliary
|
package. By using this strategy, the developer of an auxiliary
|
||||||
look and feel can avoid competing with the default look and feel.</p>
|
look and feel can avoid competing with the default look and feel.
|
||||||
</ul>
|
</blockquote>
|
||||||
<p> <font color="#000080"><b>Override all UI-specific methods
|
<p> <font color="#000080"><b>Override all UI-specific methods
|
||||||
your UI classes inherit.</b></font>
|
your UI classes inherit.</b></font>
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<blockquote>
|
||||||
<p> We recommend that each UI class of
|
We recommend that each UI class of
|
||||||
an auxiliary look and feel override the methods
|
an auxiliary look and feel override the methods
|
||||||
defined in the <code>javax.swing.plaf</code>
|
defined in the <code>javax.swing.plaf</code>
|
||||||
UI classes it descends from
|
UI classes it descends from
|
||||||
|
@ -309,15 +298,14 @@ lets the previous UI object remove its listeners.
|
||||||
if the
|
if the
|
||||||
component is opaque. If a UI class from a non-visual auxiliary
|
component is opaque. If a UI class from a non-visual auxiliary
|
||||||
look and feel does not override this method, all
|
look and feel does not override this method, all
|
||||||
opaque components appear as blank areas on the screen!</p>
|
opaque components appear as blank areas on the screen!
|
||||||
</ul>
|
</blockquote>
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a name="uidefaults">
|
<a name="uidefaults">
|
||||||
<font color="#000080" size="+1"><b>Extending UIDefaults</b></font>
|
<font color="#000080" size="+1"><b>Extending UIDefaults</b></font>
|
||||||
</a>
|
</a>
|
||||||
<p></p>
|
|
||||||
|
|
||||||
<p>In many cases, you
|
<p>In many cases, you
|
||||||
might want an auxiliary look and feel to be "incomplete." That
|
might want an auxiliary look and feel to be "incomplete." That
|
||||||
|
@ -379,7 +367,6 @@ In the preceding example, an auxiliary look and feel named <code>MyAux</code>
|
||||||
<a name="defaultui">
|
<a name="defaultui">
|
||||||
<b><font color="#000080" size="+1">Examining Other UI Objects</font></b>
|
<b><font color="#000080" size="+1">Examining Other UI Objects</font></b>
|
||||||
</a>
|
</a>
|
||||||
<p></p>
|
|
||||||
|
|
||||||
<p>In
|
<p>In
|
||||||
rare instances, a UI object from an auxiliary look and feel
|
rare instances, a UI object from an auxiliary look and feel
|
||||||
|
@ -395,12 +382,10 @@ In the preceding example, an auxiliary look and feel named <code>MyAux</code>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a name="implementation">
|
<a name="implementation"></a>
|
||||||
<hr width=100% align=LEFT size=2>
|
<hr width=100% align=LEFT size=2>
|
||||||
</a>
|
|
||||||
<font color="#000080" size="+2"><b>How the Multiplexing Look and Feel
|
<font color="#000080" size="+2"><b>How the Multiplexing Look and Feel
|
||||||
Is Implemented</b></font>
|
Is Implemented</b></font>
|
||||||
<p></p>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The Multiplexing look and feel
|
The Multiplexing look and feel
|
||||||
|
@ -437,8 +422,8 @@ all developers and users.
|
||||||
and feel is always the first to be created. After that, a UI object
|
and feel is always the first to be created. After that, a UI object
|
||||||
is created from each auxiliary look and feel in the order
|
is created from each auxiliary look and feel in the order
|
||||||
they are specified in the <code>swing.auxiliarylaf</code>
|
they are specified in the <code>swing.auxiliarylaf</code>
|
||||||
property.</li>
|
property.<br><br></li>
|
||||||
<p>
|
|
||||||
<li> When a method that requests information
|
<li> When a method that requests information
|
||||||
from a UI object is invoked, the multiplexing UI object
|
from a UI object is invoked, the multiplexing UI object
|
||||||
invokes the method on all the UI objects, but returns
|
invokes the method on all the UI objects, but returns
|
||||||
|
@ -450,8 +435,8 @@ all developers and users.
|
||||||
The <code>getPreferredSize</code> method
|
The <code>getPreferredSize</code> method
|
||||||
is also invoked on the UI object for each auxiliary look and feel,
|
is also invoked on the UI object for each auxiliary look and feel,
|
||||||
but the return values are ignored.
|
but the return values are ignored.
|
||||||
</li>
|
<br><br></li>
|
||||||
<p>
|
|
||||||
<li> When a method that does not request information
|
<li> When a method that does not request information
|
||||||
from the UI object is invoked, the multiplexing UI object
|
from the UI object is invoked, the multiplexing UI object
|
||||||
invokes that method on all UIs --
|
invokes that method on all UIs --
|
||||||
|
@ -474,14 +459,12 @@ all developers and users.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
<a name="custom">
|
<a name="custom"></a>
|
||||||
<hr width=100% align=LEFT size=2>
|
<hr width=100% align=LEFT size=2>
|
||||||
</a>
|
|
||||||
<font color="#000080" size="+2"><b>How to Provide a Custom Multiplexing Look
|
<font color="#000080" size="+2"><b>How to Provide a Custom Multiplexing Look
|
||||||
and Feel</b></font>
|
and Feel</b></font>
|
||||||
<p></p>
|
|
||||||
|
|
||||||
<p><font color="#000080" size="+2"><b></b></font>While
|
<p>While
|
||||||
we hope the behavior of the Multiplexing look and feel is
|
we hope the behavior of the Multiplexing look and feel is
|
||||||
flexible enough not to require an alternative multiplexing look
|
flexible enough not to require an alternative multiplexing look
|
||||||
and feel, Swing allows the user to specify another multiplexing look
|
and feel, Swing allows the user to specify another multiplexing look
|
||||||
|
|
|
@ -25,7 +25,7 @@ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
or visit www.oracle.com if you need additional information or have any
|
or visit www.oracle.com if you need additional information or have any
|
||||||
questions.
|
questions.
|
||||||
-->
|
-->
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1 id="primaryColors">Primary Colors</h1>
|
<h1 id="primaryColors">Primary Colors</h1>
|
||||||
|
|
|
@ -25,7 +25,7 @@ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
or visit www.oracle.com if you need additional information or have any
|
or visit www.oracle.com if you need additional information or have any
|
||||||
questions.
|
questions.
|
||||||
-->
|
-->
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
|
@ -39,11 +39,11 @@ component states.
|
||||||
|
|
||||||
<p>Nimbus allows customizing many of its properties, including painters, by
|
<p>Nimbus allows customizing many of its properties, including painters, by
|
||||||
altering the {@link javax.swing.UIDefaults} table. Here's an example:
|
altering the {@link javax.swing.UIDefaults} table. Here's an example:
|
||||||
<code><pre>
|
<pre>
|
||||||
UIManager.put("ProgressBar.tileWidth", myTileWidth);
|
UIManager.put("ProgressBar.tileWidth", myTileWidth);
|
||||||
UIManager.put("ProgressBar[Enabled].backgroundPainter", myBgPainter);
|
UIManager.put("ProgressBar[Enabled].backgroundPainter", myBgPainter);
|
||||||
UIManager.put("ProgressBar[Enabled].foregroundPainter", myFgPainter);
|
UIManager.put("ProgressBar[Enabled].foregroundPainter", myFgPainter);
|
||||||
</pre></code>
|
</pre>
|
||||||
|
|
||||||
<p>Per-component customization is also possible. When rendering a component,
|
<p>Per-component customization is also possible. When rendering a component,
|
||||||
Nimbus checks its client property named "Nimbus.Overrides". The value of this
|
Nimbus checks its client property named "Nimbus.Overrides". The value of this
|
||||||
|
@ -53,14 +53,14 @@ only. An optional client property, "Nimbus.Overrides.InheritDefaults" of type
|
||||||
Boolean, specifies whether the overriding settings should be merged with
|
Boolean, specifies whether the overriding settings should be merged with
|
||||||
default ones ({@code true}), or replace them ({@code false}). By default they
|
default ones ({@code true}), or replace them ({@code false}). By default they
|
||||||
are merged:
|
are merged:
|
||||||
<code><pre>
|
<pre>
|
||||||
JProgressBar bar = new JProgressBar();
|
JProgressBar bar = new JProgressBar();
|
||||||
UIDefaults overrides = new UIDefaults();
|
UIDefaults overrides = new UIDefaults();
|
||||||
overrides.put("ProgressBar.cycleTime", 330);
|
overrides.put("ProgressBar.cycleTime", 330);
|
||||||
...
|
...
|
||||||
bar.putClientProperty("Nimbus.Overrides", overrides);
|
bar.putClientProperty("Nimbus.Overrides", overrides);
|
||||||
bar.putClientProperty("Nimbus.Overrides.InheritDefaults", false);
|
bar.putClientProperty("Nimbus.Overrides.InheritDefaults", false);
|
||||||
</pre></code>
|
</pre>
|
||||||
|
|
||||||
<p>Colors in Nimbus are derived from a core set of
|
<p>Colors in Nimbus are derived from a core set of
|
||||||
<a href="doc-files/properties.html#primaryColors">primary colors</a>. There are also
|
<a href="doc-files/properties.html#primaryColors">primary colors</a>. There are also
|
||||||
|
|
|
@ -25,7 +25,7 @@ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
or visit www.oracle.com if you need additional information or have any
|
or visit www.oracle.com if you need additional information or have any
|
||||||
questions.
|
questions.
|
||||||
-->
|
-->
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Synth File Format</title>
|
<title>Synth File Format</title>
|
||||||
<style>
|
<style type="text/css">
|
||||||
div.dtd-fragment {
|
div.dtd-fragment {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -24,7 +24,7 @@ div.example {
|
||||||
Synth's file format (<a href="synth.dtd">dtd</a>)
|
Synth's file format (<a href="synth.dtd">dtd</a>)
|
||||||
allows for specifying all the pieces
|
allows for specifying all the pieces
|
||||||
necessary to create your own look and feel. A synth file is
|
necessary to create your own look and feel. A synth file is
|
||||||
loaded by way of the <A HREF="../../../../../javax/swing/plaf/synth/SynthLookAndFeel.html#load(java.io.InputStream, java.lang.Class)">SynthLookAndFeel.load(InputStream, Class)</a> or
|
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.
|
<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
|
The following example uses the <code>load</code> method to configure
|
||||||
a <code>SynthLookAndFeel</code> and sets it as the current look
|
a <code>SynthLookAndFeel</code> and sets it as the current look
|
||||||
|
@ -110,7 +110,7 @@ div.example {
|
||||||
style.</dd>
|
style.</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<p>
|
<p>
|
||||||
A <a name="e.style">style</a> element corresponds to a
|
A style element corresponds to a
|
||||||
<code>SynthStyle</code>, with the child elements specifying
|
<code>SynthStyle</code>, with the child elements specifying
|
||||||
properties that apply to all states or state elements which
|
properties that apply to all states or state elements which
|
||||||
contain properties specific to a particular state. The following
|
contain properties specific to a particular state. The following
|
||||||
|
@ -216,7 +216,6 @@ div.example {
|
||||||
contains at least SELECTED and PRESSED, state <code>one</code> will be
|
contains at least SELECTED and PRESSED, state <code>one</code> will be
|
||||||
chosen, otherwise if the state is SELECTED, but not does not
|
chosen, otherwise if the state is SELECTED, but not does not
|
||||||
contain PRESSED, state <code>two</code> will be used.
|
contain PRESSED, state <code>two</code> will be used.
|
||||||
<p>
|
|
||||||
|
|
||||||
<h3>The font element</h3>
|
<h3>The font element</h3>
|
||||||
<div class="dtd-fragment">
|
<div class="dtd-fragment">
|
||||||
|
@ -462,7 +461,6 @@ div.example {
|
||||||
for idref properties this will be the unique id of a
|
for idref properties this will be the unique id of a
|
||||||
previously defined object.</dd>
|
previously defined object.</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</dl>
|
|
||||||
<p>
|
<p>
|
||||||
<a href="#e.defaultsProperty">DefaultsProperty</a> elements are
|
<a href="#e.defaultsProperty">DefaultsProperty</a> elements are
|
||||||
used to define properties that will be placed in the
|
used to define properties that will be placed in the
|
||||||
|
@ -738,7 +736,7 @@ div.example {
|
||||||
<state value="SELECTED">
|
<state value="SELECTED">
|
||||||
<painter idref="stateFallbackPainter"/>
|
<painter idref="stateFallbackPainter"/>
|
||||||
<painter idref="stateButtonBackgroundPainter" method="buttonBackground"/>
|
<painter idref="stateButtonBackgroundPainter" method="buttonBackground"/>
|
||||||
</state>
|
</state>
|
||||||
</style>
|
</style>
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -27,6 +27,7 @@ questions.
|
||||||
|
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -25,7 +25,7 @@ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
or visit www.oracle.com if you need additional information or have any
|
or visit www.oracle.com if you need additional information or have any
|
||||||
questions.
|
questions.
|
||||||
-->
|
-->
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
or visit www.oracle.com if you need additional information or have any
|
or visit www.oracle.com if you need additional information or have any
|
||||||
questions.
|
questions.
|
||||||
-->
|
-->
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
or visit www.oracle.com if you need additional information or have any
|
or visit www.oracle.com if you need additional information or have any
|
||||||
questions.
|
questions.
|
||||||
-->
|
-->
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
or visit www.oracle.com if you need additional information or have any
|
or visit www.oracle.com if you need additional information or have any
|
||||||
questions.
|
questions.
|
||||||
-->
|
-->
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
or visit www.oracle.com if you need additional information or have any
|
or visit www.oracle.com if you need additional information or have any
|
||||||
questions.
|
questions.
|
||||||
-->
|
-->
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
or visit www.oracle.com if you need additional information or have any
|
or visit www.oracle.com if you need additional information or have any
|
||||||
questions.
|
questions.
|
||||||
-->
|
-->
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
or visit www.oracle.com if you need additional information or have any
|
or visit www.oracle.com if you need additional information or have any
|
||||||
questions.
|
questions.
|
||||||
-->
|
-->
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue