Revision 45189

View differences:

tags/org.gvsig.desktop-2.0.289/org.gvsig.desktop.framework/org.gvsig.andami/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2

  
3
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4
    <modelVersion>4.0.0</modelVersion>
5
    <artifactId>org.gvsig.andami</artifactId>
6
    <packaging>jar</packaging>
7
    <name>${project.artifactId}</name>
8
    <description>Plugins management framework</description>
9
    <parent>
10
        <groupId>org.gvsig</groupId>
11
        <artifactId>org.gvsig.desktop.framework</artifactId>
12
        <version>2.0.289</version>
13
    </parent>
14

  
15
    <dependencies>
16

  
17
        <dependency>
18
            <groupId>org.slf4j</groupId>
19
            <artifactId>slf4j-api</artifactId>
20
            <scope>compile</scope>
21
        </dependency>
22
        <dependency>
23
            <groupId>commons-configuration</groupId>
24
            <artifactId>commons-configuration</artifactId>
25
            <scope>compile</scope>
26
        </dependency>
27
        <dependency>
28
            <groupId>commons-io</groupId>
29
            <artifactId>commons-io</artifactId>
30
            <scope>compile</scope>
31
        </dependency>
32
        <dependency>
33
            <groupId>org.apache.commons</groupId>
34
            <artifactId>commons-math</artifactId>
35
            <scope>runtime</scope>
36
        </dependency>                
37
        <dependency>
38
            <groupId>org.apache.commons</groupId>
39
            <artifactId>commons-text</artifactId>
40
            <scope>runtime</scope>
41
        </dependency>
42
        <dependency>
43
            <groupId>org.gvsig</groupId>
44
            <artifactId>org.gvsig.tools.lib</artifactId>
45
            <scope>compile</scope>
46
        </dependency>
47
        <dependency>
48
            <groupId>org.gvsig</groupId>
49
            <artifactId>org.gvsig.tools.dynform.api</artifactId>
50
            <scope>compile</scope>
51
        </dependency>
52
        <dependency>
53
            <groupId>org.gvsig</groupId>
54
            <artifactId>org.gvsig.tools.dynform.spi</artifactId>
55
            <scope>compile</scope>
56
        </dependency>
57
        <dependency>
58
            <groupId>org.gvsig</groupId>
59
            <artifactId>org.gvsig.tools.dynform.services</artifactId>
60
            <scope>compile</scope>
61
        </dependency>
62
        <dependency>
63
            <groupId>org.gvsig</groupId>
64
            <artifactId>org.gvsig.tools.util.api</artifactId>
65
            <scope>compile</scope>
66
        </dependency>
67
        <dependency>
68
            <groupId>org.gvsig</groupId>
69
            <artifactId>org.gvsig.tools.util.impl</artifactId>
70
            <scope>compile</scope>
71
        </dependency>
72
        <dependency>
73
            <groupId>org.gvsig</groupId>
74
            <artifactId>org.gvsig.tools.dynform.impl</artifactId>
75
            <scope>runtime</scope>
76
        </dependency>
77
        <dependency>
78
            <groupId>org.gvsig</groupId>
79
            <artifactId>org.gvsig.i18n</artifactId>
80
            <scope>compile</scope>
81
        </dependency>
82
        <dependency>
83
            <groupId>org.gvsig</groupId>
84
            <artifactId>org.gvsig.tools.swing.api</artifactId>
85
            <scope>compile</scope>
86
        </dependency>
87
        <dependency>
88
            <groupId>org.gvsig</groupId>
89
            <artifactId>org.gvsig.tools.swing.impl</artifactId>
90
            <scope>compile</scope>
91
        </dependency>
92
        <dependency>
93
            <groupId>org.gvsig</groupId>
94
            <artifactId>org.gvsig.utils</artifactId>
95
            <scope>compile</scope>
96
        </dependency>
97
        <dependency>
98
            <groupId>org.gvsig</groupId>
99
            <artifactId>org.gvsig.ui</artifactId>
100
            <scope>compile</scope>
101
        </dependency>
102
        <dependency>
103
            <groupId>org.gvsig</groupId>
104
            <artifactId>org.gvsig.installer.lib.api</artifactId>
105
            <scope>compile</scope>
106
        </dependency>
107
        <dependency>
108
            <groupId>org.gvsig</groupId>
109
            <artifactId>org.gvsig.installer.swing.api</artifactId>
110
            <scope>compile</scope>
111
        </dependency>
112
        <dependency>
113
            <groupId>org.gvsig</groupId>
114
            <artifactId>org.gvsig.expressionevaluator.lib.impl</artifactId>
115
            <scope>runtime</scope>
116
        </dependency>
117
        <dependency>
118
            <groupId>org.gvsig</groupId>
119
            <artifactId>org.gvsig.expressionevaluator.swing.impl</artifactId>
120
            <scope>runtime</scope>
121
        </dependency>
122
        <dependency>
123
            <groupId>javax.help</groupId>
124
            <artifactId>javahelp</artifactId>
125
            <scope>compile</scope>
126
        </dependency>
127
        <dependency>
128
            <groupId>com.jgoodies</groupId>
129
            <artifactId>jgoodies-looks</artifactId>
130
        </dependency>
131
        <dependency>
132
            <groupId>castor</groupId>
133
            <artifactId>castor</artifactId>
134
            <scope>compile</scope>
135
        </dependency>
136
        <dependency>
137
            <groupId>log4j</groupId>
138
            <artifactId>log4j</artifactId>
139
            <scope>compile</scope>
140
        </dependency>
141
        <dependency>
142
            <groupId>commons-cli</groupId>
143
            <artifactId>commons-cli</artifactId>
144
            <scope>compile</scope>
145
        </dependency>
146
        <dependency>
147
            <groupId>commons-collections</groupId>
148
            <artifactId>commons-collections</artifactId>
149
            <scope>compile</scope>
150
        </dependency>
151
        <dependency>
152
            <groupId>org.apache.commons</groupId>
