Revision 8729 trunk/extensions/extGraph_predes/src/com/iver/cit/gvsig/fmap/core/symbols/SimpleFillSymbol.java

View differences:

SimpleFillSymbol.java
43 43
*
44 44
* $Id$
45 45
* $Log$
46
* Revision 1.6  2006-11-09 18:39:05  jaume
46
* Revision 1.7  2006-11-14 11:10:27  jaume
47 47
* *** empty log message ***
48 48
*
49
* Revision 1.6  2006/11/09 18:39:05  jaume
50
* *** empty log message ***
51
*
49 52
* Revision 1.5  2006/11/09 10:22:50  jaume
50 53
* *** empty log message ***
51 54
*
......
67 70

  
68 71
import java.awt.BasicStroke;
69 72
import java.awt.Color;
70
import java.awt.Font;
71 73
import java.awt.Graphics2D;
72 74
import java.awt.Rectangle;
73 75
import java.awt.Shape;
74
import java.awt.Stroke;
75 76
import java.awt.geom.AffineTransform;
76 77

  
77 78
import com.iver.cit.gvsig.fmap.core.FShape;
78 79
import com.iver.cit.gvsig.fmap.core.ISymbol;
79
import com.iver.cit.gvsig.fmap.core.v02.FConstant;
80
//import com.iver.cit.gvsig.fmap.core.styles.SimpleStyle;
81 80
import com.iver.utiles.StringUtilities;
82 81
import com.iver.utiles.XMLEntity;
83 82

  
83
/**
84
 * Basic fill symbol. It will allow to paint a shape with its filling color (and transparency)
85
 * and the outline.
86
 * @author jaume dominguez faus - jaume.dominguez@iver.es
87
 *
88
 */
84 89
public class SimpleFillSymbol extends AbstractFillSymbol {
90
	private SimpleFillSymbol symbolForSelection;
85 91

  
86
//	private SimpleStyle style;
87

  
88 92
	public ISymbol getSymbolForSelection() {
89
		// TODO Auto-generated method stub
90
		throw new Error("Not yet implemented!");
93
		if (symbolForSelection == null) {
94
			XMLEntity xml = getXMLEntity();
95
			xml.putProperty("color", StringUtilities.color2String(Color.YELLOW));
96
			symbolForSelection = (SimpleFillSymbol) SymbolFactory.
97
					createFromXML(xml, getDescription()+" version for selection");
98
		}
99
		return symbolForSelection;
91 100
	}
92 101

  
93 102
	public void draw(Graphics2D g, AffineTransform affineTransform, FShape shp) {
94
		System.out.println(shp.getBounds());
95 103
		g.setColor(color);
96 104
		g.fill(shp);
97 105
		g.setColor(outline);
98
		g.setStroke(new BasicStroke(3));
106
		g.setStroke(new BasicStroke(1));
99 107
		g.draw(shp);
100 108
		for (int i = 0; i < layers.length; i++) {
101 109
			layers[i].draw(g, affineTransform, shp);
......
181 189
			layers[i] = SymbolFactory.createFromXML(xml.getChild(i), null);
182 190
		}
183 191
	}
184

  
185 192
}

Also available in: Unified diff