Revision 46612
tags/org.gvsig.desktop-2.0.385/license.txt | ||
---|---|---|
1 |
gvSIG. Desktop Geographic Information System. |
|
2 |
|
|
3 |
Copyright (C) 2007-2020 gvSIG Association. |
|
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 3 |
|
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, see <https://www.gnu.org/licenses/>. |
|
17 |
|
|
18 |
For any additional information, do not hesitate to contact us |
|
19 |
at info AT gvsig.com, or visit our website www.gvsig.com. |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.temporarystorage/org.gvsig.temporarystorage.lib/org.gvsig.temporarystorage.lib.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.temporarystorage.impl.TemporaryStorageImplLibrary |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.temporarystorage/org.gvsig.temporarystorage.lib/org.gvsig.temporarystorage.lib.impl/src/main/java/org/gvsig/temporarystorage/impl/DefaultTemporaryStorageManager.java | ||
---|---|---|
1 |
package org.gvsig.temporarystorage.impl; |
|
2 |
|
|
3 |
import java.util.HashMap; |
|
4 |
import java.util.Iterator; |
|
5 |
import java.util.Map; |
|
6 |
import org.gvsig.temporarystorage.TemporaryStorageGroup; |
|
7 |
import org.gvsig.temporarystorage.TemporaryStorageManager; |
|
8 |
|
|
9 |
public class DefaultTemporaryStorageManager implements TemporaryStorageManager { |
|
10 |
|
|
11 |
private final Map<String,TemporaryStorageGroup> groups; |
|
12 |
|
|
13 |
public DefaultTemporaryStorageManager() { |
|
14 |
this.groups = new HashMap<>(); |
|
15 |
} |
|
16 |
|
|
17 |
@Override |
|
18 |
public TemporaryStorageGroup get(String groupName) { |
|
19 |
return this.groups.get(groupName); |
|
20 |
} |
|
21 |
|
|
22 |
@Override |
|
23 |
public boolean contains(String groupName) { |
|
24 |
return this.groups.containsKey(groupName); |
|
25 |
} |
|
26 |
|
|
27 |
@Override |
|
28 |
public TemporaryStorageGroup create(String groupName) { |
|
29 |
return this.create(groupName, Object.class); |
|
30 |
} |
|
31 |
|
|
32 |
@Override |
|
33 |
public TemporaryStorageGroup create(String groupName, Class classOfElements) { |
|
34 |
TemporaryStorageGroup group = this.groups.get(groupName); |
|
35 |
if( group!=null ) { |
|
36 |
return group; |
|
37 |
} |
|
38 |
group = new DefaultTemporaryStorageGroup(groupName, classOfElements); |
|
39 |
this.groups.put(groupName, group); |
|
40 |
return group; |
|
41 |
} |
|
42 |
|
|
43 |
@Override |
|
44 |
public Iterator<TemporaryStorageGroup> iterator() { |
|
45 |
return this.groups.values().iterator(); |
|
46 |
} |
|
47 |
|
|
48 |
@Override |
|
49 |
public boolean remove(String groupName) { |
|
50 |
return this.groups.remove(groupName)!=null; |
|
51 |
} |
|
52 |
|
|
53 |
} |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.temporarystorage/org.gvsig.temporarystorage.lib/org.gvsig.temporarystorage.lib.impl/src/main/java/org/gvsig/temporarystorage/impl/DefaultTemporaryStorageGroup.java | ||
---|---|---|
1 |
package org.gvsig.temporarystorage.impl; |
|
2 |
|
|
3 |
import java.util.ArrayList; |
|
4 |
import java.util.Collections; |
|
5 |
import java.util.Comparator; |
|
6 |
import java.util.List; |
|
7 |
import org.apache.commons.lang3.StringUtils; |
|
8 |
import org.apache.commons.lang3.tuple.MutablePair; |
|
9 |
import org.apache.commons.lang3.tuple.Pair; |
|
10 |
import org.gvsig.temporarystorage.TemporaryStorageGroup; |
|
11 |
|
|
12 |
public class DefaultTemporaryStorageGroup implements TemporaryStorageGroup { |
|
13 |
|
|
14 |
private final String name; |
|
15 |
private final Class classOfElements; |
|
16 |
private final List<Pair<String, Object>> elements; |
|
17 |
|
|
18 |
public DefaultTemporaryStorageGroup(String name, Class classOfElements) { |
|
19 |
this.name = name; |
|
20 |
this.classOfElements = classOfElements; |
|
21 |
this.elements = new ArrayList<>(); |
|
22 |
} |
|
23 |
|
|
24 |
@Override |
|
25 |
public String getName() { |
|
26 |
return this.name; |
|
27 |
} |
|
28 |
|
|
29 |
@Override |
|
30 |
public Class getClassOfElements() { |
|
31 |
return this.classOfElements; |
|
32 |
} |
|
33 |
|
|
34 |
private MutablePair<String, Object> getElement(String name) { |
|
35 |
if( StringUtils.isEmpty(name) ) { |
|
36 |
return null; |
|
37 |
} |
|
38 |
for (Pair<String, Object> element : this.elements) { |
|
39 |
if( name.equalsIgnoreCase(element.getKey()) ) { |
|
40 |
return (MutablePair<String, Object>) element; |
|
41 |
} |
|
42 |
} |
|
43 |
return null; |
|
44 |
} |
|
45 |
|
|
46 |
@Override |
|
47 |
public boolean contains(String name) { |
|
48 |
Pair<String, Object> element = this.getElement(name); |
|
49 |
return element!=null; |
|
50 |
} |
|
51 |
|
|
52 |
@Override |
|
53 |
public void put(String name, Object obj) { |
|
54 |
if( !this.classOfElements.isInstance(obj) ) { |
|
55 |
throw new IllegalArgumentException("The object can't be of class "+this.classOfElements.getName()+"."); |
|
56 |
} |
|
57 |
MutablePair<String, Object> element = this.getElement(name); |
|
58 |
if( element == null ) { |
|
59 |
element = new MutablePair<>(name,obj); |
|
60 |
this.elements.add(element); |
|
61 |
this.elements.sort(new Comparator<Pair<String, Object>>() { |
|
62 |
@Override |
|
63 |
public int compare(Pair<String, Object> o1, Pair<String, Object> o2) { |
|
64 |
return o1.compareTo(o2); |
|
65 |
} |
|
66 |
}); |
|
67 |
} else { |
|
68 |
element.setValue(obj); |
|
69 |
} |
|
70 |
} |
|
71 |
|
|
72 |
@Override |
|
73 |
public Object get(String name) { |
|
74 |
Pair<String, Object> element = this.getElement(name); |
|
75 |
if( element == null ) { |
|
76 |
return null; |
|
77 |
} |
|
78 |
return element.getValue(); |
|
79 |
} |
|
80 |
|
|
81 |
@Override |
|
82 |
public boolean remove(String name) { |
|
83 |
Pair<String, Object> element = this.getElement(name); |
|
84 |
if( element == null ) { |
|
85 |
return false; |
|
86 |
} |
|
87 |
return this.elements.remove(element); |
|
88 |
} |
|
89 |
|
|
90 |
@Override |
|
91 |
public List<Pair<String, Object>> asList() { |
|
92 |
return Collections.unmodifiableList(elements); |
|
93 |
} |
|
94 |
|
|
95 |
} |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.temporarystorage/org.gvsig.temporarystorage.lib/org.gvsig.temporarystorage.lib.impl/src/main/java/org/gvsig/temporarystorage/impl/TemporaryStorageImplLibrary.java | ||
---|---|---|
1 |
package org.gvsig.temporarystorage.impl; |
|
2 |
|
|
3 |
|
|
4 |
import org.gvsig.temporarystorage.TemporaryStorageLibrary; |
|
5 |
import org.gvsig.temporarystorage.TemporaryStorageLocator; |
|
6 |
import org.gvsig.tools.library.AbstractLibrary; |
|
7 |
import org.gvsig.tools.library.LibraryException; |
|
8 |
|
|
9 |
public class TemporaryStorageImplLibrary extends AbstractLibrary { |
|
10 |
|
|
11 |
@Override |
|
12 |
public void doRegistration() { |
|
13 |
registerAsImplementationOf(TemporaryStorageLibrary.class); |
|
14 |
} |
|
15 |
|
|
16 |
@Override |
|
17 |
protected void doInitialize() throws LibraryException { |
|
18 |
TemporaryStorageLocator.registerManager(DefaultTemporaryStorageManager.class); |
|
19 |
} |
|
20 |
|
|
21 |
@Override |
|
22 |
protected void doPostInitialize() throws LibraryException { |
|
23 |
|
|
24 |
} |
|
25 |
} |
|
26 |
|
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.temporarystorage/org.gvsig.temporarystorage.lib/org.gvsig.temporarystorage.lib.impl/pom.xml | ||
---|---|---|
1 |
<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"> |
|
2 |
<modelVersion>4.0.0</modelVersion> |
|
3 |
<artifactId>org.gvsig.temporarystorage.lib.impl</artifactId> |
|
4 |
<name>org.gvsig.temporarystorage.lib.impl</name> |
|
5 |
<parent> |
|
6 |
<groupId>org.gvsig</groupId> |
|
7 |
<artifactId>org.gvsig.temporarystorage.lib</artifactId> |
|
8 |
<version>2.0.385</version> |
|
9 |
</parent> |
|
10 |
<groupId>org.gvsig</groupId> |
|
11 |
<dependencies> |
|
12 |
<dependency> |
|
13 |
<groupId>org.gvsig</groupId> |
|
14 |
<artifactId>org.gvsig.temporarystorage.lib.api</artifactId> |
|
15 |
<scope>compile</scope> |
|
16 |
</dependency> |
|
17 |
</dependencies> |
|
18 |
</project> |
|
0 | 19 |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.temporarystorage/org.gvsig.temporarystorage.lib/org.gvsig.temporarystorage.lib.api/pom.xml | ||
---|---|---|
1 |
<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"> |
|
2 |
<modelVersion>4.0.0</modelVersion> |
|
3 |
<groupId>org.gvsig</groupId> |
|
4 |
<artifactId>org.gvsig.temporarystorage.lib.api</artifactId> |
|
5 |
<name>org.gvsig.temporarystorage.lib.api</name> |
|
6 |
<parent> |
|
7 |
<groupId>org.gvsig</groupId> |
|
8 |
<artifactId>org.gvsig.temporarystorage.lib</artifactId> |
|
9 |
<version>2.0.385</version> |
|
10 |
</parent> |
|
11 |
|
|
12 |
<build> |
|
13 |
<plugins> |
|
14 |
<plugin> |
|
15 |
<groupId>org.apache.maven.plugins</groupId> |
|
16 |
<artifactId>maven-jar-plugin</artifactId> |
|
17 |
<configuration> |
|
18 |
</configuration> |
|
19 |
<executions> |
|
20 |
<!-- Generates a jar file only with the test classes --> |
|
21 |
<execution> |
|
22 |
<goals> |
|
23 |
<goal>test-jar</goal> |
|
24 |
</goals> |
|
25 |
</execution> |
|
26 |
</executions> |
|
27 |
</plugin> |
|
28 |
</plugins> |
|
29 |
</build> |
|
30 |
|
|
31 |
<dependencies> |
|
32 |
<dependency> |
|
33 |
<groupId>org.gvsig</groupId> |
|
34 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
35 |
<scope>compile</scope> |
|
36 |
</dependency> |
|
37 |
|
|
38 |
</dependencies> |
|
39 |
</project> |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.temporarystorage/org.gvsig.temporarystorage.lib/org.gvsig.temporarystorage.lib.api/src/main/java/org/gvsig/temporarystorage/TemporaryStorageLocator.java | ||
---|---|---|
1 |
package org.gvsig.temporarystorage; |
|
2 |
|
|
3 |
import org.gvsig.tools.locator.AbstractLocator; |
|
4 |
import org.gvsig.tools.locator.LocatorException; |
|
5 |
|
|
6 |
|
|
7 |
public class TemporaryStorageLocator extends AbstractLocator { |
|
8 |
|
|
9 |
private static final String LOCATOR_NAME = "TemporaryStorageLocator"; |
|
10 |
|
|
11 |
public static final String MANAGER_NAME = "TemporaryStorageManager"; |
|
12 |
|
|
13 |
private static final String MANAGER_DESCRIPTION = "TemporaryStorage of gvSIG"; |
|
14 |
|
|
15 |
/** |
|
16 |
* Unique instance. |
|
17 |
*/ |
|
18 |
private static final TemporaryStorageLocator instance = new TemporaryStorageLocator(); |
|
19 |
|
|
20 |
/** |
|
21 |
* Return the singleton instance. |
|
22 |
* |
|
23 |
* @return the singleton instance |
|
24 |
*/ |
|
25 |
public static TemporaryStorageLocator getInstance() { |
|
26 |
return instance; |
|
27 |
} |
|
28 |
|
|
29 |
/** |
|
30 |
* Returns the Locator name. |
|
31 |
* |
|
32 |
* @return String containing the locator name. |
|
33 |
*/ |
|
34 |
@Override |
|
35 |
public String getLocatorName() { |
|
36 |
return LOCATOR_NAME; |
|
37 |
} |
|
38 |
|
|
39 |
public static TemporaryStorageManager getTemporaryStorageManager() throws LocatorException { |
|
40 |
return (TemporaryStorageManager) getInstance().get(MANAGER_NAME); |
|
41 |
} |
|
42 |
|
|
43 |
public static void registerManager(Class clazz) { |
|
44 |
getInstance().register(MANAGER_NAME, MANAGER_DESCRIPTION, clazz); |
|
45 |
} |
|
46 |
|
|
47 |
public static void registerDefaultManager(Class clazz) { |
|
48 |
getInstance().registerDefault(MANAGER_NAME, MANAGER_DESCRIPTION, clazz); |
|
49 |
} |
|
50 |
|
|
51 |
} |
|
0 | 52 |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.temporarystorage/org.gvsig.temporarystorage.lib/org.gvsig.temporarystorage.lib.api/src/main/java/org/gvsig/temporarystorage/TemporaryStorageLibrary.java | ||
---|---|---|
1 |
package org.gvsig.temporarystorage; |
|
2 |
|
|
3 |
import org.gvsig.tools.ToolsLibrary; |
|
4 |
import org.gvsig.tools.library.AbstractLibrary; |
|
5 |
import org.gvsig.tools.library.LibraryException; |
|
6 |
|
|
7 |
public class TemporaryStorageLibrary extends AbstractLibrary { |
|
8 |
|
|
9 |
@Override |
|
10 |
public void doRegistration() { |
|
11 |
registerAsAPI(TemporaryStorageLibrary.class); |
|
12 |
require(ToolsLibrary.class); |
|
13 |
} |
|
14 |
|
|
15 |
@Override |
|
16 |
protected void doInitialize() throws LibraryException { |
|
17 |
} |
|
18 |
|
|
19 |
@Override |
|
20 |
protected void doPostInitialize() throws LibraryException { |
|
21 |
|
|
22 |
} |
|
23 |
} |
|
24 |
|
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.temporarystorage/org.gvsig.temporarystorage.lib/org.gvsig.temporarystorage.lib.api/src/main/java/org/gvsig/temporarystorage/TemporaryStorageManager.java | ||
---|---|---|
1 |
package org.gvsig.temporarystorage; |
|
2 |
|
|
3 |
import java.util.Iterator; |
|
4 |
|
|
5 |
public interface TemporaryStorageManager extends Iterable<TemporaryStorageGroup> { |
|
6 |
|
|
7 |
/** |
|
8 |
* Si existe lo devuelbe, si no falla. |
|
9 |
* @param groupName |
|
10 |
* @return |
|
11 |
*/ |
|
12 |
public TemporaryStorageGroup get(String groupName); |
|
13 |
|
|
14 |
public boolean contains(String groupName); |
|
15 |
|
|
16 |
/** |
|
17 |
* Si no existe crea el grupo y lo devuelbe, y si ya existe lo devuelbe sin |
|
18 |
* crear nada. |
|
19 |
* @param groupName |
|
20 |
* @return |
|
21 |
*/ |
|
22 |
public TemporaryStorageGroup create(String groupName); |
|
23 |
|
|
24 |
public TemporaryStorageGroup create(String groupName, Class classOfElements); |
|
25 |
|
|
26 |
@Override |
|
27 |
public Iterator<TemporaryStorageGroup> iterator(); |
|
28 |
|
|
29 |
/** |
|
30 |
* |
|
31 |
* @param groupName |
|
32 |
* @return |
|
33 |
*/ |
|
34 |
public boolean remove(String groupName); |
|
35 |
|
|
36 |
} |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.temporarystorage/org.gvsig.temporarystorage.lib/org.gvsig.temporarystorage.lib.api/src/main/java/org/gvsig/temporarystorage/TemporaryStorageGroup.java | ||
---|---|---|
1 |
package org.gvsig.temporarystorage; |
|
2 |
|
|
3 |
import java.util.List; |
|
4 |
import org.apache.commons.lang3.tuple.Pair; |
|
5 |
|
|
6 |
public interface TemporaryStorageGroup { |
|
7 |
|
|
8 |
public String getName(); |
|
9 |
|
|
10 |
public Class getClassOfElements(); |
|
11 |
|
|
12 |
public boolean contains(String name); |
|
13 |
|
|
14 |
public void put(String name, Object obj); |
|
15 |
|
|
16 |
/** |
|
17 |
* return the object or null if not exists |
|
18 |
* @param name |
|
19 |
* @return |
|
20 |
*/ |
|
21 |
public Object get(String name); |
|
22 |
|
|
23 |
public boolean remove(String name); |
|
24 |
|
|
25 |
public List<Pair<String, Object>> asList(); |
|
26 |
} |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.temporarystorage/org.gvsig.temporarystorage.lib/org.gvsig.temporarystorage.lib.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.temporarystorage.TemporaryStorageLibrary |
|
0 | 2 |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.temporarystorage/org.gvsig.temporarystorage.lib/pom.xml | ||
---|---|---|
1 |
<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"> |
|
2 |
<modelVersion>4.0.0</modelVersion> |
|
3 |
<parent> |
|
4 |
<groupId>org.gvsig</groupId> |
|
5 |
<artifactId>org.gvsig.temporarystorage</artifactId> |
|
6 |
<version>2.0.385</version> |
|
7 |
</parent> |
|
8 |
<groupId>org.gvsig</groupId> |
|
9 |
<artifactId>org.gvsig.temporarystorage.lib</artifactId> |
|
10 |
<packaging>pom</packaging> |
|
11 |
<modules> |
|
12 |
<module>org.gvsig.temporarystorage.lib.api</module> |
|
13 |
<module>org.gvsig.temporarystorage.lib.impl</module> |
|
14 |
</modules> |
|
15 |
</project> |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.temporarystorage/pom.xml | ||
---|---|---|
1 |
<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"> |
|
2 |
<modelVersion>4.0.0</modelVersion> |
|
3 |
<artifactId>org.gvsig.temporarystorage</artifactId> |
|
4 |
<packaging>pom</packaging> |
|
5 |
<description /> |
|
6 |
<parent> |
|
7 |
<groupId>org.gvsig</groupId> |
|
8 |
<artifactId>org.gvsig.desktop.library</artifactId> |
|
9 |
<version>2.0.385</version> |
|
10 |
</parent> |
|
11 |
<modules> |
|
12 |
<module>org.gvsig.temporarystorage.lib</module> |
|
13 |
</modules> |
|
14 |
</project> |
|
0 | 15 |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.api/src/test/java/README.txt | ||
---|---|---|
1 |
#set( $symbol_pound = '#' ) |
|
2 |
#set( $symbol_dollar = '$' ) |
|
3 |
#set( $symbol_escape = '\' ) |
|
4 |
For each class you are going to test, create one Test class with the same |
|
5 |
name as the class to test, ending with Test. |
|
6 |
|
|
7 |
For example, the unit tests of the "ExampleLibrary" class are performed |
|
8 |
by the "ExampleLibraryTest" class. |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.api/src/main/resources/org/gvsig/about/i18n/text.properties | ||
---|---|---|
1 |
# Resource bundle texts for the Spanish language locale (es) |
|
2 |
Example.returns_value=devuelve el valor |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.api/src/main/resources/org/gvsig/about/i18n/text_en.properties | ||
---|---|---|
1 |
# Resource bundle texts for the English language locale (en) |
|
2 |
Example.returns_value=returns value |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.api/src/main/resources/overview.html | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
|
2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
3 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
4 |
<head> |
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
|
6 |
<title>org.gvsig.scripting package documentation</title> |
|
7 |
</head> |
|
8 |
<body> |
|
9 |
|
|
10 |
<p>TODO: Example library overview.</p> |
|
11 |
|
|
12 |
<p>See the <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#overviewcomment">Javadoc Tool documentation about the overview file</a></p> |
|
13 |
|
|
14 |
</body> |
|
15 |
</html> |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.about.AboutLibrary |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.api/src/main/java/org/gvsig/about/AboutLocator.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
package org.gvsig.about; |
|
23 |
|
|
24 |
import org.gvsig.tools.locator.BaseLocator; |
|
25 |
import org.gvsig.tools.locator.Locator; |
|
26 |
import org.gvsig.tools.locator.LocatorException; |
|
27 |
|
|
28 |
/** |
|
29 |
* @author gvSIG Team |
|
30 |
* @version $Id$ |
|
31 |
* |
|
32 |
*/ |
|
33 |
public class AboutLocator extends BaseLocator { |
|
34 |
|
|
35 |
private static final String LOCATOR_NAME = "AboutLocator"; |
|
36 |
|
|
37 |
public static final String MANAGER_NAME = "aboutlocator.manager"; |
|
38 |
|
|
39 |
public static final String MANAGER_DESCRIPTION = "About Manager"; |
|
40 |
|
|
41 |
/** |
|
42 |
* Unique instance. |
|
43 |
*/ |
|
44 |
private static final AboutLocator instance = new AboutLocator(); |
|
45 |
|
|
46 |
/** |
|
47 |
* Return the singleton instance. |
|
48 |
* |
|
49 |
* @return the singleton instance |
|
50 |
*/ |
|
51 |
public static AboutLocator getInstance() { |
|
52 |
return instance; |
|
53 |
} |
|
54 |
|
|
55 |
@Override |
|
56 |
public String getLocatorName() { |
|
57 |
return LOCATOR_NAME; |
|
58 |
} |
|
59 |
|
|
60 |
/** |
|
61 |
* Return a reference to AboutManager. |
|
62 |
* |
|
63 |
* @return a reference to AboutManager |
|
64 |
* @throws LocatorException |
|
65 |
* if there is no access to the class or the class cannot be |
|
66 |
* instantiated |
|
67 |
* @see Locator#get(String) |
|
68 |
*/ |
|
69 |
public static AboutManager getManager() throws LocatorException { |
|
70 |
return (AboutManager) getInstance().get(MANAGER_NAME); |
|
71 |
} |
|
72 |
|
|
73 |
/** |
|
74 |
* Registers the Class implementing the AboutManager interface. |
|
75 |
* |
|
76 |
* @param clazz |
|
77 |
* implementing the AboutManager interface |
|
78 |
*/ |
|
79 |
public static void registerManager(Class<? extends AboutManager> clazz) { |
|
80 |
getInstance().register(MANAGER_NAME, MANAGER_DESCRIPTION, clazz); |
|
81 |
} |
|
82 |
|
|
83 |
} |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.api/src/main/java/org/gvsig/about/AboutSponsor.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
package org.gvsig.about; |
|
23 |
|
|
24 |
/** |
|
25 |
* @author gvSIG Team |
|
26 |
* @version $Id$ |
|
27 |
* |
|
28 |
*/ |
|
29 |
public interface AboutSponsor extends AboutParticipant { |
|
30 |
|
|
31 |
} |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.api/src/main/java/org/gvsig/about/package.html | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
|
2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
3 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
4 |
<head> |
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
|
6 |
<title>org.gvsig.scripting package documentation</title> |
|
7 |
</head> |
|
8 |
<body> |
|
9 |
|
|
10 |
<p>TODO: Example library description.</p> |
|
11 |
|
|
12 |
<p>See the <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#packagecomment">Javadoc Tool documentation about the package file</a></p> |
|
13 |
|
|
14 |
</body> |
|
15 |
</html> |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.api/src/main/java/org/gvsig/about/AboutLibrary.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
package org.gvsig.about; |
|
23 |
|
|
24 |
import org.gvsig.tools.library.AbstractLibrary; |
|
25 |
import org.gvsig.tools.library.LibraryException; |
|
26 |
|
|
27 |
/** |
|
28 |
* @author gvSIG Team |
|
29 |
* @version $Id$ |
|
30 |
* |
|
31 |
*/ |
|
32 |
public class AboutLibrary extends AbstractLibrary { |
|
33 |
|
|
34 |
@Override |
|
35 |
public void doRegistration() { |
|
36 |
registerAsAPI(AboutLibrary.class); |
|
37 |
} |
|
38 |
|
|
39 |
@Override |
|
40 |
protected void doInitialize() throws LibraryException { |
|
41 |
// Nothing to do |
|
42 |
} |
|
43 |
|
|
44 |
@Override |
|
45 |
protected void doPostInitialize() throws LibraryException { |
|
46 |
// Nothing to do |
|
47 |
} |
|
48 |
|
|
49 |
} |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.api/src/main/java/org/gvsig/about/AboutDeveloper.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
package org.gvsig.about; |
|
23 |
|
|
24 |
/** |
|
25 |
* @author gvSIG Team |
|
26 |
* @version $Id$ |
|
27 |
* |
|
28 |
*/ |
|
29 |
public interface AboutDeveloper extends AboutParticipant { |
|
30 |
|
|
31 |
} |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.api/src/main/java/org/gvsig/about/AboutProject.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
package org.gvsig.about; |
|
23 |
|
|
24 |
import java.net.URL; |
|
25 |
|
|
26 |
/** |
|
27 |
* @author gvSIG Team |
|
28 |
* @version $Id$ |
|
29 |
* |
|
30 |
*/ |
|
31 |
public interface AboutProject { |
|
32 |
|
|
33 |
public String getName(); |
|
34 |
|
|
35 |
public URL getDescription(); |
|
36 |
|
|
37 |
public URL getIcon(); |
|
38 |
|
|
39 |
public String getInformationPage(); |
|
40 |
|
|
41 |
public void set(String name, String value); |
|
42 |
} |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.api/src/main/java/org/gvsig/about/AboutTranslator.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
package org.gvsig.about; |
|
23 |
|
|
24 |
/** |
|
25 |
* @author gvSIG Team |
|
26 |
* @version $Id$ |
|
27 |
* |
|
28 |
*/ |
|
29 |
public interface AboutTranslator extends AboutParticipant { |
|
30 |
|
|
31 |
} |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.api/src/main/java/org/gvsig/about/AboutManager.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
package org.gvsig.about; |
|
23 |
|
|
24 |
import java.net.URL; |
|
25 |
import java.util.List; |
|
26 |
import java.util.Map; |
|
27 |
|
|
28 |
import javax.swing.JPanel; |
|
29 |
|
|
30 |
/** |
|
31 |
* @author gvSIG Team |
|
32 |
* @version $Id$ |
|
33 |
* |
|
34 |
*/ |
|
35 |
public interface AboutManager { |
|
36 |
|
|
37 |
public void setProject(String name, URL description, URL icon); |
|
38 |
|
|
39 |
public void setProject(String name, URL description, URL icon, |
|
40 |
Map<String, String> vars); |
|
41 |
|
|
42 |
/** |
|
43 |
* Add a developer information if not exists |
|
44 |
*/ |
|
45 |
public AboutParticipant addDeveloper(String name, URL description, |
|
46 |
int priority); |
|
47 |
|
|
48 |
public AboutParticipant addDeveloper(String name, URL description, |
|
49 |
int priority, URL icon); |
|
50 |
|
|
51 |
/** |
|
52 |
* Add a sponsor information if not exists |
|
53 |
*/ |
|
54 |
public AboutParticipant addSponsor(String name, URL description, |
|
55 |
int priority); |
|
56 |
|
|
57 |
public AboutParticipant addSponsor(String name, URL description, |
|
58 |
int priority, URL icon); |
|
59 |
|
|
60 |
/** |
|
61 |
* Add a translator information if not exists |
|
62 |
*/ |
|
63 |
public AboutParticipant addTranslator(String name, URL description, |
|
64 |
int priority); |
|
65 |
|
|
66 |
public AboutParticipant addTranslator(String name, URL description, |
|
67 |
int priority, URL icon); |
|
68 |
|
|
69 |
public AboutProject getProject(); |
|
70 |
|
|
71 |
public List<AboutDeveloper> getDevelopers(); |
|
72 |
|
|
73 |
public List<AboutSponsor> getSponsors(); |
|
74 |
|
|
75 |
public List<AboutTranslator> getTranslators(); |
|
76 |
|
|
77 |
public AboutSponsor getSponsor(String name); |
|
78 |
|
|
79 |
public AboutDeveloper getDeveloper(String name); |
|
80 |
|
|
81 |
public AboutTranslator getTranslator(String name); |
|
82 |
|
|
83 |
/* API of the swing part */ |
|
84 |
public JPanel getAboutPanel(); |
|
85 |
|
|
86 |
/** |
|
87 |
* Returns the base path of a file URL. |
|
88 |
* <p> |
|
89 |
* The method will simply cut the last path of the URL. |
|
90 |
* For example, if the URL is: |
|
91 |
* </p> |
|
92 |
* http://www.gvsig.org/docs/file.html |
|
93 |
* <p> |
|
94 |
* The returned base string would be: |
|
95 |
* </p> |
|
96 |
* http://www.gvsig.org/docs/ |
|
97 |
* @param fileURL the {@link URL} of the file |
|
98 |
* @return the base path of a file URL |
|
99 |
*/ |
|
100 |
public String getURLBase(URL fileURL); |
|
101 |
} |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.api/src/main/java/org/gvsig/about/AboutParticipant.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
package org.gvsig.about; |
|
23 |
|
|
24 |
import java.net.URL; |
|
25 |
import java.util.Date; |
|
26 |
import java.util.List; |
|
27 |
import java.util.Map; |
|
28 |
|
|
29 |
/** |
|
30 |
* @author gvSIG Team |
|
31 |
* @version $Id$ |
|
32 |
* |
|
33 |
*/ |
|
34 |
public interface AboutParticipant { |
|
35 |
|
|
36 |
public String getName(); |
|
37 |
|
|
38 |
public int getPriority(); |
|
39 |
|
|
40 |
public URL getDescription(); |
|
41 |
|
|
42 |
public URL getIcon(); |
|
43 |
|
|
44 |
public List<AboutContribution> getContributions(); |
|
45 |
|
|
46 |
public AboutContribution addContribution(String title, String description, |
|
47 |
Date begin, Date end); |
|
48 |
|
|
49 |
public AboutContribution addContribution(String title, String description, |
|
50 |
int begin_year, int begin_month, int begin_day, int end_year, |
|
51 |
int end_month, int end_day); |
|
52 |
|
|
53 |
public String getInformationPage(); |
|
54 |
|
|
55 |
public String getContributionsTable(); |
|
56 |
|
|
57 |
public AboutManager getManager(); |
|
58 |
|
|
59 |
public void addVariables(Map<String, String> vars); |
|
60 |
|
|
61 |
public void set(String name, String value); |
|
62 |
|
|
63 |
} |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.api/src/main/java/org/gvsig/about/AboutContribution.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
package org.gvsig.about; |
|
23 |
|
|
24 |
import java.util.Date; |
|
25 |
|
|
26 |
/** |
|
27 |
* @author gvSIG Team |
|
28 |
* @version $Id$ |
|
29 |
* |
|
30 |
*/ |
|
31 |
public interface AboutContribution { |
|
32 |
|
|
33 |
public String getTitle(); |
|
34 |
|
|
35 |
public Date getEnd(); |
|
36 |
|
|
37 |
public Date getBegin(); |
|
38 |
|
|
39 |
public AboutParticipant getParticipant(); |
|
40 |
|
|
41 |
public String getDescription(); |
|
42 |
|
|
43 |
} |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.api/src/main/javadoc/overview.html | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
|
2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
3 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
4 |
<head> |
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
|
6 |
<title>org.gvsig.scripting package documentation</title> |
|
7 |
</head> |
|
8 |
<body> |
|
9 |
|
|
10 |
<p>TODO: Example library overview.</p> |
|
11 |
|
|
12 |
<p>See the <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#overviewcomment">Javadoc Tool documentation about the overview file</a></p> |
|
13 |
|
|
14 |
</body> |
|
15 |
</html> |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.api/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<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"> |
|
3 |
|
|
4 |
<modelVersion>4.0.0</modelVersion> |
|
5 |
<artifactId>org.gvsig.about.api</artifactId> |
|
6 |
<packaging>jar</packaging> |
|
7 |
<name>${project.artifactId}</name> |
|
8 |
<description>"About us..." dialog library API</description> |
|
9 |
<parent> |
|
10 |
<groupId>org.gvsig</groupId> |
|
11 |
<artifactId>org.gvsig.about</artifactId> |
|
12 |
<version>2.0.385</version> |
|
13 |
</parent> |
|
14 |
<dependencies> |
|
15 |
<dependency> |
|
16 |
<groupId>org.gvsig</groupId> |
|
17 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
18 |
<scope>compile</scope> |
|
19 |
</dependency> |
|
20 |
</dependencies> |
|
21 |
</project> |
|
0 | 22 |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<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"> |
|
3 |
|
|
4 |
<modelVersion>4.0.0</modelVersion> |
|
5 |
<artifactId>org.gvsig.about</artifactId> |
|
6 |
<packaging>pom</packaging> |
|
7 |
<name>org.gvsig.about</name> |
|
8 |
<description>"About us..." dialog library</description> |
|
9 |
<parent> |
|
10 |
<groupId>org.gvsig</groupId> |
|
11 |
<artifactId>org.gvsig.desktop.library</artifactId> |
|
12 |
<version>2.0.385</version> |
|
13 |
</parent> |
|
14 |
|
|
15 |
<modules> |
|
16 |
<module>org.gvsig.about.api</module> |
|
17 |
<module>org.gvsig.about.impl</module> |
|
18 |
</modules> |
|
19 |
</project> |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.impl/src/main/java/org/gvsig/htmlBrowser/SimpleHtmlBrowserPanel.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
package org.gvsig.htmlBrowser; |
|
23 |
|
|
24 |
import java.awt.BorderLayout; |
|
25 |
import java.io.IOException; |
|
26 |
import java.net.URL; |
|
27 |
|
|
28 |
import javax.swing.JEditorPane; |
|
29 |
import javax.swing.JScrollPane; |
|
30 |
import javax.swing.event.HyperlinkEvent; |
|
31 |
import javax.swing.event.HyperlinkListener; |
|
32 |
|
|
33 |
import org.slf4j.Logger; |
|
34 |
import org.slf4j.LoggerFactory; |
|
35 |
|
|
36 |
/** |
|
37 |
* @author gvSIG Team |
|
38 |
* @version $Id$ |
|
39 |
* |
|
40 |
*/ |
|
41 |
public class SimpleHtmlBrowserPanel extends HtmlBrowserPanel implements |
|
42 |
HyperlinkListener { |
|
43 |
|
|
44 |
private static final long serialVersionUID = 2222495134882233629L; |
|
45 |
private static final Logger LOG = LoggerFactory |
|
46 |
.getLogger(SimpleHtmlBrowserPanel.class); |
|
47 |
|
|
48 |
public JEditorPane htmlPane; |
|
49 |
public JScrollPane scroll; |
|
50 |
|
|
51 |
public SimpleHtmlBrowserPanel() { |
|
52 |
setLayout(new BorderLayout()); |
|
53 |
|
|
54 |
this.htmlPane = new JEditorPane(); |
|
55 |
this.htmlPane.setContentType("text/html"); |
|
56 |
this.htmlPane.setEditable(false); |
|
57 |
|
|
58 |
this.scroll = new JScrollPane(htmlPane); |
|
59 |
// htmlPane.addHyperlinkListener(this); |
|
60 |
|
|
61 |
add(scroll, BorderLayout.CENTER); |
|
62 |
} |
|
63 |
|
|
64 |
@Override |
|
65 |
public void navigate(URL url) { |
|
66 |
try { |
|
67 |
this.htmlPane.setPage(url); |
|
68 |
} catch (IOException e) { |
|
69 |
this.htmlPane.setText("Error reading html content"); |
|
70 |
LOG.error("Error reading html content from URL: " + url, e); |
|
71 |
} |
|
72 |
} |
|
73 |
|
|
74 |
@Override |
|
75 |
public void setText(String text) { |
|
76 |
this.htmlPane.setText(text); |
|
77 |
this.htmlPane.setCaretPosition(0); |
|
78 |
} |
|
79 |
|
|
80 |
public void hyperlinkUpdate(HyperlinkEvent event) { |
|
81 |
if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { |
|
82 |
try { |
|
83 |
htmlPane.setPage(event.getURL()); |
|
84 |
} catch (IOException ioe) { |
|
85 |
this.htmlPane.setText("Error reading html content"); |
|
86 |
LOG.error( |
|
87 |
"Error reading html content from URL: " + event.getURL(), |
|
88 |
ioe); |
|
89 |
} |
|
90 |
} |
|
91 |
} |
|
92 |
|
|
93 |
public JEditorPane getJEditorPane() { |
|
94 |
return htmlPane; |
|
95 |
} |
|
96 |
|
|
97 |
} |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.impl/src/main/java/org/gvsig/htmlBrowser/LoboHtmlBrowserPanel.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
package org.gvsig.htmlBrowser; |
|
23 |
|
|
24 |
import java.net.URL; |
|
25 |
|
|
26 |
//import org.lobobrowser.gui.FramePanel; |
|
27 |
|
|
28 |
/** |
|
29 |
* @author gvSIG Team |
|
30 |
* @version $Id$ |
|
31 |
* |
|
32 |
*/ |
|
33 |
public class LoboHtmlBrowserPanel extends HtmlBrowserPanel { |
|
34 |
|
|
35 |
/** |
|
36 |
* |
|
37 |
*/ |
|
38 |
private static final long serialVersionUID = 2789434542951170259L; |
|
39 |
|
|
40 |
// FramePanel framePanel = null; |
|
41 |
|
|
42 |
public LoboHtmlBrowserPanel() { |
|
43 |
super(); |
|
44 |
} |
|
45 |
|
|
46 |
@Override |
|
47 |
public void navigate(URL url) { |
|
48 |
// this.framePanel.navigate(url); |
|
49 |
} |
|
50 |
|
|
51 |
@Override |
|
52 |
public void setText(String text) { |
|
53 |
|
|
54 |
} |
|
55 |
|
|
56 |
} |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.impl/src/main/java/org/gvsig/htmlBrowser/HtmlBrowserPanel.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
package org.gvsig.htmlBrowser; |
|
23 |
|
|
24 |
import java.net.URL; |
|
25 |
|
|
26 |
import javax.swing.JPanel; |
|
27 |
|
|
28 |
/** |
|
29 |
* @author gvSIG Team |
|
30 |
* @version $Id$ |
|
31 |
* |
|
32 |
*/ |
|
33 |
public abstract class HtmlBrowserPanel extends JPanel { |
|
34 |
|
|
35 |
private static final long serialVersionUID = 8497218072224309746L; |
|
36 |
|
|
37 |
abstract public void navigate(URL url); |
|
38 |
|
|
39 |
abstract public void setText(String text); |
|
40 |
|
|
41 |
} |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.impl/src/main/java/org/gvsig/about/impl/DefaultAboutTranslator.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
package org.gvsig.about.impl; |
|
23 |
|
|
24 |
import java.net.URL; |
|
25 |
|
|
26 |
import org.gvsig.about.AboutTranslator; |
|
27 |
|
|
28 |
/** |
|
29 |
* @author gvSIG Team |
|
30 |
* @version $Id$ |
|
31 |
* |
|
32 |
*/ |
|
33 |
public class DefaultAboutTranslator extends AbstractParticipant implements |
|
34 |
AboutTranslator { |
|
35 |
|
|
36 |
public DefaultAboutTranslator(DefaultAboutManager manager, String name, |
|
37 |
URL description, int priority, URL icon) { |
|
38 |
super(manager, name, description, priority, icon); |
|
39 |
} |
|
40 |
|
|
41 |
public DefaultAboutTranslator(DefaultAboutManager manager, String name, |
|
42 |
URL description, int priority) { |
|
43 |
super(manager, name, description, priority, null); |
|
44 |
} |
|
45 |
|
|
46 |
} |
tags/org.gvsig.desktop-2.0.385/org.gvsig.desktop.library/org.gvsig.about/org.gvsig.about.impl/src/main/java/org/gvsig/about/impl/DefaultAboutManager.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
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 2 |
|
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 |
*/ |
|
22 |
package org.gvsig.about.impl; |
|
23 |
|
|
24 |
import java.io.BufferedReader; |
|
25 |
import java.io.FileNotFoundException; |
|
26 |
import java.io.FileReader; |
|
27 |
import java.io.IOException; |
|
28 |
import java.io.InputStream; |
|
29 |
import java.io.InputStreamReader; |
|
30 |
import java.net.URL; |
|
31 |
import java.util.ArrayList; |
|
32 |
import java.util.Collections; |
|
33 |
import java.util.Comparator; |
|
34 |
import java.util.Iterator; |
|
35 |
import java.util.List; |
|
36 |
import java.util.Map; |
|
37 |
|
|
38 |
import javax.swing.ImageIcon; |
|
39 |
import javax.swing.JPanel; |
|
40 |
|
Also available in: Unified diff