153
            <artifactId>commons-collections4</artifactId>
154
            <scope>compile</scope>
155
        </dependency>
156
        <dependency>
157
            <groupId>org.gnu</groupId>
158
            <artifactId>jel</artifactId>
159
            <scope>compile</scope>
160
        </dependency>
161
        <dependency>
162
            <groupId>jwizardcomponent</groupId>
163
            <artifactId>jwizardcomponent</artifactId>
164
            <scope>compile</scope>
165
        </dependency>
166
        <dependency>
167
            <groupId>jwizardcomponent</groupId>
168
            <artifactId>jwizardcomponent-0i18n</artifactId>
169
            <scope>compile</scope>
170
        </dependency>
171
        <dependency>
172
            <groupId>net.sf.kxml</groupId>
173
            <artifactId>kxml2</artifactId>
174
            <scope>compile</scope>
175
        </dependency>
176

  
177
        <dependency>
178
            <groupId>org.gvsig</groupId>
179
            <artifactId>org.gvsig.about.api</artifactId>
180
            <scope>runtime</scope>
181
        </dependency> 
182
       <dependency>
183
            <groupId>org.gvsig</groupId>
184
            <artifactId>org.gvsig.about.impl</artifactId>
185
            <scope>runtime</scope>
186
        </dependency>
187
        <dependency>
188
            <groupId>org.gvsig</groupId>
189
            <artifactId>org.gvsig.jdk.v1_6</artifactId>
190
            <scope>runtime</scope>
191
        </dependency>
192
        <dependency>
193
            <groupId>org.gvsig</groupId>
194
            <artifactId>org.gvsig.compat.api</artifactId>
195
            <scope>runtime</scope>
196
        </dependency>
197
        <dependency>
198
            <groupId>org.gvsig</groupId>
199
            <artifactId>org.gvsig.compat.se</artifactId>
200
            <scope>runtime</scope>
201
        </dependency>
202
        <dependency>
203
            <groupId>xerces</groupId>
204
            <artifactId>xercesImpl</artifactId>
205
            <scope>runtime</scope>
206
        </dependency>
207
        <dependency>
208
            <groupId>org.slf4j</groupId>
209
            <artifactId>slf4j-log4j12</artifactId>
210
            <scope>runtime</scope>
211
        </dependency>
212
        <dependency>
213
            <groupId>org.gvsig</groupId>
214
            <artifactId>org.gvsig.installer.lib.impl</artifactId>
215
            <scope>runtime</scope>
216
        </dependency>
217
        <dependency>
218
            <groupId>org.gvsig</groupId>
219
            <artifactId>org.gvsig.installer.lib.spi</artifactId>
220
            <scope>compile</scope>
221
        </dependency>
222
        <dependency>
223
            <groupId>org.gvsig</groupId>
224
            <artifactId>org.gvsig.installer.prov.plugin</artifactId>
225
            <scope>runtime</scope>
226
        </dependency>
227
        <dependency>
228
            <groupId>org.gvsig</groupId>
229
            <artifactId>org.gvsig.installer.swing.impl</artifactId>
230
            <scope>runtime</scope>
231
        </dependency>
232
        <dependency>
233
            <groupId>com.sardak</groupId>
234
            <artifactId>antform</artifactId>
235
            <scope>runtime</scope>
236
        </dependency>
237
        <dependency>
238
            <groupId>ant-contrib</groupId>
239
            <artifactId>ant-contrib</artifactId>
240
            <scope>runtime</scope>
241
        </dependency>
242
        <dependency>
243
            <groupId>org.apache.commons</groupId>
244
            <artifactId>commons-lang3</artifactId>
245
            <scope>compile</scope>
246
        </dependency>
247
        <dependency>
248
            <groupId>commons-lang</groupId>
249
            <artifactId>commons-lang</artifactId>
250
            <scope>compile</scope>
251
        </dependency>
252
        
253
        <dependency>
254
            <groupId>org.swinglabs</groupId>
255
            <artifactId>swing-layout</artifactId>
256
            <scope>compile</scope>
257
        </dependency>
258
        <dependency>
259
            <!-- lo requieren los paneles de timesupport -->
260
            <groupId>com.toedter</groupId>
261
            <artifactId>jcalendar</artifactId> 				
262
            <scope>runtime</scope>
263
        </dependency>	
264
        <dependency>
265
            <groupId>xml-apis</groupId>
266
            <artifactId>xml-apis</artifactId>
267
            <scope>runtime</scope>
268
        </dependency>
269
        <dependency>
270
            <groupId>com.fifesoft</groupId>
271
            <artifactId>rsyntaxtextarea</artifactId>
272
            <scope>runtime</scope>
273
        </dependency>
274
        <dependency>
275
            <groupId>com.fifesoft</groupId>
276
            <artifactId>rstaui</artifactId>
277
            <scope>runtime</scope>
278
        </dependency>
279
        <dependency>
280
            <groupId>com.fifesoft</groupId>
281
            <artifactId>autocomplete</artifactId>
282
            <scope>runtime</scope>
283
        </dependency>
284
        <dependency>
285
            <groupId>org.json</groupId>
286
            <artifactId>json</artifactId>
287
            <scope>runtime</scope>
288
        </dependency>
289
        <dependency>
290
            <groupId>commons-codec</groupId>
291
            <artifactId>commons-codec</artifactId>
292
            <scope>runtime</scope>
293
        </dependency>
294
        <dependency>
295
            <groupId>org.apache.xmlgraphics</groupId>
296
            <artifactId>batik-awt-util</artifactId>
297
            <scope>runtime</scope>
298
        </dependency>
299
        <dependency>
300
            <groupId>org.apache.xmlgraphics</groupId>
301
            <artifactId>batik-bridge</artifactId>
302
            <scope>runtime</scope>
303
        </dependency>
304
        <dependency>
305
            <groupId>org.apache.xmlgraphics</groupId>
306
            <artifactId>batik-ext</artifactId>
307
            <scope>runtime</scope>
308
        </dependency>
309
        <dependency>
