Revision 41435 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/symbol/marker/impl/SimpleMarkerSymbol.java
SimpleMarkerSymbol.java | ||
---|---|---|
54 | 54 |
public class SimpleMarkerSymbol extends AbstractMarkerSymbol implements ISimpleMarkerSymbol { |
55 | 55 |
|
56 | 56 |
public static final String SIMPLE_MARKER_SYMBOL_PERSISTENCE_DEFINITION_NAME = "SimpleMarkerSymbol"; |
57 |
|
|
58 |
private static final String FIELD_OUTLINED = "outlined"; |
|
59 |
private static final String FIELD_OUTLINECOLOR = "outlineColor"; |
|
60 |
private static final String FIELD_OUTLINESIZE = "outlineSize"; |
|
61 |
private static final String FIELD_MARKERSTYLE = "markerStyle"; |
|
62 | 57 |
|
58 |
private static final String FIELD_OUTLINED = "outlined"; |
|
59 |
private static final String FIELD_OUTLINECOLOR = "outlineColor"; |
|
60 |
private static final String FIELD_OUTLINESIZE = "outlineSize"; |
|
61 |
private static final String FIELD_MARKERSTYLE = "markerStyle"; |
|
62 |
|
|
63 | 63 |
private boolean outlined; |
64 | 64 |
private Color outlineColor; |
65 | 65 |
private double outlineSize; |
... | ... | |
69 | 69 |
public SimpleMarkerSymbol() { |
70 | 70 |
super(); |
71 | 71 |
} |
72 |
|
|
72 |
|
|
73 | 73 |
public ISymbol getSymbolForSelection() { |
74 | 74 |
if (selectionSymbol == null) { |
75 | 75 |
selectionSymbol = (SimpleMarkerSymbol) cloneForSelection(); |
... | ... | |
82 | 82 |
int x, y; |
83 | 83 |
org.gvsig.fmap.geom.primitive.Point p = (org.gvsig.fmap.geom.primitive.Point)geom.cloneGeometry(); |
84 | 84 |
p.transform(affineTransform); |
85 |
|
|
85 |
|
|
86 | 86 |
int size = (int) getSize(); |
87 | 87 |
|
88 | 88 |
int halfSize = size/2; |
... | ... | |
116 | 116 |
genPath.lineTo(x + halfSize, y); |
117 | 117 |
g.draw(genPath); |
118 | 118 |
break; |
119 |
case VERTICAL_LINE_STYLE: |
|
120 |
genPath = new GeneralPathX(); |
|
121 |
genPath.moveTo(x + halfSize, y); |
|
122 |
genPath.lineTo(x + halfSize, y + size); |
|
123 |
g.draw(genPath); |
|
124 |
break; |
|
119 | 125 |
case DIAMOND_STYLE: |
120 | 126 |
x = x + halfSize; |
121 | 127 |
y = y + halfSize; |
... | ... | |
205 | 211 |
case STAR_STYLE: |
206 | 212 |
case X_STYLE: |
207 | 213 |
case TRIANGLE_STYLE: |
214 |
case VERTICAL_LINE_STYLE: |
|
208 | 215 |
g.draw(genPath); |
209 | 216 |
break; |
210 | 217 |
} |
... | ... | |
291 | 298 |
|
292 | 299 |
public Object clone() throws CloneNotSupportedException { |
293 | 300 |
SimpleMarkerSymbol copy = (SimpleMarkerSymbol) super.clone(); |
294 |
|
|
301 |
|
|
295 | 302 |
// clone selection |
296 | 303 |
if (selectionSymbol != null) { |
297 | 304 |
copy.selectionSymbol = (ISymbol) selectionSymbol.clone(); |
298 | 305 |
} |
299 |
|
|
306 |
|
|
300 | 307 |
return copy; |
301 | 308 |
} |
302 | 309 |
|
... | ... | |
335 | 342 |
} |
336 | 343 |
} |
337 | 344 |
|
338 |
|
|
345 |
|
|
339 | 346 |
public static class RegisterPersistence implements Callable { |
340 | 347 |
|
341 | 348 |
public Object call() throws Exception { |
... | ... | |
345 | 352 |
SimpleMarkerSymbol.class, |
346 | 353 |
SIMPLE_MARKER_SYMBOL_PERSISTENCE_DEFINITION_NAME, |
347 | 354 |
SIMPLE_MARKER_SYMBOL_PERSISTENCE_DEFINITION_NAME+" Persistence definition", |
348 |
null,
|
|
355 |
null, |
|
349 | 356 |
null |
350 | 357 |
); |
351 | 358 |
// Extend the FillSymbol base definition |
... | ... | |
362 | 369 |
} |
363 | 370 |
return Boolean.TRUE; |
364 | 371 |
} |
365 |
|
|
372 |
|
|
366 | 373 |
} |
367 | 374 |
|
368 | 375 |
public static class RegisterSymbol implements Callable { |
... | ... | |
379 | 386 |
|
380 | 387 |
return Boolean.TRUE; |
381 | 388 |
} |
382 |
|
|
389 |
|
|
383 | 390 |
} |
384 | 391 |
|
385 | 392 |
} |
Also available in: Unified diff