Revision 509 2.1/trunk/org.gvsig.view3d/org.gvsig.view3d.lib/org.gvsig.view3d.lib.impl/src/main/java/org/gvsig/view3d/lib/impl/DefaultView3DManger.java
DefaultView3DManger.java | ||
---|---|---|
23 | 23 |
|
24 | 24 |
package org.gvsig.view3d.lib.impl; |
25 | 25 |
|
26 |
import org.gvsig.fmap.mapcontext.layers.ExtendedPropertiesSupport; |
|
27 | 26 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
28 | 27 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
29 | 28 |
import org.gvsig.view3d.lib.api.View3DManager; |
30 |
import org.gvsig.view3d.lib.api.properties.GeneralProperties3D; |
|
31 | 29 |
import org.gvsig.view3d.lib.api.properties.LayerProperties3D; |
32 |
import org.gvsig.view3d.lib.api.properties.MapControlProperties3D; |
|
33 |
import org.gvsig.view3d.lib.impl.properties.DefaultGeneralProperties3D; |
|
34 |
import org.gvsig.view3d.lib.impl.properties.DefaultMapControlProperties3D; |
|
35 | 30 |
import org.gvsig.view3d.lib.impl.properties.DefaultRasterLayerProperties3D; |
36 | 31 |
import org.gvsig.view3d.lib.impl.properties.DefaultVectorialLayerProperties3D; |
37 | 32 |
|
... | ... | |
42 | 37 |
*/ |
43 | 38 |
public class DefaultView3DManger implements View3DManager { |
44 | 39 |
|
45 |
private GeneralProperties3D generalProperties; |
|
46 |
|
|
47 | 40 |
public LayerProperties3D getLayerProperties(FLayer layer) { |
48 | 41 |
Object properties = layer.getProperty("properties3D"); |
49 | 42 |
if(properties == null){ |
... | ... | |
63 | 56 |
public void setLayerProperties(FLayer layer, LayerProperties3D properties) { |
64 | 57 |
layer.setProperty("properties3D", properties); |
65 | 58 |
} |
66 |
|
|
67 |
public MapControlProperties3D getMapControl3DProperties( |
|
68 |
ExtendedPropertiesSupport viewProperties) { |
|
69 |
|
|
70 |
MapControlProperties3D properties = |
|
71 |
(MapControlProperties3D) viewProperties |
|
72 |
.getProperty("mapControl3DProperties"); |
|
73 |
|
|
74 |
if(properties == null){ |
|
75 |
properties = new DefaultMapControlProperties3D(); |
|
76 |
setMapControlProperties3D(viewProperties, properties); |
|
77 |
} |
|
78 |
|
|
79 |
return properties; |
|
80 |
} |
|
81 |
|
|
82 |
public void setMapControlProperties3D( |
|
83 |
ExtendedPropertiesSupport viewProperties, |
|
84 |
MapControlProperties3D mapControl3DProperties) { |
|
85 |
|
|
86 |
viewProperties.setProperty("mapControl3DProperties", |
|
87 |
mapControl3DProperties); |
|
88 |
} |
|
89 |
|
|
90 |
public GeneralProperties3D getGeneral3DProperties() { |
|
91 |
if(generalProperties == null){ |
|
92 |
generalProperties = new DefaultGeneralProperties3D(); |
|
93 |
} |
|
94 |
return generalProperties; |
|
95 |
} |
|
96 |
|
|
97 |
public void setGeneral3DProperties(GeneralProperties3D properties) { |
|
98 |
if(properties != null){ |
|
99 |
this.generalProperties = properties; |
|
100 |
} |
|
101 |
|
|
102 |
} |
|
103 |
|
|
104 | 59 |
} |
Also available in: Unified diff