Revision 39339
tags/v2_0_0_Build_2060/frameworks/_fwAndami/theme/andami-theme.xml | ||
---|---|---|
1 |
<AndamiProperties> |
|
2 |
<ApplicationImages> |
|
3 |
<SplashImages> |
|
4 |
<Splash |
|
5 |
path="splash.png" |
|
6 |
timer="10000" |
|
7 |
x="270" y="240" |
|
8 |
fontsize="18" color="80,170,240" |
|
9 |
version="2.0.0"/> |
|
10 |
</SplashImages> |
|
11 |
<!-- |
|
12 |
<BackgroundImage path="gvsig-icon16x16.png"/> |
|
13 |
--> |
|
14 |
<WallpaperType value="CENTERED"/> |
|
15 |
<Icon path="gvsig-icon16x16.png"/> |
|
16 |
</ApplicationImages> |
|
17 |
<ApplicationName value="Andami 2.0.0"/> |
|
18 |
</AndamiProperties> |
|
0 | 19 |
tags/v2_0_0_Build_2060/frameworks/_fwAndami/theme/README.txt | ||
---|---|---|
1 |
Use those files as a template for your own andami theme. |
|
2 |
|
|
3 |
If none provided by any plugin, this theme will be used as the default one. |
tags/v2_0_0_Build_2060/frameworks/_fwAndami/schemas/andami-config.xml | ||
---|---|---|
1 |
<andami-config locale-language="es" locale-country="ES" locale-variant="es" pluginsDirectory="c:\tirar"> |
|
2 |
<andami update="yes"/> |
|
3 |
<plugin name="com.iver.cit.gvsig" update="yes"/> |
|
4 |
<plugin name="com.iver.core" update="no"/> |
|
5 |
<andami-options> |
|
6 |
<option name="CustomOption1" value="customValue1"/> |
|
7 |
<icon-theme name="DefaultTheme" resource="iconThemes/default" basedir="iconThemes" /> |
|
8 |
</andami-options> |
|
9 |
</andami-config> |
|
0 | 10 |
tags/v2_0_0_Build_2060/frameworks/_fwAndami/schemas/sample-plugins-persistence.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<plugins-status> |
|
3 |
<plugin name="gvsig" lastUpdate="237628686"> |
|
4 |
<xml-entity name="config"> |
|
5 |
<property name="dataDirectory" value="c:\"/> |
|
6 |
<xml-entity> |
|
7 |
<property name="dataDirectory" value="c:\"/> |
|
8 |
<property name="dataDirectory" value="c:\"/> |
|
9 |
<property name="dataDirectory" value="c:\"/> |
|
10 |
</xml-entity> |
|
11 |
</xml-entity> |
|
12 |
<bookmarks> |
|
13 |
<bookmark text="Recientes/raster"> |
|
14 |
<xml-entity> |
|
15 |
<property name="projection" value="EPSG:3403"/> |
|
16 |
<property name="boundinBox" value="12,12,115,115"/> |
|
17 |
</xml-entity> |
|
18 |
</bookmark> |
|
19 |
</bookmarks> |
|
20 |
<windows> |
|
21 |
<window id="0" rectangle="0,0,150,150"/> |
|
22 |
<window id="2" rectangle="50,50,150,150"/> |
|
23 |
<window id="8" rectangle="100,100,150,150"/> |
|
24 |
<window id="12" rectangle="150,150,150,150"/> |
|
25 |
</windows> |
|
26 |
</plugin> |
|
27 |
<tool-bars> |
|
28 |
<tool-bar name="gvsig.herramientas" x-position="0" y-position="1"/> |
|
29 |
<tool-bar name="gvsig.herramientas" x-position="0" y-position="0"/> |
|
30 |
</tool-bars> |
|
31 |
</plugins-status> |
|
0 | 32 |
tags/v2_0_0_Build_2060/frameworks/_fwAndami/schemas/sample-config.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<plugin-config> |
|
3 |
<icon src="images/logoGVA.gif" text="gvSIG"/> |
|
4 |
<resourceBundle name="text"/> |
|
5 |
<import plugin-name="com.iver.cit.gvsig" /> |
|
6 |
<labelSet class="com.iver.cit.gvsig.gui.View"> |
|
7 |
<label id="1" size="100"/> |
|
8 |
<label id="2" size="230"/> |
|
9 |
</labelSet> |
|
10 |
<libraries> |
|
11 |
<library file="com.iver.cit.gvsig.jar"/> |
|
12 |
<library file="wmsclient.jar"/> |
|
13 |
</libraries> |
|
14 |
<extensions> |
|
15 |
<extension> |
|
16 |
<class name="com.iver.cit.gvsig.ProjectExtension"/> |
|
17 |
<menu text="Archivo/nuevo_proyecto" |
|
18 |
key="n" mnemonic="n" |
|
19 |
tooltip="nuevo_tooltip" |
|
20 |
action-command="NUEVO" icon="images/new.png"/> |
|
21 |
<menu text="Archivo/abrir_proyecto" |
|
22 |
key="a" mnemonic="a" |
|
23 |
tooltip="abrir_tooltip" |
|
24 |
action-command="ABRIR" icon="images/open.png"/> |
|
25 |
<menu text="Archivo/guardar_proyecto" |
|
26 |
key="g" mnemonic="g" |
|
27 |
tooltip="guardar_tooltip" |
|
28 |
action-command="GUARDAR" icon="images/save.png"/> |
|
29 |
|
|
30 |
<toolBar> |
|
31 |
<tool icon="images/new.png" tooltip="nuevo_tooltip" |
|
32 |
action-command="NUEVO"/> |
|
33 |
<tool icon="images/open.png" tooltip="abrir_tooltip" |
|
34 |
action-command="ABRIR"/> |
|
35 |
<tool icon="images/save.png" tooltip="guardar_tooltip" |
|
36 |
action-command="GUARDAR"/> |
|
37 |
|
|
38 |
<!-- these will be added to the containing toolbar --> |
|
39 |
<combo-scale |
|
40 |
name="JPEG Quality" |
|
41 |
elements="15;30;60;70;80;90;100" |
|
42 |
value="80" |
|
43 |
action-command="JPEG_QUALITY" /> |
|
44 |
|
|
45 |
<combo-button |
|
46 |
name="Copy/paste tools"> |
|
47 |
<combo-button-element icon="images/scissor.png" action-command="CUT" /> |
|
48 |
<combo-button-element icon="images/paste.png" action-command="PASTE" /> |
|
49 |
<combo-button-element icon="images/copy.png" action-command="COPY" /> |
|
50 |
</combo-button> |
|
51 |
</toolBar> |
|
52 |
|
|
53 |
</extension> |
|
54 |
|
|
55 |
<extension> |
|
56 |
<class name="com.iver.cit.gvsig.ZoomPrev"/> |
|
57 |
<menu text="Vista/Zoom_Previo" icon="images/ZoomPrevio.png"/> |
|
58 |
<tool-bar name="Herramientas"> |
|
59 |
<action-tool icon="images/ZoomPrevio.png" action-command="ZOOM_PREV" tooltip="Zoom_Previo" position="11"/> |
|
60 |
</tool-bar> |
|
61 |
|
|
62 |
<!-- these will be added to the status-bar (because they are not contained in any toolbar) --> |
|
63 |
<combo-scale |
|
64 |
name="Scale" |
|
65 |
label="Scale:" |
|
66 |
elements="1000;2000;5000;10000;25000;50000;100000;200000;500000;1000000;2000000;5000000" |
|
67 |
value="10000" |
|
68 |
action-command="CHANGE_SCALE" /> |
|
69 |
|
|
70 |
<combo-button |
|
71 |
name="Tool Mode"> |
|
72 |
<combo-button-element icon="images/once.png" action-command="USE_ONCE" /> |
|
73 |
<combo-button-element icon="images/sticky-tool.png" action-command="UNTIL_CHANGED" /> |
|
74 |
</combo-button> |
|
75 |
</extension> |
|
76 |
<extension processing-position="2"> |
|
77 |
<class name="com.iver.cit.gvsig.ViewControls"/> |
|
78 |
<menus> |
|
79 |
<menu text="Vista/Zoom_Completo" action-command="FULL" icon="images/MapContents.png" tooltip="Zoom completo a la v?sta"/> |
|
80 |
<menu text="Vista/Zoom_Select" action-command="ZOOM_SELECT" icon="image/Select.png"/> |
|
81 |
<menu text="Vista/Encuadre" action-command="ENCUADRE" icon="images/encuadre.png"/> |
|
82 |
<menu text="Vista/Seleccion_por_tema" action-command="SELECTIONBYSHAPE"/> |
|
83 |
<menu text="Vista/configurar_localizador" action-command="CONFIG_LOCATOR"/> |
|
84 |
<menu text="Vista/propiedades" action-command="PROPERTIES"/> |
|
85 |
</menus> |
|
86 |
<tool-bar name="Herramientas" y-position="1"> |
|
87 |
<action-tool icon="images/MapContents.png" action-command="FULL" tooltip="Zoom_Completo" position="1"/> |
|
88 |
<action-tool icon="images/encuadre.png" action-command="ENCUADRE" tooltip="gestion_encuadre" last="true" position="2"/> |
|
89 |
<selectable-tool group="grupo1" default="true" icon="images/ZoomIn.png" action-command="ZOOM_IN" tooltip="Zoom_M?s" position="3"/> |
|
90 |
<selectable-tool group="grupo1" icon="images/ZoomOut.png" action-command="ZOOM_OUT" position="4"/> |
|
91 |
<selectable-tool group="grupo1" icon="images/Pan.png" action-command="PAN" tooltip="Encuadre" position="5"/> |
|
92 |
<selectable-tool group="grupo1" icon="images/Identify.png" action-command="INFO" tooltip="informacion" position="6" /> |
|
93 |
<selectable-tool group="grupo2" icon="images/Distancia.png" action-command="MEDICION" tooltip="medir_distancias" position="7"/> |
|
94 |
<selectable-tool group="grupo2" icon="images/Poligono16.png" action-command="AREA" tooltip="medir_area" position="8"/> |
|
95 |
<selectable-tool group="grupo2" default="true" icon="images/Select.png" action-command="SELPOINT" tooltip="seleccionar_por_punto" position="9"/> |
|
96 |
<selectable-tool group="grupo2" icon="images/SelEspacial2b.png" action-command="SELRECT" tooltip="seleccionar_por_rectangulo" position="10"/> |
|
97 |
</tool-bar> |
|
98 |
</extension> |
|
99 |
<extension> |
|
100 |
<class name="com.iver.cit.gvsig.ThemeControls"/> |
|
101 |
<menu text="Tema/propiedades"/> |
|
102 |
</extension> |
|
103 |
</extensions> |
|
104 |
|
|
105 |
<file-extensions> |
|
106 |
<file-extension description="DGNfiles" ends-with="dgn" dialog="openLayer"> |
|
107 |
<class name="com.iver.cit.gvsig.DGNFileExtension"/> |
|
108 |
</file-extension> |
|
109 |
<file-extension description="Rasterfiles" ends-with="ecw,tif,tiff,jpg,png" dialog="openLayer"> |
|
110 |
<class name="com.iver.cit.gvsig.RasterFileExtension"/> |
|
111 |
</file-extension> |
|
112 |
</file-extensions> |
|
113 |
</plugin-config> |
|
0 | 114 |
tags/v2_0_0_Build_2060/frameworks/_fwAndami/src-test/org/gvsig/andami/AllTests.java | ||
---|---|---|
1 |
package org.gvsig.andami; |
|
2 |
|
|
3 |
import junit.framework.Test; |
|
4 |
import junit.framework.TestSuite; |
|
5 |
|
|
6 |
public class AllTests { |
|
7 |
|
|
8 |
public static Test suite() { |
|
9 |
TestSuite suite = new TestSuite("Test for com.iver.andami"); |
|
10 |
//$JUnit-BEGIN$ |
|
11 |
|
|
12 |
//$JUnit-END$ |
|
13 |
return suite; |
|
14 |
} |
|
15 |
|
|
16 |
} |
|
0 | 17 |
tags/v2_0_0_Build_2060/frameworks/_fwAndami/castor.properties | ||
---|---|---|
1 |
org.exolab.castor.indent=true |
|
0 | 2 |
tags/v2_0_0_Build_2060/frameworks/_fwAndami/compile-classpath.xml | ||
---|---|---|
1 |
<project name="_fwAndami.compile-classpath" basedir="."> |
|
2 |
<!-- defines the classpath to be used for batch-compilation --> |
|
3 |
<property name="andami" location="../_fwAndami"/> |
|
4 |
<property name="andamiLibs" location="${andami}/lib"/> |
|
5 |
<path id="_fwAndami.compile-classpath"> |
|
6 |
<pathelement location="${andamiLibs}/beans.jar"/> |
|
7 |
<pathelement location="${andamiLibs}/castor-0.9.5.3-xml.jar"/> |
|
8 |
<pathelement location="${andamiLibs}/gvsig-i18n.jar"/> |
|
9 |
<pathelement location="${andamiLibs}/iver-utiles.jar"/> |
|
10 |
<pathelement location="${andamiLibs}/javaws.jar"/> |
|
11 |
<pathelement location="${andamiLibs}/JWizardComponent.jar"/> |
|
12 |
<pathelement location="${andamiLibs}/log4j-1.2.8.jar"/> |
|
13 |
<pathelement location="${andamiLibs}/tempFileManager.jar"/> |
|
14 |
<pathelement location="${andamiLibs}/xercesImpl.jar"/> |
|
15 |
<pathelement location="${andamiLibs}/xml-apis.jar"/> |
|
16 |
<pathelement location="${andamiLibs}/kxml2.jar"/> |
|
17 |
<pathelement location="${andamiLibs}/jcalendar.jar"/> |
|
18 |
</path> |
|
19 |
</project> |
|
0 | 20 |
tags/v2_0_0_Build_2060/frameworks/_fwAndami/src/iso_639.tab | ||
---|---|---|
1 |
|
|
2 |
## iso-639.tab |
|
3 |
## |
|
4 |
## Copyright (C) 2005 Alastair McKinstry <mckinstry@computer.org> |
|
5 |
## Released under the GNU License; see file COPYING for details |
|
6 |
## |
|
7 |
## PLEASE NOTE: THIS FILE IS DEPRECATED AND SCHEDULED TO BE REMOVED. |
|
8 |
## IT IS FOR BACKWARD-COMPATIBILITY ONLY: PLEASE USE THE ISO-639.XML |
|
9 |
## FILE INSTEAD. |
|
10 |
## |
|
11 |
## This file gives a list of all languages in the ISO-639 |
|
12 |
## standard, and is used to provide translations (via gettext) |
|
13 |
## |
|
14 |
## Status: ISO 639-2:1998 + additions and changes until 2003-03-05 |
|
15 |
## Source: http://lcweb.loc.gov/standards/iso639-2/englangn.html |
|
16 |
## |
|
17 |
## Columns: |
|
18 |
## iso-639-2 terminology code |
|
19 |
## iso-639-2 bibliography code |
|
20 |
## iso-639-1 code (XX if none exists) |
|
21 |
## Name (English) |
|
22 |
## |
|
23 |
## |
|
24 |
aar aar aa Afar |
|
25 |
abk abk ab Abkhazian |
|
26 |
ace ace XX Achinese |
|
27 |
ach ach XX Acoli |
|
28 |
ada ada XX Adangme |
|
29 |
ady ady XX Adyghe; Adygei |
|
30 |
afa afa XX Afro-Asiatic (Other) |
|
31 |
afh afh XX Afrihili |
|
32 |
afr afr af Afrikaans |
|
33 |
ain ain XX Ainu |
|
34 |
aka aka ak Akan |
|
35 |
akk akk XX Akkadian |
|
36 |
ale ale XX Aleut |
|
37 |
alg alg XX Algonquian languages |
|
38 |
alt alt XX Southern Altai |
|
39 |
amh amh am Amharic |
|
40 |
ang ang XX English, Old (ca. 450-1100) |
|
41 |
anp anp XX Angika |
|
42 |
apa apa XX Apache languages |
|
43 |
ara ara ar Arabic |
|
44 |
arc arc XX Aramaic |
|
45 |
arg arg an Aragonese |
|
46 |
arn arn XX Araucanian |
|
47 |
arp arp XX Arapaho |
|
48 |
art art XX Artificial (Other) |
|
49 |
arw arw XX Arawak |
|
50 |
asm asm as Assamese |
|
51 |
ast ast XX Asturian; Bable |
|
52 |
ath ath XX Athapascan languages |
|
53 |
aus aus XX Australian languages |
|
54 |
ava ava av Avaric |
|
55 |
ave ave ae Avestan |
|
56 |
awa awa XX Awadhi |
|
57 |
aym aym ay Aymara |
|
58 |
aze aze az Azerbaijani |
|
59 |
bad bad XX Banda |
|
60 |
bai bai XX Bamileke languages |
|
61 |
bak bak ba Bashkir |
|
62 |
bal bal XX Baluchi |
|
63 |
bam bam bm Bambara |
|
64 |
ban ban XX Balinese |
|
65 |
bas bas XX Basa |
|
66 |
bat bat XX Baltic (Other) |
|
67 |
bej bej XX Beja |
|
68 |
bel bel be Belarusian |
|
69 |
bem bem XX Bemba |
|
70 |
ben ben bn Bengali |
|
71 |
ber ber XX Berber (Other) |
|
72 |
bho bho XX Bhojpuri |
|
73 |
bih bih bh Bihari |
|
74 |
bik bik XX Bikol |
|
75 |
bin bin XX Bini |
|
76 |
bis bis bi Bislama |
|
77 |
bla bla XX Siksika |
|
78 |
bnt bnt XX Bantu (Other) |
|
79 |
bod tib bo Tibetan |
|
80 |
bos bos bs Bosnian |
|
81 |
bra bra XX Braj |
|
82 |
bre bre br Breton |
|
83 |
btk btk XX Batak (Indonesia) |
|
84 |
bua bua XX Buriat |
|
85 |
bug bug XX Buginese |
|
86 |
bul bul bg Bulgarian |
|
87 |
byn byn XX Blin; Bilin |
|
88 |
cad cad XX Caddo |
|
89 |
cai cai XX Central American Indian (Other) |
|
90 |
car car XX Carib |
|
91 |
cat cat ca Catalan; Valencian |
|
92 |
cau cau XX Caucasian (Other) |
|
93 |
ceb ceb XX Cebuano |
|
94 |
cel cel XX Celtic (Other) |
|
95 |
ces cze cs Czech |
|
96 |
cha cha ch Chamorro |
|
97 |
chb chb XX Chibcha |
|
98 |
che che ce Chechen |
|
99 |
chg chg XX Chagatai |
|
100 |
chk chk XX Chuukese |
|
101 |
chm chm XX Mari |
|
102 |
chn chn XX Chinook jargon |
|
103 |
cho cho XX Choctaw |
|
104 |
chp chp XX Chipewyan |
|
105 |
chr chr XX Cherokee |
|
106 |
chu chu cu Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic |
|
107 |
chv chv cv Chuvash |
|
108 |
chy chy XX Cheyenne |
|
109 |
cmc cmc XX Chamic languages |
|
110 |
cop cop XX Coptic |
|
111 |
cor cor kw Cornish |
|
112 |
cos cos co Corsican |
|
113 |
cpe cpe XX Creoles and pidgins, English based (Other) |
|
114 |
cpf cpf XX Creoles and pidgins, French-based (Other) |
|
115 |
cpp cpp XX Creoles and pidgins, Portuguese-based (Other) |
|
116 |
cre cre cr Cree |
|
117 |
crh crh XX Crimean Tatar; Crimean Turkish |
|
118 |
crp crp XX Creoles and pidgins (Other) |
|
119 |
csb csb XX Kashubian |
|
120 |
cus cus XX Cushitic (Other) |
|
121 |
cym wel cy Welsh |
|
122 |
dak dak XX Dakota |
|
123 |
dan dan da Danish |
|
124 |
dar dar XX Dargwa |
|
125 |
day day XX Dayak |
|
126 |
del del XX Delaware |
|
127 |
den den XX Slave (Athapascan) |
|
128 |
deu ger de German |
|
129 |
dgr dgr XX Dogrib |
|
130 |
din din XX Dinka |
|
131 |
div div dv Divehi; Dhivehi; Maldivian |
|
132 |
doi doi XX Dogri |
|
133 |
dra dra XX Dravidian (Other) |
|
134 |
dsb dsb XX Lower Sorbian |
|
135 |
dua dua XX Duala |
|
136 |
dum dum XX Dutch, Middle (ca. 1050-1350) |
|
137 |
dyu dyu XX Dyula |
|
138 |
dzo dzo dz Dzongkha |
|
139 |
efi efi XX Efik |
|
140 |
egy egy XX Egyptian (Ancient) |
|
141 |
eka eka XX Ekajuk |
|
142 |
ell gre el Greek, Modern (1453-) |
|
143 |
elx elx XX Elamite |
|
144 |
eng eng en English |
|
145 |
enm enm XX English, Middle (1100-1500) |
|
146 |
epo epo eo Esperanto |
|
147 |
est est et Estonian |
|
148 |
eus baq eu Basque |
|
149 |
ewe ewe ee Ewe |
|
150 |
ewo ewo XX Ewondo |
|
151 |
fan fan XX Fang |
|
152 |
fao fao fo Faroese |
|
153 |
fas per fa Persian |
|
154 |
fat fat XX Fanti |
|
155 |
fij fij fj Fijian |
|
156 |
fil fil XX Filipino; Pilipino |
|
157 |
fin fin fi Finnish |
|
158 |
fiu fiu XX Finno-Ugrian (Other) |
|
159 |
fon fon XX Fon |
|
160 |
fra fre fr French |
|
161 |
frm frm XX French, Middle (ca. 1400-1600) |
|
162 |
fro fro XX French, Old (842-ca. 1400) |
|
163 |
frr frr XX Northern Frisian |
|
164 |
frs frs XX Eastern Frisian |
|
165 |
fry fry fy Western Frisian |
|
166 |
ful ful ff Fulah |
|
167 |
fur fur XX Friulian |
|
168 |
gaa gaa XX Ga |
|
169 |
gay gay XX Gayo |
|
170 |
gba gba XX Gbaya |
|
171 |
gem gem XX Germanic (Other) |
|
172 |
gez gez XX Geez |
|
173 |
gil gil XX Gilbertese |
|
174 |
gla gla gd Gaelic; Scottish Gaelic |
|
175 |
gle gle ga Irish |
|
176 |
glg glg gl Galician |
|
177 |
glv glv gv Manx |
|
178 |
gmh gmh XX German, Middle High (ca. 1050-1500) |
|
179 |
goh goh XX German, Old High (ca. 750-1050) |
|
180 |
gon gon XX Gondi |
|
181 |
gor gor XX Gorontalo |
|
182 |
got got XX Gothic |
|
183 |
grb grb XX Grebo |
|
184 |
grc grc XX Greek, Ancient (to 1453) |
|
185 |
grn grn gn Guarani |
|
186 |
gsw gsw XX Alemanic; Swiss German |
|
187 |
guj guj gu Gujarati |
|
188 |
gwi gwi XX Gwich´in |
|
189 |
hai hai XX Haida |
|
190 |
hat hat ht Haitian; Haitian Creole |
|
191 |
hau hau ha Hausa |
|
192 |
haw haw XX Hawaiian |
|
193 |
heb heb he Hebrew |
|
194 |
her her hz Herero |
|
195 |
hil hil XX Hiligaynon |
|
196 |
him him XX Himachali |
|
197 |
hin hin hi Hindi |
|
198 |
hit hit XX Hittite |
|
199 |
hmn hmn XX Hmong |
|
200 |
hmo hmo ho Hiri Motu |
|
201 |
hrv scr hr Croatian |
|
202 |
hsb hsb XX Upper Sorbian |
|
203 |
hun hun hu Hungarian |
|
204 |
hup hup XX Hupa |
|
205 |
hye arm hy Armenian |
|
206 |
iba iba XX Iban |
|
207 |
ibo ibo ig Igbo |
|
208 |
ido ido io Ido |
|
209 |
iii iii ii Sichuan Yi |
|
210 |
ijo ijo XX Ijo |
|
211 |
iku iku iu Inuktitut |
|
212 |
ile ile ie Interlingue |
|
213 |
ilo ilo XX Iloko |
|
214 |
ina ina ia Interlingua (International Auxiliary Language Association) |
|
215 |
inc inc XX Indic (Other) |
|
216 |
ind ind id Indonesian |
|
217 |
ine ine XX Indo-European (Other) |
|
218 |
inh inh XX Ingush |
|
219 |
ipk ipk ik Inupiaq |
|
220 |
ira ira XX Iranian (Other) |
|
221 |
iro iro XX Iroquoian languages |
|
222 |
isl ice is Icelandic |
|
223 |
ita ita it Italian |
|
224 |
jav jav jv Javanese |
|
225 |
jbo jbo XX Lojban |
|
226 |
jpn jpn ja Japanese |
|
227 |
jpr jpr XX Judeo-Persian |
|
228 |
jrb jrb XX Judeo-Arabic |
|
229 |
kaa kaa XX Kara-Kalpak |
|
230 |
kab kab XX Kabyle |
|
231 |
kac kac XX Kachin |
|
232 |
kal kal kl Kalaallisut; Greenlandic |
|
233 |
kam kam XX Kamba |
|
234 |
kan kan kn Kannada |
|
235 |
kar kar XX Karen |
|
236 |
kas kas ks Kashmiri |
|
237 |
kat geo ka Georgian |
|
238 |
kau kau kr Kanuri |
|
239 |
kaw kaw XX Kawi |
|
240 |
kaz kaz kk Kazakh |
|
241 |
kbd kbd XX Kabardian |
|
242 |
kha kha XX Khasi |
|
243 |
khi khi XX Khoisan (Other) |
|
244 |
khm khm km Khmer |
|
245 |
kho kho XX Khotanese |
|
246 |
kik kik ki Kikuyu; Gikuyu |
|
247 |
kin kin rw Kinyarwanda |
|
248 |
kir kir ky Kirghiz |
|
249 |
kmb kmb XX Kimbundu |
|
250 |
kok kok XX Konkani |
|
251 |
kom kom kv Komi |
|
252 |
kon kon kg Kongo |
|
253 |
kor kor ko Korean |
|
254 |
kos kos XX Kosraean |
|
255 |
kpe kpe XX Kpelle |
|
256 |
krc krc XX Karachay-Balkar |
|
257 |
krl krl XX Karelian |
|
258 |
kro kro XX Kru |
|
259 |
kru kru XX Kurukh |
|
260 |
kua kua kj Kuanyama; Kwanyama |
|
261 |
kum kum XX Kumyk |
|
262 |
kur kur ku Kurdish |
|
263 |
kut kut XX Kutenai |
|
264 |
lad lad XX Ladino |
|
265 |
lah lah XX Lahnda |
|
266 |
lam lam XX Lamba |
|
267 |
lao lao lo Lao |
|
268 |
lat lat la Latin |
|
269 |
lav lav lv Latvian |
|
270 |
lez lez XX Lezghian |
|
271 |
lim lim li Limburgan; Limburger; Limburgish |
|
272 |
lin lin ln Lingala |
|
273 |
lit lit lt Lithuanian |
|
274 |
lol lol XX Mongo |
|
275 |
loz loz XX Lozi |
|
276 |
ltz ltz lb Luxembourgish; Letzeburgesch |
|
277 |
lua lua XX Luba-Lulua |
|
278 |
lub lub lu Luba-Katanga |
|
279 |
lug lug lg Ganda |
|
280 |
lui lui XX Luiseno |
|
281 |
lun lun XX Lunda |
|
282 |
luo luo XX Luo (Kenya and Tanzania) |
|
283 |
lus lus XX Lushai |
|
284 |
mad mad XX Madurese |
|
285 |
mag mag XX Magahi |
|
286 |
mah mah mh Marshallese |
|
287 |
mai mai XX Maithili |
|
288 |
mak mak XX Makasar |
|
289 |
mal mal ml Malayalam |
|
290 |
man man XX Mandingo |
|
291 |
map map XX Austronesian (Other) |
|
292 |
mar mar mr Marathi |
|
293 |
mas mas XX Masai |
|
294 |
mdf mdf XX Moksha |
|
295 |
mdr mdr XX Mandar |
|
296 |
men men XX Mende |
|
297 |
mga mga XX Irish, Middle (900-1200) |
|
298 |
mic mic XX Mi'kmaq; Micmac |
|
299 |
min min XX Minangkabau |
|
300 |
mis mis XX Miscellaneous languages |
|
301 |
mkd mac mk Macedonian |
|
302 |
mkh mkh XX Mon-Khmer (Other) |
|
303 |
mlg mlg mg Malagasy |
|
304 |
mlt mlt mt Maltese |
|
305 |
mnc mnc XX Manchu |
|
306 |
mni mni XX Manipuri |
|
307 |
mno mno XX Manobo languages |
|
308 |
moh moh XX Mohawk |
|
309 |
mol mol mo Moldavian |
|
310 |
mon mon mn Mongolian |
|
311 |
mos mos XX Mossi |
|
312 |
mri mao mi Maori |
|
313 |
msa may ms Malay |
|
314 |
mul mul XX Multiple languages |
|
315 |
mun mun XX Munda languages |
|
316 |
mus mus XX Creek |
|
317 |
mwl mwl XX Mirandese |
|
318 |
mwr mwr XX Marwari |
|
319 |
mya bur my Burmese |
|
320 |
myn myn XX Mayan languages |
|
321 |
myv myv XX Erzya |
|
322 |
nah nah XX Nahuatl |
|
323 |
nai nai XX North American Indian |
|
324 |
nap nap XX Neapolitan |
|
325 |
nau nau na Nauru |
|
326 |
nav nav nv Navajo; Navaho |
|
327 |
nbl nbl nr Ndebele, South; South Ndebele |
|
328 |
nde nde nd Ndebele, North; North Ndebele |
|
329 |
ndo ndo ng Ndonga |
|
330 |
nds nds XX Low German; Low Saxon; German, Low; Saxon, Low |
|
331 |
nep nep ne Nepali |
|
332 |
new new XX Newari; Nepal Bhasa |
|
333 |
nia nia XX Nias |
|
334 |
nic nic XX Niger-Kordofanian (Other) |
|
335 |
niu niu XX Niuean |
|
336 |
nld dut nl Dutch; Flemish |
|
337 |
nno nno nn Norwegian Nynorsk; Nynorsk, Norwegian |
|
338 |
nob nob nb Norwegian Bokmål; Bokmål, Norwegian |
|
339 |
nog nog XX Nogai |
|
340 |
non non XX Norse, Old |
|
341 |
nor nor no Norwegian |
|
342 |
nqo nqo XX N'ko |
|
343 |
nso nso XX Northern Sotho, Pedi; Sepedi |
|
344 |
nub nub XX Nubian languages |
|
345 |
nwc nwc XX Classical Newari; Old Newari; Classical Nepal Bhasa |
|
346 |
nya nya ny Chichewa; Chewa; Nyanja |
|
347 |
nym nym XX Nyamwezi |
|
348 |
nyn nyn XX Nyankole |
|
349 |
nyo nyo XX Nyoro |
|
350 |
nzi nzi XX Nzima |
|
351 |
oci oci oc Occitan (post 1500); Provençal |
|
352 |
oji oji oj Ojibwa |
|
353 |
ori ori or Oriya |
|
354 |
orm orm om Oromo |
|
355 |
osa osa XX Osage |
|
356 |
oss oss os Ossetian; Ossetic |
|
357 |
ota ota XX Turkish, Ottoman (1500-1928) |
|
358 |
oto oto XX Otomian languages |
|
359 |
paa paa XX Papuan (Other) |
|
360 |
pag pag XX Pangasinan |
|
361 |
pal pal XX Pahlavi |
|
362 |
pam pam XX Pampanga |
|
363 |
pan pan pa Panjabi; Punjabi |
|
364 |
pap pap XX Papiamento |
|
365 |
pau pau XX Palauan |
|
366 |
peo peo XX Persian, Old (ca. 600-400 B.C.) |
|
367 |
phi phi XX Philippine (Other) |
|
368 |
phn phn XX Phoenician |
|
369 |
pli pli pi Pali |
|
370 |
pol pol pl Polish |
|
371 |
pon pon XX Pohnpeian |
|
372 |
por por pt Portuguese |
|
373 |
pra pra XX Prakrit languages |
|
374 |
pro pro XX Provençal, Old (to 1500) |
|
375 |
pus pus ps Pushto |
|
376 |
qaa-qtz qaa-qtz XX Reserved for local use |
|
377 |
que que qu Quechua |
|
378 |
raj raj XX Rajasthani |
|
379 |
rap rap XX Rapanui |
|
380 |
rar rar XX Rarotongan |
|
381 |
roa roa XX Romance (Other) |
|
382 |
roh roh rm Raeto-Romance |
|
383 |
rom rom XX Romany |
|
384 |
ron rum ro Romanian |
|
385 |
run run rn Rundi |
|
386 |
rup rup XX Aromanian; Arumanian; Macedo-Romanian |
|
387 |
rus rus ru Russian |
|
388 |
sad sad XX Sandawe |
|
389 |
sag sag sg Sango |
|
390 |
sah sah XX Yakut |
|
391 |
sai sai XX South American Indian (Other) |
|
392 |
sal sal XX Salishan languages |
|
393 |
sam sam XX Samaritan Aramaic |
|
394 |
san san sa Sanskrit |
|
395 |
sas sas XX Sasak |
|
396 |
sat sat XX Santali |
|
397 |
scn scn XX Sicilian |
|
398 |
sco sco XX Scots |
|
399 |
sel sel XX Selkup |
|
400 |
sem sem XX Semitic (Other) |
|
401 |
sga sga XX Irish, Old (to 900) |
|
402 |
sgn sgn XX Sign Languages |
|
403 |
shn shn XX Shan |
|
404 |
sid sid XX Sidamo |
|
405 |
sin sin si Sinhala; Sinhalese |
|
406 |
sio sio XX Siouan languages |
|
407 |
sit sit XX Sino-Tibetan (Other) |
|
408 |
sla sla XX Slavic (Other) |
|
409 |
slk slo sk Slovak |
|
410 |
slv slv sl Slovenian |
|
411 |
sma sma XX Southern Sami |
|
412 |
sme sme se Northern Sami |
|
413 |
smi smi XX Sami languages (Other) |
|
414 |
smj smj XX Lule Sami |
|
415 |
smn smn XX Inari Sami |
|
416 |
smo smo sm Samoan |
|
417 |
sms sms XX Skolt Sami |
|
418 |
sna sna sn Shona |
|
419 |
snd snd sd Sindhi |
|
420 |
snk snk XX Soninke |
|
421 |
sog sog XX Sogdian |
|
422 |
som som so Somali |
|
423 |
son son XX Songhai |
|
424 |
sot sot st Sotho, Southern |
|
425 |
spa spa es Spanish; Castilian |
|
426 |
sqi alb sq Albanian |
|
427 |
srd srd sc Sardinian |
|
428 |
srn srn XX Sranan Tongo |
|
429 |
srp scc sr Serbian |
|
430 |
srr srr XX Serer |
|
431 |
ssa ssa XX Nilo-Saharan (Other) |
|
432 |
ssw ssw ss Swati |
|
433 |
suk suk XX Sukuma |
|
434 |
sun sun su Sundanese |
|
435 |
sus sus XX Susu |
|
436 |
sux sux XX Sumerian |
|
437 |
swa swa sw Swahili |
|
438 |
swe swe sv Swedish |
|
439 |
syr syr XX Syriac |
|
440 |
tah tah ty Tahitian |
|
441 |
tai tai XX Tai (Other) |
|
442 |
tam tam ta Tamil |
|
443 |
tat tat tt Tatar |
|
444 |
tel tel te Telugu |
|
445 |
tem tem XX Timne |
|
446 |
ter ter XX Tereno |
|
447 |
tet tet XX Tetum |
|
448 |
tgk tgk tg Tajik |
|
449 |
tgl tgl tl Tagalog |
|
450 |
tha tha th Thai |
|
451 |
tig tig XX Tigre |
|
452 |
tir tir ti Tigrinya |
|
453 |
tiv tiv XX Tiv |
|
454 |
tkl tkl XX Tokelau |
|
455 |
tlh tlh XX Klingon; tlhIngan-Hol |
|
456 |
tli tli XX Tlingit |
|
457 |
tmh tmh XX Tamashek |
|
458 |
tog tog XX Tonga (Nyasa) |
|
459 |
ton ton to Tonga (Tonga Islands) |
|
460 |
tpi tpi XX Tok Pisin |
|
461 |
tsi tsi XX Tsimshian |
|
462 |
tsn tsn tn Tswana |
|
463 |
tso tso ts Tsonga |
|
464 |
tuk tuk tk Turkmen |
|
465 |
tum tum XX Tumbuka |
|
466 |
tup tup XX Tupi languages |
|
467 |
tur tur tr Turkish |
|
468 |
tut tut XX Altaic (Other) |
|
469 |
tvl tvl XX Tuvalu |
|
470 |
twi twi tw Twi |
|
471 |
tyv tyv XX Tuvinian |
|
472 |
udm udm XX Udmurt |
|
473 |
uga uga XX Ugaritic |
|
474 |
uig uig ug Uighur; Uyghur |
|
475 |
ukr ukr uk Ukrainian |
|
476 |
umb umb XX Umbundu |
|
477 |
und und XX Undetermined |
|
478 |
urd urd ur Urdu |
|
479 |
uzb uzb uz Uzbek |
|
480 |
vai vai XX Vai |
|
481 |
ven ven ve Venda |
|
482 |
vie vie vi Vietnamese |
|
483 |
vol vol vo Volapük |
|
484 |
vot vot XX Votic |
|
485 |
wak wak XX Wakashan languages |
|
486 |
wal wal XX Walamo |
|
487 |
war war XX Waray |
|
488 |
was was XX Washo |
|
489 |
wen wen XX Sorbian languages |
|
490 |
wln wln wa Walloon |
|
491 |
wol wol wo Wolof |
|
492 |
xal xal XX Kalmyk; Oirat |
|
493 |
xho xho xh Xhosa |
|
494 |
yao yao XX Yao |
|
495 |
yap yap XX Yapese |
|
496 |
yid yid yi Yiddish |
|
497 |
yor yor yo Yoruba |
|
498 |
ypk ypk XX Yupik languages |
|
499 |
zap zap XX Zapotec |
|
500 |
zen zen XX Zenaga |
|
501 |
zha zha za Zhuang; Chuang |
|
502 |
zho chi zh Chinese |
|
503 |
znd znd XX Zande |
|
504 |
zul zul zu Zulu |
|
505 |
zun zun XX Zuni |
|
506 |
zxx zxx XX No linguistic content |
|
0 | 507 |
tags/v2_0_0_Build_2060/frameworks/_fwAndami/src/org/gvsig/andami/PluginsManager.java | ||
---|---|---|
1 |
package org.gvsig.andami; |
|
2 |
|
|
3 |
import java.io.File; |
|
4 |
import java.util.Iterator; |
|
5 |
import java.util.List; |
|
6 |
|
|
7 |
import org.gvsig.andami.plugins.ExclusiveUIExtension; |
|
8 |
import org.gvsig.andami.plugins.IExtension; |
|
9 |
import org.gvsig.installer.lib.api.PackageInfo; |
|
10 |
|
|
11 |
public interface PluginsManager { |
|
12 |
/** |
|
13 |
* Return the associated pluginServices to the extension class passed as parameter. |
|
14 |
* @param extension |
|
15 |
* @return |
|
16 |
*/ |
|
17 |
public PluginServices getPlugin(Class<? extends IExtension> extension); |
|
18 |
|
|
19 |
public PluginServices getPlugin(String pluginName); |
|
20 |
|
|
21 |
public PackageInfo getPackageInfo(Class<? extends IExtension> extension); |
|
22 |
|
|
23 |
public List<PluginServices> getPlugins(); |
|
24 |
|
|
25 |
public IExtension getExtension(Class<? extends IExtension> extension); |
|
26 |
public Iterator<IExtension> getExtensions(); |
|
27 |
|
|
28 |
public void setExclusiveUIExtension(ExclusiveUIExtension extension); |
|
29 |
|
|
30 |
public ExclusiveUIExtension getExclusiveUIExtension(); |
|
31 |
|
|
32 |
/** |
|
33 |
* @deprecated @see {@link #getPluginsFolder()} |
|
34 |
*/ |
|
35 |
@Deprecated |
|
36 |
public File getPluginsDirectory(); |
|
37 |
|
|
38 |
public String getText(Object obj, String msg); |
|
39 |
|
|
40 |
/** |
|
41 |
* Returns the main application folder, where the application is installed. |
|
42 |
* |
|
43 |
* @return the main application folder |
|
44 |
*/ |
|
45 |
public File getApplicationFolder(); |
|
46 |
|
|
47 |
/** |
|
48 |
* Returns the application folder in the home of user. |
|
49 |
* |
|
50 |
* @return the main application folder |
|
51 |
*/ |
|
52 |
public File getApplicationHomeFolder(); |
|
53 |
|
|
54 |
/** |
|
55 |
* Returns the plugins folder. |
|
56 |
* |
|
57 |
* @return the plugins folder |
|
58 |
*/ |
|
59 |
public File getPluginsFolder(); |
|
60 |
|
|
61 |
/** |
|
62 |
* Returns the default folder with the installable package bundles. |
|
63 |
* |
|
64 |
* @return the default folder with the installable package bundles |
|
65 |
*/ |
|
66 |
public File getInstallFolder(); |
|
67 |
} |
|
0 | 68 |
tags/v2_0_0_Build_2060/frameworks/_fwAndami/src/org/gvsig/andami/preferences/StoreException.java | ||
---|---|---|
1 |
package org.gvsig.andami.preferences; |
|
2 |
|
|
3 |
public class StoreException extends Exception { |
|
4 |
|
|
5 |
public StoreException() { |
|
6 |
super(); |
|
7 |
// TODO Auto-generated constructor stub |
|
8 |
} |
|
9 |
|
|
10 |
public StoreException(String arg0, Throwable arg1) { |
|
11 |
super(arg0, arg1); |
|
12 |
// TODO Auto-generated constructor stub |
|
13 |
} |
|
14 |
|
|
15 |
public StoreException(String arg0) { |
|
16 |
super(arg0); |
|
17 |
// TODO Auto-generated constructor stub |
|
18 |
} |
|
19 |
|
|
20 |
public StoreException(Throwable arg0) { |
|
21 |
super(arg0); |
|
22 |
// TODO Auto-generated constructor stub |
|
23 |
} |
|
24 |
} |
|
0 | 25 |
tags/v2_0_0_Build_2060/frameworks/_fwAndami/src/org/gvsig/andami/preferences/AbstractPreferencePage.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 org.gvsig.andami.preferences; |
|
42 |
|
|
43 |
import java.util.Map; |
|
44 |
|
|
45 |
import org.gvsig.gui.beans.swing.GridBagLayoutPanel; |
|
46 |
import org.gvsig.tools.extensionpoint.ExtensionBuilder; |
|
47 |
/** |
|
48 |
* The abstract class that any preference page should extend. |
|
49 |
* |
|
50 |
* @author jaume dominguez faus - jaume.dominguez@iver.es |
|
51 |
* |
|
52 |
*/ |
|
53 |
public abstract class AbstractPreferencePage extends GridBagLayoutPanel implements IPreference, ExtensionBuilder{ |
|
54 |
/** |
|
55 |
* The number of components already added to the layout manager. |
|
56 |
*/ |
|
57 |
protected int y; |
|
58 |
|
|
59 |
private String title; |
|
60 |
|
|
61 |
protected String parentID = null; // Por defecto, nodo raiz |
|
62 |
|
|
63 |
|
|
64 |
public final void setParentID(String parentID) { |
|
65 |
this.parentID = parentID; |
|
66 |
} |
|
67 |
|
|
68 |
public String getParentID() { |
|
69 |
return parentID; |
|
70 |
} |
|
71 |
|
|
72 |
public final void setTitle(String title) { |
|
73 |
this.title = title; |
|
74 |
} |
|
75 |
|
|
76 |
public String toString() |
|
77 |
{ |
|
78 |
return getTitle(); |
|
79 |
} |
|
80 |
|
|
81 |
public Object create() { |
|
82 |
return this; |
|
83 |
} |
|
84 |
|
|
85 |
public Object create(Object[] args) { |
|
86 |
return this; |
|
87 |
} |
|
88 |
|
|
89 |
public Object create(Map args) { |
|
90 |
return this; |
|
91 |
} |
|
92 |
|
|
93 |
/** |
|
94 |
* Devuelve true si el Panel debe estar en un BorderLayout centrado o false si |
|
95 |
* tiene un tama?o fijo. |
|
96 |
* @return |
|
97 |
*/ |
|
98 |
public boolean isResizeable() { |
|
99 |
return false; |
|
100 |
} |
|
101 |
|
|
102 |
|
|
103 |
public final void saveValues() throws StoreException { |
|
104 |
// Store the values. |
|
105 |
storeValues(); |
|
106 |
|
|
107 |
// Tell the page that its changes are already applied |
|
108 |
setChangesApplied(); |
|
109 |
} |
|
110 |
|
|
111 |
/** |
|
112 |
* <p> |
|
113 |
* Gathers the configurations and stores them in the system.<br> |
|
114 |
* </p> |
|
115 |
* <p> |
|
116 |
* <b>storeValues()</b> and <b>setChangesApplied()</b> are methods from <b>AbstractPreferencePage</b> |
|
117 |
* not from <b>IPreference</b>. They both perform in combination what saveValue() should do |
|
118 |
* by itself, but they exist for performance issues. In fact, you <b>should not</b> |
|
119 |
* invoke them outside your PreferencePage class, you only need to code them. |
|
120 |
* </p> |
|
121 |
* @throws StoreException |
|
122 |
*/ |
|
123 |
public abstract void storeValues() throws StoreException; |
|
124 |
|
|
125 |
/** |
|
126 |
* <p> |
|
127 |
* After this method is invoked, the Preference page <b>must</b> return <b>true</b> as the |
|
128 |
* result of invoking isValueChanged() method. It tells that the values have been |
|
129 |
* saved in the system.<br> |
|
130 |
* </p> |
|
131 |
* <p> |
|
132 |
* <b>storeValues()</b> and <b>setChangesApplied()</b> are methods from <b>AbstractPreferencePage</b> |
|
133 |
* not from <b>IPreference</b>. They both perform in combination what storeValue() should |
|
134 |
* by itself, but they exist for performance issues. In fact, you <b>should not</b> |
|
135 |
* invoke them outside your PreferencePage class, you only need to code them. |
|
136 |
* </p> |
|
137 |
*/ |
|
138 |
public abstract void setChangesApplied(); |
|
139 |
} |
|
0 | 140 |
tags/v2_0_0_Build_2060/frameworks/_fwAndami/src/org/gvsig/andami/preferences/IPreferenceExtension.java | ||
---|---|---|
1 |
package org.gvsig.andami.preferences; |
|
2 |
|
|
3 |
public interface IPreferenceExtension { |
|
4 |
public IPreference[] getPreferencesPages(); |
|
5 |
} |
|
0 | 6 |
tags/v2_0_0_Build_2060/frameworks/_fwAndami/src/org/gvsig/andami/preferences/GenericDlgPreferences.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 org.gvsig.andami.preferences; |
|
42 |
|
|
43 |
import java.awt.BorderLayout; |
|
44 |
import java.awt.Component; |
|
45 |
import java.awt.Dimension; |
|
46 |
import java.awt.FlowLayout; |
|
47 |
import java.awt.Font; |
|
48 |
import java.awt.event.ActionEvent; |
|
49 |
import java.awt.event.ActionListener; |
|
50 |
import java.util.ArrayList; |
|
51 |
import java.util.Enumeration; |
|
52 |
import java.util.Hashtable; |
|
53 |
import java.util.Iterator; |
|
54 |
import java.util.Map; |
|
55 |
|
|
56 |
import javax.swing.JButton; |
|
57 |
import javax.swing.JLabel; |
|
58 |
import javax.swing.JOptionPane; |
|
59 |
import javax.swing.JPanel; |
|
60 |
import javax.swing.JScrollPane; |
|
61 |
import javax.swing.JSeparator; |
|
62 |
import javax.swing.JSplitPane; |
|
63 |
import javax.swing.JTree; |
|
64 |
import javax.swing.UIManager; |
|
65 |
import javax.swing.tree.DefaultMutableTreeNode; |
|
66 |
import javax.swing.tree.DefaultTreeCellRenderer; |
|
67 |
import javax.swing.tree.DefaultTreeModel; |
|
68 |
import javax.swing.tree.TreeSelectionModel; |
|
69 |
|
|
70 |
import org.gvsig.andami.PluginServices; |
|
71 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
|
72 |
import org.gvsig.andami.ui.mdiManager.WindowInfo; |
|
73 |
import org.gvsig.tools.ToolsLocator; |
|
74 |
import org.gvsig.tools.extensionpoint.ExtensionPoint; |
|
75 |
import org.gvsig.tools.extensionpoint.ExtensionPointManager; |
|
76 |
|
|
77 |
|
|
78 |
/** |
|
79 |
* @author fjp |
|
80 |
* |
|
81 |
* The reason behind this class is to have the opportunity of use a DlgPreferences |
|
82 |
* in a local way. Then, you don't need to be a SingletonView. |
|
83 |
*/ |
|
84 |
public class GenericDlgPreferences extends JPanel implements IWindow { |
|
85 |
|
|
86 |
private static final long serialVersionUID = -6561660591523322611L; |
|
87 |
|
|
88 |
private WindowInfo viewInfo = null; |
|
89 |
private IPreference activePreference; |
|
90 |
|
|
91 |
private Map<String, IPreference> preferences = |
|
92 |
new Hashtable<String, IPreference>(); |
|
93 |
DefaultTreeModel treeModel = null; |
|
94 |
|
|
95 |
private JTree jTreePlugins = null; |
|
96 |
|
|
97 |
private JPanel jPanelButtons = null; |
|
98 |
|
|
99 |
private JButton jButtonOK = null; |
|
100 |
|
|
101 |
private JButton jButtonCancel = null; |
|
102 |
private DefaultMutableTreeNode root = new DefaultMutableTreeNode(); |
|
103 |
|
|
104 |
private JPanel jPanelCenter = null; |
|
105 |
|
|
106 |
private JLabel jLabelBigTitle = null; |
|
107 |
|
|
108 |
private JScrollPane jScrollPane = null; |
|
109 |
|
|
110 |
private JSplitPane jSplitPaneCenter = null; |
|
111 |
|
|
112 |
private JPanel jPanelContainer = null; |
|
113 |
private JButton jButtonRestore; |
|
114 |
private ActionListener action; |
|
115 |
private boolean dirtyTree = false; |
|
116 |
private ExtensionPointManager extensionPoints =ToolsLocator.getExtensionPointManager(); |
|
117 |
|
|
118 |
|
|
119 |
private class MyTreeCellRenderer extends DefaultTreeCellRenderer |
|
120 |
{ |
|
121 |
|
|
122 |
private static final long serialVersionUID = 1833782141342096776L; |
|
123 |
|
|
124 |
public MyTreeCellRenderer() { |
|
125 |
} |
|
126 |
|
|
127 |
public Component getTreeCellRendererComponent( |
|
128 |
JTree tree, |
|
129 |
Object value, |
|
130 |
boolean sel, |
|
131 |
boolean expanded, |
|
132 |
boolean leaf, |
|
133 |
int row, |
|
134 |
boolean hasFocus) { |
|
135 |
|
|
136 |
super.getTreeCellRendererComponent( |
|
137 |
tree, value, sel, |
|
138 |
expanded, leaf, row, |
|
139 |
hasFocus); |
|
140 |
if (value instanceof DefaultMutableTreeNode) |
|
141 |
{ |
|
142 |
DefaultMutableTreeNode node = (DefaultMutableTreeNode) value; |
|
143 |
if (node.getUserObject() instanceof IPreference) |
|
144 |
{ |
|
145 |
IPreference pref = (IPreference) node.getUserObject(); |
|
146 |
this.setText(pref.getTitle()); |
|
147 |
} |
|
148 |
} |
|
149 |
return this; |
|
150 |
} |
|
151 |
|
|
152 |
} |
|
153 |
|
|
154 |
|
|
155 |
public GenericDlgPreferences() { |
|
156 |
super(); |
|
157 |
this.action = new ActionListener() { |
|
158 |
public void actionPerformed(ActionEvent e) { |
|
159 |
PluginServices.getMDIManager().setWaitCursor(); |
|
160 |
String actionCommand = e.getActionCommand(); |
|
161 |
if ("RESTORE".equals(actionCommand)) { |
|
162 |
// Restore default values in current page |
|
163 |
if (activePreference!=null) { |
|
164 |
activePreference.initializeDefaults(); |
|
165 |
// bug 240 |
|
166 |
// try { |
|
167 |
// activePreference.saveValues(); |
|
168 |
// } catch (StoreException sEx) { |
|
169 |
// /* |
|
170 |
// * If you reach this code you coded your page |
|
171 |
// * with wrong factory default values. |
|
172 |
// * Check them out. |
|
173 |
// */ |
|
174 |
// PluginServices.getMDIManager().restoreCursor(); |
|
175 |
// |
|
176 |
// // Show error message |
|
177 |
// JOptionPane.showMessageDialog((Component) PluginServices. |
|
178 |
// getMainFrame(),sEx.getMessage()); |
|
179 |
// |
|
180 |
// } |
|
181 |
} |
|
182 |
} else { |
|
183 |
Iterator<String> it = preferences.keySet().iterator(); |
|
184 |
|
|
185 |
if ("CANCEL".equals(actionCommand)) { |
|
186 |
// Restore previous values in all pages |
|
187 |
while (it.hasNext()) { |
|
188 |
IPreference pref = preferences.get(it.next()); |
|
189 |
if (pref.isValueChanged()) { |
|
190 |
pref.initializeValues(); // |
|
191 |
} |
|
192 |
} |
|
193 |
closeView(); |
|
194 |
} else if ("OK".equals(actionCommand)) { |
|
195 |
// Apply values in all pages |
|
196 |
boolean shouldClose = true; |
|
197 |
while (it.hasNext()) { |
|
198 |
IPreference preference = |
|
199 |
preferences.get(it.next()); |
|
200 |
try{ |
|
201 |
if (preference.isValueChanged()) { |
|
202 |
preference.saveValues(); |
|
203 |
preference.initializeValues(); |
|
204 |
} |
|
205 |
}catch (StoreException ex) { |
|
206 |
// Reach this code should mean that the page has wrong values |
|
207 |
shouldClose = false; |
|
208 |
PluginServices.getMDIManager().restoreCursor(); |
|
209 |
|
|
210 |
// Show error message |
|
211 |
JOptionPane.showMessageDialog((Component)PluginServices.getMainFrame(),ex.getMessage()); |
|
212 |
|
|
213 |
// Focus on error page |
|
214 |
setActivePage(preference); |
|
215 |
} |
|
216 |
} |
|
217 |
if (shouldClose) { |
|
218 |
closeView(); |
|
219 |
} |
|
220 |
} |
|
221 |
} |
|
222 |
PluginServices.getMDIManager().restoreCursor(); |
|
223 |
} |
|
224 |
}; |
|
225 |
initialize(); |
|
226 |
} |
|
227 |
|
|
228 |
private void initialize() { |
|
229 |
setLayout(new BorderLayout()); |
|
230 |
setSize(new java.awt.Dimension(750,479)); |
|
231 |
super.add(getJPanelButtons(), BorderLayout.SOUTH); |
|
232 |
setPreferredSize(new java.awt.Dimension(390,369)); |
|
233 |
super.add(getJSplitPaneCenter(), java.awt.BorderLayout.CENTER); |
|
234 |
getJSplitPaneCenter().setLeftComponent(getJScrollPane()); |
|
235 |
getJSplitPaneCenter().setRightComponent(getJPanelNorth()); |
|
236 |
treeModel = new DefaultTreeModel(root); |
|
237 |
} |
|
238 |
|
|
239 |
public void refreshExtensionPoints() { |
|
240 |
ExtensionPoint ep = this.extensionPoints.add("AplicationPreferences", ""); |
|
241 |
|
|
242 |
|
|
243 |
@SuppressWarnings("unchecked") |
|
244 |
Iterator<ExtensionPoint.Extension> iterator = ep.iterator(); |
|
245 |
while (iterator.hasNext()) { |
|
246 |
try { |
|
247 |
IPreference obj = (IPreference) (iterator.next()).create(); |
|
248 |
this.addPreferencePage(obj); |
|
249 |
} catch (InstantiationException e) { |
|
250 |
e.printStackTrace(); |
|
251 |
} catch (IllegalAccessException e) { |
|
252 |
e.printStackTrace(); |
|
253 |
} catch (ClassCastException e) { |
|
254 |
e.printStackTrace(); |
|
255 |
} |
|
256 |
} |
|
257 |
ArrayList<IPreference> prefList = new ArrayList<IPreference>(preferences.values()); |
|
258 |
addPreferencePages(prefList); |
|
259 |
} |
|
260 |
|
|
261 |
// TODO este m?todo es un parche provisional mientras se hace un refactoring de |
|
262 |
//las PreferencePages para disponer de un m?todo que inicialize las variables |
|
263 |
//a partir de las preferencias. |
|
264 |
public void storeValues() { |
|
265 |
Iterator<IPreference> iter = preferences.values().iterator(); |
|
266 |
|
|
267 |
while (iter.hasNext()) { |
|
268 |
IPreference preference = iter.next(); |
|
269 |
|
|
270 |
try { |
|
271 |
preference.saveValues(); |
|
272 |
} catch (StoreException e) { |
|
273 |
/* |
|
274 |
* If you reach this code you coded your page |
|
275 |
* with wrong factory default values. |
|
276 |
* Check them out. |
|
277 |
*/ |
|
278 |
PluginServices.getMDIManager().restoreCursor(); |
|
279 |
// Show error message |
|
280 |
JOptionPane.showMessageDialog( |
|
281 |
(Component) PluginServices.getMainFrame(), e.getMessage()); |
|
282 |
} |
|
283 |
} |
|
284 |
} |
|
285 |
|
|
286 |
/** |
|
287 |
* It is very common to be confused with this method. But |
|
288 |
* the one you are looking for is addPreferencePage(IPreference) |
|
289 |
*/ |
|
290 |
public Component add(Component c) { |
|
291 |
//throw new Error("Do not use com.iver.cit.gvsig.gui.preferences.DlgPreferences.add(Component) use com.iver.cit.gvsig.gui.preferences.DlgPreferences.addPreferencePage(IPreference) instead"); |
|
292 |
throw new Error("Do not use org.gvsig.app.gui.preferences.DlgPreferences.add(Component) register an extension point instead"); |
|
293 |
} |
|
294 |
|
|
295 |
public Component add(Component c, int i) { |
|
296 |
return add(c); |
|
297 |
} |
|
298 |
|
|
299 |
public void add(Component c, Object o) { |
|
300 |
add(c); |
|
301 |
} |
|
302 |
|
|
303 |
public void add(Component c, Object o, int i) { |
|
304 |
add(c); |
|
305 |
} |
|
306 |
|
|
307 |
public WindowInfo getWindowInfo() { |
|
308 |
if (viewInfo == null) { |
|
309 |
viewInfo = new WindowInfo(WindowInfo.MODALDIALOG | WindowInfo.RESIZABLE | WindowInfo.PALETTE); |
|
310 |
viewInfo.setTitle(PluginServices.getText(this, |
|
311 |
"Preferences")); |
|
312 |
viewInfo.setWidth(this.getWidth()+8); |
|
313 |
viewInfo.setHeight(this.getHeight()); |
|
314 |
} |
|
315 |
return viewInfo; |
|
316 |
} |
|
317 |
|
|
318 |
/** |
|
319 |
* This method initializes jTreePlugins |
|
320 |
* |
|
321 |
* @return javax.swing.JTree |
|
322 |
*/ |
|
323 |
private JTree getJTreePlugins() { |
|
324 |
if (jTreePlugins == null) { |
|
325 |
jTreePlugins = new JTree(); |
|
326 |
jTreePlugins.setRootVisible(false); |
|
327 |
MyTreeCellRenderer treeCellRenderer = new MyTreeCellRenderer(); |
|
328 |
treeCellRenderer.setOpenIcon(null); |
|
329 |
treeCellRenderer.setClosedIcon(null); |
|
330 |
treeCellRenderer.setLeafIcon(null); |
|
331 |
|
|
332 |
jTreePlugins.setCellRenderer(treeCellRenderer); |
|
333 |
jTreePlugins.setShowsRootHandles(true); |
|
334 |
jTreePlugins |
|
335 |
.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() { |
|
336 |
public void valueChanged(javax.swing.event.TreeSelectionEvent e) { |
|
337 |
DefaultMutableTreeNode node = (DefaultMutableTreeNode) |
|
338 |
jTreePlugins.getLastSelectedPathComponent(); |
Also available in: Unified diff