Revision 38311
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/prepare-workspace.xml | ||
---|---|---|
1 |
<project name="org.gvsig.initial.build" default="prepare-workspace"> |
|
2 |
|
|
3 |
<dirname property="org.gvsig.initial.build.basedir" file="${ant.file.org.gvsig.initial.build}" /> |
|
4 |
|
|
5 |
<property name="workspace.basedir" value="${org.gvsig.initial.build.basedir}/.." /> |
|
6 |
<property name="build.basedir" value="${workspace.basedir}/org.gvsig.maven.base.build" description="Eclipse workspace location" /> |
|
7 |
<property name="build.jar.version" value="1.0.8-SNAPSHOT" /> |
|
8 |
<property name="build.jar.file" value="org.gvsig.maven.base.build-${build.jar.version}.jar" /> |
|
9 |
|
|
10 |
<property name="ant.libs.dir" location="${build.basedir}" description="Additional ant tasks libs folder" /> |
|
11 |
|
|
12 |
<target name="check-maven-base-build-available"> |
|
13 |
<available file="${user.home}/.m2/repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}" property="maven-base-build-available" /> |
|
14 |
</target> |
|
15 |
|
|
16 |
<target name="get-maven-base-build-local" depends="check-maven-base-build-available" if="maven-base-build-available"> |
|
17 |
<!-- Unzip de build jar file from the maven repository into the workspace root folder --> |
|
18 |
<copy todir="${workspace.basedir}" preservelastmodified="false" filtering="false"> |
|
19 |
<zipfileset src="${user.home}/.m2/repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}"> |
|
20 |
<patternset> |
|
21 |
<exclude name="META-INF/**" /> |
|
22 |
</patternset> |
|
23 |
</zipfileset> |
|
24 |
</copy> |
|
25 |
</target> |
|
26 |
|
|
27 |
<target name="get-maven-base-build-remote" depends="check-maven-base-build-available" unless="maven-base-build-available"> |
|
28 |
<mkdir dir="target" /> |
|
29 |
|
|
30 |
<!-- Download the build jar file --> |
|
31 |
<get src="http://devel.gvsig.org/m2repo/j2se/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}" dest="target/${build.jar.file}" verbose="true" /> |
|
32 |
|
|
33 |
<!-- Unzip de build jar file into the workspace root folder --> |
|
34 |
<copy todir="${workspace.basedir}" preservelastmodified="false" filtering="false"> |
|
35 |
<zipfileset src="target/${build.jar.file}"> |
|
36 |
<patternset> |
|
37 |
<exclude name="META-INF/**" /> |
|
38 |
</patternset> |
|
39 |
</zipfileset> |
|
40 |
</copy> |
|
41 |
|
|
42 |
</target> |
|
43 |
|
|
44 |
<target name="find.depends.natives.file"> |
|
45 |
<condition property="depends.natives.file.exists"> |
|
46 |
<available file="${org.gvsig.initial.build.basedir}/DEPENDS_ON_NATIVE_LIBRARIES"/> |
|
47 |
</condition> |
|
48 |
</target> |
|
49 |
|
|
50 |
<target name="find.gvsig.platform.properties.file" |
|
51 |
depends="find.depends.natives.file" |
|
52 |
if="depends.natives.file.exists"> |
|
53 |
<condition property="gvsig.platform.exists"> |
|
54 |
<available file="${user.home}/.gvsig.platform.properties"/> |
|
55 |
</condition> |
|
56 |
</target> |
|
57 |
|
|
58 |
<target name="check.gvsig.platform.properties" |
|
59 |
depends="find.gvsig.platform.properties.file"> |
|
60 |
<fail if="depends.natives.file.exists" unless="gvsig.platform.exists"> |
|
61 |
ERROR!! |
|
62 |
|
|
63 |
You have to define your gvSIG platform properties, |
|
64 |
by creating the file: ${user.home}/.gvsig.platform.properties |
|
65 |
with the following content: |
|
66 |
|
|
67 |
native_platform=linux |
|
68 |
native_distribution=all |
|
69 |
native_compiler=gcc4 |
|
70 |
native_arch=i386 |
|
71 |
native_libraryType=dynamic |
|
72 |
export native_classifier=${native_platform}-${native_distribution}-${native_compiler}-${native_arch}-${native_libraryType} |
|
73 |
|
|
74 |
Replace the fifth initial variables values with the ones appropiate |
|
75 |
to your platform. |
|
76 |
|
|
77 |
If you use maven in the command line, you can use the previous file also |
|
78 |
to define the MAVEN_OPTS environment variable, by adding to your |
|
79 |
.bash_rc file something like this: |
|
80 |
|
|
81 |
if [ -f "${HOME}/.gvsig.platform.properties" ] |
|
82 |
then |
|
83 |
. ${HOME}/.gvsig.platform.properties |
|
84 |
export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m -Dnative-classifier=${native_classifier}" |
|
85 |
else |
|
86 |
export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m" |
|
87 |
fi |
|
88 |
|
|
89 |
It will work if you use the bash shell. In any other case or platform, you'll |
|
90 |
have to define your MAVEN_OPTS environment variable and set the |
|
91 |
"native-classifier" parameter directly. |
|
92 |
</fail> |
|
93 |
|
|
94 |
</target> |
|
95 |
|
|
96 |
<target name="prepare-workspace" depends="get-maven-base-build-local,get-maven-base-build-remote,check.gvsig.platform.properties"> |
|
97 |
|
|
98 |
<mkdir dir="target" /> |
|
99 |
|
|
100 |
<chmod dir="${build.basedir}/maven/bin" perm="u+x" includes="m2,mvn,mvnDebug" /> |
|
101 |
|
|
102 |
<!-- Copy the maven launchers to the workspace metadata folder --> |
|
103 |
<copy todir="${workspace.basedir}/.metadata"> |
|
104 |
<fileset dir="${build.basedir}/eclipse-launchers"> |
|
105 |
<exclude name="**/org.eclipse.jdt.core.prefs" /> |
|
106 |
<exclude name="**/org.eclipse.core.variables.prefs" /> |
|
107 |
</fileset> |
|
108 |
</copy> |
|
109 |
|
|
110 |
<concat destfile="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs" append="true"> |
|
111 |
<filelist dir="${build.basedir}/eclipse-launchers/.plugins/org.eclipse.core.runtime/.settings" files="org.eclipse.jdt.core.prefs" /> |
|
112 |
</concat> |
|
113 |
<concat destfile="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.variables.prefs" append="true"> |
|
114 |
<filelist dir="${build.basedir}/eclipse-launchers/.plugins/org.eclipse.core.runtime/.settings" files="org.eclipse.core.variables.prefs" /> |
|
115 |
</concat> |
|
116 |
|
|
117 |
<!-- Configure the eclipse workspace --> |
|
118 |
<ant antfile="${build.basedir}/maven-goals.xml" target="mvn-configure-eclipse-workspace" /> |
|
119 |
|
|
120 |
<!-- Configure the gvSIG profile --> |
|
121 |
<ant antfile="${build.basedir}/check-gvsig-profile.xml" /> |
|
122 |
|
|
123 |
<property name="user-settings-file-location" value="${user.home}/.m2/settings.xml" /> |
|
124 |
|
|
125 |
<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask"> |
|
126 |
<classpath> |
|
127 |
<pathelement location="${ant.libs.dir}/com.oopsconsultancy.xmltask-1.16.1.jar" /> |
|
128 |
</classpath> |
|
129 |
</taskdef> |
|
130 |
|
|
131 |
<xmltask source="${user-settings-file-location}" dest="${user-settings-file-location}"> |
|
132 |
<copy path="//:settings/:profiles/:profile[:id/text() = 'gvsig-install']/:properties/:gvsig.install.dir/text()" property="current-gvsig-location" /> |
|
133 |
</xmltask> |
|
134 |
|
|
135 |
<replace file="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs" token="@GVSIG_HOME@" value="${current-gvsig-location}" /> |
|
136 |
<replace file="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.variables.prefs" token="@GVSIG_HOME@" value="${current-gvsig-location}" /> |
|
137 |
|
|
138 |
<!-- Compile, install and generate eclipse projects --> |
|
139 |
<ant antfile="${build.basedir}/maven-goals.xml" target="mvn-install-and-eclipse-eclipse" /> |
|
140 |
|
|
141 |
<echo>INFORMATION!!!</echo> |
|
142 |
<echo>Restart eclipse and then proceed to import the subprojects contained into the main project</echo> |
|
143 |
|
|
144 |
<!-- TODO: copiar al proyecto de configuraciĆ³n general --> |
|
145 |
</target> |
|
146 |
|
|
147 |
<target name="clean"> |
|
148 |
<delete dir="target" /> |
|
149 |
</target> |
|
150 |
|
|
151 |
</project> |
|
0 | 152 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
4 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
5 |
<modelVersion>4.0.0</modelVersion> |
|
6 |
<artifactId>org.gvsig.symbology</artifactId> |
|
7 |
<packaging>pom</packaging> |
|
8 |
<version>2.0.0-SNAPSHOT</version> |
|
9 |
<name>org.gvsig.symbology</name> |
|
10 |
<description>Symbology example project</description> |
|
11 |
<parent> |
|
12 |
<groupId>org.gvsig</groupId> |
|
13 |
<artifactId>org.gvsig.maven.base.pom</artifactId> |
|
14 |
<version>1.0.8-SNAPSHOT</version> |
|
15 |
</parent> |
|
16 |
<scm> |
|
17 |
<connection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/branches/v2_0_0_prep/libraries/org.gvsig.symbology</connection> |
|
18 |
<developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/branches/v2_0_0_prep/libraries/org.gvsig.symbology</developerConnection> |
|
19 |
<url>https://devel.gvsig.org/redmine/projects/gvsig-desktop/repository/show/branches/v2_0_0_prep/libraries/org.gvsig.symbology</url> |
|
20 |
</scm> |
|
21 |
<developers> |
|
22 |
<developer> |
|
23 |
<id>jjdelcerro</id> |
|
24 |
<name>Joaqu?n Jos? del Cerro</name> |
|
25 |
<email>jjdelcerro@gvsig.org</email> |
|
26 |
<roles> |
|
27 |
<role>Architect</role> |
|
28 |
<role>Developer</role> |
|
29 |
</roles> |
|
30 |
</developer> |
|
31 |
<developer> |
|
32 |
<id>jbadia</id> |
|
33 |
<name>Jos? Bad?a</name> |
|
34 |
<email>badia_jos@gva.es</email> |
|
35 |
<roles> |
|
36 |
<role>Developer</role> |
|
37 |
</roles> |
|
38 |
</developer> |
|
39 |
</developers> |
|
40 |
<repositories> |
|
41 |
<repository> |
|
42 |
<id>gvsig-public-http-repository</id> |
|
43 |
<name>gvSIG maven public HTTP repository</name> |
|
44 |
<url>http://devel.gvsig.org/m2repo/j2se</url> |
|
45 |
<releases> |
|
46 |
<enabled>true</enabled> |
|
47 |
<updatePolicy>daily</updatePolicy> |
|
48 |
<checksumPolicy>warn</checksumPolicy> |
|
49 |
</releases> |
|
50 |
<snapshots> |
|
51 |
<enabled>true</enabled> |
|
52 |
<updatePolicy>daily</updatePolicy> |
|
53 |
<checksumPolicy>warn</checksumPolicy> |
|
54 |
</snapshots> |
|
55 |
</repository> |
|
56 |
</repositories> |
|
57 |
<dependencyManagement> |
|
58 |
<dependencies> |
|
59 |
<dependency> |
|
60 |
<groupId>org.gvsig</groupId> |
|
61 |
<artifactId>org.gvsig.core.maven.dependencies</artifactId> |
|
62 |
<version>2.0.1-SNAPSHOT</version> |
|
63 |
<type>pom</type> |
|
64 |
<scope>import</scope> |
|
65 |
</dependency> |
|
66 |
</dependencies> |
|
67 |
</dependencyManagement> |
|
68 |
<dependencies> |
|
69 |
<dependency> |
|
70 |
<groupId>org.gvsig</groupId> |
|
71 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
72 |
<scope>compile</scope> |
|
73 |
</dependency> |
|
74 |
<dependency> |
|
75 |
<groupId>org.gvsig</groupId> |
|
76 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
77 |
<type>test-jar</type> |
|
78 |
</dependency> |
|
79 |
</dependencies> |
|
80 |
|
|
81 |
<modules> |
|
82 |
<module>org.gvsig.symbology.lib</module> |
|
83 |
<module>org.gvsig.symbology.swing</module> |
|
84 |
<module>org.gvsig.symbology.main</module> |
|
85 |
</modules> |
|
86 |
</project> |
|
0 | 87 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/README.txt | ||
---|---|---|
1 |
The first time you checkout the current project to a new workspace, |
|
2 |
you have to prepare it to be able to work easily with maven from |
|
3 |
eclipse itself. |
|
4 |
|
|
5 |
Perform the following steps: |
|
6 |
|
|
7 |
1.- Launch the *prepare-workspace.xml* ant build file. |
|
8 |
You can do it by loading the file into the ant view, |
|
9 |
and running the default task, or right-clicking the |
|
10 |
file from the package explorer or the navigator and |
|
11 |
select the option: *Run as > Ant build*. |
|
12 |
|
|
13 |
2.- Restart eclipse. |
|
14 |
|
|
15 |
3.- Import the subprojects of the project you have just checked out. |
|
16 |
|
|
17 |
Those steps are only needed once per workspace. |
|
18 |
|
|
0 | 19 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/org.gvsig.symbology.main/src/main/java/org/gvsig/symbology/main/Main.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.symbology.main; |
|
23 |
|
|
24 |
import java.awt.BorderLayout; |
|
25 |
import java.awt.Dimension; |
|
26 |
import java.awt.event.ActionEvent; |
|
27 |
|
|
28 |
import javax.swing.AbstractAction; |
|
29 |
import javax.swing.Action; |
|
30 |
import javax.swing.JButton; |
|
31 |
import javax.swing.JFrame; |
|
32 |
import javax.swing.JMenu; |
|
33 |
import javax.swing.JMenuBar; |
|
34 |
import javax.swing.JMenuItem; |
|
35 |
import javax.swing.JToolBar; |
|
36 |
import javax.swing.WindowConstants; |
|
37 |
|
|
38 |
import org.gvsig.symbology.SymbologyLocator; |
|
39 |
import org.gvsig.symbology.SymbologyManager; |
|
40 |
import org.gvsig.symbology.swing.SymbologySwingLocator; |
|
41 |
import org.gvsig.symbology.swing.SymbologySwingManager; |
|
42 |
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer; |
|
43 |
import org.slf4j.Logger; |
|
44 |
import org.slf4j.LoggerFactory; |
|
45 |
|
|
46 |
/** |
|
47 |
* Main executable class for testing the Symbology library. |
|
48 |
* |
|
49 |
* @author gvSIG Team |
|
50 |
* @version $Id$ |
|
51 |
*/ |
|
52 |
public class Main { |
|
53 |
|
|
54 |
private static final Logger LOG = LoggerFactory.getLogger(Main.class); |
|
55 |
|
|
56 |
private SymbologyManager manager; |
|
57 |
private SymbologySwingManager swingManager; |
|
58 |
|
|
59 |
public static void main(String args[]) { |
|
60 |
new DefaultLibrariesInitializer().fullInitialize(); |
|
61 |
Main main = new Main(); |
|
62 |
main.show(); |
|
63 |
} |
|
64 |
|
|
65 |
@SuppressWarnings("serial") |
|
66 |
public void show() { |
|
67 |
manager = SymbologyLocator.getSymbologyManager(); |
|
68 |
swingManager = SymbologySwingLocator.getSwingManager(); |
|
69 |
|
|
70 |
Action showCookie = new AbstractAction("Get a Symbology") { |
|
71 |
|
|
72 |
public void actionPerformed(ActionEvent e) { |
|
73 |
showSymbology(manager); |
|
74 |
} |
|
75 |
}; |
|
76 |
|
|
77 |
Action exit = new AbstractAction("Exit") { |
|
78 |
|
|
79 |
public void actionPerformed(ActionEvent e) { |
|
80 |
System.exit(0); |
|
81 |
} |
|
82 |
}; |
|
83 |
|
|
84 |
JFrame frame = new JFrame("Symbology example app"); |
|
85 |
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); |
|
86 |
|
|
87 |
// Create the menu bar. |
|
88 |
JMenuBar menuBar = new JMenuBar(); |
|
89 |
|
|
90 |
// Build the menu. |
|
91 |
JMenu menuFile = new JMenu("File"); |
|
92 |
menuFile.add(new JMenuItem(showCookie)); |
|
93 |
menuFile.add(new JMenuItem(exit)); |
|
94 |
|
|
95 |
menuBar.add(menuFile); |
|
96 |
|
|
97 |
JToolBar toolBar = new JToolBar(); |
|
98 |
toolBar.add(new JButton(showCookie)); |
|
99 |
toolBar.add(new JButton(exit)); |
|
100 |
|
|
101 |
frame.setPreferredSize(new Dimension(200, 100)); |
|
102 |
frame.setJMenuBar(menuBar); |
|
103 |
frame.add(toolBar, BorderLayout.PAGE_START); |
|
104 |
|
|
105 |
// Display the window. |
|
106 |
frame.pack(); |
|
107 |
frame.setVisible(true); |
|
108 |
} |
|
109 |
|
|
110 |
public void showSymbology(SymbologyManager manager) { |
|
111 |
// try { |
|
112 |
// SymbologyService service = |
|
113 |
// (SymbologyService) manager.getSymbologyService(); |
|
114 |
// JSymbologyServicePanel panel = |
|
115 |
// swingManager.createSymbology(service); |
|
116 |
// swingManager.getWindowManager().showWindow(panel, "Symbology", |
|
117 |
// SymbologyWindowManager.MODE_WINDOW); |
|
118 |
// |
|
119 |
// } catch (ServiceException e) { |
|
120 |
// LOG.error("Error showing a Symbology", e); |
|
121 |
// } |
|
122 |
} |
|
123 |
|
|
124 |
} |
|
0 | 125 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/org.gvsig.symbology.main/src/main/java/org/gvsig/symbology/main/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.symbology package documentation</title> |
|
7 |
</head> |
|
8 |
<body> |
|
9 |
|
|
10 |
<p>Symbology library testing and demo application.</p> |
|
11 |
|
|
12 |
</body> |
|
13 |
</html> |
|
0 | 14 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/org.gvsig.symbology.main/src/main/resources/log4j.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1" ?> |
|
2 |
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> |
|
3 |
|
|
4 |
<!-- |
|
5 |
Log4J configuration file for unit tests execution. |
|
6 |
--> |
|
7 |
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> |
|
8 |
|
|
9 |
<!-- Appender configuration to show logging messages through the console --> |
|
10 |
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> |
|
11 |
<layout class="org.apache.log4j.PatternLayout"> |
|
12 |
<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n %m%n" /> |
|
13 |
</layout> |
|
14 |
</appender> |
|
15 |
|
|
16 |
<!-- |
|
17 |
Activate logging messages of DEBUG level of higher only for the |
|
18 |
org.gvsig.tools packages. |
|
19 |
You can put full classes names or packages instead, to configure |
|
20 |
logging for all the classes and subpackages of the package. |
|
21 |
--> |
|
22 |
<category name="org.gvsig.tools"> |
|
23 |
<priority value="DEBUG" /> |
|
24 |
</category> |
|
25 |
<category name="org.gvsig.symbology"> |
|
26 |
<priority value="DEBUG" /> |
|
27 |
</category> |
|
28 |
|
|
29 |
<!-- |
|
30 |
By default, show only logging messages of INFO level or higher, |
|
31 |
through the previously configured CONSOLE appender. |
|
32 |
--> |
|
33 |
<root> |
|
34 |
<priority value="INFO" /> |
|
35 |
<appender-ref ref="CONSOLE" /> |
|
36 |
</root> |
|
37 |
</log4j:configuration> |
|
0 | 38 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/org.gvsig.symbology.main/src/main/resources/README.txt | ||
---|---|---|
1 |
Put into this folder the resources needed by your classes. |
|
2 |
|
|
3 |
This folder is added to the classpath, so you can load any resources |
|
4 |
through the ClassLoader. |
|
5 |
|
|
6 |
By default, in this folder you can find an example of log4j configuration, |
|
7 |
prepared to log messages through the console, so logging works when you |
|
8 |
run your classes. |
|
0 | 9 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/org.gvsig.symbology.main/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
3 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
4 |
<modelVersion>4.0.0</modelVersion> |
|
5 |
<artifactId>org.gvsig.symbology.main</artifactId> |
|
6 |
<packaging>jar</packaging> |
|
7 |
<name>org.gvsig.symbology.main</name> |
|
8 |
<parent> |
|
9 |
<groupId>org.gvsig</groupId> |
|
10 |
<artifactId>org.gvsig.symbology</artifactId> |
|
11 |
<version>2.0.0-SNAPSHOT</version> |
|
12 |
</parent> |
|
13 |
<dependencies> |
|
14 |
<dependency> |
|
15 |
<groupId>org.gvsig</groupId> |
|
16 |
<artifactId>org.gvsig.symbology.lib.api</artifactId> |
|
17 |
<version>2.0.0-SNAPSHOT</version> |
|
18 |
<scope>compile</scope> |
|
19 |
</dependency> |
|
20 |
<dependency> |
|
21 |
<groupId>org.gvsig</groupId> |
|
22 |
<artifactId>org.gvsig.symbology.lib.impl</artifactId> |
|
23 |
<version>2.0.0-SNAPSHOT</version> |
|
24 |
<scope>runtime</scope> |
|
25 |
</dependency> |
|
26 |
<dependency> |
|
27 |
<groupId>org.gvsig</groupId> |
|
28 |
<artifactId>org.gvsig.symbology.swing.api</artifactId> |
|
29 |
<version>2.0.0-SNAPSHOT</version> |
|
30 |
<scope>compile</scope> |
|
31 |
</dependency> |
|
32 |
<dependency> |
|
33 |
<groupId>org.gvsig</groupId> |
|
34 |
<artifactId>org.gvsig.symbology.swing.impl</artifactId> |
|
35 |
<version>2.0.0-SNAPSHOT</version> |
|
36 |
<scope>runtime</scope> |
|
37 |
</dependency> |
|
38 |
<dependency> |
|
39 |
<groupId>org.slf4j</groupId> |
|
40 |
<artifactId>slf4j-api</artifactId> |
|
41 |
<scope>compile</scope> |
|
42 |
</dependency> |
|
43 |
</dependencies> |
|
44 |
</project> |
|
0 | 45 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/src/test/java/org/gvsig/symbology/SymbologyManagerTest.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.symbology; |
|
23 |
|
|
24 |
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase; |
|
25 |
|
|
26 |
/** |
|
27 |
* API compatibility tests for {@link SymbologyManager} implementations. |
|
28 |
* |
|
29 |
* @author gvSIG Team |
|
30 |
* @version $Id$ |
|
31 |
*/ |
|
32 |
public abstract class SymbologyManagerTest extends |
|
33 |
AbstractLibraryAutoInitTestCase { |
|
34 |
|
|
35 |
protected SymbologyManager manager; |
|
36 |
|
|
37 |
@Override |
|
38 |
protected void doSetUp() throws Exception { |
|
39 |
manager = SymbologyLocator.getSymbologyManager(); |
|
40 |
} |
|
41 |
} |
|
0 | 42 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/src/main/java/org/gvsig/symbology/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.symbology package documentation</title> |
|
7 |
</head> |
|
8 |
<body> |
|
9 |
|
|
10 |
<p>Symbology library API.</p> |
|
11 |
|
|
12 |
<p> |
|
13 |
It allows to get new Symbology and get their text. |
|
14 |
</p> |
|
15 |
|
|
16 |
</body> |
|
17 |
</html> |
|
0 | 18 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/src/main/java/org/gvsig/symbology/SymbologyManager.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 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2009 {} {{Task}} |
|
26 |
*/ |
|
27 |
package org.gvsig.symbology; |
|
28 |
|
|
29 |
import java.io.IOException; |
|
30 |
import java.net.URL; |
|
31 |
|
|
32 |
import org.gvsig.fmap.mapcontext.rendering.legend.IInterval; |
|
33 |
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy; |
|
34 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.IMultiShapeSymbol; |
|
35 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IMarkerFillSymbol; |
|
36 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IPictureFillSymbol; |
|
37 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.ISimpleFillSymbol; |
|
38 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.IPictureLineSymbol; |
|
39 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ISimpleLineSymbol; |
|
40 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IPictureMarkerSymbol; |
|
41 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.ISimpleMarkerSymbol; |
|
42 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IArrowDecoratorStyle; |
|
43 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IMarkerFillPropertiesStyle; |
|
44 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IMask; |
|
45 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.ISimpleLineStyle; |
|
46 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.text.ISimpleTextSymbol; |
|
47 |
|
|
48 |
|
|
49 |
/** |
|
50 |
* Basic symbology manager. |
|
51 |
* |
|
52 |
* @author 2009- <a href="cordinyana@gvsig.org">C?sar Ordi?ana</a> - gvSIG team |
|
53 |
*/ |
|
54 |
public interface SymbologyManager { |
|
55 |
|
|
56 |
/** |
|
57 |
* Creates a new interval with the given limit values |
|
58 |
* |
|
59 |
* @param min |
|
60 |
* the minimum included interval value |
|
61 |
* @param max |
|
62 |
* the maximum included interval value |
|
63 |
* @return a new interval |
|
64 |
*/ |
|
65 |
IInterval createInterval(double min, double max); |
|
66 |
|
|
67 |
IArrowDecoratorStyle createArrowDecoratorStyle(); |
|
68 |
|
|
69 |
// IMarkerSymbol createMarkerSymbol(); |
|
70 |
|
|
71 |
ISimpleMarkerSymbol createSimpleMarkerSymbol(); |
|
72 |
|
|
73 |
IMask createMask(); |
|
74 |
|
|
75 |
IMultiShapeSymbol createMultiShapeSymbol(); |
|
76 |
|
|
77 |
ISimpleFillSymbol createSimpleFillSymbol(); |
|
78 |
|
|
79 |
ISimpleLineSymbol createSimpleLineSymbol(); |
|
80 |
|
|
81 |
ISimpleLineStyle createSimpleLineStyle(); |
|
82 |
|
|
83 |
ISimpleTextSymbol createSimpleTextSymbol(); |
|
84 |
|
|
85 |
IMarkerFillPropertiesStyle createSimpleMarkerFillPropertiesStyle(); |
|
86 |
|
|
87 |
IPictureFillSymbol createPictureFillSymbol(URL imageURL, URL selImageURL) throws IOException; |
|
88 |
|
|
89 |
IPictureLineSymbol createPictureLineSymbol(URL imageURL, URL selImageURL) throws IOException; |
|
90 |
|
|
91 |
IPictureMarkerSymbol createPictureMarkerSymbol(URL imageURL, URL selImageURL) throws IOException; |
|
92 |
|
|
93 |
IMarkerFillSymbol createMarkerFillSymbol(); |
|
94 |
|
|
95 |
IAttrInTableLabelingStrategy createAttrInTableLabelingStrategy(); |
|
96 |
|
|
97 |
} |
|
0 | 98 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/strategies/ShapeInfo.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
package org.gvsig.symbology.fmap.mapcontext.rendering.legend.strategies; |
|
42 |
|
|
43 |
import java.awt.geom.Rectangle2D; |
|
44 |
|
|
45 |
|
|
46 |
/** |
|
47 |
* Estructura de datos con la informaci?n relativa a las geometr?as de una |
|
48 |
* fuente de datos necesaria para acelerar el procesado de la capa |
|
49 |
*/ |
|
50 |
public interface ShapeInfo { |
|
51 |
/** |
|
52 |
* A?ade al final de la estructura de datos la informaci?n de una geometr?a |
|
53 |
* |
|
54 |
* @param boundingBox Extent del shape. |
|
55 |
* @param type Tipo de shape. |
|
56 |
*/ |
|
57 |
void addShapeInfo(Rectangle2D boundingBox, int type); |
|
58 |
|
|
59 |
/** |
|
60 |
* Establece en la posici?n index-?sima de la estructura de datos la |
|
61 |
* informaci?n de una geometr?a |
|
62 |
* |
|
63 |
* @param index ?ndice. |
|
64 |
* @param boundingBox Extent del shape. |
|
65 |
* @param type Tipo de shape. |
|
66 |
* |
|
67 |
* @throws ArrayIndexOutOfBoundsException Si se intenta establecer la |
|
68 |
* informaci?n para una geometr?a que no existe |
|
69 |
*/ |
|
70 |
void setShapeInfo(int index, Rectangle2D boundingBox, int type) |
|
71 |
throws ArrayIndexOutOfBoundsException; |
|
72 |
|
|
73 |
/** |
|
74 |
* Obtiene el bounding box de la geometr?a index-?sima |
|
75 |
* |
|
76 |
* @param index ?ndice de la geometr?a. |
|
77 |
* |
|
78 |
* @return Extent de la geometr?a. |
|
79 |
*/ |
|
80 |
Rectangle2D getBoundingBox(int index); |
|
81 |
|
|
82 |
/** |
|
83 |
* Obtiene el tipo de la geometr?a index-?sima |
|
84 |
* |
|
85 |
* @param index ?ndice. |
|
86 |
* |
|
87 |
* @return Tipo de geometr?a. |
|
88 |
*/ |
|
89 |
int getType(int index); |
|
90 |
} |
|
0 | 91 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/styling/IAttrInTableLabelingStrategy.java | ||
---|---|---|
1 |
package org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling; |
|
2 |
|
|
3 |
import java.awt.Color; |
|
4 |
import java.awt.Font; |
|
5 |
|
|
6 |
import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingStrategy; |
|
7 |
import org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport; |
|
8 |
|
|
9 |
public interface IAttrInTableLabelingStrategy extends ILabelingStrategy, CartographicSupport{ |
|
10 |
|
|
11 |
public abstract String getRotationField(); |
|
12 |
|
|
13 |
public abstract String getTextField(); |
|
14 |
|
|
15 |
public abstract String getHeightField(); |
|
16 |
|
|
17 |
public abstract String getColorField(); |
|
18 |
|
|
19 |
public abstract void setTextField(String textFieldName); |
|
20 |
|
|
21 |
public abstract void setRotationField(String rotationFieldName); |
|
22 |
|
|
23 |
/** |
|
24 |
* Sets the field that contains the size of the text. The size is computed |
|
25 |
* in meters. To use any other unit, call setUnit(int) with the scale factor from meters |
|
26 |
* (for centimeters, call <b>setUnitFactor(0.01))</b>. |
|
27 |
* @param heightFieldName |
|
28 |
*/ |
|
29 |
public abstract void setHeightField(String heightFieldName); |
|
30 |
|
|
31 |
public abstract void setColorField(String colorFieldName); |
|
32 |
|
|
33 |
public abstract void setUsesFixedSize(boolean b); |
|
34 |
|
|
35 |
public abstract boolean usesFixedSize(); |
|
36 |
|
|
37 |
public abstract double getFixedSize(); |
|
38 |
|
|
39 |
public abstract void setFixedSize(double fixedSize); |
|
40 |
|
|
41 |
public abstract void setUsesFixedColor(boolean b); |
|
42 |
|
|
43 |
public abstract boolean usesFixedColor(); |
|
44 |
|
|
45 |
public abstract Color getFixedColor(); |
|
46 |
|
|
47 |
public abstract void setFixedColor(Color fixedColor); |
|
48 |
|
|
49 |
public abstract Color getColorFont(); |
|
50 |
|
|
51 |
public abstract void setColorFont(Color colorFont); |
|
52 |
|
|
53 |
public abstract Font getFont(); |
|
54 |
|
|
55 |
public abstract void setFont(Font selFont); |
|
56 |
|
|
57 |
} |
|
0 | 58 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/text/ISimpleTextSymbol.java | ||
---|---|---|
1 |
package org.gvsig.symbology.fmap.mapcontext.rendering.symbol.text; |
|
2 |
|
|
3 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ITextSymbol; |
|
4 |
|
|
5 |
public interface ISimpleTextSymbol extends ITextSymbol{ |
|
6 |
|
|
7 |
public abstract double getRotation(); |
|
8 |
|
|
9 |
/** |
|
10 |
* Defines the angle of rotation for the text that composes the symbol |
|
11 |
* |
|
12 |
* @param rotation |
|
13 |
*/ |
|
14 |
public abstract void setRotation(double rotation); |
|
15 |
|
|
16 |
} |
|
0 | 17 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/fill/IPictureFillSymbol.java | ||
---|---|---|
1 |
package org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill; |
|
2 |
|
|
3 |
import java.io.IOException; |
|
4 |
import java.net.URL; |
|
5 |
|
|
6 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IMarkerFillPropertiesStyle; |
|
7 |
|
|
8 |
public interface IPictureFillSymbol extends IFillSymbol{ |
|
9 |
|
|
10 |
/** |
|
11 |
* Sets the URL for the image to be used as a picture fill symbol (when it is selected in the map) |
|
12 |
* @param imageFile, File |
|
13 |
* @throws IOException |
|
14 |
*/ |
|
15 |
public abstract void setSelImage(URL selImageUrl) throws IOException; |
|
16 |
|
|
17 |
/** |
|
18 |
* Defines the URL from where the picture to fill the polygon is taken. |
|
19 |
* @param imageFile |
|
20 |
* @throws IOException |
|
21 |
*/ |
|
22 |
public abstract void setImage(URL imageUrl) throws IOException; |
|
23 |
|
|
24 |
/** |
|
25 |
* Returns the IMarkerFillProperties that allows this class to treat the picture as |
|
26 |
* a marker in order to scale it, rotate it and so on. |
|
27 |
* @return markerFillProperties,IMarkerFillPropertiesStyle |
|
28 |
*/ |
|
29 |
public abstract IMarkerFillPropertiesStyle getMarkerFillProperties(); |
|
30 |
|
|
31 |
/** |
|
32 |
* Sets the MarkerFillProperties in order to allow the user to modify the picture as |
|
33 |
* a marker (it is possible to scale it, rotate it and so on) |
|
34 |
* @param prop |
|
35 |
*/ |
|
36 |
public abstract void setMarkerFillProperties(IMarkerFillPropertiesStyle prop); |
|
37 |
|
|
38 |
/** |
|
39 |
* Defines the angle for the rotation of the image when it is added to create the |
|
40 |
* padding |
|
41 |
* |
|
42 |
* @return angle |
|
43 |
*/ |
|
44 |
public abstract double getAngle(); |
|
45 |
|
|
46 |
/** |
|
47 |
* Sets the angle for the rotation of the image when it is added to create the padding |
|
48 |
* @param angle |
|
49 |
*/ |
|
50 |
public abstract void setAngle(double angle); |
|
51 |
|
|
52 |
/** |
|
53 |
* Defines the scale for the x axis of the image when it is added to create the |
|
54 |
* padding |
|
55 |
* @return xScale |
|
56 |
*/ |
|
57 |
public abstract double getXScale(); |
|
58 |
|
|
59 |
/** |
|
60 |
* Returns the scale for the x axis of the image when it is added to create the |
|
61 |
* padding |
|
62 |
* @param xScale |
|
63 |
*/ |
|
64 |
public abstract void setXScale(double xScale); |
|
65 |
|
|
66 |
/** |
|
67 |
* Defines the scale for the y axis of the image when it is added to create the |
|
68 |
* padding |
|
69 |
* @return yScale |
|
70 |
*/ |
|
71 |
public abstract double getYScale(); |
|
72 |
|
|
73 |
/** |
|
74 |
* Returns the scale for the y axis of the image when it is added to create the |
|
75 |
* padding |
|
76 |
* @param yScale |
|
77 |
*/ |
|
78 |
public abstract void setYScale(double yScale); |
|
79 |
|
|
80 |
/** |
|
81 |
* Returns the URL of the image that is used to create the padding to fill the |
|
82 |
* polygon |
|
83 |
* @return imagePath |
|
84 |
*/ |
|
85 |
public abstract URL getSource(); |
|
86 |
|
|
87 |
/** |
|
88 |
* Returns the URL of the image used when the polygon is selected |
|
89 |
* @return |
|
90 |
*/ |
|
91 |
public abstract URL getSelectedSource(); |
|
92 |
|
|
93 |
} |
|
0 | 94 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/fill/IFillSymbol.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
|
|
42 |
/* CVS MESSAGES: |
|
43 |
* |
|
44 |
* $Id: IFillSymbol.java 21071 2008-06-02 10:55:35Z vcaballero $ |
|
45 |
* $Log$ |
|
46 |
* Revision 1.3 2007-08-13 11:36:50 jvidal |
|
47 |
* javadoc |
|
48 |
* |
|
49 |
* Revision 1.2 2007/03/09 11:20:56 jaume |
|
50 |
* Advanced symbology (start committing) |
|
51 |
* |
|
52 |
* Revision 1.1.2.2 2007/02/21 16:09:02 jaume |
|
53 |
* *** empty log message *** |
|
54 |
* |
|
55 |
* Revision 1.1.2.1 2007/02/16 10:54:12 jaume |
|
56 |
* multilayer splitted to multilayerline, multilayermarker,and multilayerfill |
|
57 |
* |
|
58 |
* |
|
59 |
*/ |
|
60 |
package org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill; |
|
61 |
|
|
62 |
import java.awt.Color; |
|
63 |
|
|
64 |
import org.gvsig.fmap.geom.Geometry; |
|
65 |
import org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport; |
|
66 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
|
67 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol; |
|
68 |
|
|
69 |
|
|
70 |
/** |
|
71 |
* Interface that extends ISymbol interface in order to define methods for |
|
72 |
* fill symbols which can manage specific attributes of them. |
|
73 |
* |
|
74 |
* |
|
75 |
* @author jaume dominguez faus - jaume.dominguez@iver.es |
|
76 |
*/ |
|
77 |
|
|
78 |
public interface IFillSymbol extends ISymbol, CartographicSupport{ |
|
79 |
|
|
80 |
public static final String SYMBOL_NAME = "fill"; |
|
81 |
|
|
82 |
public abstract boolean isSuitableFor(Geometry geom); |
|
83 |
|
|
84 |
public abstract int getOnePointRgb(); |
|
85 |
|
|
86 |
/** |
|
87 |
* Sets the color that will be used to draw the filling pattern of this symbol. |
|
88 |
* |
|
89 |
* @param Color |
|
90 |
*/ |
|
91 |
public abstract void setFillColor(Color color); |
|
92 |
|
|
93 |
/** |
|
94 |
* Sets the color of the outline. |
|
95 |
* @deprectated will be substituted by setOutline(AbstractLineSymbol); |
|
96 |
* @param color |
|
97 |
*/ |
|
98 |
public abstract void setOutline(ILineSymbol outline); |
|
99 |
|
|
100 |
/** |
|
101 |
* @return Returns the color. |
|
102 |
*/ |
|
103 |
public abstract Color getFillColor(); |
|
104 |
|
|
105 |
/** |
|
106 |
* Obtains the ILineSymbol interface of the outline |
|
107 |
* @return the outline,ILineSymbol. |
|
108 |
*/ |
|
109 |
public abstract ILineSymbol getOutline(); |
|
110 |
/** |
|
111 |
* Obtains the transparency of the fill symbol |
|
112 |
* @return the transparency of the fill symbol |
|
113 |
*/ |
|
114 |
|
|
115 |
public abstract int getFillAlpha(); |
|
116 |
|
|
117 |
public abstract boolean hasFill(); |
|
118 |
|
|
119 |
public abstract void setHasFill(boolean hasFill); |
|
120 |
|
|
121 |
public abstract boolean hasOutline(); |
|
122 |
|
|
123 |
public abstract void setHasOutline(boolean hasOutline); |
|
124 |
} |
|
0 | 125 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/fill/IMarkerFillSymbol.java | ||
---|---|---|
1 |
package org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill; |
|
2 |
|
|
3 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol; |
|
4 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IMarkerFillPropertiesStyle; |
|
5 |
|
|
6 |
public interface IMarkerFillSymbol extends IFillSymbol{ |
|
7 |
|
|
8 |
public abstract void setMarker(IMarkerSymbol marker); |
|
9 |
|
|
10 |
public abstract IMarkerSymbol getMarker(); |
|
11 |
|
|
12 |
/** |
|
13 |
* Sets the markerfillproperties to be used by the class |
|
14 |
* |
|
15 |
* @param markerFillStyle,IMarkerFillPropertiesStyle |
|
16 |
*/ |
|
17 |
public abstract void setMarkerFillProperties( |
|
18 |
IMarkerFillPropertiesStyle markerFillStyle); |
|
19 |
|
|
20 |
/** |
|
21 |
* Returns the markerfillproperties that are used by the class |
|
22 |
* |
|
23 |
* @return markerFillProperties,IMarkerFillPropertiesStyle |
|
24 |
*/ |
|
25 |
public abstract IMarkerFillPropertiesStyle getMarkerFillProperties(); |
|
26 |
|
|
27 |
} |
|
0 | 28 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/fill/IMultiLayerFillSymbol.java | ||
---|---|---|
1 |
package org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill; |
|
2 |
|
|
3 |
import org.gvsig.fmap.mapcontext.rendering.symbols.IMultiLayerSymbol; |
|
4 |
|
|
5 |
public interface IMultiLayerFillSymbol extends IFillSymbol, IMultiLayerSymbol{ |
|
6 |
|
|
7 |
} |
|
0 | 8 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/fill/ISimpleFillSymbol.java | ||
---|---|---|
1 |
package org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill; |
|
2 |
|
|
3 |
public interface ISimpleFillSymbol extends IFillSymbol{ |
|
4 |
|
|
5 |
} |
|
0 | 6 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/line/ISimpleLineSymbol.java | ||
---|---|---|
1 |
package org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line; |
|
2 |
|
|
3 |
public interface ISimpleLineSymbol extends ILineSymbol{ |
|
4 |
|
|
5 |
} |
|
0 | 6 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/line/IPictureLineSymbol.java | ||
---|---|---|
1 |
package org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line; |
|
2 |
|
|
3 |
import java.io.IOException; |
|
4 |
import java.net.URL; |
|
5 |
|
|
6 |
|
|
7 |
public interface IPictureLineSymbol extends ILineSymbol{ |
|
8 |
|
|
9 |
/** |
|
10 |
* Sets the URL for the image to be used as a picture line symbol |
|
11 |
* @param imageFile, File |
|
12 |
* @throws IOException |
|
13 |
*/ |
|
14 |
public abstract void setImage(URL imageUrl) throws IOException; |
|
15 |
|
|
16 |
/** |
|
17 |
* Sets the URL for the image to be used as a picture line symbol (when it is selected in the map) |
|
18 |
* @param imageFile, File |
|
19 |
* @throws IOException |
|
20 |
*/ |
|
21 |
public abstract void setSelImage(URL selImageUrl) throws IOException; |
|
22 |
|
|
23 |
/** |
|
24 |
* Sets the yscale for the picture line symbol |
|
25 |
* @param yScale |
|
26 |
*/ |
|
27 |
public abstract void setYScale(double yScale); |
|
28 |
|
|
29 |
/** |
|
30 |
* Sets the xscale for the picture line symbol |
|
31 |
* @param xScale |
|
32 |
*/ |
|
33 |
public abstract void setXScale(double xScale); |
|
34 |
|
|
35 |
/** |
|
36 |
* Returns the URL of the image that is used as a picture line symbol (when it |
|
37 |
* is selected in the map) |
|
38 |
* @return selimagePath,URL |
|
39 |
*/ |
|
40 |
public abstract URL getSelectedSource(); |
|
41 |
|
|
42 |
/** |
|
43 |
* Returns the URL of the image that is used as a picture line symbol |
|
44 |
* @return imagePath,URL |
|
45 |
*/ |
|
46 |
public abstract URL getSource(); |
|
47 |
|
|
48 |
/** |
|
49 |
* Returns the xscale for the picture line symbol |
|
50 |
* @param xScale |
|
51 |
*/ |
|
52 |
public abstract double getXScale(); |
|
53 |
|
|
54 |
/** |
|
55 |
* Returns the yscale for the picture line symbol |
|
56 |
* @param yScale |
|
57 |
*/ |
|
58 |
public abstract double getYScale(); |
|
59 |
|
|
60 |
} |
|
0 | 61 |
tags/v2_0_0_Build_2047/libraries/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.api/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/line/ILineSymbol.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
|
|
42 |
/* CVS MESSAGES: |
|
43 |
* |
|
44 |
* $Id: ILineSymbol.java 20989 2008-05-28 11:05:57Z jmvivo $ |
|
45 |
* $Log$ |
|
46 |
* Revision 1.6 2007-08-14 11:17:31 jvidal |
|
47 |
* javadoc updated |
|
48 |
* |
|
49 |
* Revision 1.5 2007/08/08 12:03:13 jvidal |
|
50 |
* javadoc |
|
51 |
* |
|
52 |
* Revision 1.4 2007/05/08 08:47:39 jaume |
|
53 |
* *** empty log message *** |
|
54 |
* |
|
55 |
* Revision 1.3 2007/03/20 16:00:24 jaume |
|
56 |
* removed unuseful comments |
|
57 |
* |
|
58 |
* Revision 1.2 2007/03/09 11:20:56 jaume |
|
59 |
* Advanced symbology (start committing) |
|
60 |
* |
|
61 |
* Revision 1.1.2.5 2007/02/21 16:09:02 jaume |
|
62 |
* *** empty log message *** |
|
63 |
* |
|
64 |
* Revision 1.1.2.4 2007/02/15 16:23:44 jaume |
|
65 |
* *** empty log message *** |
|
66 |
* |
|
67 |
* Revision 1.1.2.3 2007/02/14 15:53:35 jaume |
|
68 |
* *** empty log message *** |
|
69 |
* |
|
70 |
* Revision 1.1.2.2 2007/02/13 16:19:19 jaume |
|
71 |
* graduated symbol legends (start commiting) |
|
72 |
* |
|
73 |
* Revision 1.1.2.1 2007/02/09 07:47:04 jaume |
|
74 |
* Isymbol moved |
|
75 |
* |
|
76 |
* |
|
77 |
*/ |
|
78 |
|
|
79 |
package org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line; |
|
80 |
|
|
81 |
import java.awt.Color; |
|
82 |
|
|
83 |
import org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport; |
|
84 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
|
85 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.ILineStyle; |
|
86 |
|
|
87 |
|
|
88 |
|
|
89 |
/** |
|
90 |
* Interface for <b>line symbols</b>.It has the different methods to obtain or define |
|
91 |
* the attributes of a line such as color, style, width and alpha (transparency). |
|
92 |
* |
|
93 |
* @author jaume dominguez faus - jaume.dominguez@iver.es |
|
94 |
*/ |
|
95 |
public interface ILineSymbol extends ISymbol, CartographicSupport{ |
|
96 |
|
|
97 |
public static final String SYMBOL_NAME = "line"; |
|
98 |
|
|
99 |
/** |
|
100 |
* Returns the color of the line symbol |
|
101 |
* @return Color |
|
102 |
*/ |
|
103 |
public abstract Color getColor(); |
|
104 |
/** |
|
105 |
* Sets the color for a line symbol |
|
106 |
* @param color |
|
107 |
*/ |
|
108 |
|
|
109 |
public abstract void setLineColor(Color color); |
|
110 |
/** |
|
111 |
* Obtains the style of the line symbol. |
|
112 |
* @return ILineStyle, the style of the line symbol |
|
113 |
*/ |
|
114 |
public abstract ILineStyle getLineStyle(); |
|
115 |
/** |
|
116 |
* Defines the style of the line symbol to be used. |
|
117 |
* @param lineStyle |
Also available in: Unified diff