310
            <groupId>org.apache.xmlgraphics</groupId>
311
            <artifactId>batik-gui-util</artifactId>
312
            <scope>runtime</scope>
313
        </dependency>
314
        <dependency>
315
            <groupId>org.apache.xmlgraphics</groupId>
316
            <artifactId>batik-gvt</artifactId>
317
            <scope>runtime</scope>
318
        </dependency>
319
        <dependency>
320
            <groupId>org.apache.xmlgraphics</groupId>
321
            <artifactId>batik-script</artifactId>
322
            <scope>runtime</scope>
323
        </dependency>
324
        <dependency>
325
            <groupId>org.apache.xmlgraphics</groupId>
326
            <artifactId>batik-xml</artifactId>
327
            <scope>runtime</scope>
328
        </dependency>
329
        <dependency>
330
            <groupId>org.apache.xmlgraphics</groupId>
331
            <artifactId>batik-anim</artifactId>
332
            <scope>runtime</scope>
333
        </dependency>
334
        <dependency>
335
            <groupId>org.apache.xmlgraphics</groupId>
336
            <artifactId>batik-css</artifactId>
337
            <scope>runtime</scope>
338
        </dependency>
339
        <dependency>
340
            <groupId>org.apache.xmlgraphics</groupId>
341
            <artifactId>batik-dom</artifactId>
342
            <scope>runtime</scope>
343
        </dependency>
344
        <dependency>
345
            <groupId>org.apache.xmlgraphics</groupId>
346
            <artifactId>batik-js</artifactId>
347
            <scope>runtime</scope>
348
        </dependency>
349
        <dependency>
350
            <groupId>org.apache.xmlgraphics</groupId>
351
            <artifactId>batik-parser</artifactId>
352
            <scope>runtime</scope>
353
        </dependency>
354
        <dependency>
355
            <groupId>org.apache.xmlgraphics</groupId>
356
            <artifactId>batik-svg-dom</artifactId>
357
            <scope>runtime</scope>
358
        </dependency>
359
        <dependency>
360
            <groupId>xml-apis</groupId>
361
            <artifactId>xml-apis-ext</artifactId>
362
            <scope>runtime</scope>
363
        </dependency>        
364
        <dependency>
365
            <groupId>com.github.jai-imageio</groupId>
366
            <artifactId>jai-imageio-jpeg2000</artifactId>
367
            <version>1.3.0</version>
368
        </dependency>                
369
        <dependency>
370
            <groupId>com.github.jai-imageio</groupId>
371
            <artifactId>jai-imageio-core</artifactId>
372
            <version>1.4.0</version>
373
        </dependency> 
374
        <dependency>
375
            <groupId>org.glassfish</groupId>
376
            <artifactId>javax.json</artifactId>
377
            <scope>compile</scope>
378
        </dependency>
379
        <dependency>
380
          <groupId>com.fasterxml.uuid</groupId>
381
          <artifactId>java-uuid-generator</artifactId>
382
          <version>4.0.1</version>
383
          <scope>runtime</scope>
384
        </dependency>        
385
          <dependency>
386
            <groupId>com.github.lespaul361</groupId>
387
            <artifactId>JCommunique</artifactId>
388
            <scope>runtime</scope>
389
        </dependency>        
390
        <!--
391
        <dependency>
392
            <groupId>com.jtattoo</groupId>
393
            <artifactId>JTattoo</artifactId>
394
            <scope>runtime</scope>
395
            <version>1.6.13</version>
396
        </dependency>
397
        <dependency>
398
            <groupId>com.seaglasslookandfeel</groupId>
399
            <artifactId>seaglasslookandfeel</artifactId>
400
            <scope>runtime</scope>
401
            <version>0.2.1</version>
402
        </dependency>   
403
                -->
404
        <dependency>
405
            <groupId>org.devzendo</groupId>
406
            <artifactId>quaqua</artifactId>
407
            <scope>runtime</scope>
408
            <version>9.1</version>
409
        </dependency>
410
        <dependency>
411
          <groupId>com.jidesoft</groupId>
412
          <artifactId>jide-oss</artifactId>
413
        </dependency>
414
<!--        Substance da errores en la carga de gvSIG y el L&F no funciona
415
        <dependency>
416
            <groupId>com.github.insubstantial</groupId>
417
            <artifactId>substance</artifactId>
418
            <scope>runtime</scope>
419
            <version>7.3</version>
420
        </dependency>       -->
421
        <!--
422
        <dependency>
423
            <groupId>com.weblookandfeel</groupId>
424
            <artifactId>weblaf-ui</artifactId>
425
            <scope>runtime</scope>
426
            <version>1.2.8</version>
427
        </dependency>
428
        -->
429
    </dependencies>
430

  
431

  
432
    <build>
433
        <plugins>
434

  
435
            <plugin>
436
                <groupId>org.codehaus.mojo</groupId>
437
                <artifactId>exec-maven-plugin</artifactId>
438
                <executions>
439
                    <execution>
440
                        <goals>
441
                            <goal>exec</goal>
442
                        </goals>
443
                    </execution>
444
                </executions>
445
                <configuration>
446
                    <executable>java</executable>
447
                    <arguments>
448
                        <argument>-classpath</argument>
449
                        <!-- automatically creates the classpath using all project
450
                        dependencies, also adding the project build directory -->
451
                        <classpath />
452
                        <argument>org.gvsig.andami.Launcher</argument>
453
                        <argument>gvSIG</argument>
454
                        <argument>${gvsig.install.dir}/gvSIG/extensiones</argument>
455
                    </arguments>
456
                    <environmentVariables>
457
                        <GDAL_DATA>${user.home}/.depman/data/gdal</GDAL_DATA>
458
                        <PROJ_LIB>gvSIG/extensiones/org.gvsig.crs.extension/data</PROJ_LIB>
459
                        <LD_LIBRARY_PATH>${user.home}/.depman/lib</LD_LIBRARY_PATH>
460
                        <PATH>${user.home}/.depman/bin</PATH>
