Revision 1823
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/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.legend.aggregate</artifactId> |
|
5 |
<version>1.0.2</version> |
|
6 |
<packaging>pom</packaging> |
|
7 |
<name>${project.artifactId}</name> |
|
8 |
<description>Legend for aggregate text symbols that are near.</description> |
|
9 |
<parent> |
|
10 |
<groupId>org.gvsig</groupId> |
|
11 |
<artifactId>org.gvsig.desktop</artifactId> |
|
12 |
<version>2.0.203</version> |
|
13 |
</parent> |
|
14 |
|
|
15 |
<url>https://devel.gvsig.org/sites/org.gvsig.legend.aggregate/${project.version}</url> |
|
16 |
<scm> |
|
17 |
<connection>scm:svn:https://devel.gvsig.org/svn/gvsig-base-legends/org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2</connection> |
|
18 |
<developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-base-legends/org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2</developerConnection> |
|
19 |
<url>https://devel.gvsig.org/redmine/projects/gvsig-base-legends/repository/show/org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2</url> |
|
20 |
</scm> |
|
21 |
<repositories> |
|
22 |
<repository> |
|
23 |
<id>gvsig-public-http-repository</id> |
|
24 |
<name>gvSIG maven public HTTP repository</name> |
|
25 |
<url>http://devel.gvsig.org/m2repo/j2se</url> |
|
26 |
<releases> |
|
27 |
<enabled>true</enabled> |
|
28 |
<updatePolicy>daily</updatePolicy> |
|
29 |
<checksumPolicy>warn</checksumPolicy> |
|
30 |
</releases> |
|
31 |
<snapshots> |
|
32 |
<enabled>true</enabled> |
|
33 |
<updatePolicy>daily</updatePolicy> |
|
34 |
<checksumPolicy>warn</checksumPolicy> |
|
35 |
</snapshots> |
|
36 |
</repository> |
|
37 |
</repositories> |
|
38 |
|
|
39 |
<distributionManagement> |
|
40 |
<site> |
|
41 |
<id>gvsig-repository</id> |
|
42 |
<url>dav:https://devel.gvsig.org/download/projects/gvsig-base-legends/pool/${project.artifactId}/${project.version}</url> |
|
43 |
</site> |
|
44 |
</distributionManagement> |
|
45 |
|
|
46 |
<build> |
|
47 |
<plugins> |
|
48 |
<plugin> |
|
49 |
<groupId>org.apache.maven.plugins</groupId> |
|
50 |
<artifactId>maven-release-plugin</artifactId> |
|
51 |
<configuration> |
|
52 |
<tagBase>https://devel.gvsig.org/svn/gvsig-base-legends/org.gvsig.legend.aggregate/tags</tagBase> |
|
53 |
</configuration> |
|
54 |
</plugin> |
|
55 |
</plugins> |
|
56 |
</build> |
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
<dependencyManagement> |
|
61 |
<dependencies> |
|
62 |
<dependency> |
|
63 |
<groupId>org.gvsig</groupId> |
|
64 |
<artifactId>org.gvsig.legend.aggregate.lib.api</artifactId> |
|
65 |
<version>1.0.2</version> |
|
66 |
</dependency> |
|
67 |
<dependency> |
|
68 |
<groupId>org.gvsig</groupId> |
|
69 |
<artifactId>org.gvsig.legend.aggregate.lib.impl</artifactId> |
|
70 |
<version>1.0.2</version> |
|
71 |
</dependency> |
|
72 |
<dependency> |
|
73 |
<groupId>org.gvsig</groupId> |
|
74 |
<artifactId>org.gvsig.legend.aggregate.swing.api</artifactId> |
|
75 |
<version>1.0.2</version> |
|
76 |
</dependency> |
|
77 |
<dependency> |
|
78 |
<groupId>org.gvsig</groupId> |
|
79 |
<artifactId>org.gvsig.legend.aggregate.swing.impl</artifactId> |
|
80 |
<version>1.0.2</version> |
|
81 |
</dependency> |
|
82 |
<dependency> |
|
83 |
<groupId>org.gvsig</groupId> |
|
84 |
<artifactId>org.gvsig.legend.aggregate.app.mainplugin</artifactId> |
|
85 |
<version>1.0.2</version> |
|
86 |
</dependency> |
|
87 |
</dependencies> |
|
88 |
</dependencyManagement> |
|
89 |
<modules> |
|
90 |
<module>org.gvsig.legend.aggregate.lib</module> |
|
91 |
<module>org.gvsig.legend.aggregate.swing</module> |
|
92 |
<module>org.gvsig.legend.aggregate.app</module> |
|
93 |
</modules> |
|
94 |
</project> |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.lib/org.gvsig.legend.aggregate.lib.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.legend.aggregate.lib.api.AggregateLegendLibrary |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.lib/org.gvsig.legend.aggregate.lib.api/src/main/java/org/gvsig/legend/aggregate/lib/api/AggregateLegendManager.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2015 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, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.legend.aggregate.lib.api; |
|
24 |
|
|
25 |
import org.gvsig.fmap.mapcontext.rendering.symbols.styles.ILabelStyle; |
|
26 |
|
|
27 |
|
|
28 |
public interface AggregateLegendManager { |
|
29 |
|
|
30 |
/** |
|
31 |
* Creates an aggregate legend |
|
32 |
* |
|
33 |
* @return the aggregate legend |
|
34 |
*/ |
|
35 |
public AggregateLegend createAggregateLegend(); |
|
36 |
|
|
37 |
public Class<? extends AggregateLegend> getLegendClass(); |
|
38 |
|
|
39 |
public ILabelStyle getDefaultLabelStyle(); |
|
40 |
|
|
41 |
public void setDefaultLabelStyle(ILabelStyle defaultLabelStyle); |
|
42 |
} |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.lib/org.gvsig.legend.aggregate.lib.api/src/main/java/org/gvsig/legend/aggregate/lib/api/AggregateLegend.java | ||
---|---|---|
1 |
package org.gvsig.legend.aggregate.lib.api; |
|
2 |
|
|
3 |
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend; |
|
4 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ITextSymbol; |
|
5 |
import org.gvsig.fmap.mapcontext.rendering.symbols.styles.ILabelStyle; |
|
6 |
|
|
7 |
public interface AggregateLegend extends IVectorLegend { |
|
8 |
|
|
9 |
public int getDistance(); |
|
10 |
public void setDistance(int distance); |
|
11 |
|
|
12 |
public ILabelStyle getLabelStyle(); |
|
13 |
public void setLabelStyle(ILabelStyle labelStyle); |
|
14 |
|
|
15 |
public ITextSymbol getTextSymbol(); |
|
16 |
public void setTextSymbol(ITextSymbol textSymbol); |
|
17 |
} |
|
18 |
|
|
19 |
|
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.lib/org.gvsig.legend.aggregate.lib.api/src/main/java/org/gvsig/legend/aggregate/lib/api/AggregateLegendLocator.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2015 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 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., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.legend.aggregate.lib.api; |
|
24 |
|
|
25 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
|
26 |
import org.gvsig.tools.locator.AbstractLocator; |
|
27 |
import org.gvsig.tools.locator.Locator; |
|
28 |
import org.gvsig.tools.locator.LocatorException; |
|
29 |
|
|
30 |
|
|
31 |
public class AggregateLegendLocator extends AbstractLocator { |
|
32 |
|
|
33 |
/** |
|
34 |
* AggregateLegend locator name |
|
35 |
*/ |
|
36 |
private static final String LOCATOR_NAME = "AggregateLegendLocator"; |
|
37 |
|
|
38 |
/** |
|
39 |
* AggregateLegend manager name |
|
40 |
*/ |
|
41 |
public static final String MANAGER_NAME = "AggregateLegendManager"; |
|
42 |
|
|
43 |
/** |
|
44 |
* AggregateLegend manager description |
|
45 |
*/ |
|
46 |
private static final String MANAGER_DESCRIPTION = |
|
47 |
"AggregateLegend Manager of gvSIG"; |
|
48 |
|
|
49 |
|
|
50 |
/** |
|
51 |
* Unique instance |
|
52 |
*/ |
|
53 |
private static final AggregateLegendLocator instance = new AggregateLegendLocator(); |
|
54 |
|
|
55 |
@Override |
|
56 |
public String getLocatorName() { |
|
57 |
return LOCATOR_NAME; |
|
58 |
} |
|
59 |
|
|
60 |
/** |
|
61 |
* Registers the Class implementing the AggregateLegendManager interface. |
|
62 |
* |
|
63 |
* @param clazz |
|
64 |
* implementing the AggregateLegendManager interface |
|
65 |
*/ |
|
66 |
public static void registerAggregateLegendManager(Class clazz){ |
|
67 |
getInstance().register(MANAGER_NAME, MANAGER_DESCRIPTION, clazz); |
|
68 |
} |
|
69 |
|
|
70 |
/** |
|
71 |
* Registers the default Class implementing the AggregateLegendManager interface |
|
72 |
* |
|
73 |
* @param clazz |
|
74 |
* implementing the AggregateLegendManager interface |
|
75 |
*/ |
|
76 |
public static void registerDefaultAggregateLegendManager(Class clazz){ |
|
77 |
getInstance().registerDefault(MANAGER_NAME, MANAGER_DESCRIPTION, clazz); |
|
78 |
} |
|
79 |
|
|
80 |
/** |
|
81 |
* Return a reference to AggregateLegendManager. |
|
82 |
* |
|
83 |
* @return a reference to AggregateLegendManager |
|
84 |
* @throws LocatorException |
|
85 |
* if there is no access to the class or the class |
|
86 |
* cannot be instantiated |
|
87 |
* @see Locator#get(String) |
|
88 |
*/ |
|
89 |
public static AggregateLegendManager getAggregateLegendManager() throws LocatorException { |
|
90 |
return (AggregateLegendManager) getInstance().get(MANAGER_NAME); |
|
91 |
} |
|
92 |
|
|
93 |
/** |
|
94 |
* @return |
|
95 |
*/ |
|
96 |
public static Locator getInstance() { |
|
97 |
return instance; |
|
98 |
} |
|
99 |
|
|
100 |
} |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.lib/org.gvsig.legend.aggregate.lib.api/src/main/java/org/gvsig/legend/aggregate/lib/api/AggregateLegendLibrary.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2015 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 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., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.legend.aggregate.lib.api; |
|
24 |
|
|
25 |
import org.gvsig.tools.library.AbstractLibrary; |
|
26 |
import org.gvsig.tools.library.LibraryException; |
|
27 |
import org.gvsig.tools.locator.ReferenceNotRegisteredException; |
|
28 |
|
|
29 |
|
|
30 |
/** |
|
31 |
* @author fdiaz |
|
32 |
* |
|
33 |
*/ |
|
34 |
public class AggregateLegendLibrary extends AbstractLibrary { |
|
35 |
|
|
36 |
/* (non-Javadoc) |
|
37 |
* @see org.gvsig.tools.library.AbstractLibrary#doInitialize() |
|
38 |
*/ |
|
39 |
@Override |
|
40 |
protected void doInitialize() throws LibraryException { |
|
41 |
registerAsAPI(AggregateLegendLibrary.class); |
|
42 |
} |
|
43 |
|
|
44 |
/* (non-Javadoc) |
|
45 |
* @see org.gvsig.tools.library.AbstractLibrary#doPostInitialize() |
|
46 |
*/ |
|
47 |
@Override |
|
48 |
protected void doPostInitialize() throws LibraryException { |
|
49 |
// Validate there is any implementation registered. |
|
50 |
AggregateLegendManager manager = AggregateLegendLocator.getAggregateLegendManager(); |
|
51 |
if (manager == null) { |
|
52 |
throw new ReferenceNotRegisteredException( |
|
53 |
AggregateLegendLocator.MANAGER_NAME, AggregateLegendLocator.getInstance()); |
|
54 |
} |
|
55 |
} |
|
56 |
|
|
57 |
} |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.lib/org.gvsig.legend.aggregate.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.legend.aggregate.lib.api</artifactId> |
|
5 |
<name>org.gvsig.legend.aggregate.lib.api</name> |
|
6 |
<parent> |
|
7 |
<groupId>org.gvsig</groupId> |
|
8 |
<artifactId>org.gvsig.legend.aggregate.lib</artifactId> |
|
9 |
<version>1.0.2</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 |
<dependency> |
|
38 |
<groupId>org.gvsig</groupId> |
|
39 |
<artifactId>org.gvsig.fmap.mapcontext.api</artifactId> |
|
40 |
<scope>compile</scope> |
|
41 |
</dependency> |
|
42 |
</dependencies> |
|
43 |
</project> |
|
0 | 44 |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.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.legend.aggregate</artifactId> |
|
6 |
<version>1.0.2</version> |
|
7 |
</parent> |
|
8 |
<groupId>org.gvsig</groupId> |
|
9 |
<artifactId>org.gvsig.legend.aggregate.lib</artifactId> |
|
10 |
<packaging>pom</packaging> |
|
11 |
<modules> |
|
12 |
<module>org.gvsig.legend.aggregate.lib.api</module> |
|
13 |
<module>org.gvsig.legend.aggregate.lib.impl</module> |
|
14 |
</modules> |
|
15 |
</project> |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.lib/org.gvsig.legend.aggregate.lib.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.legend.aggregate.lib.impl.AggregateLegendLibraryImpl |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.lib/org.gvsig.legend.aggregate.lib.impl/src/main/java/org/gvsig/legend/aggregate/lib/impl/AggregateLegendLibraryImpl.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright ? 2007-2015 gvSIG Association |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU General Public License |
|
8 |
* as published by the Free Software Foundation; either version 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 |
* For any additional information, do not hesitate to contact us |
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
23 |
*/ |
|
24 |
|
|
25 |
package org.gvsig.legend.aggregate.lib.impl; |
|
26 |
|
|
27 |
import org.gvsig.fmap.mapcontext.MapContextLibrary; |
|
28 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
|
29 |
import org.gvsig.fmap.mapcontext.MapContextManager; |
|
30 |
import org.gvsig.legend.aggregate.lib.api.AggregateLegendLibrary; |
|
31 |
import org.gvsig.legend.aggregate.lib.api.AggregateLegendLocator; |
|
32 |
import org.gvsig.tools.library.AbstractLibrary; |
|
33 |
import org.gvsig.tools.library.LibraryException; |
|
34 |
|
|
35 |
public class AggregateLegendLibraryImpl extends AbstractLibrary { |
|
36 |
|
|
37 |
@Override |
|
38 |
public void doRegistration() { |
|
39 |
registerAsImplementationOf(AggregateLegendLibrary.class); |
|
40 |
this.require(MapContextLibrary.class); |
|
41 |
} |
|
42 |
|
|
43 |
@Override |
|
44 |
protected void doInitialize() throws LibraryException { |
|
45 |
AggregateLegendLocator.registerAggregateLegendManager(DefaultAggregateLegendManager.class); |
|
46 |
MapContextManager mcmanager = MapContextLocator.getMapContextManager(); |
|
47 |
mcmanager.registerLegend("AggregateLegend", DefaultAggregateLegend.class); |
|
48 |
} |
|
49 |
|
|
50 |
@Override |
|
51 |
protected void doPostInitialize() throws LibraryException { |
|
52 |
} |
|
53 |
|
|
54 |
} |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.lib/org.gvsig.legend.aggregate.lib.impl/src/main/java/org/gvsig/legend/aggregate/lib/impl/DefaultAggregateLegendManager.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2015 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 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., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.legend.aggregate.lib.impl; |
|
24 |
|
|
25 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
|
26 |
import org.gvsig.fmap.mapcontext.rendering.symbols.styles.ILabelStyle; |
|
27 |
import org.gvsig.legend.aggregate.lib.api.AggregateLegend; |
|
28 |
import org.gvsig.legend.aggregate.lib.api.AggregateLegendManager; |
|
29 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.SimpleLabelStyle; |
|
30 |
|
|
31 |
|
|
32 |
public class DefaultAggregateLegendManager implements AggregateLegendManager { |
|
33 |
|
|
34 |
private ILabelStyle defaultLabelStyle = null; |
|
35 |
|
|
36 |
public DefaultAggregateLegendManager() { |
|
37 |
this.defaultLabelStyle = new SimpleLabelStyle(); |
|
38 |
} |
|
39 |
|
|
40 |
@Override |
|
41 |
public AggregateLegend createAggregateLegend() { |
|
42 |
return new DefaultAggregateLegend(); |
|
43 |
} |
|
44 |
|
|
45 |
@Override |
|
46 |
public Class<? extends AggregateLegend> getLegendClass() { |
|
47 |
return DefaultAggregateLegend.class; |
|
48 |
} |
|
49 |
|
|
50 |
@Override |
|
51 |
public ILabelStyle getDefaultLabelStyle() { |
|
52 |
return this.defaultLabelStyle; |
|
53 |
} |
|
54 |
|
|
55 |
@Override |
|
56 |
public void setDefaultLabelStyle(ILabelStyle defaultLabelStyle) { |
|
57 |
this.defaultLabelStyle = defaultLabelStyle; |
|
58 |
} |
|
59 |
|
|
60 |
} |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.lib/org.gvsig.legend.aggregate.lib.impl/src/main/java/org/gvsig/legend/aggregate/lib/impl/DefaultAggregateLegend.java | ||
---|---|---|
1 |
package org.gvsig.legend.aggregate.lib.impl; |
|
2 |
|
|
3 |
import java.awt.Color; |
|
4 |
import java.awt.Dimension; |
|
5 |
import java.awt.FontMetrics; |
|
6 |
import java.awt.Graphics2D; |
|
7 |
import java.awt.Rectangle; |
|
8 |
import java.awt.Stroke; |
|
9 |
import java.awt.geom.AffineTransform; |
|
10 |
import java.awt.geom.Ellipse2D; |
|
11 |
import java.awt.geom.Point2D; |
|
12 |
import java.awt.geom.Rectangle2D; |
|
13 |
import java.awt.image.BufferedImage; |
|
14 |
import java.util.ArrayList; |
|
15 |
import java.util.List; |
|
16 |
import java.util.Map; |
|
17 |
|
|
18 |
import org.cresques.cts.ICoordTrans; |
|
19 |
import org.slf4j.Logger; |
|
20 |
import org.slf4j.LoggerFactory; |
|
21 |
|
|
22 |
import org.gvsig.fmap.dal.exception.DataException; |
|
23 |
import org.gvsig.fmap.dal.feature.Feature; |
|
24 |
import org.gvsig.fmap.dal.feature.FeatureQuery; |
|
25 |
import org.gvsig.fmap.dal.feature.FeatureSelection; |
|
26 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
|
27 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
28 |
import org.gvsig.fmap.geom.Geometry; |
|
29 |
import org.gvsig.fmap.geom.primitive.Point; |
|
30 |
import org.gvsig.fmap.mapcontext.MapContextException; |
|
31 |
import org.gvsig.fmap.mapcontext.ViewPort; |
|
32 |
import org.gvsig.fmap.mapcontext.rendering.legend.LegendException; |
|
33 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
|
34 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ITextSymbol; |
|
35 |
import org.gvsig.fmap.mapcontext.rendering.symbols.styles.ILabelStyle; |
|
36 |
import org.gvsig.legend.aggregate.lib.api.AggregateLegend; |
|
37 |
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractVectorialLegend; |
|
38 |
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.DefaultFeatureDrawnNotification; |
|
39 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.text.impl.SimpleTextSymbol; |
|
40 |
import org.gvsig.tools.exception.BaseException; |
|
41 |
import org.gvsig.tools.logger.FilteredLogger; |
|
42 |
import org.gvsig.tools.task.Cancellable; |
|
43 |
import org.gvsig.tools.visitor.VisitCanceledException; |
|
44 |
import org.gvsig.tools.visitor.Visitor; |
|
45 |
|
|
46 |
public class DefaultAggregateLegend extends AbstractVectorialLegend implements AggregateLegend { |
|
47 |
|
|
48 |
private static class Group { |
|
49 |
|
|
50 |
private final Point pointGeo; |
|
51 |
private final Point pointPixels; |
|
52 |
private int count; |
|
53 |
private final Rectangle2D rectangle; |
|
54 |
private final Ellipse2D circle; |
|
55 |
|
|
56 |
public Group(Point pointGeo, Point pointPixels, double distance) { |
|
57 |
this.count = 1; |
|
58 |
this.pointGeo = pointGeo; |
|
59 |
this.pointPixels = pointPixels; |
|
60 |
double d2 = distance * 2; |
|
61 |
this.rectangle = new Rectangle2D.Double(pointPixels.getX() - distance, pointPixels.getY() - distance, d2, d2); |
|
62 |
this.circle = new Ellipse2D.Double(pointPixels.getX() - distance, pointPixels.getY() - distance, d2, d2); |
|
63 |
} |
|
64 |
|
|
65 |
public boolean contains(Point pointPixels) { |
|
66 |
// return this.rectangle.contains(pointPixels.getX(), pointPixels.getY()); |
|
67 |
return this.circle.contains(pointPixels.getX(), pointPixels.getY()); |
|
68 |
} |
|
69 |
|
|
70 |
public void add(Feature feature) { |
|
71 |
this.count++; |
|
72 |
} |
|
73 |
} |
|
74 |
|
|
75 |
private static final Logger LOG = LoggerFactory.getLogger(DefaultAggregateLegend.class); |
|
76 |
|
|
77 |
private int distance; // Pixels |
|
78 |
private List<Group> groups; |
|
79 |
private ITextSymbol textSymbol; |
|
80 |
private ILabelStyle labelStyle; |
|
81 |
|
|
82 |
public DefaultAggregateLegend() { |
|
83 |
this.textSymbol = new SimpleTextSymbol(); |
|
84 |
this.labelStyle = null; |
|
85 |
this.groups = null; |
|
86 |
this.distance = 30; |
|
87 |
} |
|
88 |
|
|
89 |
@Override |
|
90 |
protected String[] getRequiredFeatureAttributeNames(FeatureStore featureStore) throws DataException { |
|
91 |
return new String[]{ |
|
92 |
featureStore.getDefaultFeatureType().getDefaultGeometryAttributeName()}; |
|
93 |
} |
|
94 |
|
|
95 |
@Override |
|
96 |
public ISymbol getDefaultSymbol() { |
|
97 |
return this.textSymbol; |
|
98 |
} |
|
99 |
|
|
100 |
@Override |
|
101 |
public void setDefaultSymbol(ISymbol is) { |
|
102 |
} |
|
103 |
|
|
104 |
@Override |
|
105 |
public ISymbol getSymbolByFeature(Feature ftr) throws MapContextException { |
|
106 |
return this.textSymbol; |
|
107 |
} |
|
108 |
|
|
109 |
@Override |
|
110 |
public int getShapeType() { |
|
111 |
return Geometry.TYPES.GEOMETRY; |
|
112 |
} |
|
113 |
|
|
114 |
@Override |
|
115 |
public void setShapeType(int i) { |
|
116 |
} |
|
117 |
|
|
118 |
@Override |
|
119 |
public boolean isUseDefaultSymbol() { |
|
120 |
return true; |
|
121 |
} |
|
122 |
|
|
123 |
@Override |
|
124 |
public void useDefaultSymbol(boolean bln) { |
|
125 |
} |
|
126 |
|
|
127 |
@Override |
|
128 |
public boolean isSuitableForShapeType(int shapeType) { |
|
129 |
return true; |
|
130 |
} |
|
131 |
|
|
132 |
@Override |
|
133 |
protected void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, Cancellable cancel, double scale, Map queryParameters, ICoordTrans coordTrans, FeatureStore featureStore, FeatureQuery featureQuery, double dpi) throws LegendException { |
|
134 |
super.draw(image, g, viewPort, cancel, scale, queryParameters, coordTrans, featureStore, featureQuery, dpi); |
|
135 |
this.drawMarkers(image, g, cancel, viewPort.getAffineTransform()); |
|
136 |
} |
|
137 |
|
|
138 |
@Override |
|
139 |
protected void drawFeatures( |
|
140 |
BufferedImage image, |
|
141 |
Graphics2D g, |
|
142 |
final ViewPort viewPort, |
|
143 |
final Cancellable cancel, |
|
144 |
final ICoordTrans coordTrans, |
|
145 |
double dpi, |
|
146 |
DefaultFeatureDrawnNotification drawnNotification, |
|
147 |
FeatureSet featureSet, |
|
148 |
FeatureSelection selection |
|
149 |
) throws BaseException { |
|
150 |
this.groups = new ArrayList<>(); |
|
151 |
featureSet.accept(new Visitor() { |
|
152 |
@Override |
|
153 |
public void visit(Object o) throws VisitCanceledException, BaseException { |
|
154 |
if( cancel.isCanceled() ) { |
|
155 |
throw new VisitCanceledException(); |
|
156 |
} |
|
157 |
Feature feature = (Feature) o; |
|
158 |
Geometry geom = feature.getDefaultGeometry(); |
|
159 |
if( geom != null ) { |
|
160 |
Point pointGeo = geom.centroid(); |
|
161 |
if( coordTrans != null ) { |
|
162 |
pointGeo.reProject(coordTrans); |
|
163 |
} |
|
164 |
Point pointPixels = (Point) pointGeo.cloneGeometry(); |
|
165 |
pointPixels.transform(viewPort.getAffineTransform()); |
|
166 |
boolean inGroup = false; |
|
167 |
for( Group group : groups ) { |
|
168 |
if( group.contains(pointPixels) ) { |
|
169 |
group.add(feature); |
|
170 |
inGroup = true; |
|
171 |
break; |
|
172 |
} |
|
173 |
} |
|
174 |
if( !inGroup ) { |
|
175 |
groups.add(new Group(pointGeo, pointPixels, getDistance())); |
|
176 |
} |
|
177 |
} |
|
178 |
} |
|
179 |
}); |
|
180 |
} |
|
181 |
|
|
182 |
private void drawMarkers(BufferedImage image, Graphics2D g1, Cancellable cancel, AffineTransform affineTransform) { |
|
183 |
FilteredLogger logger = new FilteredLogger(LOG, "", 10); |
|
184 |
AffineTransform identity = new AffineTransform(); |
|
185 |
Stroke stroke = g1.getStroke(); |
|
186 |
Color circlebg = new Color(0x80e29ea8, true); |
|
187 |
for( Group group : groups ) { |
|
188 |
if( cancel.isCanceled() ) { |
|
189 |
return; |
|
190 |
} |
|
191 |
final Graphics2D g = (Graphics2D)g1.create(); |
|
192 |
try { |
|
193 |
int x = (int) group.pointPixels.getX(); |
|
194 |
int y = (int) group.pointPixels.getY(); |
|
195 |
this.textSymbol.setDrawWithHalo(false); |
|
196 |
String txt = String.valueOf(group.count); |
|
197 |
this.textSymbol.setText(txt); |
|
198 |
if( this.labelStyle != null ) { |
|
199 |
Dimension size = this.labelStyle.getSize(); |
|
200 |
this.labelStyle.setTextFields(new String[]{ |
|
201 |
txt} |
|
202 |
); |
|
203 |
g.setTransform(identity); |
|
204 |
g.translate(x-size.getWidth()/2, y-size.getHeight()/2); |
|
205 |
Point2D markerPoint = this.labelStyle.getMarkerPoint(); |
|
206 |
Rectangle rect = new Rectangle( |
|
207 |
0, |
|
208 |
0, |
|
209 |
(int)size.getWidth(), |
|
210 |
(int)size.getHeight()); |
|
211 |
this.labelStyle.drawInsideRectangle(g, rect); |
|
212 |
Rectangle2D[] bounds = this.labelStyle.getTextBounds(); |
|
213 |
if(bounds.length>0){ |
|
214 |
Rectangle2D bound = bounds[0]; |
|
215 |
Rectangle2D expandedBound = new Rectangle2D.Double( |
|
216 |
bound.getMinX()*size.getWidth(), |
|
217 |
bound.getMinY()*size.getHeight(), |
|
218 |
bound.getWidth()*size.getWidth(), |
|
219 |
bound.getHeight()*size.getHeight()); |
|
220 |
drawCenteredString(txt, expandedBound, g); |
|
221 |
|
|
222 |
} |
|
223 |
g.translate(-(x-size.getWidth()/2), -(y-size.getHeight()/2)); |
|
224 |
} else { |
|
225 |
int r = distance; //2; |
|
226 |
g.setStroke(stroke); |
|
227 |
g.setColor(circlebg); |
|
228 |
g.fillOval( x-r, y-r, 2*r, 2*r); |
|
229 |
g.setColor(Color.BLACK); |
|
230 |
g.drawOval( x-r, y-r, 2*r, 2*r); |
|
231 |
g.drawRect( x-r, y-r, 2*r, 2*r); |
|
232 |
FontMetrics fm = g.getFontMetrics(); |
|
233 |
int txtX = x - (fm.stringWidth(txt) / 2); |
|
234 |
int txtY = fm.getAscent() + y - ((fm.getAscent() + fm.getDescent())) / 2; |
|
235 |
|
|
236 |
g.drawString(txt, txtX, txtY); |
|
237 |
} |
|
238 |
} catch (Exception ex) { |
|
239 |
logger.warn("Can't draw group",ex); |
|
240 |
} finally { |
|
241 |
g.dispose(); |
|
242 |
} |
|
243 |
} |
|
244 |
} |
|
245 |
|
|
246 |
private void drawCenteredString(String s, Rectangle2D rect, Graphics2D g) { |
|
247 |
|
|
248 |
double x = rect.getMinX(); |
|
249 |
double y = rect.getMinY(); |
|
250 |
double w = rect.getWidth(); |
|
251 |
double h = rect.getHeight(); |
|
252 |
|
|
253 |
FontMetrics fm = g.getFontMetrics(); |
|
254 |
int auxX = (int)(x+((w - fm.stringWidth(s)) / 2)); |
|
255 |
int auxY = (int)(y+((fm.getAscent() + (h - (fm.getAscent() + fm.getDescent())) / 2))); |
|
256 |
g.setColor(Color.BLACK); |
|
257 |
g.drawString(s, auxX, auxY); |
|
258 |
} |
|
259 |
|
|
260 |
@Override |
|
261 |
public int getDistance() { |
|
262 |
return distance; |
|
263 |
} |
|
264 |
|
|
265 |
@Override |
|
266 |
public void setDistance(int distance) { |
|
267 |
this.distance = distance; |
|
268 |
} |
|
269 |
|
|
270 |
@Override |
|
271 |
public ILabelStyle getLabelStyle() { |
|
272 |
return this.labelStyle; |
|
273 |
} |
|
274 |
|
|
275 |
@Override |
|
276 |
public void setLabelStyle(ILabelStyle labelStyle) { |
|
277 |
this.labelStyle = labelStyle; |
|
278 |
} |
|
279 |
|
|
280 |
@Override |
|
281 |
public ITextSymbol getTextSymbol() { |
|
282 |
return this.textSymbol; |
|
283 |
} |
|
284 |
|
|
285 |
@Override |
|
286 |
public void setTextSymbol(ITextSymbol textSymbol) { |
|
287 |
this.textSymbol = textSymbol; |
|
288 |
} |
|
289 |
|
|
290 |
} |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.lib/org.gvsig.legend.aggregate.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.legend.aggregate.lib.impl</artifactId> |
|
4 |
<name>org.gvsig.legend.aggregate.lib.impl</name> |
|
5 |
<parent> |
|
6 |
<groupId>org.gvsig</groupId> |
|
7 |
<artifactId>org.gvsig.legend.aggregate.lib</artifactId> |
|
8 |
<version>1.0.2</version> |
|
9 |
</parent> |
|
10 |
<groupId>org.gvsig</groupId> |
|
11 |
<dependencies> |
|
12 |
<dependency> |
|
13 |
<groupId>org.gvsig</groupId> |
|
14 |
<artifactId>org.gvsig.legend.aggregate.lib.api</artifactId> |
|
15 |
<scope>compile</scope> |
|
16 |
</dependency> |
|
17 |
<dependency> |
|
18 |
<groupId>org.gvsig</groupId> |
|
19 |
<artifactId>org.gvsig.fmap.dal.api</artifactId> |
|
20 |
<scope>compile</scope> |
|
21 |
</dependency> |
|
22 |
<dependency> |
|
23 |
<groupId>org.gvsig</groupId> |
|
24 |
<artifactId>org.gvsig.symbology.lib.impl</artifactId> |
|
25 |
<scope>compile</scope> |
|
26 |
</dependency> |
|
27 |
</dependencies> |
|
28 |
</project> |
|
0 | 29 |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.swing/org.gvsig.legend.aggregate.swing.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 |
<parent> |
|
4 |
<groupId>org.gvsig</groupId> |
|
5 |
<artifactId>org.gvsig.legend.aggregate.swing</artifactId> |
|
6 |
<version>1.0.2</version> |
|
7 |
</parent> |
|
8 |
<groupId>org.gvsig</groupId> |
|
9 |
<artifactId>org.gvsig.legend.aggregate.swing.api</artifactId> |
|
10 |
<name>org.gvsig.legend.aggregate.swing.api</name> |
|
11 |
<dependencies> |
|
12 |
<dependency> |
|
13 |
<groupId>org.gvsig</groupId> |
|
14 |
<artifactId>org.gvsig.tools.swing.api</artifactId> |
|
15 |
<scope>compile</scope> |
|
16 |
</dependency> |
|
17 |
<dependency> |
|
18 |
<groupId>org.gvsig</groupId> |
|
19 |
<artifactId>org.gvsig.legend.aggregate.lib.api</artifactId> |
|
20 |
<scope>compile</scope> |
|
21 |
</dependency> |
|
22 |
<dependency> |
|
23 |
<groupId>org.gvsig</groupId> |
|
24 |
<artifactId>org.gvsig.symbology.swing.api</artifactId> |
|
25 |
<scope>compile</scope> |
|
26 |
</dependency> |
|
27 |
</dependencies> |
|
28 |
</project> |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.swing/org.gvsig.legend.aggregate.swing.api/src/main/java/org/gvsig/legend/aggregate/swing/api/AggregateLegendSwingManager.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2015 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 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., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.legend.aggregate.swing.api; |
|
24 |
|
|
25 |
public interface AggregateLegendSwingManager { |
|
26 |
|
|
27 |
public AggregateLegendEditor createAggregatedLegendEditor(); |
|
28 |
} |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.swing/org.gvsig.legend.aggregate.swing.api/src/main/java/org/gvsig/legend/aggregate/swing/api/AggregateLegendEditor.java | ||
---|---|---|
1 |
|
|
2 |
package org.gvsig.legend.aggregate.swing.api; |
|
3 |
|
|
4 |
import org.gvsig.app.project.documents.view.legend.gui.ILegendPanel; |
|
5 |
|
|
6 |
|
|
7 |
public interface AggregateLegendEditor extends ILegendPanel { |
|
8 |
|
|
9 |
} |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.swing/org.gvsig.legend.aggregate.swing.api/src/main/java/org/gvsig/legend/aggregate/swing/api/AggregateLegendSwingLocator.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2015 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 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., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.legend.aggregate.swing.api; |
|
24 |
|
|
25 |
import org.gvsig.tools.locator.AbstractLocator; |
|
26 |
import org.gvsig.tools.locator.Locator; |
|
27 |
import org.gvsig.tools.locator.LocatorException; |
|
28 |
|
|
29 |
|
|
30 |
/** |
|
31 |
* @author fdiaz |
|
32 |
* |
|
33 |
*/ |
|
34 |
public class AggregateLegendSwingLocator extends AbstractLocator { |
|
35 |
/** |
|
36 |
* LrsSwing locator name |
|
37 |
*/ |
|
38 |
private static final String LOCATOR_NAME = "AggregateLegendSwingLocator"; |
|
39 |
|
|
40 |
/** |
|
41 |
* LrsSwing manager name |
|
42 |
*/ |
|
43 |
public static final String MANAGER_NAME = "AggregateLegendSwingManager"; |
|
44 |
|
|
45 |
/** |
|
46 |
* LrsSwing manager description |
|
47 |
*/ |
|
48 |
private static final String MANAGER_DESCRIPTION = |
|
49 |
"Lrs Swing Algorithms Manager of gvSIG"; |
|
50 |
|
|
51 |
|
|
52 |
/** |
|
53 |
* Unique instance |
|
54 |
*/ |
|
55 |
private static final AggregateLegendSwingLocator instance = new AggregateLegendSwingLocator(); |
|
56 |
|
|
57 |
|
|
58 |
/* (non-Javadoc) |
|
59 |
* @see org.gvsig.tools.locator.Locator#getLocatorName() |
|
60 |
*/ |
|
61 |
@Override |
|
62 |
public String getLocatorName() { |
|
63 |
return LOCATOR_NAME; |
|
64 |
} |
|
65 |
|
|
66 |
|
|
67 |
/** |
|
68 |
* Registers the Class implementing the LrsSwingManager interface. |
|
69 |
* |
|
70 |
* @param clazz |
|
71 |
* implementing the LrsAlgorthmsSwingManager interface |
|
72 |
*/ |
|
73 |
public static void registerAggregateLegendSwingManager(Class clazz){ |
|
74 |
getInstance().register(MANAGER_NAME, MANAGER_DESCRIPTION, clazz); |
|
75 |
} |
|
76 |
|
|
77 |
/** |
|
78 |
* Registers the default Class implementing the LrsSwingManager interface |
|
79 |
* |
|
80 |
* @param clazz |
|
81 |
* implementing the LrsAlgorthmsSwingManager interface |
|
82 |
*/ |
|
83 |
public static void registerDefaultAggregateLegendSwingManager(Class clazz){ |
|
84 |
getInstance().registerDefault(MANAGER_NAME, MANAGER_DESCRIPTION, clazz); |
|
85 |
} |
|
86 |
|
|
87 |
/** |
|
88 |
* Return a reference to AggregateLegendSwingManager. |
|
89 |
* |
|
90 |
* @return a reference to AggregateLegendSwingManager |
|
91 |
* @throws LocatorException |
|
92 |
* if there is no access to the class or the class |
|
93 |
* cannot be instantiated |
|
94 |
* @see Locator#get(String) |
|
95 |
*/ |
|
96 |
public static AggregateLegendSwingManager getAggregateLegendSwingManager() throws LocatorException { |
|
97 |
return (AggregateLegendSwingManager)(getInstance().get(MANAGER_NAME)); |
|
98 |
} |
|
99 |
|
|
100 |
/** |
|
101 |
* @return |
|
102 |
*/ |
|
103 |
public static Locator getInstance() { |
|
104 |
return instance; |
|
105 |
} |
|
106 |
|
|
107 |
} |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.swing/org.gvsig.legend.aggregate.swing.api/src/main/java/org/gvsig/legend/aggregate/swing/api/AggregateLegendSwingLibrary.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2015 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 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., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.legend.aggregate.swing.api; |
|
24 |
|
|
25 |
import java.io.InputStream; |
|
26 |
import org.gvsig.legend.aggregate.lib.api.AggregateLegendLibrary; |
|
27 |
|
|
28 |
import org.gvsig.tools.ToolsLocator; |
|
29 |
import org.gvsig.tools.dynobject.DynStruct; |
|
30 |
import org.gvsig.tools.library.AbstractLibrary; |
|
31 |
import org.gvsig.tools.library.LibraryException; |
|
32 |
import org.gvsig.tools.locator.ReferenceNotRegisteredException; |
|
33 |
import org.gvsig.tools.persistence.PersistenceManager; |
|
34 |
import org.slf4j.Logger; |
|
35 |
import org.slf4j.LoggerFactory; |
|
36 |
|
|
37 |
|
|
38 |
/** |
|
39 |
* @author fdiaz |
|
40 |
* |
|
41 |
*/ |
|
42 |
public class AggregateLegendSwingLibrary extends AbstractLibrary { |
|
43 |
|
|
44 |
private static final Logger LOG = LoggerFactory.getLogger(AggregateLegendSwingLibrary.class); |
|
45 |
|
|
46 |
@Override |
|
47 |
protected void doInitialize() throws LibraryException { |
|
48 |
registerAsAPI(AggregateLegendSwingLibrary.class); |
|
49 |
require(AggregateLegendLibrary.class); |
|
50 |
} |
|
51 |
|
|
52 |
@Override |
|
53 |
protected void doPostInitialize() throws LibraryException { |
|
54 |
// Validate there is any implementation registered. |
|
55 |
AggregateLegendSwingManager manager = AggregateLegendSwingLocator.getAggregateLegendSwingManager(); |
|
56 |
if (manager == null) { |
|
57 |
throw new ReferenceNotRegisteredException( |
|
58 |
AggregateLegendSwingLocator.MANAGER_NAME, AggregateLegendSwingLocator.getInstance()); |
|
59 |
} |
|
60 |
} |
|
61 |
|
|
62 |
|
|
63 |
} |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.swing/org.gvsig.legend.aggregate.swing.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.legend.aggregate.swing.api.AggregateLegendSwingLibrary |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.swing/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.legend.aggregate</artifactId> |
|
6 |
<version>1.0.2</version> |
|
7 |
</parent> |
|
8 |
<groupId>org.gvsig</groupId> |
|
9 |
<artifactId>org.gvsig.legend.aggregate.swing</artifactId> |
|
10 |
<packaging>pom</packaging> |
|
11 |
<name>org.gvsig.legend.aggregate.swing</name> |
|
12 |
<modules> |
|
13 |
<module>org.gvsig.legend.aggregate.swing.api</module> |
|
14 |
<module>org.gvsig.legend.aggregate.swing.impl</module> |
|
15 |
</modules> |
|
16 |
</project> |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.swing/org.gvsig.legend.aggregate.swing.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.legend.aggregate.swing.impl.DefaultAggregateLegendSwingLibrary |
org.gvsig.legend.aggregate/tags/org.gvsig.legend.aggregate-1.0.2/org.gvsig.legend.aggregate.swing/org.gvsig.legend.aggregate.swing.impl/src/main/java/org/gvsig/legend/aggregate/swing/impl/DefaultAggregateLegendEditorView.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<object classname="com.jeta.forms.store.memento.FormPackage"> |
|
4 |
<at name="fileversion"> |
|
5 |
<object classname="com.jeta.forms.store.memento.FormsVersion2"> |
|
6 |
<at name="major">2</at> |
|
7 |
<at name="minor">0</at> |
|
8 |
<at name="sub">0</at> |
|
9 |
</object> |
|
10 |
</at> |
|
11 |
<at name="form"> |
|
12 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
|
13 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
14 |
<at name="cellconstraints"> |
|
15 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
16 |
<at name="column">1</at> |
|
17 |
<at name="row">1</at> |
|
18 |
<at name="colspan">1</at> |
|
19 |
<at name="rowspan">1</at> |
|
20 |
<at name="halign">default</at> |
|
21 |
<at name="valign">default</at> |
|
22 |
<at name="insets" object="insets">0,0,0,0</at> |
|
23 |
</object> |
|
24 |
</at> |
|
25 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
|
26 |
</super> |
|
27 |
<at name="id">/home/jjdelcerro/datos/devel/org.gvsig.legend.aggregate/org.gvsig.legend.aggregate.swing/org.gvsig.legend.aggregate.swing.impl/src/main/java/org/gvsig/legend/aggregate/swing/impl/DefaultAggregateLegendEditorView.xml</at> |
|
28 |
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE</at> |
|
29 |
<at name="colspecs">FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE</at> |
|
30 |
<at name="components"> |
|
31 |
<object classname="java.util.LinkedList"> |
|
32 |
<item > |
|
33 |
<at name="value"> |
|
34 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
35 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
36 |
<at name="cellconstraints"> |
|
37 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
38 |
<at name="column">2</at> |
|
39 |
<at name="row">2</at> |
|
40 |
<at name="colspan">1</at> |
|
41 |
<at name="rowspan">1</at> |
|
42 |
<at name="halign">default</at> |
|
43 |
<at name="valign">default</at> |
|
44 |
<at name="insets" object="insets">0,0,0,0</at> |
|
45 |
</object> |
|
46 |
</at> |
|
47 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
48 |
</super> |
|
49 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
50 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
51 |
<at name="beanproperties"> |
|
52 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
53 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
54 |
<at name="properties"> |
|
55 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
56 |
<at name="border"> |
|
57 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
58 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
59 |
<at name="name">border</at> |
|
60 |
</super> |
|
61 |
<at name="borders"> |
|
62 |
<object classname="java.util.LinkedList"> |
|
63 |
<item > |
|
64 |
<at name="value"> |
|
65 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
66 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
67 |
<at name="name">border</at> |
|
68 |
</super> |
|
69 |
</object> |
|
70 |
</at> |
|
71 |
</item> |
|
72 |
</object> |
|
73 |
</at> |
|
74 |
</object> |
|
75 |
</at> |
|
76 |
<at name="name">lblDistance</at> |
|
77 |
<at name="width">49</at> |
|
78 |
<at name="text">Distance</at> |
|
79 |
<at name="fill"> |
|
80 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
81 |
<at name="name">fill</at> |
|
82 |
</object> |
|
83 |
</at> |
|
84 |
<at name="height">14</at> |
|
85 |
</object> |
|
86 |
</at> |
|
87 |
</object> |
|
88 |
</at> |
|
89 |
</object> |
|
90 |
</at> |
|
91 |
</item> |
|
92 |
<item > |
|
93 |
<at name="value"> |
|
94 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
95 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
96 |
<at name="cellconstraints"> |
|
97 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
98 |
<at name="column">4</at> |
|
99 |
<at name="row">2</at> |
|
100 |
<at name="colspan">3</at> |
|
101 |
<at name="rowspan">1</at> |
|
102 |
<at name="halign">default</at> |
|
103 |
<at name="valign">default</at> |
|
104 |
<at name="insets" object="insets">0,0,0,0</at> |
|
105 |
</object> |
|
106 |
</at> |
|
107 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
108 |
</super> |
|
109 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
110 |
<at name="beanclass">javax.swing.JTextField</at> |
|
111 |
<at name="beanproperties"> |
|
112 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
113 |
<at name="classname">javax.swing.JTextField</at> |
|
114 |
<at name="properties"> |
|
115 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
116 |
<at name="border"> |
|
117 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
118 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
119 |
<at name="name">border</at> |
|
120 |
</super> |
|
121 |
<at name="borders"> |
|
122 |
<object classname="java.util.LinkedList"> |
|
123 |
<item > |
|
124 |
<at name="value"> |
|
125 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
126 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
127 |
<at name="name">border</at> |
|
128 |
</super> |
|
129 |
</object> |
|
130 |
</at> |
|
131 |
</item> |
|
132 |
</object> |
|
133 |
</at> |
|
134 |
</object> |
|
135 |
</at> |
|
136 |
<at name="name">txtDistance</at> |
|
137 |
<at name="width">446</at> |
|
138 |
<at name="height">20</at> |
|
139 |
</object> |
|
140 |
</at> |
|
141 |
</object> |
|
142 |
</at> |
|
143 |
</object> |
|
144 |
</at> |
|
145 |
</item> |
|
146 |
<item > |
|
147 |
<at name="value"> |
|
148 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
149 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
150 |
<at name="cellconstraints"> |
|
151 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
152 |
<at name="column">2</at> |
|
153 |
<at name="row">4</at> |
|
154 |
<at name="colspan">1</at> |
|
155 |
<at name="rowspan">1</at> |
|
156 |
<at name="halign">default</at> |
|
157 |
<at name="valign">default</at> |
|
158 |
<at name="insets" object="insets">0,0,0,0</at> |
|
159 |
</object> |
|
160 |
</at> |
|
161 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
162 |
</super> |
|
163 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
164 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
165 |
<at name="beanproperties"> |
|
166 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
167 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
168 |
<at name="properties"> |
|
169 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
170 |
<at name="border"> |
|
171 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
172 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
173 |
<at name="name">border</at> |
|
174 |
</super> |
|
175 |
<at name="borders"> |
|
176 |
<object classname="java.util.LinkedList"> |
|
177 |
<item > |
|
178 |
<at name="value"> |
|
179 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
180 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
181 |
<at name="name">border</at> |
|
182 |
</super> |
|
183 |
</object> |
|
184 |
</at> |
|
185 |
</item> |
|
186 |
</object> |
|
187 |
</at> |
|
188 |
</object> |
|
189 |
</at> |
|
190 |
<at name="name">lblStyle</at> |
|
191 |
<at name="width">49</at> |
|
192 |
<at name="text">Style</at> |
|
193 |
<at name="fill"> |
|
194 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
195 |
<at name="name">fill</at> |
|
196 |
</object> |
|
197 |
</at> |
|
198 |
<at name="height">14</at> |
|
199 |
</object> |
|
200 |
</at> |
|
201 |
</object> |
|
202 |
</at> |
|
203 |
</object> |
|
204 |
</at> |
|
205 |
</item> |
|
206 |
<item > |
|
207 |
<at name="value"> |
|
208 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
209 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
210 |
<at name="cellconstraints"> |
|
211 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
212 |
<at name="column">4</at> |
|
213 |
<at name="row">4</at> |
|
214 |
<at name="colspan">1</at> |
|
215 |
<at name="rowspan">1</at> |
|
216 |
<at name="halign">default</at> |
|
217 |
<at name="valign">default</at> |
|
218 |
<at name="insets" object="insets">0,0,0,0</at> |
|
219 |
</object> |
|
220 |
</at> |
|
221 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
222 |
</super> |
|
223 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
224 |
<at name="beanclass">javax.swing.JTextField</at> |
|
225 |
<at name="beanproperties"> |
|
226 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
227 |
<at name="classname">javax.swing.JTextField</at> |
|
228 |
<at name="properties"> |
|
229 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
230 |
<at name="border"> |
|
231 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
232 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
233 |
<at name="name">border</at> |
|
234 |
</super> |
|
235 |
<at name="borders"> |
|
236 |
<object classname="java.util.LinkedList"> |
|
237 |
<item > |
|
238 |
<at name="value"> |
|
239 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
240 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
241 |
<at name="name">border</at> |
|
242 |
</super> |
|
243 |
</object> |
|
244 |
</at> |
|
245 |
</item> |
|
246 |
</object> |
|
247 |
</at> |
|
248 |
</object> |
|
249 |
</at> |
|
250 |
<at name="background" object="color">236,233,216</at> |
|
251 |
<at name="editable">false</at> |
|
252 |
<at name="name">txtStyle</at> |
|
253 |
<at name="width">382</at> |
|
254 |
<at name="height">20</at> |
|
255 |
</object> |
|
256 |
</at> |
|
257 |
</object> |
|
258 |
</at> |
|
259 |
</object> |
|
260 |
</at> |
|
261 |
</item> |
|
262 |
<item > |
|
263 |
<at name="value"> |
|
264 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
265 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
266 |
<at name="cellconstraints"> |
|
267 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
268 |
<at name="column">6</at> |
|
269 |
<at name="row">4</at> |
|
270 |
<at name="colspan">1</at> |
|
271 |
<at name="rowspan">1</at> |
|
272 |
<at name="halign">default</at> |
|
273 |
<at name="valign">default</at> |
|
274 |
<at name="insets" object="insets">0,0,0,0</at> |
|
275 |
</object> |
|
276 |
</at> |
|
277 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
278 |
</super> |
|
279 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
280 |
<at name="beanclass">javax.swing.JButton</at> |
|
281 |
<at name="beanproperties"> |
|
282 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
283 |
<at name="classname">javax.swing.JButton</at> |
|
284 |
<at name="properties"> |
|
285 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
286 |
<at name="border"> |
|
287 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
288 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
289 |
<at name="name">border</at> |
|
290 |
</super> |
|
291 |
<at name="borders"> |
|
292 |
<object classname="java.util.LinkedList"> |
|
293 |
<item > |
|
294 |
<at name="value"> |
|
295 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
296 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
297 |
<at name="name">border</at> |
|
298 |
</super> |
|
299 |
</object> |
|
300 |
</at> |
|
301 |
</item> |
|
302 |
</object> |
|
303 |
</at> |
|
304 |
</object> |
|
305 |
</at> |
|
306 |
<at name="actionCommand">...</at> |
|
307 |
<at name="name">btnStyle</at> |
|
308 |
<at name="width">44</at> |
|
309 |
<at name="text">...</at> |
|
310 |
<at name="height">22</at> |
|
311 |
</object> |
Also available in: Unified diff