Revision 42770 trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/mdiManager/MDIManager.java

View differences:

MDIManager.java
57 57
 * which will decide the final implementation of frames. A different frame
58 58
 * implementation could be used by switching the Skin.
59 59
 * </p>
60
 * 
60
 *
61 61
 * @see IWindow
62 62
 * @see WindowInfo
63 63
 * @see SingletonWindow
64 64
 *
65 65
 */
66 66
public interface MDIManager {
67
	
67

  
68 68
    /**
69 69
     * Initializes the MDIFrame. It must be called before starting
70 70
     * to use it. It receives the application's main frame
71
     * (MDIFrame) as parameter.  
71
     * (MDIFrame) as parameter.
72 72
     *
73 73
     * @param f Application's main frame.
74 74
     */
......
80 80
     * new window. The new frame's properties are set according to
81 81
     * the WindowInfo object from IWindow's <code>getWindowInfo()</code>
82 82
     * method.
83
     * The new frame is disposed when closed. 
83
     * The new frame is disposed when closed.
84 84
     * </p>
85 85
     * <p>
86 86
     * If the provided IWindow also implements SingletonWindow, and
......
93 93
     *
94 94
     * @return Returns the added IWindow, or in case it is a
95 95
     * SingletonWindow and there is another SingletonWindow with
96
     * the same model that it is already shown, returns this 
96
     * the same model that it is already shown, returns this
97 97
     * later SingletonWindow.
98 98
     */
99 99
    public IWindow addWindow(IWindow p) throws SingletonDialogAlreadyShownException;
100 100

  
101
    
101

  
102 102
    /*
103
     * Constants used by the method showWindow 
103
     * Constants used by the method showWindow
104 104
     */
105 105
    public final MODE WINDOW = WindowManager.MODE.WINDOW;
106 106
    public final MODE TOOL = WindowManager.MODE.TOOL;
107 107
    public final MODE DIALOG = WindowManager.MODE.DIALOG;
108
    
108

  
109 109
    /**
110
     * Useful method to simplify the presentation of a window. 
111
     * For more precise control over the behavior of the window 
110
     * Useful method to simplify the presentation of a window.
111
     * For more precise control over the behavior of the window
112 112
     * use addWindow
113
     * 
114
     * This methos 
113
     *
114
     * This methos
115 115
     * @param panel to show as a window
116 116
     * @param title title of the window
117 117
     * @param mode type of the window to create
......
122 122
     * Return the window associated to the SingletonWindow class and the model
123 123
     * specified. If not exists any singleton window associated to this
124 124
     * null is returned.
125
     * 
125
     *
126 126
     * @param windowClass, the class that implement SingletonWindow
127 127
     * @param model, the model associated to the SingletonWindow
128 128
     * @return the requested window or null.
129 129
     */
130 130
    public SingletonWindow getSingletonWindow(Class windowClass, Object model) ;
131
    
131

  
132 132
    /**
133 133
     * <p>
134 134
     * Creates a new frame with the provided contents, and shows this
135 135
     * new window. The new frame will be centered, regardless the
136 136
     * position specified in the WindowInfo object from IWindow's
137 137
     * <code>getWindowInfo()</code> method.
138
     * The new frame is disposed when closed. 
138
     * The new frame is disposed when closed.
139 139
     * </p>
140 140
     * <p>
141 141
     * If the provided IWindow also implements SingletonWindow, and
......
148 148
     *
149 149
     * @return Returns the added IWindow, or in case it is a
150 150
     * SingletonWindow and there is another SingletonWindow with
151
     * the same model that it is already shown, returns this 
151
     * the same model that it is already shown, returns this
152 152
     * later SingletonWindow.
153
     * 
153
     *
154 154
     * @author Pablo Piqueras Bartolom?
155 155
     */
156 156
    public IWindow addCentredWindow(IWindow p) throws SingletonDialogAlreadyShownException;
......
165 165
    public static final int ALIGN_PAGE_END = GridBagConstraints.PAGE_END;
166 166
    public static final int ALIGN_LAST_LINE_END = GridBagConstraints.LAST_LINE_END;
167 167
    public static final int ALIGN_CENTER = GridBagConstraints.CENTER;
168
    
168

  
169 169
    public IWindow addWindow(IWindow p, int align) throws SingletonDialogAlreadyShownException;
170 170

  
171 171
    /**
......
177 177
     * <p>
178 178
     * Modal windows and PALETTE windows are considered to be auxiliary windows,
179 179
     * that is the reason why they are not returned.
180
     * </p> 
180
     * </p>
181 181
     *
182 182
     * @return A reference to the active window, or null if there is no
183 183
     * active window
......
195 195
     * focused window
196 196
     */
197 197
    public IWindow getFocusWindow();
198
    
198

  
199 199
    public void moveToFrom(IWindow win);
200
    
200

  
201 201
    /**
202 202
     * Gets all the open windows. Minimized and maximized windows are
203 203
     * included. The application's main frame is excluded; it can be
......
206 206
     * @return An IWindow array containing all the open windows.
207 207
     */
208 208
    public IWindow[] getAllWindows();
209
    
209

  
210 210
    /**
211 211
     * Gets all the open windows (as {@link #getAllWindows()}),
212 212
     * but in this method the windows are returned in the same
......
221 221
    /**
222 222
     * Close the SingletonWindow whose class and model are provided as
223 223
     * parameters.
224
     * 
224
     *
225 225
     * @param viewClass Class of the window which is to be closed
226 226
     * @param model Model of the window which is to be closed
227 227
     *
......
260 260
     * @param v window whose information is to be retrieved
261 261
     *
262 262
     * @return WindowInfo The WindowInfo object containing the information
263
     * about the provided window 
264
     * 
263
     * about the provided window
264
     *
265 265
     * @see WindowInfo
266 266
     */
267 267
    public WindowInfo getWindowInfo(IWindow v);
......
274 274

  
275 275
    /**
276 276
     * Sets the normal cursor and unblocks events from main window.
277
     * 
277
     *
278 278
     * @see #setWaitCursor()
279 279
     */
280 280
    public void restoreCursor();
281 281

  
282 282
    /**
283 283
     * Maximizes or restores the provided window
284
     * 
285
     * @param v The window to be maximized or restored 
284
     *
285
     * @param v The window to be maximized or restored
286 286
     * @param bMaximum If true, the window will be maximized,
287 287
     *  if false, it will be restored
288 288
     * @throws PropertyVetoException
289 289
     */
290 290
    public void setMaximum(IWindow v, boolean bMaximum) throws PropertyVetoException;
291
    
291

  
292 292
    /**
293 293
     * Updates the window properties (size, location, etc) according to the
294 294
     * provided WindowInfo object.
295
     * 
295
     *
296 296
     * @param v The window whose properties are to be changed
297 297
     * @param vi The WindowInfo object containing the new properties to be set
298 298
     */
299 299
    public void changeWindowInfo(IWindow v, WindowInfo vi);
300
    
300

  
301 301
    /**
302 302
     * Forces a window to be repainted. Normally, this is not necessary,
303 303
     * as windows are refreshed when necessary.
304
     * 
304
     *
305 305
     * @param win The window to be refreshed.
306 306
     */
307 307
    public void refresh(IWindow win);
......
310 310
     * Sets the provided image as background image in the main window. The image
311 311
     * will be centered, set in mosaic or expanded to fill the full window,
312 312
     * depending on the <code>typeDesktop</code> argument.
313
     * 
313
     *
314 314
     * @param image The image to be set as background image
315 315
     * @param typeDesktop Decides whether the image should be centered, set
316 316
     * in mosaic or expanded. Accepted values are: Theme.CENTERED,
317 317
     * Theme.MOSAIC and Theme.EXPAND.
318 318
     */
319 319
    public void setBackgroundImage(ImageIcon image, String typeDesktop);
320
    
320

  
321 321
    public void setLocale(Locale locale);
322
      
322

  
323
    /**
324
     * Gets the associated IWindow to the panel shown with showWindow method.
325
     * Also panel shown with the tools WindowManager.
326
     *
327
     * @param panel
328
     * @return
329
     */
330
    public IWindow getWindow(JPanel panel);
331

  
323 332
}

Also available in: Unified diff