461
                    </environmentVariables>
462
                </configuration>
463
            </plugin>
464

  
465
            <plugin>
466
                <artifactId>maven-assembly-plugin</artifactId>
467
                <configuration>
468
                    <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
469
                    <appendAssemblyId>false</appendAssemblyId>
470
                </configuration>
471
                <executions>
472
                    <execution>
473
                        <id>gvsig-plugin-package</id>
474
                        <phase>package</phase>
475
                        <goals>
476
                            <goal>single</goal>
477
                        </goals>
478
                        <configuration>
479
                            <finalName>${project.artifactId}-${project.version}-root-folder</finalName>
480
                            <descriptors>
481
                                <descriptor>src/main/assembly/gvsig-andami-package.xml</descriptor>
482
                            </descriptors>
483
                        </configuration>
484
                    </execution>
485
                </executions>
486
            </plugin>
487

  
488
            <plugin>
489
                <groupId>org.codehaus.gmaven</groupId>
490
                <artifactId>gmaven-plugin</artifactId>
491
                <executions>
492
                    <execution>
493
                        <id>install-plugin</id>
494
                        <phase>install</phase>
495
                        <goals>
496
                            <goal>execute</goal>
497
                        </goals>
498
                        <configuration>
499
                            <source><![CDATA[
500
                  ant = new AntBuilder()
501
                  source = project.basedir.getAbsolutePath() +
502
                    "/target/" +
503
                    project.artifactId + "-" +
504
                    project.version + "-" +
505
                    "root-folder.zip"
506
                  target = project.properties["gvsig.product.folder.path"]
507
                  ant.unzip(src: source, dest: target)
508
                  ant.chmod(file:target+"/gvSIG.sh", perm:"a+rx")
509
                ]]></source>
510
                        </configuration>
511
                    </execution>
512
                </executions>
513
            </plugin>
514

  
515
            <plugin>
516
                <artifactId>maven-clean-plugin</artifactId>
517
                <configuration>
518
                    <skip>false</skip>
519
                    <failOnError>true</failOnError>
520
                    <filesets>
521
                        <fileset>
522
                            <directory>${gvsig.product.folder.path}/lib</directory>
523
                        </fileset>
524
                    </filesets>
525
                </configuration>
526
                <executions>
527
                    <execution>
528
                        <id>default-clean</id>
529
                        <phase>clean</phase>
530
                    </execution>
531
                </executions>
532
            </plugin>
533
        </plugins>
534
    </build>
535

  
536
</project>
0 537

  
tags/org.gvsig.desktop-2.0.289/org.gvsig.desktop.framework/org.gvsig.andami/src/test/java/org/gvsig/andami/AllTests.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.andami;
25

  
26
import junit.framework.Test;
27
import junit.framework.TestSuite;
28

  
29
public class AllTests {
30

  
31
	public static Test suite() {
32
		TestSuite suite = new TestSuite("Test for com.iver.andami");
33
		//$JUnit-BEGIN$
34

  
35
		//$JUnit-END$
36
		return suite;
37
	}
38

  
39
}
0 40

  
tags/org.gvsig.desktop-2.0.289/org.gvsig.desktop.framework/org.gvsig.andami/src/main/assembly/gvsig-andami-package.xml
1
<!--
2

  
3
    gvSIG. Desktop Geographic Information System.
4

  
5
    Copyright (C) 2007-2013 gvSIG Association.
6

  
7
    This program is free software; you can redistribute it and/or
8
    modify it under the terms of the GNU General Public License
9
    as published by the Free Software Foundation; either version 3
10
    of the License, or (at your option) any later version.
11

  
12
    This program is distributed in the hope that it will be useful,
13
    but WITHOUT ANY WARRANTY; without even the implied warranty of
14
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
    GNU General Public License for more details.
16

  
17
    You should have received a copy of the GNU General Public License
18
    along with this program; if not, write to the Free Software
19
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
    MA  02110-1301, USA.
21

  
22
    For any additional information, do not hesitate to contact us
23
    at info AT gvsig.com, or visit our website www.gvsig.com.
24

  
25
-->
26
<assembly>
27
  <id>gvsig-andami-package</id>
28
  <formats>
29
    <format>zip</format>
30
  </formats>
31
  <baseDirectory>.</baseDirectory>
32
  <!-- 
33
  <includeBaseDirectory>true</includeBaseDirectory>
34
   -->
35
  <files>
36
    <file>
37
      <source>target/${project.artifactId}-${project.version}.jar</source>
38
      <outputDirectory>lib</outputDirectory>
39
    </file>
40
    <file>
41
      <source>src/main/resources/default-log4j/log4j.properties</source>
42
      <outputDirectory>.</outputDirectory>
43
    </file>  
44
  </files>
45
  <fileSets>
46
    <fileSet>
47
      <directory>src/main/resources-application</directory>
48
      <outputDirectory>.</outputDirectory>
49
    </fileSet>
50
    <fileSet>
51
      <directory>src/main/resources/org/gvsig/andami</directory>
52
      <outputDirectory>i18n/andami</outputDirectory>
53
    </fileSet>
54
  </fileSets>
55
  
56
  <dependencySets>
57
    <dependencySet>
58
      <useProjectArtifact>false</useProjectArtifact>
59
      <useTransitiveDependencies>true</useTransitiveDependencies>
60
      <outputDirectory>lib</outputDirectory>
61
    </dependencySet>
62
  </dependencySets>
