diff -r 7955db32d6b0 -r c408b10ef757 jdk/src/share/classes/javax/swing/plaf/basic/BasicDesktopPaneUI.java --- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicDesktopPaneUI.java Wed Jul 09 15:14:06 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicDesktopPaneUI.java Wed Jul 09 17:11:53 2014 +0400 @@ -55,7 +55,14 @@ private Handler handler; private PropertyChangeListener pcl; + /** + * The instance of {@code JDesktopPane}. + */ protected JDesktopPane desktop; + + /** + * The instance of {@code DesktopManager}. + */ protected DesktopManager desktopManager; /** @@ -109,10 +116,19 @@ @Deprecated protected KeyStroke navigateKey2; + /** + * Constructs a new instance of {@code BasicDesktopPaneUI}. + * + * @param c a component + * @return a new instance of {@code BasicDesktopPaneUI} + */ public static ComponentUI createUI(JComponent c) { return new BasicDesktopPaneUI(); } + /** + * Constructs a new instance of {@code BasicDesktopPaneUI}. + */ public BasicDesktopPaneUI() { } @@ -133,6 +149,9 @@ handler = null; } + /** + * Installs default properties. + */ protected void installDefaults() { if (desktop.getBackground() == null || desktop.getBackground() instanceof UIResource) { @@ -141,6 +160,9 @@ LookAndFeel.installProperty(desktop, "opaque", Boolean.TRUE); } + /** + * Uninstalls default properties. + */ protected void uninstallDefaults() { } /** @@ -169,6 +191,9 @@ pcl = null; } + /** + * Installs desktop manager. + */ protected void installDesktopManager() { desktopManager = desktop.getDesktopManager(); if(desktopManager == null) { @@ -177,6 +202,9 @@ } } + /** + * Uninstalls desktop manager. + */ protected void uninstallDesktopManager() { if(desktop.getDesktopManager() instanceof UIResource) { desktop.setDesktopManager(null); @@ -184,6 +212,9 @@ desktopManager = null; } + /** + * Installs keyboard actions. + */ protected void installKeyboardActions(){ InputMap inputMap = getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW); if (inputMap != null) { @@ -202,9 +233,15 @@ registerKeyboardActions(); } + /** + * Registers keyboard actions. + */ protected void registerKeyboardActions(){ } + /** + * Unregisters keyboard actions. + */ protected void unregisterKeyboardActions(){ } @@ -253,6 +290,9 @@ map.put(new Actions(Actions.NAVIGATE_PREVIOUS)); } + /** + * Unregisters keyboard actions. + */ protected void uninstallKeyboardActions(){ unregisterKeyboardActions(); SwingUtilities.replaceUIInputMap(desktop, JComponent.