Revision 3308
branches/Coreplugin_CAD/libraries/libCorePlugin/text_en.properties | ||
---|---|---|
1 |
#text_en.properties |
|
2 |
__catalan=valencian |
|
3 |
aceptar=OK |
|
4 |
cancelar=Cancel |
|
5 |
Cascada=Cascade |
|
6 |
cascada_enable=There must be at least one visible window |
|
7 |
cascada_tooltip=Arrange windows in cascade |
|
8 |
Configurar=Configure |
|
9 |
configurar_ANDAMI=ANDAMI configuration dialog. |
|
10 |
Consola=Console |
|
11 |
descripcion=Description |
|
12 |
directorio=Directory |
|
13 |
directorio_extensiones=Extensions directory. |
|
14 |
errores=Errors |
|
15 |
examinar=Examine |
|
16 |
extension_activada=Active extension. |
|
17 |
general=General |
|
18 |
info=Information |
|
19 |
opciones=Options |
|
20 |
prioridad=Priority |
|
21 |
Tile=Tile |
|
22 |
tile_tooltip=Arrange the windows in tile |
|
23 |
titulo_consola=Information console |
|
24 |
todos=All |
|
25 |
ventana=Window |
|
26 |
Ver=Show |
|
27 |
warnings=Warnings |
|
28 |
Window=Window |
|
0 | 29 |
branches/Coreplugin_CAD/libraries/libCorePlugin/config.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<plugin-config> |
|
3 |
<libraries library-dir="."/> |
|
4 |
<resourceBundle name="text"/> |
|
5 |
<extensions> |
|
6 |
<extension class-name="com.iver.core.Consola" |
|
7 |
description="Extensi?n encargada de abrir la ventana de la consola." |
|
8 |
active="true" priority="1"> |
|
9 |
<menu text="Ver/Consola" action-command="unico" key="s" |
|
10 |
mnemonic="c" icon="images/console.png" |
|
11 |
tooltip="muestra_consola_tooltip" |
|
12 |
position="0"/> |
|
13 |
<tool-bar name="core"> |
|
14 |
<action-tool icon="images/console.png" |
|
15 |
action-command="consola" tooltip="muestra_consola_tooltip" |
|
16 |
enable-text="debe_estar_activada" last="true"/> |
|
17 |
</tool-bar> |
|
18 |
</extension> |
|
19 |
<extension class-name="com.iver.core.ConfigExtension" |
|
20 |
description="Extensi?n encargada de abrir la ventana de configuraci?n de ANDAMI." |
|
21 |
active="true" priority="2"> |
|
22 |
<menu text="ventana/Configurar" action-command="config" |
|
23 |
mnemonic="p" icon="images/config.png" |
|
24 |
tooltip="configuracion_andami_tooltip" |
|
25 |
position="2"/> |
|
26 |
<tool-bar name="core"> |
|
27 |
<action-tool icon="images/config.png" |
|
28 |
action-command="configuracion" tooltip="configuracion_andami_tooltip" |
|
29 |
enable-text="debe_estar_activada"/> |
|
30 |
</tool-bar> |
|
31 |
</extension> |
|
32 |
|
|
33 |
<extension class-name="com.iver.core.StatusBar" |
|
34 |
description="Recoge los mensajes del NotificationManager y los muestra por la StatusBar" |
|
35 |
active="true"> |
|
36 |
</extension> |
|
37 |
<skin-extension class-name="com.iver.core.mdiManager.NewSkin"> |
|
38 |
<menu text="ventana/Cascada" action-command="cascada" key="c" |
|
39 |
mnemonic="c" tooltip="cascada_tooltip"/> |
|
40 |
<menu text="ventana/Tile" action-command="mosaico" key="m" |
|
41 |
mnemonic="c" tooltip="mosaico_tooltip"/> |
|
42 |
</skin-extension> |
|
43 |
</extensions> |
|
44 |
</plugin-config> |
|
45 |
|
|
46 |
<!-- |
|
47 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
48 |
<!DOCTYPE plugin SYSTEM "../../plugin.dtd"> |
|
49 |
<plugin> |
|
50 |
<libraries> |
|
51 |
<library file="com.iver.core.jar"/> |
|
52 |
<library file="prulib.jar"/> |
|
53 |
</libraries> |
|
54 |
<resourceBundle name="text"/> |
|
55 |
<labelSet class="com.iver.core.ConsolaFrame"> |
|
56 |
<label text="label1"/> |
|
57 |
<label text="label2"/> |
|
58 |
</labelSet> |
|
59 |
<extension> |
|
60 |
<class name="com.iver.core.Consola"/> |
|
61 |
<menu text="Ver/Consola" key="s"/> |
|
62 |
<toolBar name="Ver"> |
|
63 |
<tool icon="images/console.jpg" |
|
64 |
actionCommand="CONSOLA"/> |
|
65 |
</toolBar> |
|
66 |
</extension> |
|
67 |
<extension> |
|
68 |
<class name="com.iver.core.Cascade"/> |
|
69 |
<menu text="Window/Tile" key="t" mnemonic="t" |
|
70 |
tooltip="tile_tooltip" |
|
71 |
enableText="cascada_enable" |
|
72 |
actionCommand="TILE"/> |
|
73 |
<menu text="Window/Cascada" key="c" mnemonic="c" |
|
74 |
tooltip="cascada_tooltip" |
|
75 |
enableText="cascada_enable" |
|
76 |
actionCommand="CASCADA"/> |
|
77 |
<toolBar name="Window"> |
|
78 |
<tool icon="images/cascada.gif" |
|
79 |
tooltip="cascada_tooltip" |
|
80 |
enableText="cascada_enable" |
|
81 |
actionCommand="CASCADA"/> |
|
82 |
<tool icon="images/tile.gif" |
|
83 |
tooltip="tile_tooltip" |
|
84 |
enableText="cascada_enable" |
|
85 |
actionCommand="TILE"/> |
|
86 |
</toolBar> |
|
87 |
<popupMenu name="cascada"> |
|
88 |
<entry text="Cascada" |
|
89 |
tooltip="cascada_tooltip" |
|
90 |
enableText="cascada_enable" actionCommand="CASCADA"/> |
|
91 |
<entry text="Tile" |
|
92 |
tooltip="tile_tooltip" |
|
93 |
enableText="cascada_enable" actionCommand="CASCADA"/> |
|
94 |
</popupMenu> |
|
95 |
</extension> |
|
96 |
<extension> |
|
97 |
<class name="com.iver.core.StatusBar"/> |
|
98 |
</extension> |
|
99 |
</plugin> |
|
100 |
--> |
|
0 | 101 |
branches/Coreplugin_CAD/libraries/libCorePlugin/text_cs.properties | ||
---|---|---|
1 |
#text_cs.properties |
|
2 |
__catalan=valencian |
|
3 |
aceptar=Ok |
|
4 |
cancelar=Zru\u0161it |
|
5 |
Cascada=Kask\u00E1da |
|
6 |
cascada_enable=Alespo\u0148 jedno okno mus\u00ED b\u00FDt viditeln\u00E9 |
|
7 |
cascada_tooltip=Se\u0159adit okna do kask\u00E1dy |
|
8 |
Configurar=Konfigurovat |
|
9 |
configurar_ANDAMI=ANDAMI konfigura\u010Dn\u00ED dialog. |
|
10 |
Consola=Konzola |
|
11 |
descripcion=Popis |
|
12 |
directorio=Adres\u00E1\u0159 |
|
13 |
directorio_extensiones=Adres\u00E1\u0159 extenz\u00ED. |
|
14 |
errores=Chyby |
|
15 |
examinar=Prohl\u00E9dnout |
|
16 |
extension_activada=Aktivn\u00ED extenze. |
|
17 |
general=Obecn\u00FD |
|
18 |
info=Informace |
|
19 |
opciones=Mo\u017Enosti |
|
20 |
prioridad=Priorita |
|
21 |
Tile=Dla\u017Edice |
|
22 |
tile_tooltip=Dla\u017Edicov\u011B se\u0159adit okna |
|
23 |
titulo_consola=Informa\u010Dn\u00ED konzola |
|
24 |
todos=V\u0161e |
|
25 |
ventana=Okno |
|
26 |
Ver=Pohled |
|
27 |
warnings=Varov\u00E1n\u00ED |
|
28 |
Window=Okno |
|
0 | 29 |
branches/Coreplugin_CAD/libraries/libCorePlugin/text_pt_br.properties | ||
---|---|---|
1 |
#text_pt_br.properties |
|
2 |
__catalan=valenciano |
|
3 |
aceptar=OK |
|
4 |
cancelar=Cancelar |
|
5 |
Cascada=Cascata |
|
6 |
cascada_enable=Deve existir ao menos um quadro vis\u00EDvel |
|
7 |
cascada_tooltip=Arranjar janelas em cascata |
|
8 |
Configurar=Configurar |
|
9 |
configurar_ANDAMI=Di\u00E1log de configura\u00E7\u00E3o do ANDAMI. |
|
10 |
Consola=Console |
|
11 |
descripcion=Descri\u00E7\u00E3o |
|
12 |
directorio=Diret\u00F3rio |
|
13 |
directorio_extensiones=Diret\u00F3rio de extens\u00F5es |
|
14 |
errores=Erro |
|
15 |
examinar=Examinar |
|
16 |
extension_activada=Extens\u00E3o ativa. |
|
17 |
general=Geral |
|
18 |
info=Informa\u00E7\u00E3o |
|
19 |
opciones=Op\u00E7\u00F5es |
|
20 |
prioridad=Prioridade |
|
21 |
Tile=Lado a Lado |
|
22 |
tile_tooltip=Arranjar a janela Lado a Lado |
|
23 |
titulo_consola=Informa\u00E7\u00E3o de console |
|
24 |
todos=Todos |
|
25 |
ventana=Janela |
|
26 |
Ver=Vis\u00E3o |
|
27 |
warnings=Aviso |
|
28 |
Window=Janela |
|
0 | 29 |
branches/Coreplugin_CAD/libraries/libCorePlugin/text_fr.properties | ||
---|---|---|
1 |
#text_fr.properties |
|
2 |
__catalan=valencien |
|
3 |
aceptar=Accepter |
|
4 |
cancelar=Annuler |
|
5 |
Cascada=Cascade |
|
6 |
cascada_enable=Au moins une fen\u00EAtre doit \u00EAtre ouverte |
|
7 |
cascada_tooltip=Organiser les fen\u00EAtres en cascade |
|
8 |
Configurar=Configurer |
|
9 |
configurar_ANDAMI=Fen\u00EAtre de configuration d'ANDAMI. |
|
10 |
Consola=Console |
|
11 |
descripcion=Description |
|
12 |
directorio=R\u00E9pertoire |
|
13 |
directorio_extensiones=R\u00E9pertoire des extensions |
|
14 |
errores=Erreurs |
|
15 |
examinar=Examiner |
|
16 |
extension_activada=Extension activ\u00E9e. |
|
17 |
general=G\u00E9n\u00E9ral |
|
18 |
info=Information |
|
19 |
opciones=Options |
|
20 |
prioridad=Priorit\u00E9 |
|
21 |
Tile=Mosa\u00EFque |
|
22 |
tile_tooltip=Organiser les fen\u00EAtres en mosa\u00EFque |
|
23 |
titulo_consola=Console d'information |
|
24 |
todos=Tous |
|
25 |
ventana=Fen\u00EAtre |
|
26 |
Ver=Afficher |
|
27 |
warnings=Attention |
|
28 |
Window=Fen\u00EAtre |
|
0 | 29 |
branches/Coreplugin_CAD/libraries/libCorePlugin/text_eu.properties | ||
---|---|---|
1 |
#text_eu.properties |
|
2 |
__catalan=valenciano |
|
3 |
aceptar=Ados |
|
4 |
cancelar=Utzi |
|
5 |
Cascada=Kaskadan |
|
6 |
cascada_enable=Leiho bat, gutxienez, irekita egon behar da |
|
7 |
cascada_tooltip=Antolatu leihoak kaskadan |
|
8 |
Configurar=Konfiguratu |
|
9 |
configurar_ANDAMI=ANDAMIren konfigurazio-elkarrizketa. |
|
10 |
Consola=Kontsola |
|
11 |
descripcion=Deskripzioa |
|
12 |
directorio=Direktorioa |
|
13 |
directorio_extensiones=Luzapenen direktorioa. |
|
14 |
errores=Erroreak |
|
15 |
examinar=Aztertu |
|
16 |
extension_activada=Luzapena gaituta. |
|
17 |
general=Orokorra |
|
18 |
info=Informazioa |
|
19 |
opciones=Aukerak |
|
20 |
prioridad=Lehentasuna |
|
21 |
Tile=Mosaikoan |
|
22 |
tile_tooltip=Antolatu leihoak mosaikoan |
|
23 |
titulo_consola=Informazio-kontsola |
|
24 |
todos=Denak |
|
25 |
ventana=Leihoa |
|
26 |
Ver=Ikusi |
|
27 |
warnings=Oharrak |
|
28 |
Window=Leihoa |
|
0 | 29 |
branches/Coreplugin_CAD/libraries/libCorePlugin/text_it.properties | ||
---|---|---|
1 |
#text_it.properties |
|
2 |
__catalan=valenciano |
|
3 |
aceptar=Accetta |
|
4 |
cancelar=Cancella |
|
5 |
Cascada=Cascata |
|
6 |
cascada_enable=Devi aprire almeno una finestra |
|
7 |
cascada_tooltip=Organizza le finestre a cascata |
|
8 |
Configurar=Configura |
|
9 |
configurar_ANDAMI=Dialogo di confogurazione di ANDAMI |
|
10 |
Consola=Console |
|
11 |
descripcion=Descrizione |
|
12 |
directorio=Registro |
|
13 |
directorio_extensiones=Registro delle estensioni |
|
14 |
errores=Errori |
|
15 |
examinar=Esaminare |
|
16 |
extension_activada=Estensione attivata |
|
17 |
general=Generale |
|
18 |
info=Informazione |
|
19 |
opciones=Opzioni |
|
20 |
prioridad=Priorit\u00E1 |
|
21 |
Tile=Mosaico |
|
22 |
tile_tooltip=Organizza le finestre a mosaico |
|
23 |
titulo_consola=Console di informazione |
|
24 |
todos=Tutti |
|
25 |
ventana=Finestra |
|
26 |
Ver=Vedi |
|
27 |
warnings=Avisi |
|
28 |
Window=Finestra |
|
0 | 29 |
branches/Coreplugin_CAD/libraries/libCorePlugin/.cvsignore | ||
---|---|---|
1 |
bin |
|
0 | 2 |
branches/Coreplugin_CAD/libraries/libCorePlugin/text.properties | ||
---|---|---|
1 |
#text.properties |
|
2 |
__catalan=valenciano |
|
3 |
aceptar=Aceptar |
|
4 |
cancelar=Cancelar |
|
5 |
Cascada=Cascada |
|
6 |
cascada_enable=Debe haber al menos una ventana abierta |
|
7 |
cascada_tooltip=Organiza las ventanas en cascada |
|
8 |
Configurar=Configurar |
|
9 |
configurar_ANDAMI=Di\u00E1logo de configuraci\u00F3n de ANDAMI. |
|
10 |
Consola=Consola |
|
11 |
descripcion=Descripci\u00F3n |
|
12 |
directorio=Directorio |
|
13 |
directorio_extensiones=Directorio de las extensiones. |
|
14 |
errores=Errores |
|
15 |
examinar=Examinar |
|
16 |
extension_activada=Extensi\u00F3n activada. |
|
17 |
general=General |
|
18 |
info=Informacion |
|
19 |
opciones=Opciones |
|
20 |
prioridad=Prioridad |
|
21 |
Tile=Mosaico |
|
22 |
tile_tooltip=Organiza las ventanas en mosaico |
|
23 |
titulo_consola=Consola de informacion |
|
24 |
todos=Todos |
|
25 |
ventana=Ventana |
|
26 |
Ver=Ver |
|
27 |
warnings=Avisos |
|
28 |
Window=Ventana |
|
0 | 29 |
branches/Coreplugin_CAD/libraries/libCorePlugin/text_ca.properties | ||
---|---|---|
1 |
#text_ca.properties |
|
2 |
__catalan=valenci\u00E0 |
|
3 |
aceptar=Acceptar |
|
4 |
cancelar=Cancel\u00B7lar |
|
5 |
Cascada=Cascada |
|
6 |
cascada_enable=Ha d'haver-hi almenys una finestra oberta |
|
7 |
cascada_tooltip=Organitzar les finestres en cascada |
|
8 |
Configurar=Configurar |
|
9 |
configurar_ANDAMI=Di\u00E0leg de configuraci\u00F3 d'ANDAMI |
|
10 |
Consola=Consola |
|
11 |
descripcion=Descripci\u00F3 |
|
12 |
directorio=Directori |
|
13 |
directorio_extensiones=Directori de les extensions |
|
14 |
errores=Errors |
|
15 |
examinar=Examinar |
|
16 |
extension_activada=Extensi\u00F3 activada |
|
17 |
general=General |
|
18 |
info=Informaci\u00F3 |
|
19 |
opciones=Opcions |
|
20 |
prioridad=Prioritat |
|
21 |
Tile=Mosaic |
|
22 |
tile_tooltip=Organitzar les finestres en mosaic |
|
23 |
titulo_consola=Consola d'informaci\u00F3 |
|
24 |
todos=Tots |
|
25 |
ventana=Finestra |
|
26 |
Ver=Veure |
|
27 |
warnings=Avisos |
|
28 |
Window=Finestra |
|
0 | 29 |
branches/Coreplugin_CAD/libraries/libCorePlugin/text_pt.properties | ||
---|---|---|
1 |
#text_pt.properties |
|
2 |
__catalan=valenciano |
|
3 |
aceptar=OK |
|
4 |
cancelar=Cancelar |
|
5 |
Cascada=Cascata |
|
6 |
cascada_enable=Deve existir ao menos um quadro vis\u00EDvel |
|
7 |
cascada_tooltip=Arranjar janelas em cascata |
|
8 |
Configurar=Configurar |
|
9 |
configurar_ANDAMI=Di\u00E1log de configura\u00E7\u00E3o do ANDAMI. |
|
10 |
Consola=Console |
|
11 |
descripcion=Descri\u00E7\u00E3o |
|
12 |
directorio=Diret\u00F3rio |
|
13 |
directorio_extensiones=Diret\u00F3rio de extens\u00F5es |
|
14 |
errores=Erro |
|
15 |
examinar=Examinar |
|
16 |
extension_activada=Extens\u00E3o ativa. |
|
17 |
general=Geral |
|
18 |
info=Informa\u00E7\u00E3o |
|
19 |
opciones=Op\u00E7\u00F5es |
|
20 |
prioridad=Prioridade |
|
21 |
Tile=Lado a Lado |
|
22 |
tile_tooltip=Arranjar a janela Lado a Lado |
|
23 |
titulo_consola=Informa\u00E7\u00E3o de console |
|
24 |
todos=Todos |
|
25 |
ventana=Janela |
|
26 |
Ver=Ver |
|
27 |
warnings=Aviso |
|
28 |
Window=Janela |
|
0 | 29 |
branches/Coreplugin_CAD/libraries/libCorePlugin/.project | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<projectDescription> |
|
3 |
<name>CorePlugin</name> |
|
4 |
<comment></comment> |
|
5 |
<projects> |
|
6 |
</projects> |
|
7 |
<buildSpec> |
|
8 |
<buildCommand> |
|
9 |
<name>org.eclipse.jdt.core.javabuilder</name> |
|
10 |
<arguments> |
|
11 |
</arguments> |
|
12 |
</buildCommand> |
|
13 |
</buildSpec> |
|
14 |
<natures> |
|
15 |
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature> |
|
16 |
<nature>org.eclipse.jdt.core.javanature</nature> |
|
17 |
<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature> |
|
18 |
</natures> |
|
19 |
</projectDescription> |
|
0 | 20 |
branches/Coreplugin_CAD/libraries/libCorePlugin/src/com/iver/core/ConfigExtension.java | ||
---|---|---|
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.core; |
|
42 |
|
|
43 |
|
|
44 |
/** |
|
45 |
*/ |
|
46 |
import com.iver.andami.PluginServices; |
|
47 |
import com.iver.andami.plugins.Extension; |
|
48 |
import com.iver.core.configExtensions.ConfigPlugins; |
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
/** |
|
53 |
* Extensi?n para abrir el di?logo de configuraci?n de ANDAMI. |
|
54 |
* |
|
55 |
* @author Vicente Caballero Navarro |
|
56 |
* |
|
57 |
* |
|
58 |
*/ |
|
59 |
public class ConfigExtension implements Extension { |
|
60 |
|
|
61 |
/* (non-Javadoc) |
|
62 |
* @see com.iver.andami.plugins.Extension#execute(java.lang.String) |
|
63 |
*/ |
|
64 |
public void execute(String actionCommand) { |
|
65 |
ConfigPlugins cp=new ConfigPlugins(); |
|
66 |
PluginServices.getMDIManager().addView(cp); |
|
67 |
} |
|
68 |
|
|
69 |
/** |
|
70 |
* DOCUMENT ME! |
|
71 |
* |
|
72 |
* @return DOCUMENT ME! |
|
73 |
*/ |
|
74 |
public boolean isVisible() { |
|
75 |
return true; |
|
76 |
} |
|
77 |
|
|
78 |
/** |
|
79 |
* @see com.iver.mdiApp.plugins.Extension#isEnabled() |
|
80 |
*/ |
|
81 |
public boolean isEnabled() { |
|
82 |
return true; |
|
83 |
} |
|
84 |
|
|
85 |
/** |
|
86 |
* @see com.iver.andami.plugins.Extension#inicializar() |
|
87 |
*/ |
|
88 |
public void inicializar() { |
|
89 |
} |
|
90 |
} |
|
0 | 91 |
branches/Coreplugin_CAD/libraries/libCorePlugin/src/com/iver/core/mdiManager/DialogStackSupport.java | ||
---|---|---|
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.core.mdiManager; |
|
42 |
|
|
43 |
import java.awt.Cursor; |
|
44 |
import java.util.ArrayList; |
|
45 |
import java.util.Iterator; |
|
46 |
|
|
47 |
import javax.swing.JDialog; |
|
48 |
|
|
49 |
import org.apache.log4j.Logger; |
|
50 |
|
|
51 |
import com.iver.andami.ui.mdiFrame.MDIFrame; |
|
52 |
|
|
53 |
|
|
54 |
/** |
|
55 |
* |
|
56 |
*/ |
|
57 |
public class DialogStackSupport{ |
|
58 |
/** log */ |
|
59 |
private static Logger logger = Logger.getLogger(DialogStackSupport.class.getName()); |
|
60 |
|
|
61 |
/** Pila de di?logos modales mostrados */ |
|
62 |
private ArrayList dialogStack = new ArrayList(0); |
|
63 |
|
|
64 |
private ArrayList dialogCursors = new ArrayList(0); |
|
65 |
|
|
66 |
public DialogStackSupport(MDIFrame frame){ |
|
67 |
} |
|
68 |
|
|
69 |
public void pushDialog(JDialog dlg){ |
|
70 |
dialogStack.add(dlg); |
|
71 |
} |
|
72 |
|
|
73 |
public JDialog popDialog(){ |
|
74 |
return (JDialog) dialogStack.remove(dialogStack.size() - 1); |
|
75 |
} |
|
76 |
|
|
77 |
/** |
|
78 |
* @return |
|
79 |
*/ |
|
80 |
public void setWaitCursor() { |
|
81 |
dialogCursors.clear(); |
|
82 |
for (Iterator iter = dialogStack.iterator(); iter.hasNext();) { |
|
83 |
JDialog dlg = (JDialog) iter.next(); |
|
84 |
dialogCursors.add(dlg.getCursor()); |
|
85 |
dlg.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); |
|
86 |
dlg.getGlassPane().setVisible(true); |
|
87 |
} |
|
88 |
} |
|
89 |
|
|
90 |
/** |
|
91 |
* |
|
92 |
*/ |
|
93 |
public void restoreCursor() { |
|
94 |
for (Iterator iter = dialogStack.iterator(); iter.hasNext();) { |
|
95 |
JDialog dlg = (JDialog) iter.next(); |
|
96 |
|
|
97 |
// TODO: RECUPERAR EL CURSOR |
|
98 |
dlg.setCursor(null); |
|
99 |
dlg.getGlassPane().setVisible(false); |
|
100 |
} |
|
101 |
} |
|
102 |
} |
|
0 | 103 |
branches/Coreplugin_CAD/libraries/libCorePlugin/src/com/iver/core/mdiManager/FrameViewSupport.java | ||
---|---|---|
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.core.mdiManager; |
|
42 |
|
|
43 |
import java.awt.Component; |
|
44 |
import java.awt.Image; |
|
45 |
import java.util.Hashtable; |
|
46 |
import java.util.Iterator; |
|
47 |
|
|
48 |
import javax.swing.ImageIcon; |
|
49 |
import javax.swing.JDialog; |
|
50 |
import javax.swing.JFrame; |
|
51 |
import javax.swing.JInternalFrame; |
|
52 |
import javax.swing.JPanel; |
|
53 |
|
|
54 |
import com.iver.andami.ui.mdiFrame.MDIFrame; |
|
55 |
import com.iver.andami.ui.mdiManager.View; |
|
56 |
import com.iver.andami.ui.mdiManager.ViewInfo; |
|
57 |
|
|
58 |
|
|
59 |
/** |
|
60 |
* |
|
61 |
*/ |
|
62 |
public class FrameViewSupport { |
|
63 |
private Hashtable frameView = new Hashtable(); |
|
64 |
private Hashtable viewFrame = new Hashtable(); |
|
65 |
private Image icon; |
|
66 |
private ViewInfoSupport vis; |
|
67 |
private JFrame mainFrame; |
|
68 |
|
|
69 |
/** |
|
70 |
* Creates a new FrameViewSupport object. |
|
71 |
* |
|
72 |
* @param i DOCUMENT ME! |
|
73 |
*/ |
|
74 |
public FrameViewSupport(MDIFrame mainFrame) { |
|
75 |
this.mainFrame = mainFrame; |
|
76 |
icon = mainFrame.getIconImage(); |
|
77 |
} |
|
78 |
|
|
79 |
public Iterator getViewIterator(){ |
|
80 |
return viewFrame.keySet().iterator(); |
|
81 |
} |
|
82 |
|
|
83 |
public boolean contains(View v){ |
|
84 |
return viewFrame.containsKey(v); |
|
85 |
} |
|
86 |
|
|
87 |
/** |
|
88 |
* @param wnd |
|
89 |
* @return |
|
90 |
*/ |
|
91 |
public boolean contains(JInternalFrame wnd) { |
|
92 |
return frameView.contains(wnd); |
|
93 |
} |
|
94 |
|
|
95 |
/** |
|
96 |
* DOCUMENT ME! |
|
97 |
* |
|
98 |
* @param p DOCUMENT ME! |
|
99 |
* |
|
100 |
* @return DOCUMENT ME! |
|
101 |
*/ |
|
102 |
public JDialog getJDialog(View p) { |
|
103 |
JDialog dlg = (JDialog) viewFrame.get(p); |
|
104 |
|
|
105 |
if (dlg == null) { |
|
106 |
ViewInfo vi = vis.getViewInfo(p); |
|
107 |
JDialog nuevo = new JDialog(mainFrame); |
|
108 |
|
|
109 |
nuevo.getContentPane().add((JPanel) p); |
|
110 |
nuevo.setSize(getWidth(p), getHeight(p) + 30); |
|
111 |
nuevo.setTitle(vi.getTitle()); |
|
112 |
nuevo.setResizable(vi.isResizable()); |
|
113 |
|
|
114 |
viewFrame.put(p, nuevo); |
|
115 |
frameView.put(nuevo, p); |
|
116 |
|
|
117 |
nuevo.setModal(vi.isModal()); |
|
118 |
return nuevo; |
|
119 |
} else { |
|
120 |
return dlg; |
|
121 |
} |
|
122 |
} |
|
123 |
|
|
124 |
/** |
|
125 |
* DOCUMENT ME! |
|
126 |
* |
|
127 |
* @param p DOCUMENT ME! |
|
128 |
* |
|
129 |
* @return DOCUMENT ME! |
|
130 |
*/ |
|
131 |
public JInternalFrame getJInternalFrame(View p) { |
|
132 |
JInternalFrame frame = (JInternalFrame) viewFrame.get(p); |
|
133 |
|
|
134 |
if (frame == null) { |
|
135 |
ViewInfo vi = vis.getViewInfo(p); |
|
136 |
JInternalFrame nuevo = createJInternalFrame(p); |
|
137 |
viewFrame.put(p, nuevo); |
|
138 |
frameView.put(nuevo, p); |
|
139 |
|
|
140 |
return nuevo; |
|
141 |
} else { |
|
142 |
return frame; |
|
143 |
} |
|
144 |
} |
|
145 |
|
|
146 |
public JInternalFrame createJInternalFrame(View p) |
|
147 |
{ |
|
148 |
ViewInfo vi = vis.getViewInfo(p); |
|
149 |
JInternalFrame nuevo = new JInternalFrame(); |
|
150 |
if (icon != null){ |
|
151 |
nuevo.setFrameIcon(new ImageIcon(icon)); |
|
152 |
} |
|
153 |
nuevo.getContentPane().add((JPanel) p); |
|
154 |
nuevo.setClosable(true); |
|
155 |
nuevo.setSize(getWidth(p), getHeight(p)); |
|
156 |
nuevo.setTitle(vi.getTitle()); |
|
157 |
nuevo.setVisible(vi.isVisible()); |
|
158 |
nuevo.setResizable(vi.isResizable()); |
|
159 |
nuevo.setIconifiable(vi.isIconifiable()); |
|
160 |
nuevo.setMaximizable(vi.isMaximizable()); |
|
161 |
nuevo.setLocation(vi.getX(), vi.getY()); |
|
162 |
|
|
163 |
nuevo.setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE); |
|
164 |
return nuevo; |
|
165 |
} |
|
166 |
|
|
167 |
public View getView(Component dlg){ |
|
168 |
return (View) frameView.get(dlg); |
|
169 |
} |
|
170 |
|
|
171 |
public void closeView(View v){ |
|
172 |
Object c = viewFrame.remove(v); |
|
173 |
frameView.remove(c); |
|
174 |
} |
|
175 |
|
|
176 |
/** |
|
177 |
* DOCUMENT ME! |
|
178 |
* |
|
179 |
* @param v DOCUMENT ME! |
|
180 |
* @param x DOCUMENT ME! |
|
181 |
*/ |
|
182 |
public void setX(View v, int x) { |
|
183 |
JInternalFrame o = (JInternalFrame) viewFrame.get(v); |
|
184 |
o.setLocation(x, o.getY()); |
|
185 |
} |
|
186 |
|
|
187 |
/** |
|
188 |
* DOCUMENT ME! |
|
189 |
* |
|
190 |
* @param v DOCUMENT ME! |
|
191 |
* @param y DOCUMENT ME! |
|
192 |
*/ |
|
193 |
public void setY(View v, int y) { |
|
194 |
JInternalFrame o = (JInternalFrame) viewFrame.get(v); |
|
195 |
|
|
196 |
o.setLocation(o.getX(), y); |
|
197 |
} |
|
198 |
|
|
199 |
/** |
|
200 |
* DOCUMENT ME! |
|
201 |
* |
|
202 |
* @param v DOCUMENT ME! |
|
203 |
* @param height DOCUMENT ME! |
|
204 |
*/ |
|
205 |
public void setHeight(View v, int height) { |
|
206 |
JInternalFrame o = (JInternalFrame) viewFrame.get(v); |
|
207 |
|
|
208 |
o.setSize(o.getWidth(), height); |
|
209 |
} |
|
210 |
|
|
211 |
/** |
|
212 |
* DOCUMENT ME! |
|
213 |
* |
|
214 |
* @param v DOCUMENT ME! |
|
215 |
* @param width DOCUMENT ME! |
|
216 |
*/ |
|
217 |
public void setWidth(View v, int width) { |
|
218 |
JInternalFrame o = (JInternalFrame) viewFrame.get(v); |
|
219 |
|
|
220 |
o.setSize(width, o.getHeight()); |
|
221 |
} |
|
222 |
|
|
223 |
/** |
|
224 |
* DOCUMENT ME! |
|
225 |
* |
|
226 |
* @param v DOCUMENT ME! |
|
227 |
* @param title DOCUMENT ME! |
|
228 |
*/ |
|
229 |
public void setTitle(View v, String title) { |
|
230 |
JInternalFrame o = (JInternalFrame) viewFrame.get(v); |
|
231 |
o.setTitle(title); |
|
232 |
} |
|
233 |
|
|
234 |
/** |
|
235 |
* DOCUMENT ME! |
|
236 |
* |
|
237 |
* @param vis The vis to set. |
|
238 |
*/ |
|
239 |
public void setVis(ViewInfoSupport vis) { |
|
240 |
this.vis = vis; |
|
241 |
} |
|
242 |
|
|
243 |
/** |
|
244 |
* DOCUMENT ME! |
|
245 |
* |
|
246 |
* @param v DOCUMENT ME! |
|
247 |
* |
|
248 |
* @return DOCUMENT ME! |
|
249 |
*/ |
|
250 |
private int getWidth(View v) { |
|
251 |
ViewInfo vi = vis.getViewInfo(v); |
|
252 |
|
|
253 |
if (vi.getWidth() == -1) { |
|
254 |
JPanel p = (JPanel) v; |
|
255 |
|
|
256 |
return p.getSize().width; |
|
257 |
} else { |
|
258 |
return vi.getWidth(); |
|
259 |
} |
|
260 |
} |
|
261 |
|
|
262 |
/** |
|
263 |
* DOCUMENT ME! |
|
264 |
* |
|
265 |
* @param v DOCUMENT ME! |
|
266 |
* |
|
267 |
* @return DOCUMENT ME! |
|
268 |
*/ |
|
269 |
private int getHeight(View v) { |
|
270 |
ViewInfo vi = vis.getViewInfo(v); |
|
271 |
|
|
272 |
if (vi.getHeight() == -1) { |
|
273 |
JPanel p = (JPanel) v; |
|
274 |
|
|
275 |
return p.getSize().height; |
|
276 |
} else { |
|
277 |
return vi.getHeight(); |
|
278 |
} |
|
279 |
} |
|
280 |
} |
|
0 | 281 |
branches/Coreplugin_CAD/libraries/libCorePlugin/src/com/iver/core/mdiManager/ViewInfoSupport.java | ||
---|---|---|
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.core.mdiManager; |
|
42 |
|
|
43 |
import com.iver.andami.plugins.PluginClassLoader; |
|
44 |
import com.iver.andami.ui.mdiFrame.MainFrame; |
|
45 |
import com.iver.andami.ui.mdiFrame.NoSuchMenuException; |
|
46 |
import com.iver.andami.ui.mdiManager.SingletonView; |
|
47 |
import com.iver.andami.ui.mdiManager.View; |
|
48 |
import com.iver.andami.ui.mdiManager.ViewInfo; |
|
49 |
|
|
50 |
import java.beans.PropertyChangeEvent; |
|
51 |
import java.beans.PropertyChangeListener; |
|
52 |
|
|
53 |
import java.util.Enumeration; |
|
54 |
import java.util.Hashtable; |
|
55 |
|
|
56 |
|
|
57 |
/** |
|
58 |
* |
|
59 |
*/ |
|
60 |
public class ViewInfoSupport { |
|
61 |
private static int serialId = 0; |
|
62 |
private FrameViewSupport fvs; |
|
63 |
|
|
64 |
/** Correspondencias entre las vistas y su informacion */ |
|
65 |
private Hashtable viewInfo = new Hashtable(); |
|
66 |
private Hashtable infoView = new Hashtable(); |
|
67 |
private ViewPropertyChangeListener viewInfoListener = new ViewPropertyChangeListener(); |
|
68 |
private SingletonViewSupport svs; |
|
69 |
private MainFrame mdiFrame; |
|
70 |
|
|
71 |
/** |
|
72 |
* Creates a new ViewInfoSupport object. |
|
73 |
* |
|
74 |
* @param frame DOCUMENT ME! |
|
75 |
* @param fvs DOCUMENT ME! |
|
76 |
* @param svs |
|
77 |
*/ |
|
78 |
public ViewInfoSupport(MainFrame frame, FrameViewSupport fvs, |
|
79 |
SingletonViewSupport svs) { |
|
80 |
this.fvs = fvs; |
|
81 |
this.svs = svs; |
|
82 |
this.mdiFrame = frame; |
|
83 |
} |
|
84 |
|
|
85 |
/** |
|
86 |
* Devuelve la vista cuyo identificador es el parametro |
|
87 |
* |
|
88 |
* @param id Identificador de la vista que se quiere obtener |
|
89 |
* |
|
90 |
* @return La vista o null si no hay ninguna vista con ese identificador |
|
91 |
*/ |
|
92 |
public View getViewById(int id) { |
|
93 |
Enumeration en = infoView.keys(); |
|
94 |
|
|
95 |
while (en.hasMoreElements()) { |
|
96 |
ViewInfo vi = (ViewInfo) en.nextElement(); |
|
97 |
|
|
98 |
if (vi.getId() == id) { |
|
99 |
return (View) infoView.get(vi); |
|
100 |
} |
|
101 |
} |
|
102 |
|
|
103 |
return null; |
|
104 |
} |
|
105 |
|
|
106 |
/** |
|
107 |
* DOCUMENT ME! |
|
108 |
* |
|
109 |
* @param v DOCUMENT ME! |
|
110 |
* |
|
111 |
* @return DOCUMENT ME! |
|
112 |
*/ |
|
113 |
public synchronized ViewInfo getViewInfo(View v) { |
|
114 |
ViewInfo vi = (ViewInfo) viewInfo.get(v); |
|
115 |
|
|
116 |
if (vi == null) { |
|
117 |
vi = v.getViewInfo(); |
|
118 |
|
|
119 |
//Para el t?tulo |
|
120 |
if (vi.getHeight() != -1) { |
|
121 |
vi.setHeight(vi.getHeight() + 40); |
|
122 |
} |
|
123 |
|
|
124 |
vi.addPropertyChangeListener(viewInfoListener); |
|
125 |
viewInfo.put(v, vi); |
|
126 |
infoView.put(vi, v); |
|
127 |
vi.setId(serialId++); |
|
128 |
} |
|
129 |
|
|
130 |
return vi; |
|
131 |
} |
|
132 |
|
|
133 |
/** |
|
134 |
* DOCUMENT ME! |
|
135 |
* |
|
136 |
* @param p DOCUMENT ME! |
|
137 |
*/ |
|
138 |
public void deleteViewInfo(View p) { |
|
139 |
ViewInfo vi = (ViewInfo) viewInfo.remove(p); |
|
140 |
infoView.remove(vi); |
|
141 |
} |
|
142 |
|
|
143 |
/** |
|
144 |
* DOCUMENT ME! |
|
145 |
* |
|
146 |
* @author $author$ |
|
147 |
* @version $Revision$ |
|
148 |
*/ |
|
149 |
public class ViewPropertyChangeListener implements PropertyChangeListener { |
|
150 |
/** |
|
151 |
* @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent) |
|
152 |
*/ |
|
153 |
public void propertyChange(PropertyChangeEvent evt) { |
|
154 |
ViewInfo v = (ViewInfo) evt.getSource(); |
|
155 |
View view = (View) infoView.get(v); |
|
156 |
|
|
157 |
if (view instanceof SingletonView) { |
|
158 |
SingletonView sv = (SingletonView) view; |
|
159 |
|
|
160 |
if (evt.getPropertyName().equals("x")) { |
|
161 |
svs.setX(sv, ((Integer) evt.getNewValue()).intValue()); |
|
162 |
} else if (evt.getPropertyName().equals("y")) { |
|
163 |
svs.setY(sv, ((Integer) evt.getNewValue()).intValue()); |
|
164 |
} else if (evt.getPropertyName().equals("height")) { |
|
165 |
svs.setHeight(sv, ((Integer) evt.getNewValue()).intValue()); |
|
166 |
} else if (evt.getPropertyName().equals("width")) { |
|
167 |
svs.setWidth(sv, ((Integer) evt.getNewValue()).intValue()); |
|
168 |
} else if (evt.getPropertyName().equals("title")) { |
|
169 |
svs.setTitle(sv, (String) evt.getNewValue()); |
|
170 |
|
|
171 |
try { |
|
172 |
mdiFrame.changeMenuName(new String[] { |
|
173 |
"ventana", (String) evt.getOldValue() |
|
174 |
}, (String) evt.getNewValue(), |
|
175 |
(PluginClassLoader) getClass().getClassLoader()); |
|
176 |
} catch (NoSuchMenuException e) { |
|
177 |
/* |
|
178 |
* No se hace nada porque puede modificarse el t?tulo de |
|
179 |
* una ventana antes de ser a?adida a Andami |
|
180 |
*/ |
|
181 |
} |
|
182 |
} |
|
183 |
} else { |
|
184 |
if (evt.getPropertyName().equals("x")) { |
|
185 |
fvs.setX(view, ((Integer) evt.getNewValue()).intValue()); |
|
186 |
} else if (evt.getPropertyName().equals("y")) { |
|
187 |
fvs.setY(view, ((Integer) evt.getNewValue()).intValue()); |
|
188 |
} else if (evt.getPropertyName().equals("height")) { |
|
189 |
fvs.setHeight(view, ((Integer) evt.getNewValue()).intValue()); |
|
190 |
} else if (evt.getPropertyName().equals("width")) { |
|
191 |
fvs.setWidth(view, ((Integer) evt.getNewValue()).intValue()); |
|
192 |
} else if (evt.getPropertyName().equals("title")) { |
|
193 |
fvs.setTitle(view, (String) evt.getNewValue()); |
|
194 |
try{ |
|
195 |
mdiFrame.changeMenuName(new String[] { |
|
196 |
"ventana", (String) evt.getOldValue() |
|
197 |
}, (String) evt.getNewValue(), |
|
198 |
(PluginClassLoader) getClass().getClassLoader()); |
|
199 |
} catch (NoSuchMenuException e) { |
|
200 |
/* |
|
201 |
* No se hace nada porque puede modificarse el t?tulo de |
|
202 |
* una ventana antes de ser a?adida a Andami |
|
203 |
*/ |
|
204 |
} |
|
205 |
} |
|
206 |
} |
|
207 |
} |
|
208 |
} |
|
209 |
} |
|
0 | 210 |
branches/Coreplugin_CAD/libraries/libCorePlugin/src/com/iver/core/mdiManager/ComplexDesktopPane.java | ||
---|---|---|
1 |
/* |
|
2 |
* Created on 10-mar-2005 |
|
3 |
* |
|
4 |
* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
5 |
* |
|
6 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
7 |
* |
|
8 |
* This program is free software; you can redistribute it and/or |
|
9 |
* modify it under the terms of the GNU General Public License |
|
10 |
* as published by the Free Software Foundation; either version 2 |
|
11 |
* of the License, or (at your option) any later version. |
|
12 |
* |
|
13 |
* This program is distributed in the hope that it will be useful, |
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 |
* GNU General Public License for more details. |
|
17 |
* |
|
18 |
* You should have received a copy of the GNU General Public License |
|
19 |
* along with this program; if not, write to the Free Software |
|
20 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
|
21 |
USA. |
|
22 |
* |
|
23 |
* For more information, contact: |
|
24 |
* |
|
25 |
* Generalitat Valenciana |
|
26 |
* Conselleria d'Infraestructures i Transport |
|
27 |
* Av. Blasco Ib??ez, 50 |
|
28 |
* 46010 VALENCIA |
|
29 |
* SPAIN |
|
30 |
* |
|
31 |
* +34 963862235 |
|
32 |
* gvsig@gva.es |
|
33 |
* www.gvsig.gva.es |
|
34 |
* |
|
35 |
* or |
|
36 |
* |
|
37 |
* IVER T.I. S.A |
|
38 |
* Salamanca 50 |
|
39 |
* 46005 Valencia |
|
40 |
* Spain |
|
41 |
* |
|
42 |
* +34 963163400 |
|
43 |
* dac@iver.es |
|
44 |
*/ |
|
45 |
package com.iver.core.mdiManager; |
|
46 |
|
|
47 |
import javax.swing.JPanel; |
|
48 |
|
|
49 |
|
|
50 |
import javax.swing.JSplitPane; |
|
51 |
import java.awt.BorderLayout; |
|
52 |
import javax.swing.JDesktopPane; |
|
53 |
import com.iver.utiles.console.JConsole; |
|
54 |
public class ComplexDesktopPane extends JPanel { |
|
55 |
|
|
56 |
private JSplitPane jSplitPane = null; |
|
57 |
private JDesktopPane jDesktopPane = null; |
|
58 |
private JConsole jConsole = null; |
|
59 |
/** |
|
60 |
* This is the default constructor |
|
61 |
*/ |
|
62 |
public ComplexDesktopPane() { |
|
63 |
super(); |
|
64 |
initialize(); |
|
65 |
} |
|
66 |
/** |
|
67 |
* This method initializes this |
|
68 |
* |
|
69 |
* @return void |
|
70 |
*/ |
|
71 |
private void initialize() { |
|
72 |
this.setLayout(new BorderLayout()); |
|
73 |
this.setSize(300,200); |
|
74 |
this.add(getJSplitPane(), java.awt.BorderLayout.CENTER); |
|
75 |
} |
|
76 |
/** |
|
77 |
* This method initializes jSplitPane |
|
78 |
* |
|
79 |
* @return javax.swing.JSplitPane |
|
80 |
*/ |
|
81 |
private JSplitPane getJSplitPane() { |
|
82 |
if (jSplitPane == null) { |
|
83 |
jSplitPane = new JSplitPane(); |
|
84 |
jSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); |
|
85 |
jSplitPane.setResizeWeight(0.8); |
|
86 |
jSplitPane.setTopComponent(getDesktopPane()); |
|
87 |
jSplitPane.setBottomComponent(getJConsole()); |
|
88 |
} |
|
89 |
return jSplitPane; |
|
90 |
} |
|
91 |
/** |
|
92 |
* This method initializes jDesktopPane |
|
93 |
* |
|
94 |
* @return javax.swing.JDesktopPane |
|
95 |
*/ |
|
96 |
public JDesktopPane getDesktopPane() { |
|
97 |
if (jDesktopPane == null) { |
|
98 |
jDesktopPane = new JDesktopPane(); |
|
99 |
} |
|
100 |
return jDesktopPane; |
|
101 |
} |
|
102 |
/** |
|
103 |
* This method initializes jConsole |
|
104 |
* |
|
105 |
* @return com.iver.utiles.console.JConsole |
|
106 |
*/ |
|
107 |
private JConsole getJConsole() { |
|
108 |
if (jConsole == null) { |
|
109 |
jConsole = new JConsole(); |
|
110 |
} |
|
111 |
return jConsole; |
|
112 |
} |
|
113 |
} |
|
0 | 114 |
branches/Coreplugin_CAD/libraries/libCorePlugin/src/com/iver/core/mdiManager/SingletonViewSupport.java | ||
---|---|---|
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.core.mdiManager; |
|
42 |
|
|
43 |
import java.awt.Component; |
|
44 |
import java.util.ArrayList; |
|
45 |
import java.util.Comparator; |
|
46 |
import java.util.Iterator; |
|
47 |
import java.util.TreeMap; |
|
48 |
|
|
49 |
import javax.swing.JComponent; |
Also available in: Unified diff