63

  
64
</assembly>
65

  
0 66

  
tags/org.gvsig.desktop-2.0.289/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/LocaleManager.java
1
package org.gvsig.andami;
2

  
3
import java.io.File;
4
import java.net.URL;
5
import java.util.Locale;
6
import java.util.Set;
7

  
8
public interface LocaleManager {
9

  
10
    public static final Locale SPANISH = new Locale("es");
11

  
12
    public static final Locale ENGLISH = new Locale("en");
13

  
14
    public Set<Locale> getDefaultLocales();
15

  
16
    public Set<Locale> getInstalledLocales();
17

  
18
    public Locale getDefaultSystemLocale();
19

  
20
    public Locale getCurrentLocale();
21

  
22
    public void setCurrentLocale(Locale locale);
23

  
24
    public boolean installLocale(Locale locale);
25

  
26
    public boolean uninstallLocale(Locale locale);
27

  
28
    public boolean installLocales(URL localesFile);
29

  
30
    public File getResourcesFolder();
31

  
32
    public Locale[] getLocaleAlternatives(Locale locale);
33

  
34
    public String getLanguageDisplayName(Locale locale);
35

  
36
    public String getLocaleDisplayName(Locale locale);
37

  
38
    public Locale getNearestLocale(Locale locale);
39

  
40
    /**
41
     *
42
     */
43
    void updateInstalledLocales();
44
}
tags/org.gvsig.desktop-2.0.289/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/AndamiEventQueue.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.andami.ui;
25

  
26
import java.awt.AWTEvent;
27
import java.awt.EventQueue;
28
import java.awt.event.MouseEvent;
29

  
30
import javax.swing.JOptionPane;
31

  
32
import org.gvsig.andami.PluginServices;
33
import org.gvsig.andami.messages.Messages;
34
import org.gvsig.andami.messages.NotificationManager;
35
import org.slf4j.Logger;
36
import org.slf4j.LoggerFactory;
37

  
38

  
39

  
40
/**
41
 * DOCUMENT ME!
42
 *
43
 * @author Fernando Gonz?lez Cort?s
44
 */
