1 /* JDesktopPane.java --
2 Copyright (C) 2002 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
42 import javax
.accessibility
.*;
43 import javax
.swing
.plaf
.*;
47 * @author Andrew Selkirk
50 public class JDesktopPane
extends JLayeredPane
implements Accessible
53 //-------------------------------------------------------------
54 // Classes ----------------------------------------------------
55 //-------------------------------------------------------------
58 * AccessibleJDesktopPane
60 protected class AccessibleJDesktopPane
extends AccessibleJComponent
{
62 //-------------------------------------------------------------
63 // Initialization ---------------------------------------------
64 //-------------------------------------------------------------
67 * Constructor AccessibleJDesktopPane
68 * @param component TODO
70 protected AccessibleJDesktopPane(JDesktopPane component
) {
73 } // AccessibleJDesktopPane()
76 //-------------------------------------------------------------
77 // Methods ----------------------------------------------------
78 //-------------------------------------------------------------
82 * @returns AccessibleRole
84 public AccessibleRole
getAccessibleRole() {
85 return AccessibleRole
.DESKTOP_PANE
;
86 } // getAccessibleRole()
89 } // AccessibleJDesktopPane
92 //-------------------------------------------------------------
93 // Constants --------------------------------------------------
94 //-------------------------------------------------------------
99 public static int LIVE_DRAG_MODE
= 0;
104 public static int OUTLINE_DRAG_MODE
= 1;
109 private static final String uiClassID
= "DesktopPaneUI";
112 //-------------------------------------------------------------
113 // Variables --------------------------------------------------
114 //-------------------------------------------------------------
119 private transient JInternalFrame selectedFrame
;
124 private transient DesktopManager desktopManager
;
130 private int dragMode
;
133 //-------------------------------------------------------------
134 // Initialization ---------------------------------------------
135 //-------------------------------------------------------------
138 * Constructor JDesktopPane
140 public JDesktopPane() {
145 //-------------------------------------------------------------
146 // Methods ----------------------------------------------------
147 //-------------------------------------------------------------
152 * @exception IOException TODO
154 private void writeObject(ObjectOutputStream stream
) throws IOException
{
160 * @returns DesktopPaneUI
162 public DesktopPaneUI
getUI() {
163 return (DesktopPaneUI
) ui
;
170 public void setUI(DesktopPaneUI ui
) {
178 public void setDragMode(int mode
) {
179 this.dragMode
= mode
;
187 public int getDragMode() {
193 * @returns DesktopManager
195 public DesktopManager
getDesktopManager() {
196 return desktopManager
;
197 } // getDesktopManager()
201 * @param manager TODO
203 public void setDesktopManager(DesktopManager manager
) {
204 this.desktopManager
= manager
;
206 } // setDesktopManager()
211 public void updateUI() {
212 setUI((DesktopPaneUI
) UIManager
.get(this));
220 public String
getUIClassID() {
226 * @returns JInternalFrame[]
228 public JInternalFrame
[] getAllFrames() {
234 * @returns JInternalFrame
236 public JInternalFrame
getSelectedFrame() {
238 } // getSelectedFrame()
244 public void setSelectedFrame(JInternalFrame frame
) {
246 } // setSelectedFrame()
249 * getAllFramesInLayer
251 * @returns JInternalFrame[]
253 public JInternalFrame
[] getAllFramesInLayer(int layer
) {
255 } // getAllFramesInLayer()
261 public boolean isOpaque() {
269 protected String
paramString() {
274 * getAccessibleContext
275 * @returns AccessibleContext
277 public AccessibleContext
getAccessibleContext() {
278 if (accessibleContext
== null) {
279 accessibleContext
= new AccessibleJDesktopPane(this);
281 return accessibleContext
;
282 } // getAccessibleContext()