Revision 32880 branches/v2_0_0_prep/extensions/org.gvsig.symbology/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/style/ArrowDecoratorStyle.java

View differences:

ArrowDecoratorStyle.java
39 39
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol;
40 40
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.impl.ArrowMarkerSymbol;
41 41
import org.gvsig.tools.ToolsLocator;
42
import org.gvsig.tools.dynobject.DynClass;
43
import org.gvsig.tools.persistence.PersistenceException;
42
import org.gvsig.tools.dynobject.DynStruct;
43
import org.gvsig.tools.persistence.PersistenceManager;
44 44
import org.gvsig.tools.persistence.PersistentState;
45
import org.gvsig.tools.persistence.exception.PersistenceException;
45 46

  
46 47
/**
47 48
 * Class ArrowDecoratorStyle. It is used to store the information about the
......
325 326

  
326 327
	public static void registerPersistence() {
327 328
		// Add the ArrowDecoratorStyle DynClass definition.
328
		DynClass dynClass = ToolsLocator.getDynObjectManager().add(
329
				ARROR_DECORATOR_STYLE_DYNCLASS_NAME);
330

  
329
		PersistenceManager manager = ToolsLocator.getPersistenceManager();
330
		DynStruct definition = manager.addDefinition(
331
				ArrowDecoratorStyle.class,
332
				ARROR_DECORATOR_STYLE_DYNCLASS_NAME,
333
				ARROR_DECORATOR_STYLE_DYNCLASS_NAME+" Persistence definition",
334
				null, 
335
				null
336
		);
337
		
331 338
		// Extend the Style base definition
332
		dynClass.extend(STYLE_DYNCLASS_NAME);
339
		definition.extend(STYLE_DYNCLASS_NAME);
333 340

  
334 341
		// Arrow marker count
335
		dynClass.addDynFieldInt(FIELD_ARROW_MARKER_COUNT).setMandatory(true);
342
		definition.addDynFieldInt(FIELD_ARROW_MARKER_COUNT).setMandatory(true);
336 343
		// Flip all
337
		dynClass.addDynFieldBoolean(FIELD_FLIP_ALL).setMandatory(true);
344
		definition.addDynFieldBoolean(FIELD_FLIP_ALL).setMandatory(true);
338 345
		// flip first
339
		dynClass.addDynFieldBoolean(FIELD_FLIP_FIRST).setMandatory(true);
346
		definition.addDynFieldBoolean(FIELD_FLIP_FIRST).setMandatory(true);
340 347
		// Follow line angles
341
		dynClass.addDynFieldBoolean(FIELD_FOLLOW_LINE_ANGLE).setMandatory(true);
348
		definition.addDynFieldBoolean(FIELD_FOLLOW_LINE_ANGLE).setMandatory(true);
342 349
		// Marker
343
		dynClass.addDynFieldObject(FIELD_MARKER).setMandatory(true);
350
		definition.addDynFieldObject(FIELD_MARKER).setMandatory(true);
344 351

  
345
		// Register in persistence
346
		ToolsLocator.getPersistenceManager().registerClass(
347
				ArrowDecoratorStyle.class, dynClass);
348 352
	}
349 353

  
350 354
}

Also available in: Unified diff