Revision 11192 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/styling/LabelingFactory.java

View differences:

LabelingFactory.java
43 43
*
44 44
* $Id$
45 45
* $Log$
46
* Revision 1.5  2007-03-28 16:48:01  jaume
46
* Revision 1.6  2007-04-13 11:59:30  jaume
47 47
* *** empty log message ***
48 48
*
49
* Revision 1.5  2007/03/28 16:48:01  jaume
50
* *** empty log message ***
51
*
49 52
* Revision 1.4  2007/03/20 16:16:20  jaume
50 53
* refactored to use ISymbol instead of FSymbol
51 54
*
......
114 117
		Object obj = null;
115 118
		try {
116 119
			clazz = Class.forName(className);
117
			// TODO remove the patch the day we deprecate FSymbol
118 120
			obj = clazz.newInstance();
119 121
			((IPersistance) obj).setXMLEntity(xml);
120 122

  
......
183 185
			return createDefaultStrategy(layer);
184 186

  
185 187
		ILabelingStrategy strat = createDefaultStrategy(layer);
186
		strat.setLabelingMethod(method);
188
		if (method != null)
189
			strat.setLabelingMethod(method);
190
		if (placement != null)
191
			strat.setPlacementConstraints(placement);
187 192
		return strat;
188 193
		/* solament per a proves, ac? falta muntar el sistema expert que
189 194
		 * decidisca quina estrat?gia ?s la millor a partir dels par?metres.
......
208 213
		case FShape.POINT:
209 214
			return new PointPlacementConstraints();
210 215
		}
211
//		throw new Error("Shape type not yet supported");
212
		return null;
216
		throw new Error("Shape type not yet supported");
217
//		return null;
213 218
	}
214 219

  
220
	public static IPlacementConstraints createPlacementConstraints(XMLEntity entity) {
221
		return (IPlacementConstraints) createFromXML(entity);
222
	}
215 223

  
224

  
216 225
}

Also available in: Unified diff