45
public class AndamiEventQueue extends EventQueue {
46
	private static Logger logger = LoggerFactory.getLogger(AndamiEventQueue.class);
47
	
48
	protected void dispatchEvent(AWTEvent event){
49
		try{
50
			super.dispatchEvent(event);
51
		} catch(RuntimeException e){
52
		    
53
		    if (canShowWindow(e, event)) {
54
		        NotificationManager.addError(e);//Messages.getString("PluginServices.Bug en el c?digo"), e);
55
		    } else {
56
                try {
57
                    PluginServices.getMainFrame().getStatusBar().message(e.getMessage(), JOptionPane.ERROR_MESSAGE);
58
                } catch(Throwable ex) {
59
                    // Ignora cualquier error que se produzca intentando mostrar el mensaje de error y nos
60
                    // conformaremos con que este en el log.
61
                }
62
                logger.info("Error dispaching event",e);
63
			}
64
			
65
		} catch (Error e){
66
			NotificationManager.addError(
67
			    Messages.getString("Error de la applicacion.  \nEs conveniente que salga de la aplicaci?n\n\n"+e.getLocalizedMessage()), e);
68
		}
69
	}
70
	
71
	private boolean canShowWindow(Throwable th, AWTEvent event) {
72
	    
73
	    try {
74
	        if( event instanceof MouseEvent ) {
75
	            MouseEvent me = (MouseEvent)event;
76
	            if( me.getButton() == 0 && me.getClickCount()==0 ) {
77
	                // Intentamos que los errores que se produzcan con los eventos de movimiento del raton
78
                    // no provoquen la aparicion de la ventana de errores ya que llega a bloquear al usuario.
79
                    // Intentaremos sacarlos en la barra de estado si podemos.
80
	                return false;
81
	            }
82
	        }
83
	        StackTraceElement[] stack_ee = th.getStackTrace();
84
	        for (int i=0; i<stack_ee.length; i++) {
85
	            StackTraceElement se = stack_ee[i];
86
	            if (se.getClassName().startsWith("org.gvsig.fmap.mapcontrol.MapControl")) {
87
	                return false;
88
	            }
89
	        }
90
	    } catch (Throwable t) {
91
	        
92
	    }
93
        return true;
94
	    
95
	}
96
}
0 97

  
tags/org.gvsig.desktop-2.0.289/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/wizard/WizardAndami.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.andami.ui.wizard;
25

  
26
import java.awt.BorderLayout;
27

  
28
import javax.swing.ImageIcon;
29
import javax.swing.JPanel;
30

  
31
import org.gvsig.andami.PluginServices;
32
import org.gvsig.andami.ui.mdiManager.IWindow;
33
import org.gvsig.andami.ui.mdiManager.WindowInfo;
34

  
35
import jwizardcomponent.CancelAction;
36
import jwizardcomponent.DefaultJWizardComponents;
37
import jwizardcomponent.FinishAction;
38

  
39

  
40
public class WizardAndami extends JPanel implements IWindow {
41
	WindowInfo viewInfo = null;
42
	WizardPanelWithLogo wizardPanel;
43

  
44
	// No deber?an necesitarse un FinishAction y un CancelAction, pero bueno,
45
	// lo mantengo por ahora.
46
	private class CloseAction extends FinishAction
47
	{
48
		IWindow v;
49
		public CloseAction(IWindow view)
50
		{
51
			super(wizardPanel.getWizardComponents());
52
			v = view;
53
		}
54
		public void performAction() {
55
			PluginServices.getMDIManager().closeWindow(v);
56
		}
57

  
58
	}
59
	private class CloseAction2 extends CancelAction
60
	{
61

  
62
		IWindow v;
63
		public CloseAction2(IWindow view)
64
		{
65
			super(wizardPanel.getWizardComponents());
66
			v = view;
67
		}
68
		public void performAction() {
69
			PluginServices.getMDIManager().closeWindow(v);
70
		}
71

  
72
	}
73

  
74

  
75
	public WizardAndami(ImageIcon logo)
76
	{
77
		wizardPanel = new WizardPanelWithLogo(logo);
78
		CloseAction closeAction = new CloseAction(this);
79
		CloseAction2 closeAction2 = new CloseAction2(this);
80
		wizardPanel.getWizardComponents().setFinishAction(closeAction);
81
		wizardPanel.getWizardComponents().setCancelAction(closeAction2);
82

  
83
		this.setLayout(new BorderLayout());
84
		this.add(wizardPanel, BorderLayout.CENTER);
85
	}
86

  
87
	public DefaultJWizardComponents getWizardComponents()
88
	{
89
		return wizardPanel.getWizardComponents();
90
	}
91

  
92

  
93
	public WindowInfo getWindowInfo() {
94
		if (viewInfo == null)
95
		{
96
			viewInfo = new WindowInfo(WindowInfo.MODALDIALOG|WindowInfo.RESIZABLE);
97
		}
98
		return viewInfo;
99
	}
100

  
101
	public Object getWindowProfile() {
102
		// TODO Auto-generated method stub
103
		return WindowInfo.DIALOG_PROFILE;
104
	}
105

  
106
}
0 107

  
tags/org.gvsig.desktop-2.0.289/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/wizard/WizardPanelWithLogo.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.andami.ui.wizard;
25

  
26
import java.awt.BorderLayout;
27
import java.awt.Color;
28

  
29
import javax.swing.ImageIcon;
30
import javax.swing.JLabel;
31
import javax.swing.JPanel;
32
import javax.swing.JSeparator;
33

  
34
import jwizardcomponent.CancelAction;
35
import jwizardcomponent.DefaultJWizardComponents;
36
import jwizardcomponent.FinishAction;
37
import jwizardcomponent.common.SimpleButtonPanel;
38

  
39
public class WizardPanelWithLogo extends JPanel {
40
	  DefaultJWizardComponents wizardComponents;
41

  
42
	  JPanel buttonPanel;
43
	  JLabel statusLabel = new JLabel();
44

  
45
	  ImageIcon logo;
46

  
47
	  public WizardPanelWithLogo(ImageIcon logo) {
48
	    this.logo = logo;
49
	    wizardComponents = new DefaultJWizardComponents();
50
	    init();
51
	  }
52

  
53
	  private void init() {
54
	    
55

  
56
	    JPanel logoPanel = new JPanel();
57

  
58
	    String fileString;
59
	    if (logo.toString().indexOf("file:") < 0 &&
60
	        logo.toString().indexOf("http:") < 0) {
61
	      fileString = "file:///" +System.getProperty("user.dir") +"/"
62
	                        +logo.toString();
63
	      fileString = fileString.replaceAll("\\\\", "/");
64
	    } else {
65
	      fileString = logo.toString();
66
	    }
67
	    logoPanel.add(new JLabel(logo));
68
	    logoPanel.setBackground(Color.WHITE);
69
	    this.setLayout(new BorderLayout());
70
	    this.add(logoPanel, BorderLayout.WEST);
71
	    this.add(wizardComponents.getWizardPanelsContainer(),
72
	    							BorderLayout.CENTER);
73

  
74
	    JPanel auxPanel = new JPanel(new BorderLayout());
75
	    auxPanel.add(new JSeparator(), BorderLayout.NORTH);
76

  
77
	    buttonPanel = new SimpleButtonPanel(wizardComponents);
78
	    auxPanel.add(buttonPanel);
79
	    this.add(auxPanel, BorderLayout.SOUTH);
80
	    
81

  
82
	    wizardComponents.setFinishAction(new FinishAction(wizardComponents) {
83
	      public void performAction() {
84
	        // dispose();
85
	      }
86
	    });
87
	    wizardComponents.setCancelAction(new CancelAction(wizardComponents) {
88
	      public void performAction() {
89
	        // dispose();
90
	      }
91
	    });
92
	  }
93

  
94
	  public DefaultJWizardComponents getWizardComponents(){
95
	    return wizardComponents;
96
	  }
97

  
98
	  public void setWizardComponents(DefaultJWizardComponents aWizardComponents){
99
	    wizardComponents = aWizardComponents;
100
	  }
101

  
102
	  public void show() {
103
	    wizardComponents.updateComponents();
104
	    super.setVisible(true);
105
	  }
106

  
107
}
0 108

  
tags/org.gvsig.desktop-2.0.289/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/wizard/UnsavedDataPanel.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.andami.ui.wizard;
25

  
26
import java.awt.BorderLayout;
27
import java.awt.Color;
28
import java.awt.Dimension;
29
import java.awt.FlowLayout;
30
import java.awt.GridBagConstraints;
31
import java.awt.GridBagLayout;
32
import java.awt.GridLayout;
33
import java.awt.Insets;
34
import java.awt.event.ActionEvent;
35
import java.awt.event.ActionListener;
36
import java.awt.event.MouseEvent;
37
import java.awt.event.MouseListener;
38
import java.awt.image.BufferedImage;
39
import java.util.ArrayList;
40
import java.util.Arrays;
41
import java.util.Iterator;
42
import java.util.List;
43

  
44
import javax.swing.BorderFactory;
45
import javax.swing.ImageIcon;
46
import javax.swing.JCheckBox;
47
import javax.swing.JLabel;
48
import javax.swing.JPanel;
49
import javax.swing.JScrollPane;
50

  
51
import org.gvsig.andami.IconThemeHelper;
52
import org.gvsig.andami.PluginServices;
53
import org.gvsig.andami.plugins.status.IUnsavedData;
54
import org.gvsig.andami.ui.mdiManager.IWindow;
55
import org.gvsig.andami.ui.mdiManager.WindowInfo;
56
import org.gvsig.gui.beans.swing.JButton;
57

  
58

  
59
/**
60
 * Ask for elements to save before application exit
61
 *
62
 *
63
 */
