Revision 760 2.1/trunk/org.gvsig.view3d/org.gvsig.view3d.vector/org.gvsig.view3d.vector.lib/org.gvsig.view3d.vector.lib.impl/src/main/java/org/gvsig/view3d/vector/lib/impl/DefaultVectorExtrusionLoaderParameters.java
DefaultVectorExtrusionLoaderParameters.java | ||
---|---|---|
25 | 25 |
public static final String PARAMETERS_DEFINITION_DESCRIPTION = |
26 | 26 |
"Parameters that defines vector extrusion load mode"; |
27 | 27 |
|
28 |
public static final String VECTOR_ELEVATION_MODEL_FIELD_NAME = "vectorElevationModel";
|
|
28 |
public static final String VECTOR_ELEVATION_MODE_FIELD_NAME = "vectorElevationMode";
|
|
29 | 29 |
public static final String DEFAULT_COLOR_FIELD_NAME = "defaultColor"; |
30 | 30 |
public static final String HEIGHT_FIELD_FIELD_NAME = "heightField"; |
31 | 31 |
public static final String CONSTANT_HEIGHT_FIELD_NAME = "constantHeight"; |
... | ... | |
47 | 47 |
} |
48 | 48 |
|
49 | 49 |
@Override |
50 |
public VectorElevationMode getVectorElevationModel() {
|
|
50 |
public VectorElevationMode getVectorElevationMode() { |
|
51 | 51 |
return this.vectorElevationMode; |
52 | 52 |
} |
53 | 53 |
|
54 | 54 |
@Override |
55 |
public void setVectorElevationModel(VectorElevationMode vectorElevationMode) {
|
|
55 |
public void setVectorElevationMode(VectorElevationMode vectorElevationMode) { |
|
56 | 56 |
this.vectorElevationMode = vectorElevationMode; |
57 | 57 |
} |
58 | 58 |
|
... | ... | |
87 | 87 |
} |
88 | 88 |
|
89 | 89 |
@Override |
90 |
public double getVerticalExageration() { |
|
90 |
public double getVerticalExaggeration() {
|
|
91 | 91 |
return this.verticalExaggeration; |
92 | 92 |
} |
93 | 93 |
|
94 | 94 |
@Override |
95 |
public void setVerticalExageration(double verticalExageration) {
|
|
96 |
this.verticalExaggeration = verticalExageration; |
|
95 |
public void setVerticalExaggeration(double verticalExaggeration) {
|
|
96 |
this.verticalExaggeration = verticalExaggeration;
|
|
97 | 97 |
} |
98 | 98 |
|
99 | 99 |
public static void registerPersistenceDefinition() { |
... | ... | |
103 | 103 |
definition = manager.addDefinition(DefaultVectorLoaderParameters.class, PARAMETERS_DEFINITION_NAME, |
104 | 104 |
PARAMETERS_DEFINITION_DESCRIPTION, null, null); |
105 | 105 |
|
106 |
definition.addDynFieldObject(VECTOR_ELEVATION_MODEL_FIELD_NAME);
|
|
106 |
definition.addDynFieldObject(VECTOR_ELEVATION_MODE_FIELD_NAME); |
|
107 | 107 |
definition.addDynFieldObject(DEFAULT_COLOR_FIELD_NAME); |
108 | 108 |
definition.addDynFieldString(HEIGHT_FIELD_FIELD_NAME); |
109 | 109 |
definition.addDynFieldDouble(CONSTANT_HEIGHT_FIELD_NAME); |
... | ... | |
115 | 115 |
public Object clone() throws CloneNotSupportedException { |
116 | 116 |
|
117 | 117 |
VectorLoaderParameters newParameters = new DefaultVectorLoaderParameters(); |
118 |
newParameters.setVectorElevationMode(this.getVectorElevationModel());
|
|
118 |
newParameters.setVectorElevationMode(this.getVectorElevationMode()); |
|
119 | 119 |
newParameters.setDefaultColor(this.getDefaultColor()); |
120 | 120 |
newParameters.setConstantHeight(this.getConstantHeight()); |
121 | 121 |
newParameters.setLayer(this.getLayer()); |
... | ... | |
124 | 124 |
|
125 | 125 |
@Override |
126 | 126 |
protected void doSaveToState(PersistentState state) throws PersistenceException { |
127 |
state.set(VECTOR_ELEVATION_MODEL_FIELD_NAME, this.vectorElevationMode);
|
|
127 |
state.set(VECTOR_ELEVATION_MODE_FIELD_NAME, this.vectorElevationMode); |
|
128 | 128 |
state.set(DEFAULT_COLOR_FIELD_NAME, this.defaultColor); |
129 |
state.set(HEIGHT_FIELD_FIELD_NAME, this.heightField); |
|
129 | 130 |
state.set(CONSTANT_HEIGHT_FIELD_NAME, this.constantHeight); |
131 |
state.set(VERTICAL_EXAGGERATION_FIELD_NAME, this.verticalExaggeration); |
|
130 | 132 |
} |
131 | 133 |
|
132 | 134 |
@Override |
133 | 135 |
protected void doLoadFromState(PersistentState state) throws PersistenceException { |
134 |
// TODO Auto-generated method stub |
|
135 |
|
|
136 |
this.vectorElevationMode = (VectorElevationMode) state.get(VECTOR_ELEVATION_MODE_FIELD_NAME); |
|
137 |
this.defaultColor = (Color) state.get(DEFAULT_COLOR_FIELD_NAME); |
|
138 |
this.heightField = state.getString(HEIGHT_FIELD_FIELD_NAME); |
|
139 |
this.constantHeight = state.getDouble(CONSTANT_HEIGHT_FIELD_NAME); |
|
140 |
this.verticalExaggeration = state.getDouble(VERTICAL_EXAGGERATION_FIELD_NAME); |
|
136 | 141 |
} |
137 | 142 |
} |
Also available in: Unified diff