Revision 11009 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/styles/SimpleLabelStyle.java

View differences:

SimpleLabelStyle.java
43 43
*
44 44
* $Id$
45 45
* $Log$
46
* Revision 1.4  2007-04-02 00:10:04  jaume
46
* Revision 1.5  2007-04-02 16:34:56  jaume
47
* Styled labeling (start commiting)
48
*
49
* Revision 1.4  2007/04/02 00:10:04  jaume
47 50
* *** empty log message ***
48 51
*
49 52
* Revision 1.3  2007/03/29 16:02:01  jaume
......
64 67

  
65 68
import java.awt.Graphics2D;
66 69
import java.awt.Rectangle;
67
import java.awt.Shape;
68
import java.awt.geom.AffineTransform;
69
import java.awt.geom.Point2D;
70
import java.awt.geom.Rectangle2D;
70 71

  
71 72
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol;
72
import com.iver.cit.gvsig.fmap.core.symbols.PictureMarkerSymbol;
73 73
import com.iver.utiles.XMLEntity;
74 74

  
75 75

  
......
97 97
		return text;
98 98
	}
99 99

  
100
	public Point2D[] getTextPositions(AffineTransform at) {
101
		// TODO Implement it
102
		throw new Error("Not yet implemented!");
103
	}
104

  
105 100
	public boolean isSuitableFor(ISymbol symbol) {
106 101
		return true;
107
	}	
102
	}
108 103

  
109 104
	public String getClassName() {
110 105
		return getClass().getName();
......
124 119
		text = xml.getStringProperty("text");
125 120
	}
126 121

  
127
	public void drawBackground(Graphics2D g, Shape shp) {
128
//		drawInsideRectangle(g, )
122
	public Rectangle[] getTextBounds() {
123
		return new Rectangle[] {new Rectangle(0,0,300,-60)};
129 124
	}
125

  
126
	public void drawInsideRectangle(Graphics2D g, Rectangle r) {
127
		g.translate(r.getX(), r.getY());
128
		super.drawInsideRectangle(g, r);
129
		g.translate(-r.getX(), -r.getY());
130
	}
131

  
132
	public Rectangle getBounds() {
133
		return super.getBounds();
134
	}
130 135
}

Also available in: Unified diff