Revision 11138 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/styling/SimpleLabeling.java

View differences:

SimpleLabeling.java
43 43
*
44 44
* $Id$
45 45
* $Log$
46
* Revision 1.5  2007-04-10 16:34:01  jaume
46
* Revision 1.6  2007-04-11 16:01:08  jaume
47
* maybe a label placer refactor
48
*
49
* Revision 1.5  2007/04/10 16:34:01  jaume
47 50
* towards a styled labeling
48 51
*
49 52
* Revision 1.4  2007/04/02 16:34:56  jaume
......
84 87
package com.iver.cit.gvsig.fmap.rendering.styling;
85 88

  
86 89
import java.awt.Color;
90
import java.awt.Font;
87 91
import java.awt.Graphics2D;
88 92
import java.awt.geom.AffineTransform;
89 93
import java.awt.geom.Rectangle2D;
......
174 178
				 IGeometry geom;
175 179
				 Integer index = new Integer(i);
176 180

  
177
				 String[] texts = getText(index, sds);
178 181
				 geom = rv.getShape(i);
179 182
				 FShape labelShape = lc.getShape(g, geom);
180
				 if (labelShape != null) {
183

  
184
				 // refactor
185
				 // if (labelShape is big enough)
186
				 {
187
					 String[] texts = getText(index, sds);
188

  
189
					 placementConstraints.placeLabel(geom, lc, null, viewPort.getAffineTransform());
190
				 }
191

  
192
				 /*
193
				  String[] texts = getText(index, sds);
194

  
195
				  if (labelShape != null) {
181 196
					 FShape[] places = placementConstraints.getLocationsFor(
182 197
							 geom, labelShape,
183 198
							 null);
......
185 200
					 for (int j = 0; j < places.length; j++) {
186 201
						 places[j].transform(viewPort.getAffineTransform());
187 202
						 lc.drawInsideRectangle(g, places[j].getBounds(), texts);
188
						 g.setColor(Color.BLUE);
189
						 g.draw(places[j]);
190

  
191 203
					 }
192
				 }
204
				 }*/
193 205
			 }
194 206
		 } catch (ExpansionFileReadException e) {
195
			 // TODO Auto-generated catch block
196 207
			 logger.log(Level.SEVERE, e.getMessage());
197 208
		 } catch (ReadDriverException e) {
198 209
			 logger.log(Level.SEVERE, "Getting label text for "+i+"th shape of "+layer.getName());

Also available in: Unified diff