Revision 41840 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/tools/persistence/DimensionPersistenceFactory.java
DimensionPersistenceFactory.java | ||
---|---|---|
29 | 29 |
|
30 | 30 |
import java.awt.Dimension; |
31 | 31 |
import java.awt.geom.Rectangle2D; |
32 |
import org.gvsig.tools.ToolsLocator; |
|
32 | 33 |
|
33 | 34 |
import org.gvsig.tools.dynobject.DynStruct; |
34 | 35 |
import org.gvsig.tools.persistence.AbstractSinglePersistenceFactory; |
36 |
import org.gvsig.tools.persistence.PersistenceManager; |
|
35 | 37 |
import org.gvsig.tools.persistence.PersistentState; |
36 | 38 |
import org.gvsig.tools.persistence.exception.PersistenceException; |
39 |
import org.gvsig.tools.util.Callable; |
|
37 | 40 |
|
38 | 41 |
/** |
39 | 42 |
* Factory to manage the persistence of {@link Rectangle2D} objects. |
... | ... | |
80 | 83 |
state.set(FIELD_HEIGHT, dim.height); |
81 | 84 |
state.set(FIELD_WIDTH, dim.width); |
82 | 85 |
} |
86 |
|
|
87 |
public static class RegisterPersistence implements Callable { |
|
88 |
|
|
89 |
public Object call() throws Exception { |
|
90 |
PersistenceManager persistenceManager |
|
91 |
= ToolsLocator.getPersistenceManager(); |
|
92 |
persistenceManager.registerFactory(new DimensionPersistenceFactory()); |
|
93 |
return Boolean.TRUE; |
|
94 |
} |
|
95 |
} |
|
83 | 96 |
} |
Also available in: Unified diff