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