Revision 4266
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.app/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" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
4 |
<modelVersion>4.0.0</modelVersion> |
|
5 |
<artifactId>org.gvsig.complexlegend.app</artifactId> |
|
6 |
<packaging>pom</packaging> |
|
7 |
<name>org.gvsig.complexlegend.app</name> |
|
8 |
<description>complex legend extension</description> |
|
9 |
<parent> |
|
10 |
<groupId>org.gvsig</groupId> |
|
11 |
<artifactId>org.gvsig.complexlegend</artifactId> |
|
12 |
<version>1.0.122</version> |
|
13 |
</parent> |
|
14 |
<dependencyManagement> |
|
15 |
<dependencies> |
|
16 |
</dependencies> |
|
17 |
</dependencyManagement> |
|
18 |
|
|
19 |
<modules> |
|
20 |
<module>org.gvsig.complexlegend.app.mainplugin</module> |
|
21 |
</modules> |
|
22 |
|
|
23 |
</project> |
|
0 | 24 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.app/org.gvsig.complexlegend.app.mainplugin/buildNumber.properties | ||
---|---|---|
1 |
#Thu Oct 29 13:04:17 CET 2020 |
|
2 |
buildNumber=128 |
|
0 | 3 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.app/org.gvsig.complexlegend.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml | ||
---|---|---|
1 |
<assembly> |
|
2 |
<id>gvsig-plugin-package</id> |
|
3 |
<formats> |
|
4 |
<format>zip</format> |
|
5 |
</formats> |
|
6 |
<baseDirectory>${project.artifactId}</baseDirectory> |
|
7 |
<includeBaseDirectory>true</includeBaseDirectory> |
|
8 |
<files> |
|
9 |
<file> |
|
10 |
<source>target/${project.artifactId}-${project.version}.jar</source> |
|
11 |
<outputDirectory>lib</outputDirectory> |
|
12 |
</file> |
|
13 |
<file> |
|
14 |
<source>target/package.info</source> |
|
15 |
</file> |
|
16 |
</files> |
|
17 |
|
|
18 |
<fileSets> |
|
19 |
<fileSet> |
|
20 |
<directory>src/main/resources-plugin</directory> |
|
21 |
<outputDirectory>.</outputDirectory> |
|
22 |
</fileSet> |
|
23 |
</fileSets> |
|
24 |
|
|
25 |
<dependencySets> |
|
26 |
<dependencySet> |
|
27 |
<useProjectArtifact>false</useProjectArtifact> |
|
28 |
<useTransitiveDependencies>false</useTransitiveDependencies> |
|
29 |
<outputDirectory>lib</outputDirectory> |
|
30 |
<includes> |
|
31 |
<include>org.gvsig:org.gvsig.complexlegend.lib.api</include> |
|
32 |
<include>org.gvsig:org.gvsig.complexlegend.swing.api</include> |
|
33 |
<include>org.gvsig:org.gvsig.complexlegend.lib.impl</include> |
|
34 |
<include>org.gvsig:org.gvsig.complexlegend.swing.impl</include> |
|
35 |
</includes> |
|
36 |
</dependencySet> |
|
37 |
</dependencySets> |
|
38 |
|
|
39 |
</assembly> |
|
0 | 40 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.app/org.gvsig.complexlegend.app.mainplugin/src/main/java/org/gvsig/complexlegend/app/mainplugin/ComplexLegendExtension.java | ||
---|---|---|
1 |
/* OSM layers for gvSIG. |
|
2 |
* Geographic Information System of the Valencian Government |
|
3 |
* |
|
4 |
* Copyright (C) 2012 Nacho Brodin |
|
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.complexlegend.app.mainplugin; |
|
23 |
|
|
24 |
import org.gvsig.andami.plugins.Extension; |
|
25 |
import org.gvsig.complexlabel.app.editor.ComplexLabelClassEditorFactory; |
|
26 |
import org.gvsig.complexlegend.swing.impl.DefaultComplexLegendPanelController; |
|
27 |
import org.gvsig.symbology.swing.SymbologySwingLocator; |
|
28 |
import org.gvsig.symbology.swing.SymbologySwingManager; |
|
29 |
|
|
30 |
/** |
|
31 |
* Complex Legend Extension to gvSIG. |
|
32 |
* @author Jose Badia (jbadia@scolab.es) |
|
33 |
*/ |
|
34 |
public class ComplexLegendExtension extends Extension { |
|
35 |
|
|
36 |
public void initialize() { |
|
37 |
SymbologySwingManager manager = SymbologySwingLocator.getSwingManager(); |
|
38 |
manager.registerLegendEditor(DefaultComplexLegendPanelController.class); |
|
39 |
manager.registerLabelClassEditor(new ComplexLabelClassEditorFactory()); |
|
40 |
} |
|
41 |
|
|
42 |
@Override |
|
43 |
public void postInitialize() { |
|
44 |
super.postInitialize(); |
|
45 |
|
|
46 |
} |
|
47 |
|
|
48 |
public void execute(String actionCommand) { |
|
49 |
|
|
50 |
} |
|
51 |
|
|
52 |
public boolean isEnabled() { |
|
53 |
return true; |
|
54 |
} |
|
55 |
|
|
56 |
public boolean isVisible() { |
|
57 |
return true; |
|
58 |
} |
|
59 |
} |
|
0 | 60 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.app/org.gvsig.complexlegend.app.mainplugin/src/main/java/org/gvsig/complexlabel/app/editor/ComplexLabelClassEditorFactory.java | ||
---|---|---|
1 |
package org.gvsig.complexlabel.app.editor; |
|
2 |
|
|
3 |
import org.gvsig.app.gui.labeling.LabelClassEditor; |
|
4 |
import org.gvsig.app.gui.labeling.LabelClassEditorFactory; |
|
5 |
import org.gvsig.complexlabel.impl.DefaultComplexLabelClass; |
|
6 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
7 |
import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass; |
|
8 |
|
|
9 |
public class ComplexLabelClassEditorFactory implements LabelClassEditorFactory{ |
|
10 |
|
|
11 |
public static final String FACTORY_ID = "ClassEditorByScale"; |
|
12 |
|
|
13 |
public String getName() { |
|
14 |
return "Class editor by scale"; |
|
15 |
} |
|
16 |
|
|
17 |
public String getID() { |
|
18 |
return FACTORY_ID; |
|
19 |
} |
|
20 |
|
|
21 |
public LabelClassEditor createEditor(ILabelClass labelClass, |
|
22 |
FeatureStore store) { |
|
23 |
ComplexLabelClassEditor editor = new ComplexLabelClassEditor(store); |
|
24 |
editor.setLabelClass(labelClass); |
|
25 |
return editor; |
|
26 |
} |
|
27 |
|
|
28 |
public boolean accept(Class<? extends ILabelClass> labelClass) { |
|
29 |
if(DefaultComplexLabelClass.class.getName().equals(labelClass.getName()) ) { |
|
30 |
return true; |
|
31 |
} |
|
32 |
return false; |
|
33 |
} |
|
34 |
|
|
35 |
} |
|
0 | 36 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.app/org.gvsig.complexlegend.app.mainplugin/src/main/java/org/gvsig/complexlabel/app/editor/LabelClassScalePanel.java | ||
---|---|---|
1 |
package org.gvsig.complexlabel.app.editor; |
|
2 |
|
|
3 |
import java.awt.BorderLayout; |
|
4 |
import java.awt.Component; |
|
5 |
import java.awt.Dimension; |
|
6 |
import java.awt.GridBagConstraints; |
|
7 |
import java.awt.GridBagLayout; |
|
8 |
import java.awt.Insets; |
|
9 |
import java.awt.event.ActionEvent; |
|
10 |
import java.awt.event.ActionListener; |
|
11 |
|
|
12 |
import javax.swing.JCheckBox; |
|
13 |
import javax.swing.JLabel; |
|
14 |
import javax.swing.JPanel; |
|
15 |
import javax.swing.JSpinner; |
|
16 |
import javax.swing.SpinnerModel; |
|
17 |
import javax.swing.SpinnerNumberModel; |
|
18 |
|
|
19 |
import org.gvsig.complexlabel.impl.DefaultComplexLabelClass; |
|
20 |
import org.gvsig.tools.ToolsLocator; |
|
21 |
import org.gvsig.tools.i18n.I18nManager; |
|
22 |
|
|
23 |
public class LabelClassScalePanel extends JPanel{ |
|
24 |
|
|
25 |
/** |
|
26 |
* |
|
27 |
*/ |
|
28 |
private static final long serialVersionUID = -7443140994364499103L; |
|
29 |
private I18nManager i18nManager; |
|
30 |
private JSpinner maxScaleTXT; |
|
31 |
private JSpinner minScaleTXT; |
|
32 |
private JCheckBox minScaleCk; |
|
33 |
private JCheckBox maxScaleCk; |
|
34 |
|
|
35 |
public LabelClassScalePanel(){ |
|
36 |
this.i18nManager = ToolsLocator.getI18nManager(); |
|
37 |
initialize(); |
|
38 |
} |
|
39 |
|
|
40 |
public LabelClassScalePanel(DefaultComplexLabelClass labelClass){ |
|
41 |
this(); |
|
42 |
setModel(labelClass); |
|
43 |
} |
|
44 |
|
|
45 |
private void setModel(DefaultComplexLabelClass labelClass) { |
|
46 |
setMinScale(labelClass.getMinScale()); |
|
47 |
setMaxScale(labelClass.getMaxScale()); |
|
48 |
} |
|
49 |
|
|
50 |
public boolean isAccepted(){ |
|
51 |
return (getMaxScaleField().getValue() != null && getMinScaleField().getValue() != null); |
|
52 |
} |
|
53 |
|
|
54 |
private void initialize() { |
|
55 |
setPreferredSize(new Dimension(450, 160)); |
|
56 |
|
|
57 |
JPanel mainPanel = new JPanel(new BorderLayout()); |
|
58 |
mainPanel.setPreferredSize(new Dimension(440, 100)); |
|
59 |
|
|
60 |
JPanel mainDataPanel = new JPanel(); |
|
61 |
mainDataPanel.setPreferredSize(new Dimension(200, 100)); |
|
62 |
GridBagLayout gridBagLayout2 = new GridBagLayout(); |
|
63 |
gridBagLayout2.columnWidths = new int[] { 150, 180, 70 }; |
|
64 |
gridBagLayout2.rowHeights = new int[] { 0, 0, 0, 0, 0, 0 }; |
|
65 |
mainDataPanel.setLayout(gridBagLayout2); |
|
66 |
//mainDataPanel.setBorder(new TitledBorder( i18nManager.getTranslation("Connection_configuration") + ":")); |
|
67 |
|
|
68 |
GridBagConstraints c = new GridBagConstraints(); |
|
69 |
c.fill = GridBagConstraints.HORIZONTAL; |
|
70 |
c.anchor = GridBagConstraints.WEST; |
|
71 |
c.insets = new Insets(3, 0, 3, 0); |
|
72 |
c.ipadx = 10; |
|
73 |
c.gridx = 0; |
|
74 |
c.gridy = 0; |
|
75 |
JLabel labelURL = new JLabel( i18nManager.getTranslation("MinScale")+":"); |
|
76 |
mainDataPanel.add(labelURL, c); |
|
77 |
|
|
78 |
c.gridx = 1; |
|
79 |
c.gridwidth =2; |
|
80 |
mainDataPanel.add(getMinScaleField(), c); |
|
81 |
c.gridy = 1; |
|
82 |
mainDataPanel.add(getWithoutMinScale(), c); |
|
83 |
|
|
84 |
c.gridx = 0; |
|
85 |
c.gridy = 2; |
|
86 |
c.gridwidth =1; |
|
87 |
JLabel labelUser = new JLabel( i18nManager.getTranslation("MaxScale")+":"); |
|
88 |
mainDataPanel.add(labelUser, c); |
|
89 |
|
|
90 |
c.gridx = 1; |
|
91 |
c.gridwidth =2; |
|
92 |
mainDataPanel.add(getMaxScaleField(), c); |
|
93 |
c.gridy = 3; |
|
94 |
mainDataPanel.add(getWithoutMaxScale(), c); |
|
95 |
|
|
96 |
mainPanel.add(mainDataPanel, BorderLayout.CENTER); |
|
97 |
add(mainPanel, BorderLayout.CENTER); |
|
98 |
} |
|
99 |
|
|
100 |
private JSpinner getMaxScaleField() { |
|
101 |
if(maxScaleTXT == null){ |
|
102 |
SpinnerModel model = |
|
103 |
new SpinnerNumberModel(0, 0, 1000000000, 1000000); |
|
104 |
maxScaleTXT = new JSpinner(model); |
|
105 |
} |
|
106 |
return maxScaleTXT; |
|
107 |
} |
|
108 |
|
|
109 |
private JSpinner getMinScaleField() { |
|
110 |
if(minScaleTXT == null){ |
|
111 |
SpinnerModel model = |
|
112 |
new SpinnerNumberModel(0, 0, 1000000000, 1000000); |
|
113 |
minScaleTXT = new JSpinner(model); |
|
114 |
} |
|
115 |
return minScaleTXT; |
|
116 |
} |
|
117 |
|
|
118 |
public double getMinScale(){ |
|
119 |
if(getWithoutMinScale().isSelected()){ |
|
120 |
return -1; |
|
121 |
} |
|
122 |
Object obj = getMinScaleField().getValue(); |
|
123 |
if(obj instanceof Integer){ |
|
124 |
Integer x = (Integer) obj; |
|
125 |
return (Double) x.doubleValue(); |
|
126 |
} |
|
127 |
return (Double) obj; |
|
128 |
} |
|
129 |
|
|
130 |
public double getMaxScale(){ |
|
131 |
if(getWithoutMaxScale().isSelected()){ |
|
132 |
return 1000000001; |
|
133 |
} |
|
134 |
Object obj = getMaxScaleField().getValue(); |
|
135 |
if(obj instanceof Integer){ |
|
136 |
Integer x = (Integer) obj; |
|
137 |
return (Double) x.doubleValue(); |
|
138 |
} |
|
139 |
return (Double) obj; |
|
140 |
} |
|
141 |
|
|
142 |
public void setMinScale(double scale){ |
|
143 |
if(scale != -1){ |
|
144 |
getMinScaleField().setValue(scale); |
|
145 |
}else{ |
|
146 |
getWithoutMinScale().setSelected(true); |
|
147 |
} |
|
148 |
} |
|
149 |
|
|
150 |
public void setMaxScale(double scale){ |
|
151 |
if(scale != 1000000001){ |
|
152 |
getMaxScaleField().setValue(scale); |
|
153 |
}else{ |
|
154 |
getWithoutMaxScale().setSelected(true); |
|
155 |
} |
|
156 |
} |
|
157 |
|
|
158 |
private JCheckBox getWithoutMinScale() { |
|
159 |
if(minScaleCk == null){ |
|
160 |
minScaleCk = new JCheckBox(i18nManager.getTranslation("without_min_scale")); |
|
161 |
minScaleCk.addActionListener(new ActionListener() { |
|
162 |
public void actionPerformed(ActionEvent arg0) { |
|
163 |
getMinScaleField().setEnabled(!minScaleCk.isSelected()); |
|
164 |
} |
|
165 |
}); |
|
166 |
} |
|
167 |
return minScaleCk; |
|
168 |
} |
|
169 |
|
|
170 |
private JCheckBox getWithoutMaxScale() { |
|
171 |
if(maxScaleCk == null){ |
|
172 |
maxScaleCk = new JCheckBox(i18nManager.getTranslation("without_max_scale")); |
|
173 |
maxScaleCk.addActionListener(new ActionListener() { |
|
174 |
public void actionPerformed(ActionEvent arg0) { |
|
175 |
getMaxScaleField().setEnabled(!maxScaleCk.isSelected()); |
|
176 |
} |
|
177 |
}); |
|
178 |
} |
|
179 |
return maxScaleCk; |
|
180 |
} |
|
181 |
|
|
182 |
public Component asJComponent() { |
|
183 |
return this; |
|
184 |
} |
|
185 |
} |
|
0 | 186 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.app/org.gvsig.complexlegend.app.mainplugin/src/main/java/org/gvsig/complexlabel/app/editor/ComplexLabelClassEditor.java | ||
---|---|---|
1 |
package org.gvsig.complexlabel.app.editor; |
|
2 |
|
|
3 |
import java.awt.BorderLayout; |
|
4 |
import java.awt.event.ActionEvent; |
|
5 |
import java.awt.event.ActionListener; |
|
6 |
|
|
7 |
import javax.swing.JComponent; |
|
8 |
import javax.swing.JPanel; |
|
9 |
import javax.swing.JTabbedPane; |
|
10 |
|
|
11 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
|
12 |
import org.gvsig.andami.ui.mdiManager.WindowInfo; |
|
13 |
import org.gvsig.app.ApplicationLocator; |
|
14 |
import org.gvsig.app.gui.labeling.LabelClassEditor; |
|
15 |
import org.gvsig.complexlabel.impl.ComplexLabelClassFactory; |
|
16 |
import org.gvsig.complexlabel.impl.DefaultComplexLabelClass; |
|
17 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
18 |
import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass; |
|
19 |
import org.gvsig.gui.beans.AcceptCancelPanel; |
|
20 |
import org.gvsig.labeling.gui.layerproperties.LabelClassProperties; |
|
21 |
import org.gvsig.symbology.SymbologyLocator; |
|
22 |
import org.gvsig.tools.ToolsLocator; |
|
23 |
import org.gvsig.tools.i18n.I18nManager; |
|
24 |
import org.slf4j.Logger; |
|
25 |
import org.slf4j.LoggerFactory; |
|
26 |
|
|
27 |
public class ComplexLabelClassEditor extends JPanel implements LabelClassEditor, IWindow, ActionListener{ |
|
28 |
|
|
29 |
/** |
|
30 |
* |
|
31 |
*/ |
|
32 |
private static final long serialVersionUID = 1L; |
|
33 |
private static final Logger logger = LoggerFactory.getLogger(ComplexLabelClassEditor.class); |
|
34 |
|
|
35 |
private LabelClassProperties labelClassEditorPanel; |
|
36 |
private LabelClassScalePanel labelClassScalePanel; |
|
37 |
private AcceptCancelPanel acceptCancelPanel; |
|
38 |
private JTabbedPane mainPanel; |
|
39 |
private I18nManager i18nManager; |
|
40 |
private FeatureStore fstore; |
|
41 |
private DefaultComplexLabelClass complexLabelClass; |
|
42 |
|
|
43 |
|
|
44 |
public ComplexLabelClassEditor(FeatureStore store){ |
|
45 |
this(store, null); |
|
46 |
} |
|
47 |
|
|
48 |
public ComplexLabelClassEditor(FeatureStore store, DefaultComplexLabelClass labelClass){ |
|
49 |
this.i18nManager = ToolsLocator.getI18nManager(); |
|
50 |
this.fstore = store; |
|
51 |
initialize(); |
|
52 |
|
|
53 |
if(labelClass == null){ |
|
54 |
ComplexLabelClassFactory factory = (ComplexLabelClassFactory) SymbologyLocator |
|
55 |
.getSymbologyManager().getLabelClassFactory(ComplexLabelClassFactory.FACTORY_ID); |
|
56 |
this.complexLabelClass = (DefaultComplexLabelClass) factory.create(); |
|
57 |
}else{ |
|
58 |
this.complexLabelClass = labelClass; |
|
59 |
} |
|
60 |
setLabelClass(this.complexLabelClass); |
|
61 |
} |
|
62 |
|
|
63 |
private void initialize(){ |
|
64 |
setLayout(new BorderLayout()); |
|
65 |
|
|
66 |
mainPanel = new JTabbedPane(); |
|
67 |
mainPanel.addTab(i18nManager.getTranslation("Label_definition"), getPropertiesPanel().asJComponent()); |
|
68 |
mainPanel.addTab(i18nManager.getTranslation("Label_scale_definition"), getScaledPanel().asJComponent()); |
|
69 |
|
|
70 |
add(mainPanel, BorderLayout.CENTER); |
|
71 |
add(getAcceptCancelPanelButton(), BorderLayout.SOUTH); |
|
72 |
} |
|
73 |
|
|
74 |
private AcceptCancelPanel getAcceptCancelPanelButton() { |
|
75 |
if(this.acceptCancelPanel == null){ |
|
76 |
this.acceptCancelPanel = new AcceptCancelPanel(this, this); |
|
77 |
this.acceptCancelPanel.setVisible(true); |
|
78 |
} |
|
79 |
return this.acceptCancelPanel; |
|
80 |
} |
|
81 |
|
|
82 |
public void actionPerformed(ActionEvent e) { |
|
83 |
if ("OK".equals(e.getActionCommand())) { |
|
84 |
labelClassEditorPanel.actionPerformed(new ActionEvent(this, 1, "other")); |
|
85 |
getLabelClass(); |
|
86 |
try { |
|
87 |
ApplicationLocator.getManager().getUIManager().closeWindow(this); |
|
88 |
} catch (Exception ex) { |
|
89 |
// this only happens when running this as stand-alone app |
|
90 |
// from main method; |
|
91 |
logger.warn("While closing window.", ex); |
|
92 |
} |
|
93 |
} else if ("CANCEL".equals(e.getActionCommand())) { |
|
94 |
try { |
|
95 |
ApplicationLocator.getManager().getUIManager().closeWindow(this); |
|
96 |
} catch (Exception ex) { |
|
97 |
// this only happens when running this as stand-alone app |
|
98 |
// from main method; |
|
99 |
logger.warn("While closing window.", ex); |
|
100 |
} |
|
101 |
} |
|
102 |
} |
|
103 |
|
|
104 |
|
|
105 |
|
|
106 |
private LabelClassProperties getPropertiesPanel() { |
|
107 |
if(this.labelClassEditorPanel == null){ |
|
108 |
this.labelClassEditorPanel = new LabelClassProperties(fstore); |
|
109 |
this.labelClassEditorPanel.setAcceptCancelVisible(false); |
|
110 |
} |
|
111 |
return this.labelClassEditorPanel; |
|
112 |
} |
|
113 |
|
|
114 |
private LabelClassScalePanel getScaledPanel() { |
|
115 |
if(this.labelClassScalePanel == null){ |
|
116 |
this.labelClassScalePanel = new LabelClassScalePanel(); |
|
117 |
} |
|
118 |
return this.labelClassScalePanel; |
|
119 |
} |
|
120 |
|
|
121 |
public JComponent asJComponent() { |
|
122 |
return this; |
|
123 |
} |
|
124 |
|
|
125 |
public ILabelClass getLabelClass() { |
|
126 |
labelClassEditorPanel.doAccept(); |
|
127 |
complexLabelClass = (DefaultComplexLabelClass) labelClassEditorPanel.getLabelClass(); |
|
128 |
|
|
129 |
complexLabelClass.setMaxScale(labelClassScalePanel.getMaxScale()); |
|
130 |
complexLabelClass.setMinScale(labelClassScalePanel.getMinScale()); |
|
131 |
return complexLabelClass; |
|
132 |
} |
|
133 |
|
|
134 |
public void setLabelClass(ILabelClass labelClass) { |
|
135 |
this.complexLabelClass = (DefaultComplexLabelClass) labelClass; |
|
136 |
labelClassEditorPanel.setLabelClass(complexLabelClass); |
|
137 |
labelClassScalePanel.setMaxScale(complexLabelClass.getMaxScale()); |
|
138 |
labelClassScalePanel.setMinScale(complexLabelClass.getMinScale()); |
|
139 |
} |
|
140 |
|
|
141 |
public void showDialog() { |
|
142 |
ApplicationLocator.getManager().getUIManager().addWindow(this); |
|
143 |
} |
|
144 |
|
|
145 |
public boolean isAccepted() { |
|
146 |
return getPropertiesPanel().isAccepted() && getScaledPanel().isAccepted(); |
|
147 |
} |
|
148 |
|
|
149 |
public WindowInfo getWindowInfo() { |
|
150 |
WindowInfo wi = new WindowInfo(WindowInfo.MODALDIALOG |
|
151 |
| WindowInfo.RESIZABLE); |
|
152 |
wi.setTitle(i18nManager.getTranslation("complex_label_class_properties")); |
|
153 |
wi.setWidth(getPreferredSize().width + 8); |
|
154 |
wi.setHeight(getPreferredSize().height); |
|
155 |
return wi; |
|
156 |
} |
|
157 |
|
|
158 |
public Object getWindowProfile() { |
|
159 |
return WindowInfo.DIALOG_PROFILE; |
|
160 |
} |
|
161 |
|
|
162 |
} |
|
0 | 163 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.app/org.gvsig.complexlegend.app.mainplugin/src/main/resources-plugin/i18n/text.properties | ||
---|---|---|
1 |
#Translations for language [es] |
|
2 |
#Tue May 12 10:57:39 CEST 2009 |
|
3 |
panel_error_title=Error en el panel |
|
4 |
panel_error=Error en la creaci\u00f3n del panel |
|
5 |
min_max_error_title=Valores de escala por definir |
|
6 |
min_max_error=Se debe definir correctamente la escala m\u00ednima y m\u00e1xima |
|
7 |
min_greather_than_max_error_title=Datos inv\u00e1lidos |
|
8 |
min_greather_than_max_error=Escala m\u00ednima no puede ser mayor que escala m\u00e1xima |
|
9 |
overlaping_error_title=Rango superpuesto |
|
10 |
overlaping_error=El rango definido se superpone con otro ya existente |
|
11 |
MinScale=Escala m\u00ednima |
|
12 |
MaxScale=Escala m\u00e1xima |
|
13 |
LegendType=Tipo de leyenda |
|
14 |
accept=Aceptar |
|
15 |
cancel=Cancelar |
|
16 |
SelectItem=Define un rango |
|
17 |
legend_by_scale=Permite la edici\u00f3n de distintas leyendas en funci\u00f3n de la escala |
|
18 |
complex_symbology=S\u00edmbolo complejo |
|
19 |
select_scale=Rangos definidos |
|
20 |
legend_definition=Definici\u00f3n de la leyenda |
|
21 |
without_min_scale=Sin rango inferior |
|
22 |
without_max_scale=Sin rango superior |
|
23 |
|
|
24 |
complex_label_class_properties=Definici\u00f3n de la etiqueta |
|
25 |
Label_definition=Definici\u00f3n de la etiqueta |
|
26 |
Label_scale_definition=Definici\u00f3n de la escala |
|
27 |
|
|
28 |
_Allow_overlap_drawing_legends=Permitir solape en pintado de leyendas |
|
0 | 29 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.app/org.gvsig.complexlegend.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties | ||
---|---|---|
1 |
#Translations for language [en] |
|
2 |
#Tue May 12 10:57:38 CEST 2009 |
|
3 |
panel_error_title=Panel error |
|
4 |
panel_error=Error creating the panel |
|
5 |
min_max_error_title=Scale values not defined |
|
6 |
min_max_error=Scales are not defined correctly |
|
7 |
min_greather_than_max_error_title=Invalid data |
|
8 |
min_greather_than_max_error=Min scale can't be greater than max scale |
|
9 |
overlaping_error_title=Overlap range |
|
10 |
overlaping_error=This range overlaps another one defined |
|
11 |
MinScale=Min scale |
|
12 |
MaxScale=Max scale |
|
13 |
LegendType=Legend type |
|
14 |
accept=Accept |
|
15 |
cancel=Cancel |
|
16 |
SelectItem=Define a range |
|
17 |
legend_by_scale=Allow edit different legends by scale |
|
18 |
complex_symbology=Complex symbology |
|
19 |
select_scale=Defined ranges |
|
20 |
legend_definition=Legend definition |
|
21 |
without_min_scale=Without min scale |
|
22 |
without_max_scale=Without max scale |
|
23 |
|
|
24 |
complex_label_class_properties=Label definition |
|
25 |
Label_definition=Label definition |
|
26 |
Label_scale_definition=Scale definition |
|
27 |
|
|
28 |
_Allow_overlap_drawing_legends=Allow overlap drawing legends |
|
0 | 29 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.app/org.gvsig.complexlegend.app.mainplugin/src/main/resources-plugin/config.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<plugin-config> |
|
3 |
<libraries library-dir="lib"> |
|
4 |
</libraries> |
|
5 |
<depends plugin-name="org.gvsig.app.mainplugin"/> |
|
6 |
<depends plugin-name="org.gvsig.labeling.app.mainplugin"/> |
|
7 |
<resourceBundle name="text"/> |
|
8 |
<extensions> |
|
9 |
<extension class-name="org.gvsig.complexlegend.app.mainplugin.ComplexLegendExtension" |
|
10 |
description="Complex legend extension" |
|
11 |
active="true"> |
|
12 |
</extension> |
|
13 |
</extensions> |
|
14 |
</plugin-config> |
|
0 | 15 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.app/org.gvsig.complexlegend.app.mainplugin/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
4 |
|
|
5 |
<modelVersion>4.0.0</modelVersion> |
|
6 |
<artifactId>org.gvsig.complexlegend.app.mainplugin</artifactId> |
|
7 |
<packaging>jar</packaging> |
|
8 |
<name>${project.artifactId}</name> |
|
9 |
<description> |
|
10 |
</description> |
|
11 |
<parent> |
|
12 |
<groupId>org.gvsig</groupId> |
|
13 |
<artifactId>org.gvsig.complexlegend.app</artifactId> |
|
14 |
<version>1.0.122</version> |
|
15 |
</parent> |
|
16 |
|
|
17 |
<dependencies> |
|
18 |
<dependency> |
|
19 |
<groupId>org.gvsig</groupId> |
|
20 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
21 |
<scope>compile</scope> |
|
22 |
</dependency> |
|
23 |
<dependency> |
|
24 |
<groupId>org.gvsig</groupId> |
|
25 |
<artifactId>org.gvsig.andami</artifactId> |
|
26 |
<scope>compile</scope> |
|
27 |
</dependency> |
|
28 |
<dependency> |
|
29 |
<groupId>org.gvsig</groupId> |
|
30 |
<artifactId>org.gvsig.app.mainplugin</artifactId> |
|
31 |
<scope>compile</scope> |
|
32 |
</dependency> |
|
33 |
<dependency> |
|
34 |
<groupId>org.gvsig</groupId> |
|
35 |
<artifactId>org.gvsig.fmap.control</artifactId> |
|
36 |
<scope>compile</scope> |
|
37 |
</dependency> |
|
38 |
<dependency> |
|
39 |
<groupId>org.gvsig</groupId> |
|
40 |
<artifactId>org.gvsig.fmap.mapcontext.api</artifactId> |
|
41 |
<scope>compile</scope> |
|
42 |
</dependency> |
|
43 |
<dependency> |
|
44 |
<groupId>org.gvsig</groupId> |
|
45 |
<artifactId>org.gvsig.fmap.geometry.api</artifactId> |
|
46 |
<scope>compile</scope> |
|
47 |
</dependency> |
|
48 |
<dependency> |
|
49 |
<groupId>org.gvsig</groupId> |
|
50 |
<artifactId>org.gvsig.fmap.dal.api</artifactId> |
|
51 |
<scope>compile</scope> |
|
52 |
</dependency> |
|
53 |
<dependency> |
|
54 |
<groupId>org.gvsig</groupId> |
|
55 |
<artifactId>org.gvsig.symbology.lib.api</artifactId> |
|
56 |
<scope>compile</scope> |
|
57 |
</dependency> |
|
58 |
<dependency> |
|
59 |
<groupId>org.gvsig</groupId> |
|
60 |
<artifactId>org.gvsig.complexlegend.lib.api</artifactId> |
|
61 |
<scope>compile</scope> |
|
62 |
</dependency> |
|
63 |
<dependency> |
|
64 |
<groupId>org.gvsig</groupId> |
|
65 |
<artifactId>org.gvsig.complexlegend.lib.impl</artifactId> |
|
66 |
</dependency> |
|
67 |
<dependency> |
|
68 |
<groupId>org.gvsig</groupId> |
|
69 |
<artifactId>org.gvsig.complexlegend.swing.api</artifactId> |
|
70 |
<scope>compile</scope> |
|
71 |
</dependency> |
|
72 |
<dependency> |
|
73 |
<groupId>org.gvsig</groupId> |
|
74 |
<artifactId>org.gvsig.complexlegend.swing.impl</artifactId> |
|
75 |
</dependency> |
|
76 |
<dependency> |
|
77 |
<groupId>org.gvsig</groupId> |
|
78 |
<artifactId>org.gvsig.labeling.app.mainplugin</artifactId> |
|
79 |
<version>2.0.55</version> |
|
80 |
<scope>compile</scope> |
|
81 |
</dependency> |
|
82 |
</dependencies> |
|
83 |
|
|
84 |
<properties> |
|
85 |
<!-- Package info property values --> |
|
86 |
<!-- Default values in org.gvsig.desktop --> |
|
87 |
<gvsig.package.info.name>Vector legend: Complex legend</gvsig.package.info.name> |
|
88 |
<gvsig.package.info.state>testing</gvsig.package.info.state> |
|
89 |
<gvsig.package.info.official>true</gvsig.package.info.official> |
|
90 |
<gvsig.package.info.dependencies>required: org.gvsig.app.mainplugin -ge 2.1.0-A</gvsig.package.info.dependencies> |
|
91 |
<gvsig.package.info.categories>Formats,Vector,Symbology</gvsig.package.info.categories> |
|
92 |
<gvsig.package.info.poolURL>https://devel.gvsig.org/download/projects/gvsig-base-legends/pool/</gvsig.package.info.poolURL> |
|
93 |
<gvsig.package.info.operatingSystem>all</gvsig.package.info.operatingSystem> |
|
94 |
<gvsig.package.info.architecture>all</gvsig.package.info.architecture> |
|
95 |
<gvsig.install.plugin>true</gvsig.install.plugin> |
|
96 |
<gvsig.install.plugin.package>true</gvsig.install.plugin.package> |
|
97 |
</properties> |
|
98 |
|
|
99 |
|
|
100 |
|
|
101 |
|
|
102 |
<build> |
|
103 |
<plugins> |
|
104 |
|
|
105 |
<plugin> |
|
106 |
<!-- Skip compilation tests --> |
|
107 |
<groupId>org.apache.maven.plugins</groupId> |
|
108 |
<artifactId>maven-compiler-plugin</artifactId> |
|
109 |
<executions> |
|
110 |
<execution> |
|
111 |
<id>default-testCompile</id> |
|
112 |
<phase>process-test-sources</phase> |
|
113 |
<goals> |
|
114 |
<goal>testCompile</goal> |
|
115 |
</goals> |
|
116 |
<configuration> |
|
117 |
<skip>true</skip> |
|
118 |
</configuration> |
|
119 |
</execution> |
|
120 |
</executions> |
|
121 |
</plugin> |
|
122 |
|
|
123 |
<plugin> |
|
124 |
<!-- Skip test execution --> |
|
125 |
<groupId>org.apache.maven.plugins</groupId> |
|
126 |
<artifactId>maven-surefire-plugin</artifactId> |
|
127 |
<configuration> |
|
128 |
<skipTests>true</skipTests> |
|
129 |
</configuration> |
|
130 |
</plugin> |
|
131 |
|
|
132 |
</plugins> |
|
133 |
</build> |
|
134 |
|
|
135 |
</project> |
|
136 |
|
|
0 | 137 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/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" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
3 |
<modelVersion>4.0.0</modelVersion> |
|
4 |
<artifactId>org.gvsig.complexlegend</artifactId> |
|
5 |
<packaging>pom</packaging> |
|
6 |
<version>1.0.122</version> |
|
7 |
<name>org.gvsig.complexlegend</name> |
|
8 |
<description>complex legend extension</description> |
|
9 |
<parent> |
|
10 |
<groupId>org.gvsig</groupId> |
|
11 |
<artifactId>org.gvsig.desktop</artifactId> |
|
12 |
<version>2.0.303</version> |
|
13 |
</parent> |
|
14 |
<url>http://devel.gvsig.org/sites/org.gvsig.complexlegend/${project.version}</url> |
|
15 |
<scm> |
|
16 |
<connection>scm:svn:http://devel.gvsig.org/svn/gvsig-base-legends/org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122</connection> |
|
17 |
<developerConnection>scm:svn:http://devel.gvsig.org/svn/gvsig-base-legends/org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122</developerConnection> |
|
18 |
<url>http://devel.gvsig.org/svn/gvsig-base-legends/org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122</url> |
|
19 |
</scm> |
|
20 |
<developers> |
|
21 |
<developer> |
|
22 |
<id>jjdelcerro</id> |
|
23 |
<name>Joaquin Jose del Cerro</name> |
|
24 |
<email>jjdelcerro@gvsig.org</email> |
|
25 |
<roles> |
|
26 |
<role>Architect</role> |
|
27 |
<role>Developer</role> |
|
28 |
</roles> |
|
29 |
</developer> |
|
30 |
<developer> |
|
31 |
<id>jbadia</id> |
|
32 |
<name>Jose Badia</name> |
|
33 |
<email>badia_jos@gva.es</email> |
|
34 |
<roles> |
|
35 |
<role>Developer</role> |
|
36 |
</roles> |
|
37 |
</developer> |
|
38 |
</developers> |
|
39 |
<distributionManagement> |
|
40 |
<site> |
|
41 |
<id>gvsig-repository</id> |
|
42 |
<url>dav:https://devel.gvsig.org/sites/org.gvsig.complexlegend/${project.version}</url> |
|
43 |
</site> |
|
44 |
</distributionManagement> |
|
45 |
<repositories> |
|
46 |
<repository> |
|
47 |
<id>gvsig-public-http-repository</id> |
|
48 |
<name>gvSIG maven public HTTP repository</name> |
|
49 |
<url>http://devel.gvsig.org/m2repo/j2se</url> |
|
50 |
<releases> |
|
51 |
<enabled>true</enabled> |
|
52 |
<updatePolicy>daily</updatePolicy> |
|
53 |
<checksumPolicy>warn</checksumPolicy> |
|
54 |
</releases> |
|
55 |
<snapshots> |
|
56 |
<enabled>true</enabled> |
|
57 |
<updatePolicy>daily</updatePolicy> |
|
58 |
<checksumPolicy>warn</checksumPolicy> |
|
59 |
</snapshots> |
|
60 |
</repository> |
|
61 |
</repositories> |
|
62 |
<build> |
|
63 |
<plugins> |
|
64 |
<plugin> |
|
65 |
<groupId>org.apache.maven.plugins</groupId> |
|
66 |
<artifactId>maven-release-plugin</artifactId> |
|
67 |
<configuration> |
|
68 |
<tagBase>http://devel.gvsig.org/svn/gvsig-base-legends/org.gvsig.complexlegend/tags</tagBase> |
|
69 |
</configuration> |
|
70 |
</plugin> |
|
71 |
</plugins> |
|
72 |
</build> |
|
73 |
<dependencyManagement> |
|
74 |
<dependencies> |
|
75 |
<dependency> |
|
76 |
<groupId>org.gvsig</groupId> |
|
77 |
<artifactId>org.gvsig.complexlegend.lib.api</artifactId> |
|
78 |
<version>1.0.122</version> |
|
79 |
</dependency> |
|
80 |
<dependency> |
|
81 |
<groupId>org.gvsig</groupId> |
|
82 |
<artifactId>org.gvsig.complexlegend.lib.api</artifactId> |
|
83 |
<version>1.0.122</version> |
|
84 |
<type>test-jar</type> |
|
85 |
</dependency> |
|
86 |
<dependency> |
|
87 |
<groupId>org.gvsig</groupId> |
|
88 |
<artifactId>org.gvsig.complexlegend.lib.impl</artifactId> |
|
89 |
<version>1.0.122</version> |
|
90 |
</dependency> |
|
91 |
<dependency> |
|
92 |
<groupId>org.gvsig</groupId> |
|
93 |
<artifactId>org.gvsig.complexlegend.swing.api</artifactId> |
|
94 |
<version>1.0.122</version> |
|
95 |
</dependency> |
|
96 |
<dependency> |
|
97 |
<groupId>org.gvsig</groupId> |
|
98 |
<artifactId>org.gvsig.complexlegend.swing.api</artifactId> |
|
99 |
<version>1.0.122</version> |
|
100 |
<type>test-jar</type> |
|
101 |
</dependency> |
|
102 |
<dependency> |
|
103 |
<groupId>org.gvsig</groupId> |
|
104 |
<artifactId>org.gvsig.complexlegend.swing.impl</artifactId> |
|
105 |
<version>1.0.122</version> |
|
106 |
</dependency> |
|
107 |
</dependencies> |
|
108 |
</dependencyManagement> |
|
109 |
<modules> |
|
110 |
<module>org.gvsig.complexlegend.lib</module> |
|
111 |
<module>org.gvsig.complexlegend.swing</module> |
|
112 |
<!-- |
|
113 |
<module>org.gvsig.complexlegend.main</module> |
|
114 |
--> |
|
115 |
<module>org.gvsig.complexlegend.app</module> |
|
116 |
</modules> |
|
117 |
</project> |
|
0 | 118 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.main/src/main/java/org/gvsig/complexlegend/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.complexlegend.main; |
|
23 |
|
|
24 |
import java.awt.BorderLayout; |
|
25 |
import java.awt.Dimension; |
|
26 |
|
|
27 |
import javax.swing.JFrame; |
|
28 |
import javax.swing.JPanel; |
|
29 |
import javax.swing.UIManager; |
|
30 |
import javax.swing.UnsupportedLookAndFeelException; |
|
31 |
import javax.swing.WindowConstants; |
|
32 |
|
|
33 |
import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException; |
|
34 |
import org.gvsig.fmap.mapcontrol.MapControlCreationException; |
|
35 |
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer; |
|
36 |
import org.gvsig.tools.locator.LocatorException; |
|
37 |
import org.slf4j.Logger; |
|
38 |
import org.slf4j.LoggerFactory; |
|
39 |
|
|
40 |
import com.jgoodies.looks.plastic.PlasticLookAndFeel; |
|
41 |
import com.jgoodies.looks.plastic.PlasticXPLookAndFeel; |
|
42 |
|
|
43 |
/** |
|
44 |
* Main executable class for testing the Chart library. |
|
45 |
* |
|
46 |
* @author gvSIG Team |
|
47 |
* @version $Id$ |
|
48 |
*/ |
|
49 |
public class Main { |
|
50 |
|
|
51 |
private static final Logger LOG = LoggerFactory.getLogger(Main.class); |
|
52 |
|
|
53 |
public static void main(String args[]) throws MapControlCreationException, |
|
54 |
LocatorException, LoadLayerException, UnsupportedLookAndFeelException { |
|
55 |
new DefaultLibrariesInitializer().fullInitialize(); |
|
56 |
|
|
57 |
PlasticLookAndFeel laf = new PlasticXPLookAndFeel(); |
|
58 |
UIManager.setLookAndFeel(laf); |
|
59 |
|
|
60 |
Main main = new Main(); |
|
61 |
main.show(); |
|
62 |
} |
|
63 |
|
|
64 |
|
|
65 |
@SuppressWarnings("serial") |
|
66 |
public void show() throws MapControlCreationException, LocatorException, LoadLayerException { |
|
67 |
JFrame frame = new JFrame("Example APP"); |
|
68 |
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); |
|
69 |
|
|
70 |
JPanel content = new JPanel(); |
|
71 |
content.setLayout(new BorderLayout()); |
|
72 |
|
|
73 |
frame.add(content); |
|
74 |
frame.setPreferredSize(new Dimension(510, 560)); |
|
75 |
|
|
76 |
// Display the window. |
|
77 |
frame.pack(); |
|
78 |
frame.setVisible(true); |
|
79 |
} |
|
80 |
|
|
81 |
} |
|
0 | 82 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.main/src/main/java/org/gvsig/complexlegend/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.construc package documentation</title> |
|
7 |
</head> |
|
8 |
<body> |
|
9 |
|
|
10 |
<p>Construc library testing and demo application.</p> |
|
11 |
|
|
12 |
</body> |
|
13 |
</html> |
|
0 | 14 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.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 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.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.construc"> |
|
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 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.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" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
3 |
<modelVersion>4.0.0</modelVersion> |
|
4 |
<artifactId>org.gvsig.complexlegend.main</artifactId> |
|
5 |
<packaging>jar</packaging> |
|
6 |
<name>org.gvsig.complexlegend.main</name> |
|
7 |
<parent> |
|
8 |
<groupId>org.gvsig</groupId> |
|
9 |
<artifactId>org.gvsig.complexlegend</artifactId> |
|
10 |
<version>1.0.14-SNAPSHOT</version> |
|
11 |
</parent> |
|
12 |
|
|
13 |
|
|
14 |
<dependencies> |
|
15 |
<dependency> |
|
16 |
<groupId>org.gvsig</groupId> |
|
17 |
<artifactId>org.gvsig.complexlegend.lib.api</artifactId> |
|
18 |
<scope>compile</scope> |
|
19 |
</dependency> |
|
20 |
<dependency> |
|
21 |
<groupId>org.gvsig</groupId> |
|
22 |
<artifactId>org.gvsig.complexlegend.lib.impl</artifactId> |
|
23 |
<scope>runtime</scope> |
|
24 |
</dependency> |
|
25 |
<dependency> |
|
26 |
<groupId>org.gvsig</groupId> |
|
27 |
<artifactId>org.gvsig.complexlegend.swing.api</artifactId> |
|
28 |
<scope>compile</scope> |
|
29 |
</dependency> |
|
30 |
<dependency> |
|
31 |
<groupId>org.gvsig</groupId> |
|
32 |
<artifactId>org.gvsig.complexlegend.swing.impl</artifactId> |
|
33 |
<scope>runtime</scope> |
|
34 |
</dependency> |
|
35 |
<dependency> |
|
36 |
<groupId>org.gvsig</groupId> |
|
37 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
38 |
<scope>compile</scope> |
|
39 |
</dependency> |
|
40 |
<dependency> |
|
41 |
<groupId>org.gvsig</groupId> |
|
42 |
<artifactId>org.gvsig.tools.dynform.api</artifactId> |
|
43 |
<scope>compile</scope> |
|
44 |
</dependency> |
|
45 |
<dependency> |
|
46 |
<groupId>org.gvsig</groupId> |
|
47 |
<artifactId>org.gvsig.tools.dynform.impl</artifactId> |
|
48 |
<scope>runtime</scope> |
|
49 |
</dependency> |
|
50 |
|
|
51 |
<dependency> |
|
52 |
<groupId>org.gvsig</groupId> |
|
53 |
<artifactId>org.gvsig.metadata.lib.basic.api</artifactId> |
|
54 |
<scope>compile</scope> |
|
55 |
</dependency> |
|
56 |
<dependency> |
|
57 |
<groupId>org.gvsig</groupId> |
|
58 |
<artifactId>org.gvsig.tools.swing.api</artifactId> |
|
59 |
<type>jar</type> |
|
60 |
<scope>compile</scope> |
|
61 |
</dependency> |
|
62 |
<dependency> |
|
63 |
<groupId>org.gvsig</groupId> |
|
64 |
<artifactId>org.gvsig.fmap.control</artifactId> |
|
65 |
<scope>compile</scope> |
|
66 |
</dependency> |
|
67 |
<dependency> |
|
68 |
<groupId>org.gvsig</groupId> |
|
69 |
<artifactId>org.gvsig.fmap.dal.api</artifactId> |
|
70 |
<scope>compile</scope> |
|
71 |
</dependency> |
|
72 |
<dependency> |
|
73 |
<groupId>org.gvsig</groupId> |
|
74 |
<artifactId>org.gvsig.fmap.dal.spi</artifactId> |
|
75 |
<scope>compile</scope> |
|
76 |
</dependency> |
|
77 |
<dependency> |
|
78 |
<groupId>org.gvsig</groupId> |
|
79 |
<artifactId>org.gvsig.fmap.geometry.api</artifactId> |
|
80 |
<scope>compile</scope> |
|
81 |
</dependency> |
|
82 |
<dependency> |
|
83 |
<groupId>org.gvsig</groupId> |
|
84 |
<artifactId>org.gvsig.fmap.mapcontext.api</artifactId> |
|
85 |
<scope>compile</scope> |
|
86 |
</dependency> |
|
87 |
|
|
88 |
|
|
89 |
<dependency> |
|
90 |
<groupId>org.gvsig</groupId> |
|
91 |
<artifactId>org.gvsig.metadata.lib.basic.impl</artifactId> |
|
92 |
<scope>runtime</scope> |
|
93 |
</dependency> |
|
94 |
<dependency> |
|
95 |
<groupId>org.gvsig</groupId> |
|
96 |
<artifactId>org.gvsig.fmap.geometry.operation.jts</artifactId> |
|
97 |
<scope>runtime</scope> |
|
98 |
</dependency> |
|
99 |
<dependency> |
|
100 |
<groupId>org.gvsig</groupId> |
|
101 |
<artifactId>org.gvsig.fmap.mapcontext.impl</artifactId> |
|
102 |
<scope>runtime</scope> |
|
103 |
</dependency> |
|
104 |
<dependency> |
|
105 |
<groupId>org.gvsig</groupId> |
|
106 |
<artifactId>org.gvsig.symbology.lib.impl</artifactId> |
|
107 |
<scope>runtime</scope> |
|
108 |
</dependency> |
|
109 |
<dependency> |
|
110 |
<groupId>org.gvsig</groupId> |
|
111 |
<artifactId>org.gvsig.fmap.dal.impl</artifactId> |
|
112 |
<scope>runtime</scope> |
|
113 |
</dependency> |
|
114 |
<dependency> |
|
115 |
<groupId>org.gvsig</groupId> |
|
116 |
<artifactId>org.gvsig.fmap.dal.spi</artifactId> |
|
117 |
<scope>runtime</scope> |
|
118 |
</dependency> |
|
119 |
<dependency> |
|
120 |
<groupId>org.gvsig</groupId> |
|
121 |
<artifactId>org.gvsig.fmap.dal.file.shp</artifactId> |
|
122 |
<scope>runtime</scope> |
|
123 |
</dependency> |
|
124 |
<dependency> |
|
125 |
<groupId>org.gvsig</groupId> |
|
126 |
<artifactId>org.gvsig.fmap.dal.file.dbf</artifactId> |
|
127 |
<scope>runtime</scope> |
|
128 |
</dependency> |
|
129 |
<dependency> |
|
130 |
<groupId>org.gvsig</groupId> |
|
131 |
<artifactId>org.gvsig.fmap.dal.file.lib</artifactId> |
|
132 |
<scope>runtime</scope> |
|
133 |
</dependency> |
|
134 |
<dependency> |
|
135 |
<groupId>org.gvsig</groupId> |
|
136 |
<artifactId>org.gvsig.timesupport.lib.api</artifactId> |
|
137 |
<scope>runtime</scope> |
|
138 |
</dependency> |
|
139 |
<dependency> |
|
140 |
<groupId>org.gvsig</groupId> |
|
141 |
<artifactId>org.gvsig.timesupport.lib.impl</artifactId> |
|
142 |
<scope>runtime</scope> |
|
143 |
</dependency> |
|
144 |
<dependency> |
|
145 |
<groupId>org.gvsig</groupId> |
|
146 |
<artifactId>org.gvsig.tools.evaluator.sqljep</artifactId> |
|
147 |
<scope>runtime</scope> |
|
148 |
</dependency> |
|
149 |
<dependency> |
|
150 |
<groupId>org.gvsig</groupId> |
|
151 |
<artifactId>org.gvsig.proj.lib.proj4j</artifactId> |
|
152 |
<scope>runtime</scope> |
|
153 |
</dependency> |
|
154 |
</dependencies> |
|
155 |
</project> |
|
0 | 156 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.lib/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" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
3 |
|
|
4 |
<modelVersion>4.0.0</modelVersion> |
|
5 |
<artifactId>org.gvsig.complexlegend.lib</artifactId> |
|
6 |
<packaging>pom</packaging> |
|
7 |
<name>org.gvsig.complexlegend.lib</name> |
|
8 |
<parent> |
|
9 |
<groupId>org.gvsig</groupId> |
|
10 |
<artifactId>org.gvsig.complexlegend</artifactId> |
|
11 |
<version>1.0.122</version> |
|
12 |
</parent> |
|
13 |
<dependencies> |
|
14 |
</dependencies> |
|
15 |
<modules> |
|
16 |
<module>org.gvsig.complexlegend.lib.api</module> |
|
17 |
<module>org.gvsig.complexlegend.lib.impl</module> |
|
18 |
</modules> |
|
19 |
</project> |
|
0 | 20 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.lib/org.gvsig.complexlegend.lib.impl/src/test/resources/README.txt | ||
---|---|---|
1 |
Put into this folder the resources needed by your test classes. |
|
2 |
|
|
3 |
This folder is added to the Tests 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 tests classes. |
|
0 | 9 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.lib/org.gvsig.complexlegend.lib.impl/src/test/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.chart"> |
|
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="DEBUG" /> |
|
35 |
<appender-ref ref="CONSOLE" /> |
|
36 |
</root> |
|
37 |
</log4j:configuration> |
|
0 | 38 |
org.gvsig.complexlegend/tags/org.gvsig.complexlegend-1.0.122/org.gvsig.complexlegend/org.gvsig.complexlegend.lib/org.gvsig.complexlegend.lib.impl/src/main/java/org/gvsig/complexlegend/impl/DefaultVectorComplexLegend.java | ||
---|---|---|
1 |
package org.gvsig.complexlegend.impl; |
|
2 |
|
|
3 |
import java.awt.Graphics2D; |
|
4 |
import java.awt.geom.AffineTransform; |
|
5 |
import java.awt.image.BufferedImage; |
|
6 |
import java.util.ArrayList; |
|
7 |
import java.util.Collections; |
|
8 |
import java.util.Comparator; |
|
9 |
import java.util.Iterator; |
|
10 |
import java.util.List; |
|
11 |
import java.util.Map; |
|
12 |
|
|
13 |
import org.cresques.cts.ICoordTrans; |
|
14 |
import org.gvsig.compat.print.PrintAttributes; |
|
15 |
import org.gvsig.complexlegend.ComplexLegendItem; |
|
16 |
import org.gvsig.complexlegend.VectorComplexLegend; |
|
17 |
import org.gvsig.fmap.dal.exception.DataException; |
|
18 |
import org.gvsig.fmap.dal.feature.Feature; |
|
19 |
import org.gvsig.fmap.dal.feature.FeatureQuery; |
|
20 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
21 |
import org.gvsig.fmap.geom.Geometry; |
|
22 |
import org.gvsig.fmap.mapcontext.MapContextException; |
|
23 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
|
24 |
import org.gvsig.fmap.mapcontext.MapContextManager; |
|
25 |
import org.gvsig.fmap.mapcontext.ViewPort; |
|
26 |
import org.gvsig.fmap.mapcontext.layers.operations.IHasImageLegend; |
|
27 |
import org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedLegend; |
|
28 |
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend; |
|
29 |
import org.gvsig.fmap.mapcontext.rendering.legend.LegendException; |
|
30 |
import org.gvsig.fmap.mapcontext.rendering.legend.events.LegendClearEvent; |
|
31 |
import org.gvsig.fmap.mapcontext.rendering.legend.events.LegendContentsChangedListener; |
|
32 |
import org.gvsig.fmap.mapcontext.rendering.legend.events.SymbolLegendEvent; |
|
33 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
|
34 |
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolManager; |
Also available in: Unified diff