Revision 378 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/LegendFactory.java
LegendFactory.java | ||
---|---|---|
1 | 1 |
/* Generated by Together */ |
2 | 2 |
package com.iver.cit.gvsig.fmap.rendering; |
3 | 3 |
|
4 |
import com.iver.cit.gvsig.fmap.XMLEntity;
|
|
5 |
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D;
|
|
4 |
import java.awt.BasicStroke;
|
|
5 |
import java.awt.Color;
|
|
6 | 6 |
|
7 |
import org.geotools.renderer.style.Java2DMark; |
|
7 | 8 |
import org.geotools.renderer.style.LineStyle2D; |
9 |
import org.geotools.renderer.style.MarkStyle2D; |
|
10 |
import org.geotools.renderer.style.PolygonStyle2D; |
|
8 | 11 |
import org.geotools.renderer.style.Style2D; |
9 | 12 |
|
10 |
import java.awt.BasicStroke;
|
|
11 |
import java.awt.Color;
|
|
13 |
import com.iver.cit.gvsig.fmap.XMLEntity;
|
|
14 |
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D;
|
|
12 | 15 |
|
13 | 16 |
|
14 | 17 |
/** |
... | ... | |
18 | 21 |
*/ |
19 | 22 |
public class LegendFactory { |
20 | 23 |
public static FStyle2D DEFAULT_SYMBOL; |
21 |
private static LineStyle2D DEFAULT_LINE_SYMBOL = new LineStyle2D(); |
|
24 |
private static MarkStyle2D DEFAULT_POINT_SYMBOL = new MarkStyle2D(); |
|
25 |
private static LineStyle2D DEFAULT_LINE_SYMBOL = new LineStyle2D(); |
|
26 |
private static PolygonStyle2D DEFAULT_POLYGON_SYMBOL = new PolygonStyle2D(); |
|
27 |
static { |
|
28 |
|
|
29 |
DEFAULT_POLYGON_SYMBOL = new PolygonStyle2D(); |
|
30 |
DEFAULT_POLYGON_SYMBOL.setContour(Color.DARK_GRAY); |
|
31 |
DEFAULT_POLYGON_SYMBOL.setStroke(new BasicStroke(3)); |
|
32 |
DEFAULT_POLYGON_SYMBOL.setFill(Color.LIGHT_GRAY); |
|
22 | 33 |
|
23 |
static { |
|
34 |
DEFAULT_POINT_SYMBOL = new MarkStyle2D(); |
|
35 |
|
|
36 |
DEFAULT_POINT_SYMBOL.setShape(Java2DMark.getWellKnownMark("")); |
|
37 |
DEFAULT_POINT_SYMBOL.setFill(Color.RED); |
|
38 |
DEFAULT_POINT_SYMBOL.setSize(5); |
|
39 |
|
|
24 | 40 |
DEFAULT_LINE_SYMBOL.setContour(Color.BLUE); |
25 | 41 |
DEFAULT_LINE_SYMBOL.setContourComposite(null); |
26 | 42 |
|
... | ... | |
33 | 49 |
*/ |
34 | 50 |
|
35 | 51 |
DEFAULT_SYMBOL = new FStyle2D(); |
52 |
DEFAULT_SYMBOL.setPointStyle2D(DEFAULT_POINT_SYMBOL); |
|
36 | 53 |
DEFAULT_SYMBOL.setLineStyle2D(DEFAULT_LINE_SYMBOL); |
37 |
DEFAULT_SYMBOL.setPolygonStyle2D(DEFAULT_LINE_SYMBOL);
|
|
54 |
DEFAULT_SYMBOL.setPolygonStyle2D(DEFAULT_POLYGON_SYMBOL);
|
|
38 | 55 |
} |
39 | 56 |
|
40 | 57 |
// TODO Descomentar esto cuando se tenga la interfaz de datos |
Also available in: Unified diff