svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.symbology / org.gvsig.symbology.lib / org.gvsig.symbology.lib.impl / src / main / java / org / gvsig / symbology / fmap / mapcontext / rendering / dynamiclegend / DefaultDynamicLabelingStrategy.java @ 44257
History | View | Annotate | Download (21.6 KB)
1 |
/*
|
---|---|
2 |
* To change this license header, choose License Headers in Project Properties.
|
3 |
* To change this template file, choose Tools | Templates
|
4 |
* and open the template in the editor.
|
5 |
*/
|
6 |
package org.gvsig.symbology.fmap.mapcontext.rendering.dynamiclegend; |
7 |
|
8 |
import java.awt.Color; |
9 |
import java.awt.Font; |
10 |
import java.awt.Graphics2D; |
11 |
import java.awt.image.BufferedImage; |
12 |
import java.util.ArrayList; |
13 |
import java.util.List; |
14 |
import org.cresques.cts.ICoordTrans; |
15 |
import org.cresques.cts.IProjection; |
16 |
import org.gvsig.compat.print.PrintAttributes; |
17 |
import org.gvsig.expressionevaluator.Expression; |
18 |
import org.gvsig.expressionevaluator.ExpressionEvaluatorLocator; |
19 |
import org.gvsig.expressionevaluator.MutableSymbolTable; |
20 |
import org.gvsig.expressionevaluator.SymbolTable; |
21 |
import org.gvsig.fmap.dal.DALLocator; |
22 |
import org.gvsig.fmap.dal.exception.ReadException; |
23 |
import org.gvsig.fmap.dal.expressionevaluator.FeatureSymbolTable; |
24 |
import org.gvsig.fmap.dal.feature.Feature; |
25 |
import org.gvsig.fmap.dal.feature.FeatureQuery; |
26 |
import org.gvsig.fmap.dal.feature.FeatureSelection; |
27 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
28 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
29 |
import org.gvsig.fmap.geom.Geometry; |
30 |
import org.gvsig.fmap.geom.exception.CreateGeometryException; |
31 |
import org.gvsig.fmap.geom.operation.GeometryOperationException; |
32 |
import org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException; |
33 |
import org.gvsig.fmap.geom.primitive.Envelope; |
34 |
import org.gvsig.fmap.geom.primitive.Point; |
35 |
import org.gvsig.fmap.mapcontext.MapContext; |
36 |
import org.gvsig.fmap.mapcontext.ViewPort; |
37 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
38 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
39 |
import org.gvsig.fmap.mapcontext.layers.vectorial.SpatialEvaluatorsFactory; |
40 |
import org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingMethod; |
41 |
import org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints; |
42 |
import org.gvsig.fmap.mapcontext.rendering.legend.styling.IZoomConstraints; |
43 |
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.AttrInTableLabelingStrategy; |
44 |
import static org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.AttrInTableLabelingStrategy.MIN_TEXT_SIZE; |
45 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.CartographicSupportToolkit; |
46 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.text.impl.SimpleTextSymbol; |
47 |
import org.gvsig.tools.dispose.DisposableIterator; |
48 |
import org.gvsig.tools.evaluator.Evaluator; |
49 |
import org.gvsig.tools.exception.BaseException; |
50 |
import org.gvsig.tools.persistence.PersistentState; |
51 |
import org.gvsig.tools.persistence.exception.PersistenceException; |
52 |
import org.gvsig.tools.task.Cancellable; |
53 |
import org.slf4j.Logger; |
54 |
import org.slf4j.LoggerFactory; |
55 |
|
56 |
/**
|
57 |
*
|
58 |
* @author osc
|
59 |
*/
|
60 |
public class DefaultDynamicLabelingStrategy extends DynamicLabelingStrategy { |
61 |
|
62 |
private Feature feature;
|
63 |
public String LROTATION = "LROTATION"; |
64 |
public String LTEXT = "LTEXT"; |
65 |
public String LHEIGHT = "LHEIGHT"; |
66 |
public String LCOLOR = "LCOLOR"; |
67 |
public String LFONT = "LFONT"; |
68 |
public String LFONTSTYLE = "LFONTS"; |
69 |
|
70 |
public static Expression expRotation = null; |
71 |
public static Expression expText = null; |
72 |
public static Expression expHeight = null; |
73 |
public static Expression expColor = null; |
74 |
public static Expression expFont = null; |
75 |
public static Expression expFontStyle = null; |
76 |
public static Expression expUnit; |
77 |
public static Expression expReferenceSystem; |
78 |
|
79 |
private MutableSymbolTable symbolTable = null; |
80 |
private FeatureSymbolTable featureSymbolTable = null; |
81 |
private FLyrVect layer;
|
82 |
private List<Geometry> drawnGeometryLabels; |
83 |
private boolean printMode = false; |
84 |
private IZoomConstraints zoom = null; |
85 |
private static final Logger logger = LoggerFactory.getLogger(AttrInTableLabelingStrategy.class); |
86 |
private int referenceSystem; |
87 |
private String textField; |
88 |
|
89 |
public SymbolTable getFeatureSymbolTable() {
|
90 |
if (symbolTable == null) { |
91 |
MutableSymbolTable s = ExpressionEvaluatorLocator.getManager().createSymbolTable(); |
92 |
featureSymbolTable = DALLocator.getDataManager().createFeatureSymbolTable(); |
93 |
s.addSymbolTable(featureSymbolTable); |
94 |
if (feature!=null) { |
95 |
featureSymbolTable.setFeature(feature); |
96 |
} |
97 |
symbolTable = s; |
98 |
} |
99 |
return symbolTable;
|
100 |
|
101 |
} |
102 |
|
103 |
// private Expression getExpressionFromString(String value) {
|
104 |
// Expression expression = ExpressionEvaluatorLocator.getManager().createExpression();
|
105 |
// expression.setPhrase(value);
|
106 |
// return expression;
|
107 |
// }
|
108 |
private Object getValueFromExpression(Expression exp) { |
109 |
if (exp == null) { |
110 |
return null; |
111 |
} |
112 |
Object value = exp.execute(getFeatureSymbolTable());
|
113 |
return value;
|
114 |
} |
115 |
|
116 |
public Object getComputedValue(String field) { |
117 |
Object value;
|
118 |
value = feature.get(field); |
119 |
|
120 |
return value;
|
121 |
} |
122 |
|
123 |
@Override
|
124 |
public Expression getRotation() { |
125 |
return expRotation;
|
126 |
} |
127 |
|
128 |
@Override
|
129 |
public int getComputedRotation() { |
130 |
Integer value = (Integer) getValueFromExpression(getRotation()); |
131 |
return value;
|
132 |
} |
133 |
|
134 |
@Override
|
135 |
public Expression getText() { |
136 |
return expText;
|
137 |
} |
138 |
|
139 |
@Override
|
140 |
public String getComputedText() { |
141 |
String value = (String) getValueFromExpression(getText()); |
142 |
return value;
|
143 |
} |
144 |
|
145 |
@Override
|
146 |
public Expression getHeight() { |
147 |
return expHeight;
|
148 |
} |
149 |
|
150 |
@Override
|
151 |
public int getComputedHeight() { |
152 |
int value = (int) getValueFromExpression(getHeight()); |
153 |
return value;
|
154 |
} |
155 |
|
156 |
@Override
|
157 |
public Expression getColor() { |
158 |
return expColor;
|
159 |
} |
160 |
|
161 |
@Override
|
162 |
public Color getComputedColor() { |
163 |
int rgbcolor = (int) getColor().execute(getFeatureSymbolTable()); |
164 |
Color color = new Color(rgbcolor, true); |
165 |
return color;
|
166 |
} |
167 |
|
168 |
@Override
|
169 |
public Expression getFixedSize() { |
170 |
return expHeight;
|
171 |
} |
172 |
|
173 |
@Override
|
174 |
public double getComputedFixedSize() { |
175 |
double value = (double) getValueFromExpression(getFixedSize()); |
176 |
return value;
|
177 |
} |
178 |
|
179 |
@Override
|
180 |
public int getComputedUnit() { |
181 |
int value = (int) getValueFromExpression(getUnitExp()); |
182 |
return value;
|
183 |
} |
184 |
|
185 |
@Override
|
186 |
public void setText(Expression expression) { |
187 |
expText = expression; |
188 |
} |
189 |
|
190 |
@Override
|
191 |
public void setRotation(Expression expression) { |
192 |
expRotation = expression; |
193 |
} |
194 |
|
195 |
@Override
|
196 |
public void setHeight(Expression expression) { |
197 |
expHeight = expression; |
198 |
} |
199 |
|
200 |
@Override
|
201 |
public void setColor(Expression expression) { |
202 |
expColor = expression; |
203 |
} |
204 |
|
205 |
@Override
|
206 |
public void setUsesFixedSize(boolean b) { |
207 |
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
208 |
} |
209 |
|
210 |
@Override
|
211 |
public boolean usesFixedSize() { |
212 |
return false; |
213 |
} |
214 |
|
215 |
@Override
|
216 |
public void setFixedSize(double fixedSize) { |
217 |
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
218 |
} |
219 |
|
220 |
@Override
|
221 |
public void setUsesFixedColor(boolean b) { |
222 |
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
223 |
} |
224 |
|
225 |
@Override
|
226 |
public boolean usesFixedColor() { |
227 |
return true; |
228 |
} |
229 |
|
230 |
@Override
|
231 |
public Expression getFixedColor() { |
232 |
return expColor;
|
233 |
} |
234 |
|
235 |
@Override
|
236 |
public Color getComputedFixedColor() { |
237 |
int rgbcolor = (int) getFixedColor().execute(getFeatureSymbolTable()); |
238 |
Color color = new Color(rgbcolor, true); |
239 |
return color;
|
240 |
} |
241 |
|
242 |
@Override
|
243 |
public void setFixedColor(Color fixedColor) { |
244 |
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
245 |
} |
246 |
|
247 |
@Override
|
248 |
public Expression getColorFont() { |
249 |
return expColor;
|
250 |
} |
251 |
|
252 |
@Override
|
253 |
public Color getComputedColorFont() { |
254 |
int rgbcolor = (int) getColorFont().execute(getFeatureSymbolTable()); |
255 |
Color color = new Color(rgbcolor, true); |
256 |
return color;
|
257 |
} |
258 |
|
259 |
@Override
|
260 |
public void setColorFont(Color colorFont) { |
261 |
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
262 |
} |
263 |
|
264 |
@Override
|
265 |
public Expression getFont() { |
266 |
return expFont;
|
267 |
} |
268 |
|
269 |
@Override
|
270 |
public Font getComputedFont() { |
271 |
String value = (String) getFont().execute(getFeatureSymbolTable()); |
272 |
Font font = new Font(value, getComputedFontStyle(), getComputedHeight()); |
273 |
return font;
|
274 |
} |
275 |
|
276 |
@Override
|
277 |
public void setFont(Font selFont) { |
278 |
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
279 |
} |
280 |
|
281 |
@Override
|
282 |
public Expression getFontStyle() { |
283 |
return expFontStyle;
|
284 |
} |
285 |
|
286 |
@Override
|
287 |
public int getComputedFontStyle() { |
288 |
int value = (int) getFontStyle().execute(getFeatureSymbolTable()); |
289 |
return value;
|
290 |
} |
291 |
|
292 |
@Override
|
293 |
public void setFontStyle(Expression expression) { |
294 |
expFontStyle = expression; |
295 |
} |
296 |
|
297 |
public void setFeature(Feature f) { |
298 |
feature = f; |
299 |
if (featureSymbolTable==null) { |
300 |
getFeatureSymbolTable(); |
301 |
} |
302 |
featureSymbolTable.setFeature(f); |
303 |
} |
304 |
|
305 |
@Override
|
306 |
public ILabelingMethod getLabelingMethod() {
|
307 |
throw new UnsupportedOperationException("Not supported yet."); |
308 |
} |
309 |
|
310 |
@Override
|
311 |
public void setLabelingMethod(ILabelingMethod method) { |
312 |
throw new UnsupportedOperationException("Not supported yet."); |
313 |
} |
314 |
|
315 |
@Override
|
316 |
public IPlacementConstraints getPlacementConstraints() {
|
317 |
throw new UnsupportedOperationException("Not supported yet."); |
318 |
} |
319 |
|
320 |
@Override
|
321 |
public void setPlacementConstraints(IPlacementConstraints constraints) { |
322 |
throw new UnsupportedOperationException("Not supported yet."); |
323 |
} |
324 |
|
325 |
@Override
|
326 |
public IZoomConstraints getZoomConstraints() {
|
327 |
throw new UnsupportedOperationException("Not supported yet."); |
328 |
} |
329 |
|
330 |
@Override
|
331 |
public void setZoomConstraints(IZoomConstraints constraints) { |
332 |
throw new UnsupportedOperationException("Not supported yet."); |
333 |
} |
334 |
|
335 |
@Override
|
336 |
public Expression getUnitExp() { |
337 |
// String value = "-1";
|
338 |
// Expression exp = getExpressionFromString(value);
|
339 |
// return exp;
|
340 |
return expUnit;
|
341 |
} |
342 |
|
343 |
public Expression getReferenceSystemExp() { |
344 |
// String value = "0";
|
345 |
// Expression exp = getExpressionFromString(value);
|
346 |
return expReferenceSystem;
|
347 |
} |
348 |
|
349 |
private org.gvsig.fmap.geom.primitive.Point createLabelPoint(org.gvsig.fmap.geom.Geometry geom)
|
350 |
throws CreateGeometryException {
|
351 |
|
352 |
try {
|
353 |
return geom.centroid();
|
354 |
} catch (GeometryOperationNotSupportedException e) {
|
355 |
return null; |
356 |
} catch (GeometryOperationException e) {
|
357 |
return null; |
358 |
} |
359 |
} |
360 |
|
361 |
@Override
|
362 |
public void draw(BufferedImage mapImage, Graphics2D mapGraphics, double scale, ViewPort viewPort, Cancellable cancel, double dpi) throws ReadException { |
363 |
// double scale = getScale(viewPort, props);
|
364 |
PrintAttributes props = null;
|
365 |
if (layer == null) { |
366 |
return;
|
367 |
} |
368 |
|
369 |
if (zoom == null |
370 |
|| (zoom.isUserDefined() && (scale >= zoom.getMaxScale()) |
371 |
&& (scale <= zoom.getMinScale()))) { |
372 |
FeatureSet set = null;
|
373 |
DisposableIterator iterator = null;
|
374 |
try {
|
375 |
// AttrInTableLabelingStrategy.FilteredLogger logger = new AttrInTableLabelingStrategy.FilteredLogger(AttrInTableLabelingStrategy.logger, 10);
|
376 |
|
377 |
// limit the labeling to the visible extent
|
378 |
List<String> fields = new ArrayList<String>(); |
379 |
|
380 |
FeatureStore featureStore = layer.getFeatureStore(); |
381 |
ICoordTrans ct = layer.getCoordTrans(); |
382 |
|
383 |
String geomName = featureStore.getDefaultFeatureType().getDefaultGeometryAttributeName();
|
384 |
//TODO
|
385 |
fields.add(LCOLOR); |
386 |
fields.add(LFONT); |
387 |
fields.add(LFONTSTYLE); |
388 |
fields.add(LHEIGHT); |
389 |
fields.add(LROTATION); |
390 |
fields.add(LTEXT); |
391 |
fields.add(geomName); |
392 |
|
393 |
FeatureQuery featureQuery = layer.createFeatureQuery(); |
394 |
|
395 |
if (viewPort.getAdjustedEnvelope().contains(
|
396 |
layer.getFullEnvelope())) { |
397 |
/*
|
398 |
* viewport contains layer completely
|
399 |
*/
|
400 |
set = featureStore.getFeatureSet(featureQuery); |
401 |
} else {
|
402 |
/*
|
403 |
* view port does not contain layer completely
|
404 |
*/
|
405 |
Evaluator iee = null;
|
406 |
|
407 |
IProjection data_proj = null;
|
408 |
Envelope env_in_store_crs = null;
|
409 |
|
410 |
if (ct == null) { |
411 |
env_in_store_crs = viewPort.getAdjustedEnvelope(); |
412 |
data_proj = viewPort.getProjection(); |
413 |
} else {
|
414 |
env_in_store_crs = viewPort.getAdjustedEnvelope().convert( |
415 |
ct.getInverted()); |
416 |
data_proj = ct.getPOrig(); |
417 |
} |
418 |
iee = SpatialEvaluatorsFactory.getInstance().intersects( |
419 |
env_in_store_crs, |
420 |
data_proj, |
421 |
featureStore |
422 |
); |
423 |
featureQuery.setAttributeNames((String[]) fields.toArray(new String[fields.size()])); |
424 |
featureQuery.setFilter(iee); |
425 |
set = featureStore.getFeatureSet(featureQuery); |
426 |
} |
427 |
|
428 |
/*
|
429 |
* 'set' now has the features that have to be labeled
|
430 |
*/
|
431 |
FeatureSelection selection = this.layer.getFeatureStore().getFeatureSelection();
|
432 |
iterator = set.fastIterator(); |
433 |
while (iterator.hasNext()) {
|
434 |
if (cancel.isCanceled()) {
|
435 |
return;
|
436 |
} |
437 |
try {
|
438 |
Feature feat = (Feature) iterator.next(); |
439 |
Geometry geom = feat.getDefaultGeometry(); |
440 |
if (geom == null) { |
441 |
continue;
|
442 |
} |
443 |
|
444 |
double size = 0; |
445 |
Color color = null; |
446 |
this.setFeature(feat);
|
447 |
if ("".equals(getComputedText())) { |
448 |
continue;
|
449 |
} else if (getComputedText() == null) { |
450 |
continue;
|
451 |
} |
452 |
|
453 |
SimpleTextSymbol sym = new SimpleTextSymbol();
|
454 |
sym.setFont(getComputedFont()); |
455 |
sym.setUnit(getComputedUnit()); |
456 |
sym.setReferenceSystem(getComputedReferenceSystem()); |
457 |
if (this.usesFixedSize()) { //(useFixedSize) { |
458 |
// uses fixed size
|
459 |
size = getComputedFixedSize();// * fontScaleFactor;
|
460 |
} else if (true) { //(getComputedHeight() ) { |
461 |
// text size is defined in the table
|
462 |
size = getComputedHeight(); |
463 |
} else {
|
464 |
// otherwise will use the size in the symbol
|
465 |
size = sym.getFont().getSize(); |
466 |
} |
467 |
|
468 |
double the_dpi = viewPort.getDPI();
|
469 |
if (props != null) { |
470 |
int len = PrintAttributes.PRINT_QUALITY_DPI.length;
|
471 |
int priq = props.getPrintQuality();
|
472 |
if (priq < 0 || priq >= len) { |
473 |
throw new ReadException(featureStore.getName(), |
474 |
new Exception("Bad print quality value: " + priq)); |
475 |
} else {
|
476 |
the_dpi = PrintAttributes.PRINT_QUALITY_DPI[priq]; |
477 |
} |
478 |
} |
479 |
|
480 |
size = CartographicSupportToolkit.getCartographicLength(this,
|
481 |
size, |
482 |
viewPort, |
483 |
the_dpi); |
484 |
if (size <= MIN_TEXT_SIZE) {
|
485 |
// label is too small to be readable, will be skipped
|
486 |
// this speeds up the rendering in wider zooms
|
487 |
continue;
|
488 |
} |
489 |
|
490 |
/*
|
491 |
* ym.setFontSize(int) assumes dpi = 72
|
492 |
*/
|
493 |
double font_size = size * 72 / the_dpi; |
494 |
sym.setFontSize(font_size); |
495 |
|
496 |
// if (false) { //useFixedColor) {
|
497 |
// color = getComputedFixedColor();
|
498 |
// } else if (true) { //colorFieldName != null) {
|
499 |
// // text size is defined in the table
|
500 |
if (selection.isSelected(feat)) {
|
501 |
color = MapContext.getSelectionColor(); |
502 |
} else {
|
503 |
color = getComputedColorFont(); |
504 |
} |
505 |
|
506 |
sym.setTextColor(color); |
507 |
|
508 |
if (ct != null) { |
509 |
/*
|
510 |
* Reproject from store CRS to view CRS
|
511 |
*/
|
512 |
geom = geom.cloneGeometry(); |
513 |
geom.reProject(ct); |
514 |
} |
515 |
|
516 |
Point p = null; |
517 |
// text rotation is defined in the table
|
518 |
double rotation = -Math.toRadians(((Number) getComputedRotation()).doubleValue()); |
519 |
p = createLabelPoint(geom); |
520 |
|
521 |
sym.setText(getComputedText()); |
522 |
sym.setRotation(rotation); |
523 |
|
524 |
if (p != null) { |
525 |
if (props == null) { |
526 |
sym.draw(mapGraphics, viewPort.getAffineTransform(), p, feat, cancel); |
527 |
} else {
|
528 |
sym.print(mapGraphics, viewPort.getAffineTransform(), p, props); |
529 |
} |
530 |
} |
531 |
} catch (Exception ex) { |
532 |
logger.warn("", ex);
|
533 |
} |
534 |
} |
535 |
|
536 |
} catch (BaseException e) {
|
537 |
throw new ReadException( |
538 |
"Could not draw annotation in the layer.", e);
|
539 |
} finally {
|
540 |
if (iterator != null) { |
541 |
iterator.dispose(); |
542 |
} |
543 |
if (set != null) { |
544 |
set.dispose(); |
545 |
} |
546 |
|
547 |
} |
548 |
|
549 |
} |
550 |
|
551 |
} |
552 |
|
553 |
@Override
|
554 |
public void print(Graphics2D g, double scale, ViewPort viewPort, Cancellable cancel, PrintAttributes properties) throws ReadException { |
555 |
throw new UnsupportedOperationException("Not supported yet."); |
556 |
} |
557 |
|
558 |
@Override
|
559 |
public String[] getUsedFields() { |
560 |
throw new UnsupportedOperationException("Not supported yet."); |
561 |
} |
562 |
|
563 |
@Override
|
564 |
public void setLayer(FLayer flayer) { |
565 |
layer = (FLyrVect) flayer; |
566 |
} |
567 |
|
568 |
@Override
|
569 |
public boolean shouldDrawLabels(double scale) { |
570 |
return true; |
571 |
} |
572 |
|
573 |
@Override
|
574 |
public void saveToState(PersistentState state) throws PersistenceException { |
575 |
throw new UnsupportedOperationException("Not supported yet."); |
576 |
} |
577 |
|
578 |
@Override
|
579 |
public void loadFromState(PersistentState state) throws PersistenceException { |
580 |
throw new UnsupportedOperationException("Not supported yet."); |
581 |
} |
582 |
|
583 |
@Override
|
584 |
public void setUnit(int unitIndex) { |
585 |
throw new UnsupportedOperationException("Not supported yet."); |
586 |
} |
587 |
|
588 |
public void setUnit(Expression expression) { |
589 |
expUnit = expression; |
590 |
} |
591 |
|
592 |
@Override
|
593 |
public int getUnit() { |
594 |
return getComputedUnitExp();
|
595 |
} |
596 |
|
597 |
public int getComputedUnitExp() { |
598 |
int value = (int) getValueFromExpression(getUnitExp()); |
599 |
return value;
|
600 |
} |
601 |
|
602 |
|
603 |
public int getComputedReferenceSystem() { |
604 |
int value = (int) getValueFromExpression(getReferenceSystemExp()); |
605 |
return value;
|
606 |
} |
607 |
|
608 |
@Override
|
609 |
public int getReferenceSystem() { |
610 |
return getComputedReferenceSystem();
|
611 |
} |
612 |
|
613 |
@Override
|
614 |
public void setReferenceSystem(int referenceSystem) { |
615 |
// this.referenceSystem = referenceSystem;
|
616 |
} |
617 |
|
618 |
@Override
|
619 |
public double toCartographicSize(ViewPort viewPort, double dpi, Geometry geom) { |
620 |
throw new UnsupportedOperationException("Not supported yet."); |
621 |
} |
622 |
|
623 |
@Override
|
624 |
public void setCartographicSize(double cartographicSize, Geometry geom) { |
625 |
throw new UnsupportedOperationException("Not supported yet."); |
626 |
} |
627 |
|
628 |
@Override
|
629 |
public double getCartographicSize(ViewPort viewPort, double dpi, Geometry geom) { |
630 |
throw new UnsupportedOperationException("Not supported yet."); |
631 |
} |
632 |
|
633 |
@Override
|
634 |
public void setFont(Expression expression) { |
635 |
expFont = expression; |
636 |
} |
637 |
|
638 |
@Override
|
639 |
public void setFontStyle(int style) { |
640 |
|
641 |
} |
642 |
|
643 |
@Override
|
644 |
public void setReferenceSystem(Expression expression) { |
645 |
expReferenceSystem = expression; |
646 |
} |
647 |
|
648 |
} |