Revision 39429
tags/v2_0_0_Build_2061/frameworks/_fwAndami/castor.properties | ||
---|---|---|
1 |
org.exolab.castor.indent=true |
|
0 | 2 |
tags/v2_0_0_Build_2061/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_2061/frameworks/_fwAndami/src/log4j.properties | ||
---|---|---|
1 |
log4j.rootLogger=debug, stdout |
|
2 |
|
|
3 |
log4j.appender.stdout=org.apache.log4j.ConsoleAppender |
|
4 |
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout |
|
5 |
|
|
6 |
# Pattern to output the caller's file name and line number. |
|
7 |
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n |
|
8 |
|
|
0 | 9 |
tags/v2_0_0_Build_2061/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_2061/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_2061/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_2061/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(); |
|
339 |
|
|
340 |
if (node == null) { |
|
341 |
return; |
|
342 |
} |
|
343 |
setActivePage((IPreference) node.getUserObject()); |
|
344 |
} |
|
345 |
}); |
|
346 |
jTreePlugins.putClientProperty("JTree.linestyle", "Angled"); |
|
347 |
jTreePlugins.getSelectionModel(). |
|
348 |
setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); |
|
349 |
} |
|
350 |
|
|
351 |
return jTreePlugins; |
|
352 |
} |
|
353 |
|
|
354 |
/** |
|
355 |
* It takes an IPreference page and adds it to the application's preferences |
|
356 |
* dialog. The preference page is added in alphabetical order within the |
|
357 |
* branch where the page is hanging on, and defined by its title. |
|
358 |
* @param page |
|
359 |
*/ |
|
360 |
public void addPreferencePage(IPreference page) |
|
361 |
{ |
|
362 |
if (preferences.containsKey(page.getID())) { |
|
363 |
return; |
|
364 |
} |
|
365 |
preferences.put(page.getID(), page); |
|
366 |
page.initializeValues(); // init values from the last settings |
|
367 |
if (dirtyTree) { |
|
368 |
// rebuild page tree |
|
369 |
dirtyTree = false; |
|
370 |
|
|
371 |
DefaultTreeModel model = new DefaultTreeModel(root); |
|
372 |
treeModel = model; |
|
373 |
jTreePlugins.setModel(model); |
|
374 |
} |
|
375 |
|
|
376 |
doInsertNode(treeModel, page); |
|
377 |
getJTreePlugins().setModel(treeModel); |
|
378 |
getJTreePlugins().repaint(); |
|
379 |
} |
|
380 |
private void addPreferencePages(ArrayList<IPreference> prefs){ |
|
381 |
while (prefs.size()>0){ |
|
382 |
IPreference pref=prefs.get(0); |
|
383 |
// System.err.println("IPreference a persistir= "+pref.getID()); |
|
384 |
if (pref.getParentID()!=null && preferences.get(pref.getParentID())==null){ |
|
385 |
prefs.remove(pref); |
|
386 |
addPreferencePages(prefs); |
|
387 |
// System.err.println("IPreference = "+pref.getID()); |
|
388 |
addPreference(pref); |
|
389 |
}else{ |
|
390 |
// System.err.println("IPreference = "+pref.getID()); |
|
391 |
addPreference(pref); |
|
392 |
prefs.remove(pref); |
|
393 |
} |
|
394 |
} |
|
395 |
} |
|
396 |
private void addPreference(IPreference pref) { |
|
397 |
DefaultTreeModel model = new DefaultTreeModel(root); |
|
398 |
doInsertNode(model, pref); |
|
399 |
} |
|
400 |
|
|
401 |
private DefaultMutableTreeNode findNode(String searchID) |
|
402 |
{ |
|
403 |
@SuppressWarnings("unchecked") |
|
404 |
Enumeration<DefaultMutableTreeNode> e = root.breadthFirstEnumeration(); |
|
405 |
while (e.hasMoreElements()) |
|
406 |
{ |
|
407 |
DefaultMutableTreeNode nodeAux = e.nextElement(); |
|
408 |
if (nodeAux != null) |
|
409 |
{ |
|
410 |
IPreference pref = (IPreference) nodeAux.getUserObject(); |
|
411 |
if (pref == null) { |
|
412 |
continue; // Root node |
|
413 |
} |
|
414 |
if (pref.getID().equals(searchID)) |
|
415 |
{ |
|
416 |
return nodeAux; |
|
417 |
} |
|
418 |
} |
|
419 |
} |
|
420 |
return null; |
|
421 |
|
|
422 |
} |
|
423 |
|
|
424 |
private void doInsertNode(DefaultTreeModel treeModel, IPreference page) |
|
425 |
{ |
|
426 |
|
|
427 |
dirtyTree = ((page.getParentID() != null) && (findNode(page.getParentID())==null)); |
|
428 |
if (findNode(page.getID()) != null) { |
|
429 |
return; |
|
430 |
} |
|
431 |
if (page.getParentID() != null) |
|
432 |
{ |
|
433 |
if (preferences.containsKey(page.getParentID())) |
|
434 |
{ |
|
435 |
IPreference parent = (IPreference) preferences.get(page.getParentID()); |
|
436 |
DefaultMutableTreeNode nodeParent = findNode(parent.getID()); |
|
437 |
if (nodeParent == null) // the parent is empty |
|
438 |
{ |
|
439 |
// Recursively add it |
|
440 |
doInsertNode(treeModel, parent); |
|
441 |
} |
|
442 |
else |
|
443 |
{ |
|
444 |
DefaultMutableTreeNode nodeValue = new DefaultMutableTreeNode(page); |
|
445 |
int children = nodeParent.getChildCount(); |
|
446 |
int pos=0; |
|
447 |
for (int i = 0; i < children; i++) { |
|
448 |
DefaultMutableTreeNode node = (DefaultMutableTreeNode) treeModel.getChild(nodeParent, i); |
|
449 |
if (node.getUserObject() instanceof IPreference) { |
|
450 |
String pageTitle = ((IPreference) node.getUserObject()).getTitle(); |
|
451 |
if (pageTitle.compareTo(page.getTitle()) < 0) { |
|
452 |
++pos; |
|
453 |
} |
|
454 |
} |
|
455 |
} |
|
456 |
treeModel.insertNodeInto(nodeValue, nodeParent, pos); |
|
457 |
} |
|
458 |
} |
|
459 |
} |
|
460 |
else // First level node ("General", "Edition") |
|
461 |
{ |
|
462 |
DefaultMutableTreeNode nodeValue = new DefaultMutableTreeNode(page); |
|
463 |
int children = root.getChildCount(); |
|
464 |
int pos=0; |
|
465 |
for (int i = 0; i < children; i++) { |
|
466 |
DefaultMutableTreeNode node = (DefaultMutableTreeNode) treeModel.getChild(root, i); |
|
467 |
if (node.getUserObject() instanceof IPreference) { |
|
468 |
String pageTitle = ((IPreference) node.getUserObject()).getTitle(); |
|
469 |
if (pageTitle.compareTo(page.getTitle()) < 0) { |
|
470 |
++pos; |
|
471 |
} |
|
472 |
} |
|
473 |
} |
|
474 |
treeModel.insertNodeInto(nodeValue, root, pos); |
|
475 |
} |
|
476 |
} |
|
477 |
|
|
478 |
/** |
|
479 |
* This method initializes jPanelButtons |
|
480 |
* |
|
481 |
* @return javax.swing.JPanel |
|
482 |
*/ |
|
483 |
private JPanel getJPanelButtons() { |
|
484 |
if (jPanelButtons == null) { |
|
485 |
jPanelButtons = new JPanel(new BorderLayout()); |
|
486 |
JPanel jPanelAux = new JPanel(); |
|
487 |
JLabel l = new JLabel(); |
|
488 |
l.setPreferredSize(new Dimension(40, 20)); |
|
489 |
jPanelButtons.add(new JSeparator(JSeparator.HORIZONTAL), BorderLayout.NORTH); |
|
490 |
jPanelAux.add(getJButtonRestore(), BorderLayout.WEST); |
|
491 |
jPanelAux.add(l, BorderLayout.CENTER); |
|
492 |
jPanelAux.add(getJButtonOK(), BorderLayout.EAST); |
|
493 |
jPanelAux.add(getJButtonCancel(), BorderLayout.EAST); |
|
494 |
|
|
495 |
jPanelButtons.add(jPanelAux); |
|
496 |
} |
|
497 |
return jPanelButtons; |
|
498 |
} |
|
499 |
|
|
500 |
/** |
|
501 |
* This method initializes jPanelButtons |
|
502 |
* |
|
503 |
* @return javax.swing.JPanel |
|
504 |
*/ |
|
505 |
|
|
506 |
|
|
507 |
/** |
|
508 |
* This method initializes jButtonOK |
|
509 |
* |
|
510 |
* @return JButton |
|
511 |
*/ |
|
512 |
private JButton getJButtonOK() { |
|
513 |
if (jButtonOK == null) { |
|
514 |
jButtonOK = new JButton(); |
|
515 |
jButtonOK.setText(PluginServices.getText(this, "aceptar")); |
|
516 |
jButtonOK.setActionCommand("OK"); |
|
517 |
jButtonOK.addActionListener(action); |
|
518 |
} |
|
519 |
return jButtonOK; |
|
520 |
} |
|
521 |
|
|
522 |
/** |
|
523 |
* This method initializes jButtonOK |
|
524 |
* |
|
525 |
* @return JButton |
|
526 |
*/ |
|
527 |
private JButton getJButtonRestore() { |
|
528 |
if (jButtonRestore == null) { |
|
529 |
jButtonRestore = new JButton(); |
|
530 |
jButtonRestore.setText(PluginServices.getText(this, "restore_defaults")); |
|
531 |
jButtonRestore.setActionCommand("RESTORE"); |
|
532 |
jButtonRestore.addActionListener(action); |
|
533 |
} |
|
534 |
return jButtonRestore; |
|
535 |
} |
|
536 |
|
|
537 |
private void closeView() { |
|
538 |
PluginServices.getMDIManager().closeWindow(this); |
|
539 |
} |
|
540 |
|
|
541 |
/** |
|
542 |
* This method initializes jButtonCancel |
|
543 |
* |
|
544 |
* @return JButton |
|
545 |
*/ |
|
546 |
private JButton getJButtonCancel() { |
|
547 |
if (jButtonCancel == null) { |
|
548 |
jButtonCancel = new JButton(); |
|
549 |
jButtonCancel.setText(PluginServices.getText(this, "cancelar")); |
|
550 |
jButtonCancel.setActionCommand("CANCEL"); |
|
551 |
jButtonCancel.addActionListener(action); |
|
552 |
} |
|
553 |
return jButtonCancel; |
|
554 |
} |
|
555 |
|
|
556 |
/** |
|
557 |
* This method initializes jPanelNorth |
|
558 |
* |
|
559 |
* @return javax.swing.JPanel |
|
560 |
*/ |
|
561 |
private JPanel getJPanelNorth() { |
|
562 |
if (jPanelCenter == null) { |
|
563 |
jLabelBigTitle = new JLabel(); |
|
564 |
jLabelBigTitle.setText("General"); |
|
565 |
Font font = jLabelBigTitle.getFont(); |
|
566 |
font = font.deriveFont(Font.BOLD, font.getSize() + 1.0f); |
|
567 |
jLabelBigTitle.setFont(font); |
|
568 |
jLabelBigTitle.setHorizontalTextPosition(javax.swing.SwingConstants.TRAILING); |
|
569 |
jLabelBigTitle.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); |
|
570 |
jPanelCenter = new JPanel(); |
|
571 |
JPanel jPanelPageTitle = new JPanel(new BorderLayout()); |
|
572 |
JPanel jPanelAux = new JPanel(new BorderLayout()); |
|
573 |
jPanelAux.add(jLabelBigTitle, java.awt.BorderLayout.NORTH); |
|
574 |
jPanelPageTitle.add(jPanelAux, java.awt.BorderLayout.WEST); |
|
575 |
jPanelPageTitle.add(new JSeparator(JSeparator.HORIZONTAL), BorderLayout.SOUTH); |
|
576 |
jPanelCenter.setLayout(new BorderLayout()); |
|
577 |
jPanelCenter.add(jPanelPageTitle, BorderLayout.NORTH); |
|
578 |
jPanelCenter.add(getJPanelContainer(), java.awt.BorderLayout.CENTER); |
|
579 |
|
|
580 |
} |
|
581 |
return jPanelCenter; |
|
582 |
} |
|
583 |
|
|
584 |
/** |
|
585 |
* This method initializes jScrollPane |
|
586 |
* |
|
587 |
* @return javax.swing.JScrollPane |
|
588 |
*/ |
|
589 |
private JScrollPane getJScrollPane() { |
|
590 |
if (jScrollPane == null) { |
|
591 |
jScrollPane = new JScrollPane(); |
|
592 |
jScrollPane.setPreferredSize(new java.awt.Dimension(140,322)); |
|
593 |
jScrollPane.setViewportView(getJTreePlugins()); |
|
594 |
} |
|
595 |
return jScrollPane; |
|
596 |
} |
|
597 |
|
|
598 |
/** |
|
599 |
* This method initializes jSplitPaneCenter |
|
600 |
* |
|
601 |
* @return javax.swing.JSplitPane |
|
602 |
*/ |
|
603 |
private JSplitPane getJSplitPaneCenter() { |
|
604 |
if (jSplitPaneCenter == null) { |
|
605 |
jSplitPaneCenter = new JSplitPane(); |
|
606 |
jSplitPaneCenter.setResizeWeight(0.2); |
|
607 |
jSplitPaneCenter.setDividerLocation(200); |
|
608 |
} |
|
609 |
return jSplitPaneCenter; |
|
610 |
} |
|
611 |
|
|
612 |
/** |
|
613 |
* This method initializes jPanelContainer |
|
614 |
* |
|
615 |
* @return javax.swing.JPanel |
|
616 |
*/ |
|
617 |
private JPanel getJPanelContainer() { |
|
618 |
if (jPanelContainer == null) { |
|
619 |
jPanelContainer = new JPanel(); |
|
620 |
} |
|
621 |
return jPanelContainer; |
|
622 |
} |
|
623 |
|
|
624 |
/** |
|
625 |
* |
|
626 |
*/ |
|
627 |
public void setActivePage(IPreference page) { |
|
628 |
activePreference = page; |
|
629 |
jLabelBigTitle.setText(activePreference.getTitle()); |
|
630 |
JPanel prefPanel = activePreference.getPanel(); |
|
631 |
jLabelBigTitle.setIcon(activePreference.getIcon()); |
|
632 |
jPanelContainer.removeAll(); |
|
633 |
if ((prefPanel instanceof AbstractPreferencePage) && |
|
634 |
((AbstractPreferencePage) prefPanel).isResizeable()) { |
|
635 |
jPanelContainer.setLayout(new BorderLayout()); |
|
636 |
jPanelContainer.add(prefPanel, BorderLayout.CENTER); |
|
637 |
} else { |
|
638 |
jPanelContainer.setLayout(new FlowLayout()); |
|
639 |
jPanelContainer.add(prefPanel); |
|
640 |
} |
|
641 |
prefPanel.setVisible(true); |
|
642 |
repaint(); |
|
643 |
} |
|
644 |
|
|
645 |
public Object getWindowProfile() { |
|
646 |
return WindowInfo.DIALOG_PROFILE; |
|
647 |
} |
|
648 |
} |
|
0 | 649 |
tags/v2_0_0_Build_2061/frameworks/_fwAndami/src/org/gvsig/andami/preferences/IPreference.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 javax.swing.ImageIcon; |
|
44 |
import javax.swing.JPanel; |
|
45 |
|
|
46 |
import org.gvsig.tools.extensionpoint.ExtensionBuilder; |
|
47 |
/** |
|
48 |
* Interface that any entry in the application's preferences dialog must implement. |
|
49 |
* In addition to this interface, an abstract class is supplied to ease the addition |
|
50 |
* of new pages |
|
51 |
* @see org.gvsig.andami.preferences.AbstractPreferencePage |
|
52 |
* |
|
53 |
* @author jaume dominguez faus - jaume.dominguez@iver.es |
|
54 |
* |
|
55 |
*/ |
|
56 |
public interface IPreference extends ExtensionBuilder { |
|
57 |
|
|
58 |
/** |
|
59 |
* Returns an identifier for this preferences page that is used to reference |
|
60 |
* it inside the Map. |
|
61 |
* @return String, you'd typically use any kind of <code>this.getClass().getName();</code> |
|
62 |
*/ |
|
63 |
String getID(); |
|
64 |
|
|
65 |
/** |
|
66 |
* Returns an string containing the title of the preferences page. This string |
|
67 |
* will be shown whether in the tree entry or in the page header. |
|
68 |
* @return String, the title of the page |
|
69 |
*/ |
|
70 |
String getTitle(); |
|
71 |
|
|
72 |
/** |
|
73 |
* The page must be contained in a JPanel and whatever to be shown will be returned |
|
74 |
* by this function.<br> |
|
75 |
* <p> |
|
76 |
* The content is added, removed and repainted automatically upon the events received from |
|
77 |
* the mouse. So, you only have to care about the content and the functionality to make it |
|
78 |
* <br> |
|
79 |
* </p> |
|
80 |
* having sense. |
|
81 |
* @return JPanel holding the contents to be shown in the page. |
|
82 |
*/ |
|
83 |
JPanel getPanel(); |
Also available in: Unified diff