64
public class UnsavedDataPanel extends JPanel implements IWindow, ActionListener {
65
	/**
66
	 *
67
	 */
68
	private static final long serialVersionUID = -4745219917358767905L;
69

  
70

  
71
	private static ImageIcon blanckIcon = null;
72
	private JPanel pResources = null;
73
	private JPanel pButtons = null;
74
	private JScrollPane pScrollList = null;
75
	private myList list = null;
76
	private JLabel lblDescription = null;
77
	private JButton botSave = null;
78
	private JButton botDiscard = null;
79
	private JButton botDontExit = null;
80
	private JPanel pActionButtons = null;
81
	private JPanel pSelectionButtons = null;
82
	private JButton botSelectAll = null;
83
	private JButton botDeselectAll = null;
84

  
85
	private ArrayList listeners = new ArrayList();
86
	private JLabel lblResourceDescription = null;
87
	private IUnsavedData[] unsavedDataList;
88
	private String windowTitle = PluginServices.getText(this, "save_resources");
89
	private String prompt = PluginServices.getText(this, "select_resources_to_save_before_exit");
90

  
91

  
92

  
93
	/**
94
	 * This is the default constructor
95
	 */
96
	public UnsavedDataPanel(IUnsavedData[] unsavedDatalist) {
97
		super();
98
		initialize();
99
		this.setUnsavedDataArray(unsavedDatalist);
100
	}
101

  
102
	public UnsavedDataPanel(String prompt) {
103
        super();
104
        initialize();
105
        this.setUnsavedDataArray(new IUnsavedData[0]);
106
        this.prompt = prompt;
107
    }
108

  
109

  
110
	/**
111
	 * This method initializes this
112
	 *
113
	 * @return void
114
	 */
115
	private void initialize() {
116
		BorderLayout borderLayout = new BorderLayout();
117
		borderLayout.setHgap(5);
118
		borderLayout.setVgap(5);
119
		lblDescription = new JLabel();
120
		lblDescription.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
121
		lblDescription.setText(prompt);
122
		lblDescription.setPreferredSize(new Dimension(497, 30));
123
		lblDescription.setName("lblDescription");
124
		this.setLayout(borderLayout);
125
		this.setSize(396, 272);
126
		this.add(getPResources(), java.awt.BorderLayout.CENTER);
127
		this.add(getPButtons(), java.awt.BorderLayout.SOUTH);
128
		this.add(lblDescription, BorderLayout.NORTH);
129
	}
130

  
131
	/**
132
	 * This method initializes pResources
133
	 *
134
	 * @return javax.swing.JPanel
135
	 */
136
	private JPanel getPResources() {
137
		if (pResources == null) {
138
			pResources = new JPanel();
139
			pResources.setLayout(new BorderLayout());
140
			pResources.add(getPScrollList(), BorderLayout.CENTER);
141
			// pResources.add(getLblResourceDescription(), BorderLayout.SOUTH);
142
		}
143
		return pResources;
144
	}
145

  
146

  
147
	/**
148
	 * This method initializes lblResourceDescription
149
	 *
150
	 * @return javax.swing.JLabel
151
	 */
152
	private JLabel getLblResourceDescription() {
153
		if (lblResourceDescription == null) {
154
			lblResourceDescription = new JLabel();
155
			lblResourceDescription.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
156
			lblResourceDescription.setText("");
157
			lblResourceDescription.setPreferredSize(new Dimension(38, 50));
158
			lblResourceDescription.setName("lblResourceDescription");
159
		}
160
		return lblResourceDescription;
161
	}
162

  
163

  
164
	/**
165
	 * This method initializes pButtons
166
	 *
167
	 * @return javax.swing.JPanel
168
	 */
169
	private JPanel getPButtons() {
170
		if (pButtons == null) {
171
			BorderLayout borderLayout2 = new BorderLayout();
172
			borderLayout2.setHgap(5);
173
			borderLayout2.setVgap(5);
174
			pButtons = new JPanel();
175
			pButtons.setLayout(borderLayout2);
176
			pButtons.add(getPSelectionButtons(), BorderLayout.NORTH);
177
			pButtons.add(getPActionButtons(), BorderLayout.SOUTH);
178
		}
179
		return pButtons;
180
	}
181

  
182
	/**
183
	 * This method initializes pScrollList
184
	 *
185
	 * @return javax.swing.JScrollPane
186
	 */
187
	private JScrollPane getPScrollList() {
188
		if (pScrollList == null) {
189
			pScrollList = new JScrollPane();
190
			pScrollList.setPreferredSize(new java.awt.Dimension(350,350));
191
			pScrollList.setViewportView(getList());
192
		}
193
		return pScrollList;
194
	}
195

  
196
	/**
197
	 * This method initializes list
198
	 *
199
	 * @return javax.swing.JList
200
	 */
201
	private myList getList() {
202
		if (list == null) {
203
			list = new myList();
204
			list.setBackground(Color.white);
205
		}
206
		return list;
207
	}
208

  
209
	/**
210
	 * This method initializes botSave
211
	 *
212
	 * @return javax.swing.JButton
213
	 */
214
	private JButton getBotSave() {
215
		if (botSave == null) {
216
			botSave = new JButton();
217
			botSave.setName("botSave");
218
			botSave.setToolTipText(PluginServices.getText(this, "save_selected_resources_and_exit"));
219
			botSave.setText(PluginServices.getText(this, "ok"));
220
			botSave.setActionCommand("Accept");
221
			botSave.addActionListener(this);
222
		}
223
		return botSave;
224
	}
225

  
226
	/**
227
	 * This method initializes botDiscard
228
	 *
229
	 * @return javax.swing.JButton
230
	 */
231
	private JButton getBotDiscard() {
232
		if (botDiscard == null) {
233
			botDiscard = new JButton();
234
			botDiscard.setName("botDiscard");
235
			botDiscard.setToolTipText(PluginServices.getText(this, "discard_changes_and_exit"));
236
			botDiscard.setText(PluginServices.getText(this, "discard_changes"));
237
			botDiscard.setActionCommand("Discard");
238
			botDiscard.addActionListener(this);
239
		}
240
		return botDiscard;
241
	}
242

  
243
	/**
244
	 * This method initializes botDontExit
245
	 *
246
	 * @return javax.swing.JButton
247
	 */
248
	private JButton getBotDontExit() {
249
		if (botDontExit == null) {
250
			botDontExit = new JButton();
251
			botDontExit.setName("botDontExit");
252
			botDontExit.setToolTipText(PluginServices.getText(this, "cancel_the_application_termination"));
253
			botDontExit.setText(PluginServices.getText(this, "cancelar"));
254
			botDontExit.setActionCommand("Cancel");
255
			botDontExit.addActionListener(this);
256
		}
257
		return botDontExit;
258
	}
259

  
260
	/**
261
	 * This method initializes pActionButtons
262
	 *
263
	 * @return javax.swing.JPanel
264
	 */
265
	private JPanel getPActionButtons() {
266
		if (pActionButtons == null) {
267

  
268
		    GridLayout gl = new GridLayout(1, 3, 8, 0);
269
		    /*
270
			FlowLayout flowLayout = new FlowLayout();
271
			flowLayout.setAlignment(FlowLayout.RIGHT);
272
			*/
273
			pActionButtons = new JPanel();
274
			pActionButtons.setBorder(BorderFactory.createEmptyBorder(8,8,8,8));
275
			pActionButtons.setLayout(gl);
276
			pActionButtons.setName("pActionButtons");
277
			pActionButtons.add(getBotSave());
278
			pActionButtons.add(getBotDiscard());
279
			pActionButtons.add(getBotDontExit());
280
		}
281
		return pActionButtons;
282
	}
283

  
284
	/**
285
	 * This method initializes pSelectionButtons
286
	 *
287
	 * @return javax.swing.JPanel
288
	 */
289
	private JPanel getPSelectionButtons() {
290
		if (pSelectionButtons == null) {
291
		    GridLayout gl = new GridLayout(2, 3, 8, 8);
292
		    /*
293
			FlowLayout flowLayout1 = new FlowLayout();
294
			flowLayout1.setAlignment(FlowLayout.LEFT);
295
			*/
296
			pSelectionButtons = new JPanel();
297
			pSelectionButtons.setBorder(BorderFactory.createEmptyBorder(5,8,8,8));
298
			pSelectionButtons.setLayout(gl);
299
			pSelectionButtons.setName("pSelectionButtons");
300
			pSelectionButtons.add(getBotSelectAll());
301
			pSelectionButtons.add(new JLabel());
302
			pSelectionButtons.add(new JLabel());
303
			// new row
304
			pSelectionButtons.add(getBotDeselectAll());
305
			pSelectionButtons.add(new JLabel());
306
            pSelectionButtons.add(new JLabel());
307

  
308
		}
309
		return pSelectionButtons;
310
	}
311

  
312
	/**
313
	 * This method initializes botSelectAll
314
	 *
315
	 * @return javax.swing.JButton
316
	 */
317
	private JButton getBotSelectAll() {
318
		if (botSelectAll == null) {
319
			botSelectAll = new JButton();
320
			botSelectAll.setText(PluginServices.getText(this, "select_all"));
321
			botSelectAll.setName("botSelectAll");
322
			botSelectAll.setToolTipText(PluginServices.getText(this, "select_all_resources"));
323
			botSelectAll.setActionCommand("SelectAll");
324
			botSelectAll.addActionListener(this);
325
		}
326
		return botSelectAll;
327
	}
328

  
329
	/**
330
	 * This method initializes botDeselectAll
331
	 *
332
	 * @return javax.swing.JButton
333
	 */
334
	private JButton getBotDeselectAll() {
335
		if (botDeselectAll == null) {
336
			botDeselectAll = new JButton();
337
			botDeselectAll.setName("botDeselectAll");
338
			botDeselectAll.setToolTipText(PluginServices.getText(this, "deselect_all_resources"));
339
			botDeselectAll.setText(PluginServices.getText(this, "deselect_all"));
340
			botDeselectAll.setActionCommand("DeselectAll");
341
			botDeselectAll.addActionListener(this);
342
		}
343
		return botDeselectAll;
344
	}
345

  
346
	public WindowInfo getWindowInfo() {
347
		WindowInfo wi = new WindowInfo(WindowInfo.MODALDIALOG
348
				| WindowInfo.RESIZABLE
349
				| WindowInfo.MAXIMIZABLE);
350
		wi.setTitle(windowTitle);
351
		wi.setHeight(270);
352
		wi.setWidth(450);
353
		return wi;
354
	}
355

  
356
	public void setWindowTitle(String windowTitle) {
357
		this.windowTitle = windowTitle;
358
	}
359

  
360
	public void setCancelText(String text, String tooltipText) {
361
		getBotDontExit().setToolTipText(tooltipText);
362
		getBotDontExit().setText(text);
363
	}
364

  
365
	public void setDiscardText(String text, String tooltipText) {
366
		getBotDiscard().setToolTipText(tooltipText);
367
		getBotDiscard().setText(text);
368
	}
369

  
370
	public void setAcceptText(String text, String tooltipText) {
371
		getBotSave().setToolTipText(tooltipText);
372
		getBotSave().setText(text);
373
	}
374

  
375
	public void setHeaderText(String text) {
376
		lblDescription.setText(text);
377
	}
378

  
379
	/**
380
	 * Register a listener to call
381
	 *
382
	 * @param a UnsavedDataPanelListener instance
383
	 */
384
	public void addActionListener(UnsavedDataPanelListener listener){
385
		this.listeners.add(listener);
386
	}
387

  
388
	public void removeActionListener(UnsavedDataPanelListener listener){
389
		this.listeners.remove(listener);
390
	}
391

  
392
	public class UnsavedDataPanelListener {
393
		public void cancel(UnsavedDataPanel panel){
394

  
395
		}
396

  
397
		public void accept(UnsavedDataPanel panel){
398

  
399
		}
400

  
401
		public void discard(UnsavedDataPanel panel) {
402

  
403
		}
404
	}
405

  
406
	private class myList extends JPanel{
407

  
408
		/**
409
		 *
410
		 */
411
		private static final long serialVersionUID = 3179254463477354501L;
412

  
413
		private GridBagConstraints constraints;
414
		private GridBagConstraints constraintsLast;
415

  
416
		public myList(){
417
			super();
418
			initialize();
419
		}
420

  
421
		private void initialize(){
422
			this.setLayout(new GridBagLayout());
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff