Revision 22254
trunk/extensions/extSymbology/src/org/gvsig/symbology/gui/layerproperties/FeatureDependent.java | ||
---|---|---|
72 | 72 |
import com.iver.andami.PluginServices; |
73 | 73 |
import com.iver.cit.gvsig.fmap.layers.SelectableDataSource; |
74 | 74 |
import com.iver.cit.gvsig.fmap.rendering.styling.labeling.ILabelingMethod; |
75 |
import com.iver.cit.gvsig.fmap.rendering.styling.labeling.IPlacementConstraints; |
|
76 | 75 |
import com.iver.cit.gvsig.fmap.rendering.styling.labeling.LabelClass; |
77 | 76 |
|
78 | 77 |
public class FeatureDependent extends AbstractLabelingMethodPanel implements ActionListener{ |
trunk/extensions/extSymbology/src/org/gvsig/symbology/gui/styling/LayerPreview.java | ||
---|---|---|
18 | 18 |
*/ |
19 | 19 |
package org.gvsig.symbology.gui.styling; |
20 | 20 |
|
21 |
import java.awt.Color; |
|
22 | 21 |
import java.awt.Dimension; |
23 |
import java.awt.Graphics; |
|
24 | 22 |
import java.awt.Graphics2D; |
25 | 23 |
import java.awt.geom.Rectangle2D; |
26 | 24 |
import java.awt.image.BufferedImage; |
... | ... | |
40 | 38 |
import com.iver.cit.gvsig.fmap.core.ILabelable; |
41 | 39 |
import com.iver.cit.gvsig.fmap.crs.CRSFactory; |
42 | 40 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
43 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
|
44 | 41 |
import com.iver.cit.gvsig.fmap.layers.LayerFactory; |
45 | 42 |
import com.iver.cit.gvsig.fmap.operations.Cancel; |
46 | 43 |
|
trunk/extensions/extSymbology/src/org/gvsig/symbology/gui/styling/PieChart3D.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
package org.gvsig.symbology.gui.styling; |
|
42 |
|
|
43 |
import java.awt.event.ActionEvent; |
|
44 |
import java.awt.event.ActionListener; |
|
45 |
import java.util.ArrayList; |
|
46 |
|
|
47 |
import javax.swing.BorderFactory; |
|
48 |
import javax.swing.JCheckBox; |
|
49 |
import javax.swing.JPanel; |
|
50 |
|
|
51 |
import org.gvsig.gui.beans.swing.GridBagLayoutPanel; |
|
52 |
import org.gvsig.gui.beans.swing.JIncrementalNumberField; |
|
53 |
import org.gvsig.symbology.fmap.symbols.PieChart3DSymbol; |
|
54 |
|
|
55 |
import com.iver.andami.PluginServices; |
|
56 |
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol; |
|
57 |
import com.iver.cit.gvsig.gui.styling.AbstractTypeSymbolEditor; |
|
58 |
import com.iver.cit.gvsig.gui.styling.EditorTool; |
|
59 |
import com.iver.cit.gvsig.gui.styling.SymbolEditor; |
|
60 |
|
|
61 |
public class PieChart3D extends AbstractTypeSymbolEditor implements ActionListener { |
|
62 |
private static String[] sampleKeys = new String[] { "", " ", " " }; |
|
63 |
private static double[] sampleValues = new double[] { 23, 61, 16 }; |
|
64 |
private JCheckBox chkClockwise; |
|
65 |
private JCheckBox chkCircular; |
|
66 |
private JIncrementalNumberField incrSize; |
|
67 |
private JIncrementalNumberField incrMinAngle; |
|
68 |
private JIncrementalNumberField incrDepthFactor; |
|
69 |
private ArrayList<JPanel> tabs; |
|
70 |
|
|
71 |
public PieChart3D(SymbolEditor owner) { |
|
72 |
super(owner); |
|
73 |
initialize(); |
|
74 |
} |
|
75 |
|
|
76 |
private void initialize() { |
|
77 |
tabs = new ArrayList<JPanel>(); |
|
78 |
{ |
|
79 |
GridBagLayoutPanel p = new GridBagLayoutPanel(); |
|
80 |
p.setBorder(BorderFactory.createTitledBorder(PluginServices.getText(this, "pie_properties"))); |
|
81 |
p.addComponent( |
|
82 |
PluginServices.getText(this, "size"), |
|
83 |
incrSize = new JIncrementalNumberField( |
|
84 |
"25", |
|
85 |
7, |
|
86 |
0.001, |
|
87 |
Double.POSITIVE_INFINITY, |
|
88 |
1) |
|
89 |
); |
|
90 |
|
|
91 |
p.addComponent(chkClockwise = new JCheckBox(PluginServices.getText(this, "anticlockwise"))); |
|
92 |
p.addComponent(chkCircular = new JCheckBox(PluginServices.getText(this, "always_circular"))); |
|
93 |
p.addComponent( |
|
94 |
PluginServices.getText(this, "minimum_angle_to_draw"), |
|
95 |
incrMinAngle = new JIncrementalNumberField( |
|
96 |
"1", |
|
97 |
7, |
|
98 |
0.001, |
|
99 |
Double.POSITIVE_INFINITY, |
|
100 |
1) |
|
101 |
); |
|
102 |
p.addComponent( |
|
103 |
PluginServices.getText(this, "depth_factor"), |
|
104 |
incrDepthFactor = new JIncrementalNumberField( |
|
105 |
"0.3", |
|
106 |
7, |
|
107 |
0, |
|
108 |
1, |
|
109 |
0.1) |
|
110 |
); |
|
111 |
|
|
112 |
chkClockwise.addActionListener(this); |
|
113 |
chkCircular.addActionListener(this); |
|
114 |
incrSize.addActionListener(this); |
|
115 |
incrMinAngle.addActionListener(this); |
|
116 |
incrDepthFactor.addActionListener(this); |
|
117 |
|
|
118 |
tabs.add(p); |
|
119 |
} |
|
120 |
|
|
121 |
} |
|
122 |
|
|
123 |
@Override |
|
124 |
public EditorTool[] getEditorTools() { |
|
125 |
return null; |
|
126 |
} |
|
127 |
|
|
128 |
@Override |
|
129 |
public ISymbol getLayer() { |
|
130 |
PieChart3DSymbol layer = new PieChart3DSymbol(); |
|
131 |
layer.setClockwise(!chkClockwise.isSelected()); |
|
132 |
layer.setCircular(chkCircular.isSelected()); |
|
133 |
layer.setMinimumAngleToDraw(incrMinAngle.getDouble()); |
|
134 |
layer.setDepthFactor(incrDepthFactor.getDouble()); |
|
135 |
layer.setSize(incrSize.getDouble()); |
|
136 |
layer.setKeys(sampleKeys); |
|
137 |
layer.setMaxValue(100); |
|
138 |
layer.setValues(sampleValues); |
|
139 |
return layer; |
|
140 |
} |
|
141 |
|
|
142 |
@Override |
|
143 |
public String getName() { |
|
144 |
return PluginServices.getText(this, "piechart_3D"); |
|
145 |
} |
|
146 |
|
|
147 |
@Override |
|
148 |
public Class<? extends ISymbol> getSymbolClass() { |
|
149 |
return PieChart3DSymbol.class; |
|
150 |
} |
|
151 |
|
|
152 |
@Override |
|
153 |
public JPanel[] getTabs() { |
|
154 |
return tabs.toArray(new JPanel[0]); |
|
155 |
} |
|
156 |
|
|
157 |
@Override |
|
158 |
public void refreshControls(ISymbol layer) { |
|
159 |
if (layer == null) { |
|
160 |
layer = new PieChart3DSymbol(); |
|
161 |
} |
|
162 |
|
|
163 |
PieChart3DSymbol pie = (PieChart3DSymbol) layer; |
|
164 |
chkClockwise.setSelected(!pie.isClockwise()); |
|
165 |
chkCircular.setSelected(pie.isCircular()); |
|
166 |
incrMinAngle.setDouble(pie.getMinimumAngleToDraw()); |
|
167 |
incrDepthFactor.setDouble(pie.getDepthFactor()); |
|
168 |
incrSize.setDouble(pie.getSize()); |
|
169 |
} |
|
170 |
|
|
171 |
public void actionPerformed(ActionEvent e) { |
|
172 |
fireSymbolChangedEvent(); |
|
173 |
} |
|
174 |
} |
trunk/extensions/extSymbology/src/org/gvsig/symbology/ExtendedSymbologyExtension.java | ||
---|---|---|
42 | 42 |
|
43 | 43 |
import org.gvsig.symbology.fmap.labeling.GeneralLabelingStrategy; |
44 | 44 |
import org.gvsig.symbology.fmap.labeling.PlacementManager; |
45 |
import org.gvsig.symbology.fmap.labeling.lang.functions.IndexOf; |
|
46 | 45 |
import org.gvsig.symbology.fmap.labeling.lang.functions.IndexOfFunction; |
47 |
import org.gvsig.symbology.fmap.labeling.lang.functions.Substring; |
|
48 | 46 |
import org.gvsig.symbology.fmap.labeling.lang.functions.SubstringFunction; |
49 |
import org.gvsig.symbology.fmap.labeling.parse.LabelExpressionParser; |
|
50 | 47 |
import org.gvsig.symbology.fmap.labeling.placements.LinePlacementAtBest; |
51 | 48 |
import org.gvsig.symbology.fmap.labeling.placements.LinePlacementAtExtremities; |
52 | 49 |
import org.gvsig.symbology.fmap.labeling.placements.LinePlacementInTheMiddle; |
... | ... | |
72 | 69 |
import org.gvsig.symbology.gui.styling.PictureFill; |
73 | 70 |
import org.gvsig.symbology.gui.styling.PictureLine; |
74 | 71 |
import org.gvsig.symbology.gui.styling.PictureMarker; |
72 |
import org.gvsig.symbology.gui.styling.PieChart3D; |
|
75 | 73 |
import org.gvsig.symbology.gui.styling.editortools.LabelStyleNewTextFieldTool; |
76 | 74 |
import org.gvsig.symbology.gui.styling.editortools.LabelStyleOpenBackgroundFile; |
77 | 75 |
import org.gvsig.symbology.gui.styling.editortools.LabelStylePanTool; |
... | ... | |
132 | 130 |
SymbolEditor.addSymbolEditorPanel(PictureMarker.class, FShape.POINT); |
133 | 131 |
SymbolEditor.addSymbolEditorPanel(PictureLine.class, FShape.LINE); |
134 | 132 |
SymbolEditor.addSymbolEditorPanel(MarkerLine.class, FShape.LINE); |
133 |
SymbolEditor.addSymbolEditorPanel(PieChart3D.class, FShape.POINT); |
|
135 | 134 |
|
136 | 135 |
// legends available in the legend page |
137 | 136 |
LegendManager.addLegendPage(DotDensity.class); |
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/styles/PointLabelPositioneer.java | ||
---|---|---|
13 | 13 |
|
14 | 14 |
|
15 | 15 |
/** |
16 |
* Specifies the point positioner for a label
|
|
16 |
* Specifies the point position for a label |
|
17 | 17 |
* |
18 | 18 |
* |
19 | 19 |
*/ |
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/styles/SimpleLabelStyle.java | ||
---|---|---|
109 | 109 |
import java.awt.geom.Rectangle2D; |
110 | 110 |
import java.util.ArrayList; |
111 | 111 |
|
112 |
import javax.swing.JOptionPane; |
|
113 |
|
|
114 | 112 |
import com.iver.cit.gvsig.fmap.Messages; |
115 | 113 |
import com.iver.cit.gvsig.fmap.core.FPolygon2D; |
116 | 114 |
import com.iver.cit.gvsig.fmap.core.FShape; |
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/symbols/Abstract3DChartSymbol.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
package org.gvsig.symbology.fmap.symbols; |
|
42 |
|
|
43 |
import com.iver.cit.gvsig.fmap.core.symbols.AbstractMarkerSymbol; |
|
44 |
|
|
45 |
public abstract class Abstract3DChartSymbol extends AbstractMarkerSymbol implements I3DChartSymbol{ |
|
46 |
private double maxValue; |
|
47 |
private double thickness; |
|
48 |
private double tilt; |
|
49 |
private boolean display3D; |
|
50 |
|
|
51 |
public double getMaxValue() { |
|
52 |
return maxValue; |
|
53 |
} |
|
54 |
|
|
55 |
public double getThickness() { |
|
56 |
return thickness; |
|
57 |
} |
|
58 |
|
|
59 |
public double getTilt() { |
|
60 |
return tilt; |
|
61 |
} |
|
62 |
|
|
63 |
public boolean isDisplay3D() { |
|
64 |
return display3D; |
|
65 |
} |
|
66 |
|
|
67 |
public void setDisplay3D(boolean display3D) { |
|
68 |
this.display3D = display3D; |
|
69 |
} |
|
70 |
|
|
71 |
public void setMaxValue(double maxValue) { |
|
72 |
this.maxValue = maxValue; |
|
73 |
} |
|
74 |
|
|
75 |
public void setThickness(double thickness) { |
|
76 |
this.thickness = thickness; |
|
77 |
} |
|
78 |
|
|
79 |
public void setTilt(double tilt) { |
|
80 |
this.tilt = tilt; |
|
81 |
} |
|
82 |
} |
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/symbols/I3DChartSymbol.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
package org.gvsig.symbology.fmap.symbols; |
|
42 |
|
|
43 |
import com.iver.cit.gvsig.fmap.core.symbols.IMarkerSymbol; |
|
44 |
|
|
45 |
public interface I3DChartSymbol extends IMarkerSymbol { |
|
46 |
|
|
47 |
// 3D stuff |
|
48 |
|
|
49 |
/** |
|
50 |
* Tells if the symbol will be displayed in a 3D effect, if |
|
51 |
* <b>false</b> the symbol will skip the value returned by |
|
52 |
* <b>getTilt()</b> |
|
53 |
* @return boolean. |
|
54 |
* |
|
55 |
*/ |
|
56 |
public abstract boolean isDisplay3D(); |
|
57 |
|
|
58 |
/** |
|
59 |
* Sets the flag that enables or disables 3D effects. |
|
60 |
* |
|
61 |
* @see isDisplay3D() |
|
62 |
* @param bDisplay3D |
|
63 |
*/ |
|
64 |
public abstract void setDisplay3D(boolean bDisplay3D); |
|
65 |
|
|
66 |
public abstract void setThickness(double thickness); |
|
67 |
|
|
68 |
public abstract double getThickness(); |
|
69 |
|
|
70 |
public abstract double getTilt(); |
|
71 |
|
|
72 |
public abstract void setTilt(double tilt); |
|
73 |
|
|
74 |
|
|
75 |
|
|
76 |
// Charting stuff |
|
77 |
|
|
78 |
public abstract double getMaxValue(); |
|
79 |
|
|
80 |
public abstract void setMaxValue(double maxValue); |
|
81 |
|
|
82 |
|
|
83 |
|
|
84 |
} |
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/symbols/PieChart3DSymbol.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
package org.gvsig.symbology.fmap.symbols; |
|
42 |
|
|
43 |
import java.awt.Graphics2D; |
|
44 |
import java.awt.geom.AffineTransform; |
|
45 |
import java.awt.geom.Point2D; |
|
46 |
import java.awt.geom.Rectangle2D; |
|
47 |
|
|
48 |
import org.jfree.chart.plot.PiePlot3D; |
|
49 |
import org.jfree.data.general.DefaultKeyedValuesDataset; |
|
50 |
import org.jfree.data.general.DefaultPieDataset; |
|
51 |
import org.jfree.util.Rotation; |
|
52 |
|
|
53 |
import com.iver.cit.gvsig.fmap.core.FPoint2D; |
|
54 |
import com.iver.cit.gvsig.fmap.core.FShape; |
|
55 |
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol; |
|
56 |
import com.iver.utiles.XMLEntity; |
|
57 |
import com.iver.utiles.swing.threads.Cancellable; |
|
58 |
|
|
59 |
public class PieChart3DSymbol extends Abstract3DChartSymbol implements I3DChartSymbol{ |
|
60 |
private boolean clockwise; |
|
61 |
private PiePlot3D plot; |
|
62 |
private String[] keys; |
|
63 |
private double[] values; |
|
64 |
private DefaultKeyedValuesDataset dataset; |
|
65 |
private boolean circular; |
|
66 |
private double minimumAngleToDraw; |
|
67 |
private double depthFactor; |
|
68 |
|
|
69 |
public void draw(Graphics2D g, AffineTransform affineTransform, FShape shp, |
|
70 |
Cancellable cancel) { |
|
71 |
FPoint2D fp = (FPoint2D) shp; |
|
72 |
Point2D p = new Point2D.Double(fp.getX(), fp.getY()); |
|
73 |
PiePlot3D plot = getPlot(); |
|
74 |
double size = getSize(); |
|
75 |
double halfSize = size*0.5; |
|
76 |
double minx = p.getX() - halfSize; |
|
77 |
double miny = p.getY() - halfSize; |
|
78 |
plot.draw(g, new Rectangle2D.Double(minx, miny, size, size), p, null, null); |
|
79 |
} |
|
80 |
|
|
81 |
private PiePlot3D getPlot() { |
|
82 |
if (plot == null) { |
|
83 |
plot = new PiePlot3D(); |
|
84 |
plot.setLabelGap(0); |
|
85 |
plot.setBackgroundPaint(null); |
|
86 |
plot.setOutlinePaint(null); |
|
87 |
plot.setLabelBackgroundPaint(null); |
|
88 |
|
|
89 |
} |
|
90 |
|
|
91 |
if (dataset == null) dataset = new DefaultKeyedValuesDataset(); |
|
92 |
else dataset.clear(); |
|
93 |
|
|
94 |
for (int i = 0; keys != null && i < keys.length; i++) { |
|
95 |
dataset.insertValue(i, keys[i], values[i]); |
|
96 |
} |
|
97 |
|
|
98 |
plot.setDataset(new DefaultPieDataset(dataset)); |
|
99 |
plot.setDirection(clockwise ? Rotation.CLOCKWISE : Rotation.ANTICLOCKWISE); |
|
100 |
plot.setDepthFactor(depthFactor); |
|
101 |
plot.setMinimumArcAngleToDraw(minimumAngleToDraw); |
|
102 |
plot.setCircular(circular); |
|
103 |
plot.setStartAngle(getRotation()); |
|
104 |
return plot; |
|
105 |
} |
|
106 |
|
|
107 |
public ISymbol getSymbolForSelection() { |
|
108 |
return this; |
|
109 |
} |
|
110 |
|
|
111 |
public XMLEntity getXMLEntity() { |
|
112 |
XMLEntity xml = new XMLEntity(); |
|
113 |
xml.putProperty("className", getClassName()); |
|
114 |
xml.putProperty("desc", getDescription()); |
|
115 |
xml.putProperty("isShapeVisible", isShapeVisible()); |
|
116 |
xml.putProperty("unit", getUnit()); |
|
117 |
xml.putProperty("referenceSystem", getReferenceSystem()); |
|
118 |
xml.putProperty("size", getSize()); |
|
119 |
xml.putProperty("rotation", getRotation()); |
|
120 |
xml.putProperty("circular", circular); |
|
121 |
xml.putProperty("minAngleToDraw", minimumAngleToDraw); |
|
122 |
xml.putProperty("depthFactor", depthFactor); |
|
123 |
return xml; |
|
124 |
|
|
125 |
} |
|
126 |
|
|
127 |
public void setXMLEntity(XMLEntity xml) { |
|
128 |
setDescription(xml.getStringProperty("desc")); |
|
129 |
setIsShapeVisible(xml.getBooleanProperty("isShapeVisible")); |
|
130 |
setUnit(xml.getIntProperty("unit")); |
|
131 |
setReferenceSystem(xml.getIntProperty("referenceSystem")); |
|
132 |
setSize(xml.getDoubleProperty("size")); |
|
133 |
setRotation(xml.getDoubleProperty("rotation")); |
|
134 |
setCircular(xml.getBooleanProperty("circular")); |
|
135 |
setMinimumAngleToDraw(xml.getDoubleProperty("minAngleToDraw")); |
|
136 |
setDepthFactor(xml.getDoubleProperty("depthFactor")); |
|
137 |
} |
|
138 |
|
|
139 |
public String getClassName() { |
|
140 |
return getClass().getName(); |
|
141 |
} |
|
142 |
|
|
143 |
public double[] getValues() { |
|
144 |
return values; |
|
145 |
} |
|
146 |
|
|
147 |
public void setValues(double[] values) { |
|
148 |
this.values = values; |
|
149 |
} |
|
150 |
|
|
151 |
public String[] getKeys() { |
|
152 |
return keys; |
|
153 |
} |
|
154 |
|
|
155 |
public void setKeys(String[] keys) { |
|
156 |
this.keys = keys; |
|
157 |
} |
|
158 |
|
|
159 |
public boolean isClockwise() { |
|
160 |
return clockwise; |
|
161 |
} |
|
162 |
|
|
163 |
public void setClockwise(boolean clockwise) { |
|
164 |
this.clockwise = clockwise; |
|
165 |
} |
|
166 |
|
|
167 |
public boolean isCircular() { |
|
168 |
return circular; |
|
169 |
} |
|
170 |
|
|
171 |
public void setCircular(boolean circular) { |
|
172 |
this.circular = circular; |
|
173 |
} |
|
174 |
|
|
175 |
public double getMinimumAngleToDraw() { |
|
176 |
return minimumAngleToDraw; |
|
177 |
} |
|
178 |
|
|
179 |
public void setMinimumAngleToDraw(double minimumAngleToDraw) { |
|
180 |
this.minimumAngleToDraw = minimumAngleToDraw; |
|
181 |
} |
|
182 |
|
|
183 |
public double getDepthFactor() { |
|
184 |
return depthFactor; |
|
185 |
} |
|
186 |
|
|
187 |
public void setDepthFactor(double depthFactor) { |
|
188 |
this.depthFactor = depthFactor; |
|
189 |
} |
|
190 |
|
|
191 |
public void setPlot(PiePlot3D plot) { |
|
192 |
this.plot = plot; |
|
193 |
} |
|
194 |
} |
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/labeling/parse/LabelExpressionParser.jj | ||
---|---|---|
5 | 5 |
} |
6 | 6 |
PARSER_BEGIN(LabelExpressionParser) |
7 | 7 |
|
8 |
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
|
|
8 |
/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
|
|
9 | 9 |
* |
10 | 10 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
11 | 11 |
* |
... | ... | |
27 | 27 |
* |
28 | 28 |
* Generalitat Valenciana |
29 | 29 |
* Conselleria d'Infraestructures i Transport |
30 |
* Av. Blasco Ib��ez, 50
|
|
30 |
* Av. Blasco Ibáñez, 50
|
|
31 | 31 |
* 46010 VALENCIA |
32 | 32 |
* SPAIN |
33 | 33 |
* |
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/labeling/placements/LinePlacementConstraints.java | ||
---|---|---|
80 | 80 |
*/ |
81 | 81 |
package org.gvsig.symbology.fmap.labeling.placements; |
82 | 82 |
|
83 |
import java.util.Hashtable; |
|
84 |
|
|
85 | 83 |
import com.iver.cit.gvsig.fmap.rendering.styling.labeling.IPlacementConstraints; |
86 | 84 |
import com.iver.utiles.XMLEntity; |
87 | 85 |
/** |
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/labeling/GeneralLabelingStrategy.java | ||
---|---|---|
373 | 373 |
|
374 | 374 |
if (bLabelsReallocatable) { |
375 | 375 |
if (!isOverlapping(bi, lc.getShape(labelMetrics))) { |
376 |
lc.draw(g, labelMetrics, null);
|
|
376 |
lc.draw(g, labelMetrics, (FShape) geom.getInternalShape());
|
|
377 | 377 |
// SimpleMarkerSymbol sms = new SimpleMarkerSymbol(); |
378 | 378 |
// sms.setSize(5); |
379 | 379 |
// sms.setColor(Color.YELLOW); |
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/labeling/lang/functions/SubstringFunction.java | ||
---|---|---|
43 | 43 |
import java.util.ArrayList; |
44 | 44 |
import java.util.Hashtable; |
45 | 45 |
|
46 |
import org.gvsig.symbology.fmap.labeling.parse.SemanticException; |
|
47 | 46 |
import org.gvsig.symbology.fmap.rendering.filter.operations.Expression; |
48 | 47 |
import org.gvsig.symbology.fmap.rendering.filter.operations.ExpressionException; |
49 | 48 |
|
50 |
import com.hardcode.gdbms.engine.instruction.EvaluationException; |
|
51 | 49 |
import com.hardcode.gdbms.engine.values.Value; |
52 | 50 |
|
53 | 51 |
public class SubstringFunction implements Expression { |
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/rendering/filter/operations/DoubleConstant.java | ||
---|---|---|
43 | 43 |
import java.util.ArrayList; |
44 | 44 |
import java.util.Hashtable; |
45 | 45 |
|
46 |
import org.gvsig.remoteClient.sld.filterEncoding.FilterTags; |
|
47 |
|
|
48 | 46 |
import com.hardcode.gdbms.engine.values.Value; |
49 | 47 |
import com.iver.cit.gvsig.fmap.Messages; |
50 | 48 |
/** |
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/rendering/filter/operations/NumericalConstant.java | ||
---|---|---|
43 | 43 |
import java.util.ArrayList; |
44 | 44 |
import java.util.Hashtable; |
45 | 45 |
|
46 |
|
|
47 | 46 |
import com.hardcode.gdbms.engine.values.Value; |
48 | 47 |
import com.iver.cit.gvsig.fmap.Messages; |
49 | 48 |
/** |
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/rendering/filter/operations/BooleanConstant.java | ||
---|---|---|
43 | 43 |
import java.util.ArrayList; |
44 | 44 |
import java.util.Hashtable; |
45 | 45 |
|
46 |
import org.gvsig.remoteClient.sld.filterEncoding.FilterTags; |
|
47 |
|
|
48 | 46 |
import com.hardcode.gdbms.engine.values.Value; |
49 | 47 |
import com.iver.cit.gvsig.fmap.Messages; |
50 | 48 |
/** |
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/rendering/filter/operations/LessThanOperator.java | ||
---|---|---|
43 | 43 |
import java.util.ArrayList; |
44 | 44 |
import java.util.Hashtable; |
45 | 45 |
|
46 |
|
|
47 | 46 |
import com.hardcode.gdbms.engine.values.Value; |
48 | 47 |
import com.iver.cit.gvsig.fmap.Messages; |
49 | 48 |
|
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/rendering/filter/operations/MultOperator.java | ||
---|---|---|
43 | 43 |
import java.util.ArrayList; |
44 | 44 |
import java.util.Hashtable; |
45 | 45 |
|
46 |
|
|
47 | 46 |
import com.hardcode.gdbms.engine.values.Value; |
48 | 47 |
import com.iver.cit.gvsig.fmap.Messages; |
49 | 48 |
|
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/rendering/filter/operations/DivOperator.java | ||
---|---|---|
43 | 43 |
import java.util.ArrayList; |
44 | 44 |
import java.util.Hashtable; |
45 | 45 |
|
46 |
import org.gvsig.remoteClient.sld.filterEncoding.FilterTags; |
|
47 |
|
|
48 |
|
|
49 | 46 |
import com.hardcode.gdbms.engine.values.Value; |
50 | 47 |
import com.iver.cit.gvsig.fmap.Messages; |
51 | 48 |
|
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/rendering/filter/operations/AddOperator.java | ||
---|---|---|
43 | 43 |
import java.util.ArrayList; |
44 | 44 |
import java.util.Hashtable; |
45 | 45 |
|
46 |
import org.gvsig.remoteClient.sld.filterEncoding.FilterTags; |
|
47 |
|
|
48 |
|
|
49 | 46 |
import com.hardcode.gdbms.engine.values.Value; |
50 | 47 |
import com.iver.cit.gvsig.fmap.Messages; |
51 | 48 |
|
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/rendering/filter/operations/OperatorsFactory.java | ||
---|---|---|
43 | 43 |
|
44 | 44 |
import java.util.HashMap; |
45 | 45 |
|
46 |
import com.sun.org.apache.xml.internal.utils.ObjectPool; |
|
47 |
|
|
48 | 46 |
/** |
49 | 47 |
* Implements methods that allow the user to create new operators to be |
50 | 48 |
* included in an expression to be parsed |
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/rendering/filter/operations/MinusOperator.java | ||
---|---|---|
43 | 43 |
import java.util.ArrayList; |
44 | 44 |
import java.util.Hashtable; |
45 | 45 |
|
46 |
|
|
47 | 46 |
import com.hardcode.gdbms.engine.values.Value; |
48 | 47 |
import com.iver.cit.gvsig.fmap.Messages; |
49 | 48 |
|
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/rendering/filter/operations/AndOperator.java | ||
---|---|---|
43 | 43 |
import java.util.ArrayList; |
44 | 44 |
import java.util.Hashtable; |
45 | 45 |
|
46 |
import org.gvsig.remoteClient.sld.filterEncoding.FilterTags; |
|
47 |
|
|
48 | 46 |
import com.hardcode.gdbms.engine.values.Value; |
49 | 47 |
import com.iver.cit.gvsig.fmap.Messages; |
50 | 48 |
|
trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/rendering/VectorFilterExpressionLegend.java | ||
---|---|---|
41 | 41 |
package org.gvsig.symbology.fmap.rendering; |
42 | 42 |
|
43 | 43 |
|
44 |
import java.io.StringReader; |
|
45 | 44 |
import java.util.ArrayList; |
46 | 45 |
import java.util.Hashtable; |
47 | 46 |
|
trunk/extensions/extSymbology/.classpath | ||
---|---|---|
31 | 31 |
<classpathentry kind="lib" path="/libFMap/lib/kxml2.jar"/> |
32 | 32 |
<classpathentry kind="lib" path="/_fwAndami/lib/castor-0.9.5.3-xml.jar"/> |
33 | 33 |
<classpathentry kind="lib" path="/libFMap/lib/driver-manager-1.1.jar" sourcepath="/libDriverManager"/> |
34 |
<classpathentry kind="lib" path="/_fwAndami/lib/jcommon-1.0.10.jar"/> |
|
35 |
<classpathentry kind="lib" path="/_fwAndami/lib/jfreechart-1.0.6.jar" sourcepath="/home/jaume/Desktop/JFreeChart/jfreechart-1.0.10/source"/> |
|
34 | 36 |
<classpathentry kind="output" path="bin"/> |
35 | 37 |
</classpath> |
Also available in: Unified diff