changeset 41908:a97f27c928d3

8167176: Exported elements referring to inaccessible types in java.desktop Reviewed-by: prr, serb
author alexsch
date Tue, 01 Nov 2016 12:56:11 +0300
parents de2bfd90687c
children 7cdc6dfe9c9b 1f7a0a6eb773
files jdk/src/java.desktop/share/classes/javax/swing/JRootPane.java jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalBorders.java jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalScrollBarUI.java
diffstat 4 files changed, 3 insertions(+), 54 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/java.desktop/share/classes/javax/swing/JRootPane.java	Tue Nov 01 12:38:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JRootPane.java	Tue Nov 01 12:56:11 2016 +0300
@@ -320,28 +320,6 @@
      * a UI-specific action like pressing the <b>Enter</b> key occurs.
      */
     protected JButton defaultButton;
-    /**
-     * As of Java 2 platform v1.3 this unusable field is no longer used.
-     * To override the default button you should replace the <code>Action</code>
-     * in the <code>JRootPane</code>'s <code>ActionMap</code>. Please refer to
-     * the key bindings specification for further details.
-     *
-     * @deprecated As of Java 2 platform v1.3.
-     *  @see #defaultButton
-     */
-    @Deprecated
-    protected DefaultAction defaultPressAction;
-    /**
-     * As of Java 2 platform v1.3 this unusable field is no longer used.
-     * To override the default button you should replace the <code>Action</code>
-     * in the <code>JRootPane</code>'s <code>ActionMap</code>. Please refer to
-     * the key bindings specification for further details.
-     *
-     * @deprecated As of Java 2 platform v1.3.
-     *  @see #defaultButton
-     */
-    @Deprecated
-    protected DefaultAction defaultReleaseAction;
 
     /**
      * Whether or not true double buffering should be used.  This is typically
@@ -829,35 +807,6 @@
         }
     }
 
-    @SuppressWarnings("serial")
-    static class DefaultAction extends AbstractAction {
-        JButton owner;
-        JRootPane root;
-        boolean press;
-        DefaultAction(JRootPane root, boolean press) {
-            this.root = root;
-            this.press = press;
-        }
-        public void setOwner(JButton owner) {
-            this.owner = owner;
-        }
-        public void actionPerformed(ActionEvent e) {
-            if (owner != null && SwingUtilities.getRootPane(owner) == root) {
-                ButtonModel model = owner.getModel();
-                if (press) {
-                    model.setArmed(true);
-                    model.setPressed(true);
-                } else {
-                    model.setPressed(false);
-                }
-            }
-        }
-        public boolean isEnabled() {
-            return owner.getModel().isEnabled();
-        }
-    }
-
-
     /**
      * Overridden to enforce the position of the glass component as
      * the zero child.
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalBorders.java	Tue Nov 01 12:38:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalBorders.java	Tue Nov 01 12:56:11 2016 +0300
@@ -739,7 +739,7 @@
         /**
          * The instance of {@code MetalBumps}.
          */
-        protected MetalBumps bumps = new MetalBumps( 10, 10,
+        private MetalBumps bumps = new MetalBumps( 10, 10,
                                       MetalLookAndFeel.getControlHighlight(),
                                       MetalLookAndFeel.getControlDarkShadow(),
                                      UIManager.getColor("ToolBar.background"));
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java	Tue Nov 01 12:38:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java	Tue Nov 01 12:56:11 2016 +0300
@@ -923,7 +923,7 @@
      * @param fc a {@code JFileChooser}
      * @return a new instance of {@code DirectoryComboBoxRenderer}
      */
-    protected DirectoryComboBoxRenderer createDirectoryComboBoxRenderer(JFileChooser fc) {
+    private DefaultListCellRenderer createDirectoryComboBoxRenderer(JFileChooser fc) {
         return new DirectoryComboBoxRenderer();
     }
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalScrollBarUI.java	Tue Nov 01 12:38:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalScrollBarUI.java	Tue Nov 01 12:56:11 2016 +0300
@@ -62,7 +62,7 @@
     /**
      * The metal bumps.
      */
-    protected MetalBumps bumps;
+    private MetalBumps bumps;
 
     /**
      * The increase button.