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

View differences:

PointPlacementConstraints.java
43 43
*
44 44
* $Id$
45 45
* $Log$
46
* Revision 1.4  2007-04-05 16:07:13  jaume
46
* Revision 1.5  2007-04-11 16:01:08  jaume
47
* maybe a label placer refactor
48
*
49
* Revision 1.4  2007/04/05 16:07:13  jaume
47 50
* Styled labeling stuff
48 51
*
49 52
* Revision 1.3  2007/04/02 16:34:56  jaume
......
68 71
import com.iver.cit.gvsig.fmap.core.IGeometry;
69 72
/**
70 73
 *
71
 * @author jaume
74
 * @author jaume dominguez faus - jaume.dominguez@iver.es
72 75
 *
73 76
 */
74 77
public class PointPlacementConstraints extends AbstractPlacementConstraints {
75 78

  
76 79
	public FShape[] getLocationsFor(IGeometry geom, FShape labelShape, MultiPolygon exclusionZone) {
77
		FPoint2D p = (FPoint2D) geom.getInternalShape();
78
		FShape myShape = labelShape.cloneFShape();
79
		myShape.transform(AffineTransform.getTranslateInstance(p.getX(), p.getY()));
80
		return new FShape[] { myShape };
80
		if (isOnTopOfThePoint()) {
81
			FPoint2D p = (FPoint2D) geom.getInternalShape();
82
			FShape myShape = labelShape.cloneFShape();
83
			myShape.transform(AffineTransform.getTranslateInstance(p.getX(), p.getY()));
84
			return new FShape[] { myShape };
85
		} else {
86
			throw new Error("Placement mode not yet implemented");
87
		}
81 88
	}
82 89

  
90
	public void placeLabel(IGeometry geom, LabelClass lc, MultiPolygon exclusionZone, AffineTransform transform) {
91
		// TODO Implement it
92
		throw new Error("Not yet implemented!");
93

  
94
	}
83 95
}

Also available in: Unified diff