1 /* JDesktopPane.java --
2    Copyright (C) 2002, 2004 Free Software Foundation, Inc.
3 
4 This file is part of GNU Classpath.
5 
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)
9 any later version.
10 
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.
15 
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
19 02111-1307 USA.
20 
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
24 combination.
25 
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. */
37 
38 package javax.swing;
39 
40 import java.io.IOException;
41 import java.io.ObjectOutputStream;
42 import javax.accessibility.Accessible;
43 import javax.accessibility.AccessibleContext;
44 import javax.accessibility.AccessibleRole;
45 import javax.swing.plaf.DesktopPaneUI;
46 
47 /**
48  * JDesktopPane
49  * @author	Andrew Selkirk
50  * @version	1.0
51  */
52 public class JDesktopPane extends JLayeredPane implements Accessible
53 {
54 
55 	//-------------------------------------------------------------
56 	// Classes ----------------------------------------------------
57 	//-------------------------------------------------------------
58 
59 	/**
60 	 * AccessibleJDesktopPane
61 	 */
62 	protected class AccessibleJDesktopPane extends AccessibleJComponent {
63 
64 		//-------------------------------------------------------------
65 		// Initialization ---------------------------------------------
66 		//-------------------------------------------------------------
67 
68 		/**
69 		 * Constructor AccessibleJDesktopPane
70 		 * @param component TODO
71 		 */
AccessibleJDesktopPane(JDesktopPane component)72 		protected AccessibleJDesktopPane(JDesktopPane component) {
73 			super(component);
74 			// TODO
75 		} // AccessibleJDesktopPane()
76 
77 
78 		//-------------------------------------------------------------
79 		// Methods ----------------------------------------------------
80 		//-------------------------------------------------------------
81 
82 		/**
83 		 * getAccessibleRole
84 		 * @returns AccessibleRole
85 		 */
getAccessibleRole()86 		public AccessibleRole getAccessibleRole() {
87 			return AccessibleRole.DESKTOP_PANE;
88 		} // getAccessibleRole()
89 
90 
91 	} // AccessibleJDesktopPane
92 
93 
94 	//-------------------------------------------------------------
95 	// Constants --------------------------------------------------
96 	//-------------------------------------------------------------
97 
98 	/**
99 	 * LIVE_DRAG_MODE
100 	 */
101 	public static int LIVE_DRAG_MODE = 0;
102 
103 	/**
104 	 * OUTLINE_DRAG_MODE
105 	 */
106 	public static int OUTLINE_DRAG_MODE = 1;
107 
108 	/**
109 	 * uiClassID
110 	 */
111 	private static final String uiClassID = "DesktopPaneUI";
112 
113 
114 	//-------------------------------------------------------------
115 	// Variables --------------------------------------------------
116 	//-------------------------------------------------------------
117 
118 	/**
119 	 * selectedFrame
120 	 */
121 	private transient JInternalFrame selectedFrame;
122 
123         /**
124          * desktopManager
125          */
126 	private transient DesktopManager desktopManager;
127 
128 
129 	/**
130 	 * dragMode
131 	 */
132 	private int dragMode;
133 
134 
135 	//-------------------------------------------------------------
136 	// Initialization ---------------------------------------------
137 	//-------------------------------------------------------------
138 
139 	/**
140 	 * Constructor JDesktopPane
141 	 */
JDesktopPane()142 	public JDesktopPane() {
143 		// TODO
144 	} // JDesktopPane()
145 
146 
147 	//-------------------------------------------------------------
148 	// Methods ----------------------------------------------------
149 	//-------------------------------------------------------------
150 
151 	/**
152 	 * writeObject
153 	 * @param stream TODO
154 	 * @exception IOException TODO
155 	 */
writeObject(ObjectOutputStream stream)156 	private void writeObject(ObjectOutputStream stream) throws IOException {
157 		// TODO
158 	} // writeObject()
159 
160 	/**
161 	 * getUI
162 	 * @returns DesktopPaneUI
163 	 */
getUI()164 	public DesktopPaneUI getUI() {
165 		return (DesktopPaneUI) ui;
166 	} // getUI()
167 
168 	/**
169 	 * setUI
170 	 * @param ui TODO
171 	 */
setUI(DesktopPaneUI ui)172 	public void setUI(DesktopPaneUI ui) {
173 		super.setUI(ui);
174 	} // setUI()
175 
176 	/**
177 	 * setDragMode
178 	 * @param mode TODO
179 	 */
setDragMode(int mode)180 	public void setDragMode(int mode) {
181 		this.dragMode = mode;
182 		// TODO
183 	} // setDragMode()
184 
185 	/**
186 	 * getDragMode
187 	 * @returns int
188 	 */
getDragMode()189 	public int getDragMode() {
190 		return dragMode;
191 	} // getDragMode()
192 
193 	/**
194 	 * getDesktopManager
195 	 * @returns DesktopManager
196 	 */
getDesktopManager()197 	public DesktopManager getDesktopManager() {
198 		return desktopManager;
199 	} // getDesktopManager()
200 
201 	/**
202 	 * setDesktopManager
203 	 * @param manager TODO
204 	 */
setDesktopManager(DesktopManager manager)205 	public void setDesktopManager(DesktopManager manager) {
206 		this.desktopManager = manager;
207 		// TODO
208 	} // setDesktopManager()
209 
210 	/**
211 	 * updateUI
212 	 */
updateUI()213 	public void updateUI() {
214 		setUI((DesktopPaneUI) UIManager.get(this));
215 		invalidate();
216 	} // updateUI()
217 
218 	/**
219 	 * getUIClassID
220 	 * @returns String
221 	 */
getUIClassID()222 	public String getUIClassID() {
223 		return uiClassID;
224 	} // getUIClassID()
225 
226 	/**
227 	 * getAllFrames
228 	 * @returns JInternalFrame[]
229 	 */
getAllFrames()230 	public JInternalFrame[] getAllFrames() {
231 		return null; // TODO
232 	} // getAllFrames()
233 
234 	/**
235 	 * getSelectedFrame
236 	 * @returns JInternalFrame
237 	 */
getSelectedFrame()238 	public JInternalFrame getSelectedFrame() {
239 		return null; // TODO
240 	} // getSelectedFrame()
241 
242 	/**
243 	 * setSelectedFrame
244 	 * @param frame TODO
245 	 */
setSelectedFrame(JInternalFrame frame)246 	public void setSelectedFrame(JInternalFrame frame) {
247 		// TODO
248 	} // setSelectedFrame()
249 
250 	/**
251 	 * getAllFramesInLayer
252 	 * @param layer TODO
253 	 * @returns JInternalFrame[]
254 	 */
getAllFramesInLayer(int layer)255 	public JInternalFrame[] getAllFramesInLayer(int layer) {
256 		return null; // TODO
257 	} // getAllFramesInLayer()
258 
259 	/**
260 	 * isOpaque
261 	 * @returns boolean
262 	 */
isOpaque()263 	public boolean isOpaque() {
264 		return true;
265 	} // isOpaque()
266 
267 	/**
268 	 * paramString
269 	 * @returns String
270 	 */
paramString()271 	protected String paramString() {
272 		return null; // TODO
273 	} // paramString()
274 
275 	/**
276 	 * getAccessibleContext
277 	 * @returns AccessibleContext
278 	 */
getAccessibleContext()279 	public AccessibleContext getAccessibleContext() {
280 		if (accessibleContext == null) {
281 			accessibleContext = new AccessibleJDesktopPane(this);
282 		} // if
283 		return accessibleContext;
284 	} // getAccessibleContext()
285 
286 
287 } // JDesktopPane
288