Revision 486 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.FLayer; |
|
27 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
|
26 | 28 |
import org.gvsig.view3d.lib.api.View3DManager; |
29 |
import org.gvsig.view3d.lib.api.properties.LayerProperties3D; |
|
30 |
import org.gvsig.view3d.lib.impl.properties.DefaultRasterLayerProperties3D; |
|
31 |
import org.gvsig.view3d.lib.impl.properties.DefaultVectorialLayerProperties3D; |
|
27 | 32 |
|
28 | 33 |
|
29 | 34 |
/** |
... | ... | |
32 | 37 |
*/ |
33 | 38 |
public class DefaultView3DManger implements View3DManager { |
34 | 39 |
|
40 |
public LayerProperties3D getLayerProperties(FLayer layer) { |
|
41 |
Object properties = layer.getProperty("properties3D"); |
|
42 |
if(properties == null){ |
|
43 |
|
|
44 |
if(layer instanceof FLyrVect){ |
|
45 |
return new DefaultVectorialLayerProperties3D(); |
|
46 |
} else { |
|
47 |
return new DefaultRasterLayerProperties3D(); |
|
48 |
} |
|
49 |
} |
|
50 |
return (LayerProperties3D) properties; |
|
51 |
} |
|
52 |
|
|
53 |
public void setLayerProperties(FLayer layer, LayerProperties3D properties) { |
|
54 |
layer.setProperty("properties3D", properties); |
|
55 |
} |
|
56 |
|
|
35 | 57 |
} |
Also available in: Unified diff