diff --git a/jdk/src/java.desktop/share/classes/javax/swing/border/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/border/package-info.java new file mode 100644 index 00000000000..a964f6d7ceb --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/border/package-info.java @@ -0,0 +1,53 @@ +/* + * 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. + */ + +/** + * Provides classes and interface for drawing specialized borders around a Swing + * component. You can subclass these classes to create customized borders for + * your components instead of using the default borders provided by the + * look-and-feel being used. + *
+ * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + *
-Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - - -
+ * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + *
JColorChooser
-component.
-
--Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - - -
+ * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + *
-Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -
+ * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + *
JFileChooser component.
-
--Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - - -
+ * Typical Swing applications do processing in response to an event generated + * from a user gesture. For example, clicking on a {@code JButton} notifies all + * {@code ActionListeners} added to the {@code JButton}. As all events generated + * from a user gesture are dispatched on the event dispatching thread, most + * developers are not impacted by the restriction. + *
+ * Where the impact lies, however, is in constructing and showing a Swing + * application. Calls to an application's {@code main} method, or methods in + * {@code Applet}, are not invoked on the event dispatching thread. As such, + * care must be taken to transfer control to the event dispatching thread when + * constructing and showing an application or applet. The preferred way to + * transfer control and begin working with Swing is to use {@code invokeLater}. + * The {@code invokeLater} method schedules a {@code Runnable} to be processed + * on the event dispatching thread. The following two examples work equally well + * for transferring control and starting up a Swing application: + *
+ * import javax.swing.SwingUtilities;
+ *
+ * public class MyApp implements Runnable {
+ * public void run() {
+ * // Invoked on the event dispatching thread.
+ * // Construct and show GUI.
+ * }
+ *
+ * public static void main(String[] args) {
+ * SwingUtilities.invokeLater(new MyApp());
+ * }
+ * }
+ * Or:
+ * import javax.swing.SwingUtilities;
+ *
+ * public class MyApp {
+ * MyApp(String[] args) {
+ * // Invoked on the event dispatching thread.
+ * // Do any initialization here.
+ * }
+ *
+ * public void show() {
+ * // Show the UI.
+ * }
+ *
+ * public static void main(final String[] args) {
+ * // Schedule a job for the event-dispatching thread:
+ * // creating and showing this application's GUI.
+ * SwingUtilities.invokeLater(new Runnable() {
+ * public void run() {
+ * new MyApp(args).show();
+ * }
+ * });
+ * }
+ * }
+ * This restriction also applies to models attached to Swing components. For
+ * example, if a {@code TableModel} is attached to a {@code JTable}, the
+ * {@code TableModel} should only be modified on the event dispatching thread.
+ * If you modify the model on a separate thread you run the risk of exceptions
+ * and possible display corruption.
+ * + * As all events are delivered on the event dispatching thread, care must be + * taken in event processing. In particular, a long running task, such as + * network io or computational intensive processing, executed on the event + * dispatching thread blocks the event dispatching thread from dispatching any + * other events. While the event dispatching thread is blocked the application + * is completely unresponsive to user input. Refer to + * {@link javax.swing.SwingWorker} for the preferred way to do such processing + * when working with Swing. + *
+ * More information on this topic can be found in the + * Swing tutorial, + * in particular the section on + * + * Concurrency in Swing. + * + *
Provides a set of "lightweight" -(all-Java language) components that, -to the maximum degree possible, work the same on all platforms. -For a programmer's guide to using these components, see -Creating -a GUI with JFC/Swing, a trail in The Java Tutorial. -For other resources, see -Related Documentation. - -
-Typical Swing applications do processing in response to an event -generated from a user gesture. For example, clicking on a {@code -JButton} notifies all {@code ActionListeners} added to the {@code -JButton}. As all events generated from a user gesture are -dispatched on the event dispatching thread, most developers are not -impacted by the restriction. -
-Where the impact lies, however, is in constructing and showing a -Swing application. Calls to an application's {@code main} method, -or methods in {@code Applet}, are not invoked on the event -dispatching thread. As such, care must be taken to transfer control -to the event dispatching thread when constructing and showing an -application or applet. The preferred way to transfer control and begin -working with Swing is to use {@code invokeLater}. The {@code -invokeLater} method schedules a {@code Runnable} to be processed on -the event dispatching thread. The following two examples work equally -well for transferring control and starting up a Swing application: -
-import javax.swing.SwingUtilities;
-
-public class MyApp implements Runnable {
- public void run() {
- // Invoked on the event dispatching thread.
- // Construct and show GUI.
- }
-
- public static void main(String[] args) {
- SwingUtilities.invokeLater(new MyApp());
- }
-}
-
-Or:
-
-import javax.swing.SwingUtilities;
-
-public class MyApp {
- MyApp(String[] args) {
- // Invoked on the event dispatching thread.
- // Do any initialization here.
- }
-
- public void show() {
- // Show the UI.
- }
-
- public static void main(final String[] args) {
- // Schedule a job for the event-dispatching thread:
- // creating and showing this application's GUI.
- SwingUtilities.invokeLater(new Runnable() {
- public void run() {
- new MyApp(args).show();
- }
- });
- }
-}
-
-This restriction also applies to models attached to Swing components.
-For example, if a {@code TableModel} is attached to a {@code
-JTable}, the {@code TableModel} should only be modified on the
-event dispatching thread. If you modify the model on a separate
-thread you run the risk of exceptions and possible display
-corruption.
--As all events are delivered on the event dispatching thread, care must -be taken in event processing. In particular, a long running task, such -as network io or computational intensive processing, executed on the -event dispatching thread blocks the event dispatching thread from -dispatching any other events. While the event dispatching thread is -blocked the application is completely unresponsive to user -input. Refer to {@link javax.swing.SwingWorker} for the preferred way to do such -processing when working with Swing. -
-More information on this topic can be found in the -Swing tutorial, -in particular the section on -Concurrency in Swing. - - -
For overviews, tutorials, examples, guides, and other documentation, please see: - -
+ * These classes are designed to be used while the corresponding
+ * {@code LookAndFeel} class has been installed
+ * (UIManager.setLookAndFeel(new XXXLookAndFeel())).
+ * Using them while a different {@code LookAndFeel} is installed may produce
+ * unexpected results, including exceptions. Additionally, changing the
+ * {@code LookAndFeel} maintained by the {@code UIManager} without updating the
+ * corresponding {@code ComponentUI} of any {@code JComponent}s may also produce
+ * unexpected results, such as the wrong colors showing up, and is generally not
+ * encouraged.
+ *
+ * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + * @since 1.2 + * @serial exclude + */ +package javax.swing.plaf.basic; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/package.html b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/package.html deleted file mode 100644 index 347fc7cf9c8..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/package.html +++ /dev/null @@ -1,68 +0,0 @@ - - -
- -These classes are designed to be used while the
-corresponding LookAndFeel class has been
-installed
-(UIManager.setLookAndFeel(new XXXLookAndFeel())).
-Using them while a different LookAndFeel is installed
-may produce unexpected results, including exceptions.
-Additionally, changing the LookAndFeel
-maintained by the UIManager without updating the
-corresponding ComponentUI of any
-JComponents may also produce unexpected results,
-such as the wrong colors showing up, and is generally not
-encouraged.
-
-
-Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/package-info.java new file mode 100644 index 00000000000..dbd8c71940a --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/package-info.java @@ -0,0 +1,52 @@ +/* + * 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. + */ + +/** + * Provides user interface objects built according to the Java look and feel + * (once codenamed Metal), which is the default look and feel. + *
+ * These classes are designed to be used while the corresponding
+ * {@code LookAndFeel} class has been installed
+ * (UIManager.setLookAndFeel(new XXXLookAndFeel())).
+ * Using them while a different {@code LookAndFeel} is installed may produce
+ * unexpected results, including exceptions. Additionally, changing the
+ * {@code LookAndFeel} maintained by the {@code UIManager} without updating the
+ * corresponding {@code ComponentUI} of any {@code JComponent}s may also produce
+ * unexpected results, such as the wrong colors showing up, and is generally not
+ * encouraged.
+ *
+ * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + * @since 1.2 + * @serial exclude + */ +package javax.swing.plaf.metal; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/package.html b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/package.html deleted file mode 100644 index db16ddda090..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/package.html +++ /dev/null @@ -1,64 +0,0 @@ - - -
- -These classes are designed to be used while the
-corresponding LookAndFeel class has been
-installed
-(UIManager.setLookAndFeel(new XXXLookAndFeel())).
-Using them while a different LookAndFeel is installed
-may produce unexpected results, including exceptions.
-Additionally, changing the LookAndFeel
-maintained by the UIManager without updating the
-corresponding ComponentUI of any
-JComponents may also produce unexpected results,
-such as the wrong colors showing up, and is generally not
-encouraged.
-
-
-Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/multi/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/multi/package-info.java new file mode 100644 index 00000000000..6857c3f74ab --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/multi/package-info.java @@ -0,0 +1,52 @@ +/* + * 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. + */ + +/** + * Provides user interface objects that combine two or more look and feels. When + * a component asks for its UI, this look and feel returns a multiplexing UI + * that handles all communications with both the default look and feel and one + * or more auxiliary look and feels. For example, if a user combines an + * auxiliary audio look and feel with the Motif look and feel, the + * {@code JButton.getUI} method would return an instance of + * {@code MultiButtonUI}, which would handle both a {@code MotifButtonUI} and an + * {@code AudioButtonUI}. + *
+ * For more information, see + * + * Using the Multiplexing Look and Feel. + *
+ * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + * @since 1.2 + * @serial exclude + */ +package javax.swing.plaf.multi; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/multi/package.html b/jdk/src/java.desktop/share/classes/javax/swing/plaf/multi/package.html deleted file mode 100644 index 32b0d6b21af..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/multi/package.html +++ /dev/null @@ -1,66 +0,0 @@ - - -
- -JButton.getUI method
-would return an instance of MultiButtonUI,
-which would handle both a
-MotifButtonUI and an AudioButtonUI.
-
-- -For more information, see -Using -the Multiplexing Look and Feel. - -
-Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/package-info.java new file mode 100644 index 00000000000..21f93aa34c2 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/package-info.java @@ -0,0 +1,93 @@ +/* + * 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. + */ + +/** + * Provides user interface objects built according to the cross-platform Nimbus + * look and feel. + *
+ * Nimbus uses instances of the {@link javax.swing.Painter} interface to paint + * components. With each Swing component it associates a foreground and a + * background {@code Painter}, and there may be several painters for different + * component states. + *
+ * Nimbus allows customizing many of its properties, including painters, by + * altering the {@link javax.swing.UIDefaults} table. Here's an example: + *
+ * UIManager.put("ProgressBar.tileWidth", myTileWidth);
+ * UIManager.put("ProgressBar[Enabled].backgroundPainter", myBgPainter);
+ * UIManager.put("ProgressBar[Enabled].foregroundPainter", myFgPainter);
+ *
+ * + * Per-component customization is also possible. When rendering a component, + * Nimbus checks its client property named "Nimbus.Overrides". The value of this + * property should be an instance of {@code UIDefaults}. Settings from that + * table override the UIManager settings, but for that particular component + * instance only. An optional client property, + * "Nimbus.Overrides.InheritDefaults" of type Boolean, specifies whether the + * overriding settings should be merged with default ones ({@code true}), or + * replace them ({@code false}). By default they are merged: + *
+ * JProgressBar bar = new JProgressBar();
+ * UIDefaults overrides = new UIDefaults();
+ * overrides.put("ProgressBar.cycleTime", 330);
+ * ...
+ * bar.putClientProperty("Nimbus.Overrides", overrides);
+ * bar.putClientProperty("Nimbus.Overrides.InheritDefaults", false);
+ *
+ * + * Colors in Nimbus are derived from a core set of + * primary colors. There + * are also + * secondary colors, + * which are derived from primary ones, but serve themselves as base colors for + * other derived colors. The derivation mechanism allows for runtime + * customization, i.e. if a primary or secondary color is changed, all colors + * that are derived from it are automatically updated. The method + * {@link javax.swing.plaf.nimbus.NimbusLookAndFeel#getDerivedColor(java.lang.String, float, float, float, int, boolean)} + * may be used to create a derived color. + *
+ * These classes are designed to be used while the corresponding
+ * {@code LookAndFeel} class has been installed
+ * (UIManager.setLookAndFeel(new XXXLookAndFeel())).
+ * Using them while a different {@code LookAndFeel} is installed may produce
+ * unexpected results, including exceptions. Additionally, changing the
+ * {@code LookAndFeel} maintained by the {@code UIManager} without updating the
+ * corresponding {@code ComponentUI} of any {@code JComponent}s may also produce
+ * unexpected results, such as the wrong colors showing up, and is generally not
+ * encouraged.
+ *
+ * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + * @since 1.7 + * @serial exclude + */ +package javax.swing.plaf.nimbus; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/package.html b/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/package.html deleted file mode 100644 index f91d73781fd..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/package.html +++ /dev/null @@ -1,101 +0,0 @@ - - -
- -Nimbus uses instances of the {@link javax.swing.Painter} interface to paint -components. With each Swing component it associates a foreground and a -background {@code Painter}, and there may be several painters for different -component states. - -
Nimbus allows customizing many of its properties, including painters, by -altering the {@link javax.swing.UIDefaults} table. Here's an example: -
- UIManager.put("ProgressBar.tileWidth", myTileWidth);
- UIManager.put("ProgressBar[Enabled].backgroundPainter", myBgPainter);
- UIManager.put("ProgressBar[Enabled].foregroundPainter", myFgPainter);
-
-
-Per-component customization is also possible. When rendering a component, -Nimbus checks its client property named "Nimbus.Overrides". The value of this -property should be an instance of {@code UIDefaults}. Settings from that table -override the UIManager settings, but for that particular component instance -only. An optional client property, "Nimbus.Overrides.InheritDefaults" of type -Boolean, specifies whether the overriding settings should be merged with -default ones ({@code true}), or replace them ({@code false}). By default they -are merged: -
- JProgressBar bar = new JProgressBar();
- UIDefaults overrides = new UIDefaults();
- overrides.put("ProgressBar.cycleTime", 330);
- ...
- bar.putClientProperty("Nimbus.Overrides", overrides);
- bar.putClientProperty("Nimbus.Overrides.InheritDefaults", false);
-
-
-Colors in Nimbus are derived from a core set of -primary colors. There are also -secondary colors, which are -derived from primary ones, but serve themselves as base colors for other -derived colors. The derivation mechanism allows for runtime customization, -i.e. if a primary or secondary color is changed, all colors that are derived -from it are automatically updated. The method -{@link javax.swing.plaf.nimbus.NimbusLookAndFeel#getDerivedColor(java.lang.String, float, float, float, int, boolean)} -may be used to create a derived color. - -
These classes are designed to be used while the
-corresponding LookAndFeel class has been
-installed
-(UIManager.setLookAndFeel(new XXXLookAndFeel())).
-Using them while a different LookAndFeel is installed
-may produce unexpected results, including exceptions.
-Additionally, changing the LookAndFeel
-maintained by the UIManager without updating the
-corresponding ComponentUI of any
-JComponents may also produce unexpected results,
-such as the wrong colors showing up, and is generally not
-encouraged.
-
-
Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -@since 1.7 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/package-info.java new file mode 100644 index 00000000000..d29ebe69052 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/package-info.java @@ -0,0 +1,47 @@ +/* + * 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. + */ + +/** + * Provides one interface and many abstract classes that Swing uses to provide + * its pluggable look-and-feel capabilities. Its classes are subclassed and + * implemented by look and feel UIs such as Basic and the Java look and feel + * (Metal). This package is only used by developers who cannot create a new + * look and feel by subclassing existing look-and-feel components (such as those + * provided by the {@code javax.swing.plaf.basic} and + * {@code javax.swing.plaf.metal} packages). + *
+ * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + * @since 1.2 + * @serial exclude + */ +package javax.swing.plaf; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/package.html b/jdk/src/java.desktop/share/classes/javax/swing/plaf/package.html deleted file mode 100644 index 0fc8c538143..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/package.html +++ /dev/null @@ -1,57 +0,0 @@ - - -
- -javax.swing.plaf.basic and
-javax.swing.plaf.metal packages).
-
--Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/package-info.java new file mode 100644 index 00000000000..e8bf9e5a70c --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/package-info.java @@ -0,0 +1,143 @@ +/* + * 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 + * 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. + */ + +/** + * Synth is a skinnable look and feel in which all painting is delegated. Synth + * does not provide a default look. In order to use Synth you need to specify a + * file, or provide a + * {@link javax.swing.plaf.synth.SynthStyleFactory}. Both configuration options + * require an understanding of the synth architecture, which is described below, + * as well as an understanding of Swing's architecture. + *
+ * Unless otherwise specified null is not a legal value to any of the methods + * defined in the synth package and if passed in will result in a + * {@code NullPointerException}. + * + *
{@code
+ * SynthLookAndFeel laf = new SynthLookAndFeel();
+ * laf.load(MyClass.class.getResourceAsStream("laf.xml"), MyClass.class);
+ * UIManager.setLookAndFeel(laf);
+ * }
+ * + * Many {@code JComponent}s are broken down into smaller pieces and identified + * by the type safe enumeration in {@link javax.swing.plaf.synth.Region}. For + * example, a {@code JTabbedPane} consists of a {@code Region} for the + * {@code JTabbedPane}({@link javax.swing.plaf.synth.Region#TABBED_PANE}), the + * content area ({@link javax.swing.plaf.synth.Region#TABBED_PANE_CONTENT}), the + * area behind the tabs + * ({@link javax.swing.plaf.synth.Region#TABBED_PANE_TAB_AREA}), and the tabs + * ({@link javax.swing.plaf.synth.Region#TABBED_PANE_TAB}). Each + * {@code Region} of each {@code JComponent} will have a {@code SynthStyle}. + * This allows you to customize individual pieces of each region of each + * {@code JComponent}. + *
+ * Many of the Synth methods take a {@link javax.swing.plaf.synth.SynthContext}. + * This is used to provide information about the current {@code Component} and + * includes: the {@link javax.swing.plaf.synth.SynthStyle} associated with the + * current {@link javax.swing.plaf.synth.Region}, the state of the + * {@code Component} as a bitmask (refer to + * {@link javax.swing.plaf.synth.SynthConstants} for the valid states), and a + * {@link javax.swing.plaf.synth.Region} identifying the portion of the + * {@code Component} being painted. + *
+ * All text rendering by non-{@code JTextComponent}s is delegated to a + * {@link javax.swing.plaf.synth.SynthGraphicsUtils}, which is obtained using + * the {@link javax.swing.plaf.synth.SynthStyle} method + * {@link javax.swing.plaf.synth.SynthStyle#getGraphicsUtils}. You can customize + * text rendering by supplying your own + * {@link javax.swing.plaf.synth.SynthGraphicsUtils}. + * + *
{@code
+ *
+ *
+ * }
+ * + * This specifies a color combination of red on white, when selected, and white + * on red when not selected. To see the background you need to specify that + * labels are not opaque. The following XML fragment does that: + *
{@code
+ *
+ *
+ * }
+ *
+ * {@code
+ *
+ *
+ *
+ * }
+ */
+package javax.swing.plaf.synth;
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/package.html b/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/package.html
deleted file mode 100644
index 6662e81b1a4..00000000000
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/package.html
+++ /dev/null
@@ -1,178 +0,0 @@
-
-
-
-
-- Synth is a skinnable look and feel in which all painting is - delegated. Synth does not provide a default look. In - order to use Synth you need to specify a - file, or - provide a {@link - javax.swing.plaf.synth.SynthStyleFactory}. Both - configuration options require an - understanding of the synth architecture, which is described - below, as well as an understanding of Swing's architecture. -
-
- Unless otherwise specified null is not a legal value to any of
- the methods defined in the synth package and if passed in will
- result in a NullPointerException.
-
-
-
- Each {@link javax.swing.plaf.ComponentUI} implementation in Synth associates
- itself with one {@link
- javax.swing.plaf.synth.SynthStyle} per {@link
- javax.swing.plaf.synth.Region}, most
- Components only have one Region and
- therefor only one SynthStyle.
- SynthStyle
- is used to access all style related properties: fonts, colors
- and other Component properties. In addition
- SynthStyles are used to obtain
- {@link javax.swing.plaf.synth.SynthPainter}s for painting the background, border,
- focus and other portions of a Component. The ComponentUIs obtain
- SynthStyles from a
- {@link javax.swing.plaf.synth.SynthStyleFactory}.
- A SynthStyleFactory
- can be provided directly by way of
- {@link javax.swing.plaf.synth.SynthLookAndFeel#setStyleFactory(javax.swing.plaf.synth.SynthStyleFactory)},
- or indirectly by way of
- {@link javax.swing.plaf.synth.SynthLookAndFeel#load}. The
- following example uses the SynthLookAndFeel.load()
- method to configure a SynthLookAndFeel and sets it
- as the current look and feel:
-
- SynthLookAndFeel laf = new SynthLookAndFeel();
- laf.load(MyClass.class.getResourceAsStream("laf.xml"), MyClass.class);
- UIManager.setLookAndFeel(laf);
-
-
- Many JComponents are broken down into smaller
- pieces and identified by the type safe enumeration in
- {@link javax.swing.plaf.synth.Region}. For example, a JTabbedPane
- consists of a Region for the
- JTabbedPane ({@link
- javax.swing.plaf.synth.Region#TABBED_PANE}), the content
- area ({@link
- javax.swing.plaf.synth.Region#TABBED_PANE_CONTENT}), the
- area behind the tabs ({@link
- javax.swing.plaf.synth.Region#TABBED_PANE_TAB_AREA}), and the
- tabs ({@link
- javax.swing.plaf.synth.Region#TABBED_PANE_TAB}). Each
- Region of each
- JComponent will have a
- SynthStyle. This allows
- you to customize individual pieces of each region of each
- JComponent.
-
- Many of the Synth methods take a {@link javax.swing.plaf.synth.SynthContext}. This
- is used to provide information about the current
- Component and includes: the
- {@link javax.swing.plaf.synth.SynthStyle} associated with the current
- {@link javax.swing.plaf.synth.Region}, the state of the Component
- as a bitmask (refer to {@link
- javax.swing.plaf.synth.SynthConstants} for the valid
- states), and a {@link javax.swing.plaf.synth.Region} identifying the portion of
- the Component being painted.
-
- All text rendering by non-JTextComponents is
- delegated to a {@link
- javax.swing.plaf.synth.SynthGraphicsUtils}, which is
- obtained using the {@link javax.swing.plaf.synth.SynthStyle} method
- {@link javax.swing.plaf.synth.SynthStyle#getGraphicsUtils}. You can
- customize text rendering
- by supplying your own {@link javax.swing.plaf.synth.SynthGraphicsUtils}.
-
-
- Synth provides a region for the cells of a tree:
- Region.TREE_CELL. To specify the colors of the
- renderer you'll want to provide a style for the
- TREE_CELL region. The following illustrates this:
-
- <style id="treeCellStyle"> - <opaque value="TRUE"/> - <state> - <color value="WHITE" type="TEXT_FOREGROUND"/> - <color value="RED" type="TEXT_BACKGROUND"/> - </state> - <state value="SELECTED"> - <color value="RED" type="TEXT_FOREGROUND"/> - <color value="WHITE" type="BACKGROUND"/> - </state> - </style> - <bind style="treeCellStyle" type="region" key="TreeCell"/> --
- This specifies a color combination of red on white, when - selected, and white on red when not selected. To see the - background you need to specify that labels are not opaque. The - following XML fragment does that: -
- <style id="labelStyle"> - <opaque value="FALSE"/> - </style> - <bind style="labelStyle" type="region" key="Label"/> -- -
- The colors that the renderers for JList and JTable use are - specified by way of the list and table Regions. The following - XML fragment illustrates how to specify red on white, when - selected, and white on red when not selected: -
- <style id="style"> - <opaque value="TRUE"/> - <state> - <color value="WHITE" type="TEXT_FOREGROUND"/> - <color value="RED" type="TEXT_BACKGROUND"/> - <color value="RED" type="BACKGROUND"/> - </state> - <state value="SELECTED"> - <color value="RED" type="TEXT_FOREGROUND"/> - <color value="WHITE" type="TEXT_BACKGROUND"/> - </state> - </style> - <bind style="style" type="region" key="Table"/> - <bind style="style" type="region" key="List"/> -- - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/table/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/table/package-info.java new file mode 100644 index 00000000000..1ce7bd07ca9 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/table/package-info.java @@ -0,0 +1,55 @@ +/* + * 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. + */ + +/** + * Provides classes and interfaces for dealing with {@code javax.swing.JTable}. + * {@code JTable} is Swing's grid or tabular view for constructing user + * interfaces for tabular data structures inside an application. Use this + * package if you want control over how tables are constructed, updated, and + * rendered, as well as how data associated with the tables are viewed and + * managed. + *
+ * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + *
javax.swing.JTable.
-JTable is Swing's grid or tabular view for
-constructing user interfaces for tabular data structures inside
-an application. Use this package if you want control over how tables
-are constructed, updated, and rendered, as well as how data associated
-with the tables are viewed and managed.
-
-- -Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - - -
+ * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + *
HTMLEditorKit and supporting classes
-for creating HTML text editors.
-
--Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -
+ * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + * @see javax.swing.text.html.HTMLEditorKit.ParserCallback + * @since 1.2 + * @serial exclude + */ +package javax.swing.text.html.parser; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/html/parser/package.html b/jdk/src/java.desktop/share/classes/javax/swing/text/html/parser/package.html deleted file mode 100644 index 05c53989142..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/parser/package.html +++ /dev/null @@ -1,54 +0,0 @@ - - -
- -HTMLEditorKit.ParserCallback interface.
-
--Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -@see javax.swing.text.html.HTMLEditorKit.ParserCallback -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/text/package-info.java new file mode 100644 index 00000000000..424af3b6033 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/package-info.java @@ -0,0 +1,54 @@ +/* + * 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. + */ + +/** + * Provides classes and interfaces that deal with editable and noneditable text + * components. Examples of text components are text fields and text areas, of + * which password fields and document editors are special instantiations. + * Features that are supported by this package include selection/highlighting, + * editing, style, and key mapping. + *
+ * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + *
-Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -
+ * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + * @since 1.2 + * @serial exclude + */ +package javax.swing.text.rtf; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/package.html b/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/package.html deleted file mode 100644 index 9b62f229a93..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/package.html +++ /dev/null @@ -1,51 +0,0 @@ - - -
- -RTFEditorKit) for creating Rich-Text-Format
-text editors.
-
-- -Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -@since 1.2 -@serial exclude - - - diff --git a/jdk/src/java.desktop/share/classes/javax/swing/tree/package-info.java b/jdk/src/java.desktop/share/classes/javax/swing/tree/package-info.java new file mode 100644 index 00000000000..ce57345e815 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/package-info.java @@ -0,0 +1,53 @@ +/* + * 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. + */ + +/** + * Provides classes and interfaces for dealing with {@code javax.swing.JTree}. + * You use these classes and interfaces if you want control over how trees are + * constructed, updated, and rendered, as well as how data associated with the + * tree nodes are viewed and managed. + *
+ * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + *
javax.swing.JTree. You use these classes and interfaces if you want
-control over how trees are constructed, updated, and rendered, as well
-as how data associated with the tree nodes are viewed and managed.
-
--Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - - -
+ * Note: + * Most of the Swing API is not thread safe. For details, see + * Concurrency in Swing, + * a section in + * The Java Tutorial. + * + *
-Note: -Most of the Swing API is not thread safe. -For details, see -Concurrency in Swing, -a section in -The Java Tutorial. - -