root / trunk / frameworks / _fwAndami / src / com / iver / andami / ui / mdiManager / SingletonView.java @ 6877
History | View | Annotate | Download (2.25 KB)
1 | 1104 | fjp | /* 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 | 598 | fernando | package com.iver.andami.ui.mdiManager; |
42 | |||
43 | /**
|
||
44 | * Interfaz a implementar por aquellas ventanas que tengan
|
||
45 | * una identidad en la aplicaci?n. Por ejemplo en un
|
||
46 | * editor de textos mdi, habr? ventanas cuyo contenido
|
||
47 | * es un fichero y que no se desean abrir varias ventanas
|
||
48 | * con el mismo fichero. Para ello habr? que definir dicha
|
||
49 | * ventana como singleton y devolver en getViewModel la
|
||
50 | * identidad de dicha ventana. En el caso de ejemplo
|
||
51 | * podr?a valernos una cadena con la ruta del fichero.
|
||
52 | *
|
||
53 | * El framework act?a de la siguiente manera: Cuando se
|
||
54 | * a?ade una vista singleton, primero se busca en las que
|
||
55 | * hay a?adidas una cuyo getViewModel sea igual a la que
|
||
56 | * se quiere a?adir. En caso de que se encuentre se
|
||
57 | * traer? al frente dicha ventana. si no se encuentra s
|
||
58 | * muestra la vista a?adida
|
||
59 | *
|
||
60 | * @author Fernando Gonz?lez Cort?s
|
||
61 | */
|
||
62 | 6877 | cesar | public interface SingletonView extends IWindow { |
63 | 598 | fernando | /**
|
64 | * Obtiene el modelo de la vista, la identidad, el
|
||
65 | * objeto que se usar? para identificar la vista
|
||
66 | *
|
||
67 | * @return Object
|
||
68 | */
|
||
69 | public Object getViewModel(); |
||
70 | } |