root / tags / v1_1_Build_1009 / frameworks / _fwAndami / src / com / iver / andami / ui / mdiManager / SingletonWindow.java @ 12649
History | View | Annotate | Download (2.54 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU General Public License
|
7 |
* as published by the Free Software Foundation; either version 2
|
8 |
* of the License, or (at your option) any later version.
|
9 |
*
|
10 |
* This program is distributed in the hope that it will be useful,
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
* GNU General Public License for more details.
|
14 |
*
|
15 |
* You should have received a copy of the GNU General Public License
|
16 |
* along with this program; if not, write to the Free Software
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
18 |
*
|
19 |
* For more information, contact:
|
20 |
*
|
21 |
* Generalitat Valenciana
|
22 |
* Conselleria d'Infraestructures i Transport
|
23 |
* Av. Blasco Ib??ez, 50
|
24 |
* 46010 VALENCIA
|
25 |
* SPAIN
|
26 |
*
|
27 |
* +34 963862235
|
28 |
* gvsig@gva.es
|
29 |
* www.gvsig.gva.es
|
30 |
*
|
31 |
* or
|
32 |
*
|
33 |
* IVER T.I. S.A
|
34 |
* Salamanca 50
|
35 |
* 46005 Valencia
|
36 |
* Spain
|
37 |
*
|
38 |
* +34 963163400
|
39 |
* dac@iver.es
|
40 |
*/
|
41 |
package com.iver.andami.ui.mdiManager; |
42 |
|
43 |
/**
|
44 |
* <p>Interface which should be implemented by those windows
|
45 |
* which have an identity in the application. Each
|
46 |
* SingletonWindow has an associated model, which identifies
|
47 |
* the window, and thus it is not possible to create two
|
48 |
* SingletonWindow with the same model.</p>
|
49 |
*
|
50 |
* <p>For example,
|
51 |
* if a window contains a text file, maybe it is not suitable to open
|
52 |
* two windows to edit the same file. To accomplish this, the edit
|
53 |
* window should implement this interface, and the model associated
|
54 |
* with the window will be the path to the text file. Then, if the user
|
55 |
* tries to open an already open file, the existing window containing
|
56 |
* the file will be shown to the user, instead of opening a new one.</p>
|
57 |
*
|
58 |
* <p>When opening a new SingletonWindow, the framework works in the
|
59 |
* following way: all the already open SingletonWindow are searched to try
|
60 |
* to find a window which has the same model as the new one. If such window
|
61 |
* is found, it is sent to the foreground and no new window is opened;
|
62 |
* otherwise, the new window is shown.
|
63 |
* </p>
|
64 |
*
|
65 |
* @author Fernando Gonz?lez Cort?s
|
66 |
*/
|
67 |
public interface SingletonWindow extends IWindow { |
68 |
/**
|
69 |
* Gets the window model, the identity, the object which will be used
|
70 |
* to identify te window.
|
71 |
*
|
72 |
* @return Object
|
73 |
*/
|
74 |
public Object getWindowModel(); |
75 |
} |