Revision 369 2.0/trunk/org.gvsig.gvsig3d/org.gvsig.gvsig3d.lib/org.gvsig.gvsig3d.lib.impl/src/main/java/org/gvsig/gvsig3d/impl/symbology3d/extrusion/impl/ExtrusionPolygonSymbol.java
ExtrusionPolygonSymbol.java | ||
---|---|---|
11 | 11 |
import org.gvsig.osgvp.geometry.GeoPolygonList3D; |
12 | 12 |
import org.gvsig.osgvp.symbology.fill.ExtrudedFill; |
13 | 13 |
import org.gvsig.osgvp.symbology.fill.SimpleFill; |
14 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.impl.AbstractFillSymbol; |
|
14 | 15 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.impl.SimpleFillSymbol; |
16 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractSymbol; |
|
17 |
import org.gvsig.tools.ToolsLocator; |
|
18 |
import org.gvsig.tools.dynobject.DynStruct; |
|
19 |
import org.gvsig.tools.persistence.PersistenceManager; |
|
20 |
import org.gvsig.tools.persistence.PersistentState; |
|
21 |
import org.gvsig.tools.persistence.exception.PersistenceException; |
|
15 | 22 |
import org.gvsig.tools.util.Callable; |
23 |
import org.gvsig.tools.util.Caller; |
|
24 |
import org.gvsig.tools.util.impl.DefaultCaller; |
|
16 | 25 |
|
17 | 26 |
/** |
18 | 27 |
* @author AI2 |
... | ... | |
89 | 98 |
|
90 | 99 |
} |
91 | 100 |
|
101 |
public void loadFromState(PersistentState state) |
|
102 |
throws PersistenceException { |
|
103 |
// Set parent fill symbol properties |
|
104 |
super.loadFromState(state); |
|
92 | 105 |
|
106 |
// // Set own properties |
|
107 |
// setStyle(state.getInt(FIELD_MARKERSTYLE)); |
|
108 |
// setOutlined(state.getBoolean(FIELD_OUTLINED)); |
|
109 |
// if (isOutlined()) { |
|
110 |
// setOutlineColor((Color) state.get(FIELD_OUTLINECOLOR)); |
|
111 |
// setOutlineSize(state.getDouble(FIELD_OUTLINESIZE)); |
|
112 |
// } |
|
113 |
} |
|
114 |
|
|
115 |
public void saveToState(PersistentState state) throws PersistenceException { |
|
116 |
// Save parent fill symbol properties |
|
117 |
super.saveToState(state); |
|
118 |
|
|
119 |
// Save own properties |
|
120 |
// state.set(FIELD_MARKERSTYLE, getStyle()); |
|
121 |
// state.set(FIELD_OUTLINED, isOutlined()); |
|
122 |
// if (isOutlined()) { |
|
123 |
// state.set(FIELD_OUTLINECOLOR, getOutlineColor()); |
|
124 |
// state.set(FIELD_OUTLINESIZE, getOutlineSize()); |
|
125 |
// } |
|
126 |
} |
|
127 |
|
|
128 |
public static class RegisterPersistence implements Callable { |
|
129 |
|
|
130 |
public Object call() throws Exception { |
|
131 |
PersistenceManager manager = ToolsLocator.getPersistenceManager(); |
|
132 |
if (manager.getDefinition("Symbol") == null) { |
|
133 |
Caller caller = new DefaultCaller(); |
|
134 |
caller.add(new AbstractSymbol.RegisterPersistence()); |
|
135 |
caller.call(); |
|
136 |
} |
|
137 |
|
|
138 |
if (manager.getDefinition("SimpleFill3DSymbol") == null) { |
|
139 |
Caller caller = new DefaultCaller(); |
|
140 |
caller.add(new SimpleFill3DSymbol.RegisterPersistence()); |
|
141 |
caller.call(); |
|
142 |
} |
|
143 |
|
|
144 |
DynStruct definition = manager.addDefinition( |
|
145 |
ExtrusionPolygonSymbol.class, "ExtrusionPolygonSymbol", |
|
146 |
"ExtrusionPolygonSymbol Persistence definition", null, null); |
|
147 |
|
|
148 |
definition.extend(PersistenceManager.PERSISTENCE_NAMESPACE, |
|
149 |
"FillSymbol"); |
|
150 |
|
|
151 |
return Boolean.TRUE; |
|
152 |
} |
|
153 |
} |
|
154 |
|
|
93 | 155 |
} |
Also available in: Unified diff