KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > java > swing > plaf > windows > WindowsDesktopPaneUI


1 /*
2  * @(#)WindowsDesktopPaneUI.java 1.23 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.java.swing.plaf.windows;
9
10 import javax.swing.*;
11 import javax.swing.plaf.basic.*;
12 import javax.swing.plaf.ComponentUI JavaDoc;
13 import java.awt.event.*;
14
15 /**
16  * Windows desktop pane.
17  * <p>
18  * <strong>Warning:</strong>
19  * Serialized objects of this class will not be compatible with
20  * future Swing releases. The current serialization support is appropriate
21  * for short term storage or RMI between applications running the same
22  * version of Swing. A future release of Swing will provide support for
23  * long term persistence.
24  *
25  * @version %i% 12/19/03
26  * @author David Kloba
27  */

28 public class WindowsDesktopPaneUI extends BasicDesktopPaneUI
29 {
30     public static ComponentUI JavaDoc createUI(JComponent c) {
31         return new WindowsDesktopPaneUI();
32     }
33
34     protected void installDesktopManager() {
35     desktopManager = desktop.getDesktopManager();
36     if(desktopManager == null) {
37         desktopManager = new WindowsDesktopManager();
38         desktop.setDesktopManager(desktopManager);
39     }
40     }
41
42     protected void installDefaults() {
43         super.installDefaults();
44     }
45
46     protected void installKeyboardActions() {
47     super.installKeyboardActions();
48
49         // Request focus if it isn't set.
50
if(!desktop.requestDefaultFocus()) {
51             desktop.requestFocus();
52         }
53     }
54 }
55
Popular Tags