KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openide > windows > Workspace


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 package org.openide.windows;
20
21 import java.awt.Rectangle JavaDoc;
22
23 import java.beans.PropertyChangeListener JavaDoc;
24
25 import java.io.Serializable JavaDoc;
26
27 import java.net.URL JavaDoc;
28
29 import java.util.Set JavaDoc;
30
31
32 /** Represents one user workspace that holds a list of modes into which
33  * components can be assigned.
34  * Created by WindowManager.
35  * When serialized only keeps "weak" reference to this workspace does not
36  * stores the content of the workspace (it is responsibility of window manager).
37  *
38  * <p><p>
39  * <b><font color="red"><em>Important note: Do not provide implementation of this interface unless you are window system provider!</em></font></b>
40  *
41  * @author Jaroslav Tulach
42  * @deprecated Do not use any more. Use {@link WindowManager} methods directly,
43  * e.g. {@link WindowManager#getModes()} etc.
44  */

45 public interface Workspace extends Serializable JavaDoc {
46     /** Name of property for modes in the workspace.
47      * @deprecated Use {@link WindowManager#PROP_MODES} instead. */

48     public static final String JavaDoc PROP_MODES = WindowManager.PROP_MODES; // TEMP
49

50     /** Name of property for the programmatic name of this workspace.
51       * @deprecated Do no use. It is redundant. */

52     public static final String JavaDoc PROP_NAME = "name"; // NOI18N
53

54     /** Name of property for the display name of this workspace.
55      * @deprecated Do no use. It is redundant. */

56     public static final String JavaDoc PROP_DISPLAY_NAME = "displayName"; // NOI18N
57

58     /**
59      * Do not use.
60      * @deprecated Only public by accident.
61      */

62
63     /* public static final */ long serialVersionUID = 2987897537843190271L;
64
65     /**
66      * Gets the unique programmatic name of this workspace.
67      * Used e.g. by {@link WindowManager#findWorkspace}.
68      * @return the code name of this workspace
69      * @deprecated Do no use. It is redundant. */

70     public String JavaDoc getName();
71
72     /** Get human-presentable name of the workspace which
73      * will be used for displaying.
74      * @return the display name of the workspace
75      * @deprecated Do no use. It is redundant. */

76     public String JavaDoc getDisplayName();
77
78     /**
79      * Gets a list of all modes on this workspace.
80      * @return a set of all {@link Mode}s known on this workspace
81      * @deprecated Use {@link WindowManager#getModes} instead. */

82     public Set JavaDoc<? extends Mode> getModes();
83
84     /** Get bounds of the workspace. Returned value has slighly different
85      * meaning for SDI and MDI mode. Modules should use this method for
86      * correct positioning of their windows.
87      * @return In SDI, returns bounds relative to whole screen, returns bounds
88      * of the part of screen below main window (or above main window, if main
89      * window is on bottom part of the screen).<br>
90      * In MDI, bounds are relative to the main window; returned value represents
91      * 'client area' of the main window
92      * @deprecated Do no use. It is redundant. */

93     public Rectangle JavaDoc getBounds();
94
95     /** Activates this workspace to be current one.
96      * This leads to change of current workspace of the WindowManager.
97      * @deprecated Do no use. It is redundant. */

98     public void activate();
99
100     /** Create a new mode.
101     * @param name a unique programmatic name of the mode
102     * @param displayName a human presentable (probably localized) name
103     * of the mode (may be used by
104                          the <b>Dock&nbsp;Into</b> submenu, e.g.)
105     * @param icon a URL to the icon to use for the mode (e.g. on a tab or window corner);
106     * may be <code>null</code>
107     * @return the new mode
108     * @deprecated Do no use. It is redundant. Currently it returns default predefined <code>Mode</code> instance. */

109     public Mode createMode(String JavaDoc name, String JavaDoc displayName, URL JavaDoc icon);
110
111     /** Search all modes on this workspace by name.
112      * @param name the name of the mode to search for
113      * @return the mode with that name, or <code>null</code> if no such mode
114      * can be found
115      * @deprecated Use {@link WindowManager#findMode(String)} instead. */

116     public Mode findMode(String JavaDoc name);
117
118     /** Finds mode the component is in on this workspace.
119      *
120      * @param c component to find mode for
121      * @return the mode or null if the component is not visible on this workspace
122      * @deprecated Use {@link WindowManager#findMode(TopComponent)} instead. */

123     public Mode findMode(TopComponent c);
124
125     /** Removes this workspace from set of workspaces
126      * in window manager.
127      * @deprecated Do no use. It is redundant. */

128     public void remove();
129
130     /** Add a property change listener.
131      * @param list the listener to add
132      * @deprecated Use {@link WindowManager#addPropertyChangeListener} instead. */

133     public void addPropertyChangeListener(PropertyChangeListener JavaDoc list);
134
135     /** Remove a property change listener.
136      * @param list the listener to remove
137      * @deprecated Use {@link WindowManager#removePropertyChangeListener} instead. */

138     public void removePropertyChangeListener(PropertyChangeListener JavaDoc list);
139 }
140
Popular Tags