Revision 29938
branches/v2_0_0_prep/extensions/ext3Dgui/config/config.xml | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
2 | 2 |
<plugin-config> |
3 |
<depends plugin-name="com.iver.cit.gvsig" /> |
|
4 |
<depends plugin-name="com.iver.core" /> |
|
3 |
<depends plugin-name="org.gvsig.app" /> |
|
4 |
<!-- |
|
5 |
<depends plugin-name="com.iver.core" /> |
|
6 |
--> |
|
5 | 7 |
<libraries library-dir="./lib" /> |
6 | 8 |
<resourceBundle name="text" /> |
7 | 9 |
<extensions> |
... | ... | |
118 | 120 |
|
119 | 121 |
<extension class-name="org.gvsig.gvsig3dgui.display.EnableCompass" |
120 | 122 |
description="Extensi?n encargada de mostrar/ocultar la brujula" |
121 |
active="false" |
|
122 |
priority="51"> |
|
123 |
active="false" priority="51"> |
|
123 | 124 |
|
124 |
<menu text="Vista/Visualizaci?n/Brujula" action-command="COMPASS" icon="compass-icon"/> |
|
125 |
<menu text="Vista/Visualizaci?n/Brujula" action-command="COMPASS" |
|
126 |
icon="compass-icon" /> |
|
125 | 127 |
<tool-bar name="EnableCompass" position="4"> |
126 |
<action-tool icon="compass-icon" action-command="COMPASS" tooltip="Modo de Brujula" position="2"/> |
|
128 |
<action-tool icon="compass-icon" action-command="COMPASS" |
|
129 |
tooltip="Modo de Brujula" position="2" /> |
|
127 | 130 |
</tool-bar> |
128 | 131 |
</extension> |
129 |
|
|
130 |
|
|
132 |
|
|
133 |
|
|
131 | 134 |
<extension class-name="org.gvsig.gvsig3dgui.view.ViewPropertiesExtension3D" |
132 | 135 |
description="Extensi?n encargada de manejar de activar siempre al norte." |
133 | 136 |
active="true"> |
... | ... | |
243 | 246 |
<extension class-name="org.gvsig.gvsig3dgui.AboutExtension3D" |
244 | 247 |
description="Extension to add about panel." active="true" priority="1"> |
245 | 248 |
</extension> |
246 |
|
|
249 |
|
|
247 | 250 |
<extension class-name="org.gvsig.gvsig3dgui.layer.properties.Module3D" |
248 | 251 |
description="M?dulo adaptador para la librer?a de raster." active="true" |
249 | 252 |
priority="30"> |
branches/v2_0_0_prep/extensions/ext3Dgui/distribution/extension-distribution.xml | ||
---|---|---|
1 |
<assembly> |
|
2 |
<id>distribution</id> |
|
3 |
<formats> |
|
4 |
<format>dir</format> |
|
5 |
</formats> |
|
6 |
<fileSets> |
|
7 |
<!-- Extructure for the extension --> |
|
8 |
<fileSet> |
|
9 |
<directory>config</directory> |
|
10 |
<outputDirectory>${extension-distribution} |
|
11 |
</outputDirectory> |
|
12 |
</fileSet> |
|
13 |
<fileSet> |
|
14 |
<directory>images</directory> |
|
15 |
<outputDirectory>/${extension-distribution}/images |
|
16 |
</outputDirectory> |
|
17 |
</fileSet> |
|
18 |
<fileSet> |
|
19 |
<directory>resources</directory> |
|
20 |
<outputDirectory>/${extension-distribution}/resources |
|
21 |
</outputDirectory> |
|
22 |
</fileSet> |
|
23 |
</fileSets> |
|
24 |
<files> |
|
25 |
<file> |
|
26 |
<source>build.number</source> |
|
27 |
<outputDirectory>${extension-distribution} |
|
28 |
</outputDirectory> |
|
29 |
</file> |
|
30 |
</files> |
|
31 |
<!-- |
|
32 |
*********************************************************************** |
|
33 |
--> |
|
34 |
<!-- * *--> |
|
35 |
<!-- |
|
36 |
*********************************************************************** |
|
37 |
--> |
|
38 |
<dependencySets> |
|
39 |
<dependencySet> |
|
40 |
<outputDirectory>${extension-distribution}/${library-dir} |
|
41 |
</outputDirectory> |
|
42 |
<includes> |
|
43 |
<include>org.gvsig:lib3DMap</include> |
|
44 |
<include>org.gvsig:libCacheService |
|
45 |
</include> |
|
46 |
<include>org.gvsig:ext3Dgui</include> |
|
47 |
<include>org.gvsig:libG*</include> |
|
48 |
<include>org.gvsig:libFMap_geometries</include> |
|
49 |
</includes> |
|
50 |
</dependencySet> |
|
51 |
<dependencySet> |
|
52 |
<outputDirectory>${gvsig-extension-distribution}/lib |
|
53 |
</outputDirectory> |
|
54 |
<includes> |
|
55 |
<include>org.gvsig.osgvp.libosgvp:* |
|
56 |
</include> |
|
57 |
<include>jogl:*</include> |
|
58 |
<include>org.gvsig:lib3DMap-share</include> |
|
59 |
<include>org.gvsig:libExpressions</include> |
|
60 |
<include>org.gvsig:extSymbology</include> |
|
61 |
</includes> |
|
62 |
</dependencySet> |
|
63 |
</dependencySets> |
|
64 |
</assembly> |
branches/v2_0_0_prep/extensions/ext3Dgui/distribution/distribution.xml | ||
---|---|---|
1 |
<assembly> |
|
2 |
<id>distribution</id> |
|
3 |
<formats> |
|
4 |
<format>dir</format> |
|
5 |
</formats> |
|
6 |
<fileSets> |
|
7 |
<!-- Extructure for the extension --> |
|
8 |
<fileSet> |
|
9 |
<directory>config</directory> |
|
10 |
<outputDirectory>${extension-distribution}</outputDirectory> |
|
11 |
</fileSet> |
|
12 |
<fileSet> |
|
13 |
<directory>images</directory> |
|
14 |
<outputDirectory>/${extension-distribution}/images</outputDirectory> |
|
15 |
</fileSet> |
|
16 |
<fileSet> |
|
17 |
<directory>resources</directory> |
|
18 |
<outputDirectory>/${extension-distribution}/resources</outputDirectory> |
|
19 |
</fileSet> |
|
20 |
</fileSets> |
|
21 |
<files> |
|
22 |
<file> |
|
23 |
<source>build.number</source> |
|
24 |
<outputDirectory>${extension-distribution}</outputDirectory> |
|
25 |
</file> |
|
26 |
</files> |
|
27 |
<!-- |
|
28 |
*********************************************************************** |
|
29 |
--> |
|
30 |
<!-- * *--> |
|
31 |
<!-- |
|
32 |
*********************************************************************** |
|
33 |
--> |
|
34 |
<dependencySets> |
|
35 |
<dependencySet> |
|
36 |
<outputDirectory>${extension-distribution}/${library-dir} |
|
37 |
</outputDirectory> |
|
38 |
<includes> |
|
39 |
<include>org.gvsig:org.gvsig.3d.map</include> |
|
40 |
<include>org.gvsig:org.gvsig.cacheservice</include> |
|
41 |
<include>org.gvsig:org.gvsig.3d.gui</include> |
|
42 |
<include>org.gvsig:libG*</include> |
|
43 |
<include>org.gvsig:org.gvsig.fmap.geometry</include> |
|
44 |
<include>org.gvsig:org.gvsig.fmap.geometry3d</include> |
|
45 |
</includes> |
|
46 |
</dependencySet> |
|
47 |
<dependencySet> |
|
48 |
<outputDirectory>${gvsig-extension-distribution}/lib |
|
49 |
</outputDirectory> |
|
50 |
<includes> |
|
51 |
<include>org.gvsig.osgvp.libosgvp:* |
|
52 |
</include> |
|
53 |
<include>jogl:*</include> |
|
54 |
<include>org.gvsig:org.gvsig.3d.share</include><!-- |
|
55 |
<include>org.gvsig:extSymbology</include> |
|
56 |
--></includes> |
|
57 |
</dependencySet> |
|
58 |
</dependencySets> |
|
59 |
</assembly> |
|
0 | 60 |
branches/v2_0_0_prep/extensions/ext3Dgui/src/org/gvsig/gvsig3dgui/ProjectView3D.java | ||
---|---|---|
43 | 43 |
import org.gvsig.osgvp.viewer.IViewerContainer; |
44 | 44 |
import org.gvsig.osgvp.viewer.ViewerFactory; |
45 | 45 |
import org.gvsig.osgvp.viewer.ViewerStateListener; |
46 |
import org.gvsig.tools.exception.DriverException; |
|
47 | 46 |
import org.gvsig.utils.IPersistence; |
48 | 47 |
import org.gvsig.utils.StringUtilities; |
49 | 48 |
import org.gvsig.utils.XMLEntity; |
... | ... | |
69 | 68 |
private ProjectCamera projectCamera = null; |
70 | 69 |
|
71 | 70 |
private int m_planetType = Planet.CoordinateSystemType.PROJECTED; // spheric |
72 |
// or
|
|
73 |
// plane
|
|
71 |
// or |
|
72 |
// plane |
|
74 | 73 |
|
75 | 74 |
private Color backgroundColor; |
76 | 75 |
|
... | ... | |
169 | 168 |
* @see com.iver.cit.gvsig.project.documents.ProjectDocument#setXMLEntity(com.iver.utiles.XMLEntity) |
170 | 169 |
*/ |
171 | 170 |
public void setXMLEntity03(XMLEntity xml, Project p) throws XMLException { |
172 |
try { |
|
173 |
super.setXMLEntity03(xml); |
|
174 |
} catch (ReadException e) { |
|
175 |
// TODO Auto-generated catch block |
|
176 |
e.printStackTrace(); |
|
177 |
} |
|
171 |
super.setXMLEntity(xml); |
|
178 | 172 |
int numViews = xml.getIntProperty("numViews"); |
179 | 173 |
ProjectDocument.NUMS.put(ProjectView3DFactory.registerName, |
180 | 174 |
new Integer(numViews)); |
... | ... | |
185 | 179 |
setMapContext(MapContext3D.createFromXML03(xml.getChild(0))); |
186 | 180 |
|
187 | 181 |
if (xml.getBooleanProperty("mapOverView")) { |
188 |
setMapOverViewContext(MapContext.createFromXML03(xml.getChild(1)));
|
|
182 |
setMapOverViewContext(MapContext.createFromXML(xml.getChild(1))); |
|
189 | 183 |
} |
190 | 184 |
|
191 | 185 |
} |
... | ... | |
197 | 191 |
* DOCUMENT ME! |
198 | 192 |
* @param p |
199 | 193 |
* DOCUMENT ME! |
200 |
* @throws XMLException |
|
201 | 194 |
* @throws XMLException |
195 |
* @throws XMLException |
|
202 | 196 |
* @throws OpenException |
203 | 197 |
* |
204 | 198 |
* @see com.iver.cit.gvsig.project.documents.ProjectDocument#setXMLEntity(com.iver.utiles.XMLEntity) |
205 | 199 |
*/ |
206 | 200 |
public void setXMLEntity(XMLEntity xml) throws XMLException { |
207 |
|
|
208 |
super.setXMLEntity(xml); |
|
209 |
int currentChild = 0; |
|
210 | 201 |
|
211 |
// Read last child
|
|
212 |
int childNumber = currentChild;
|
|
202 |
super.setXMLEntity(xml);
|
|
203 |
int currentChild = 0;
|
|
213 | 204 |
|
214 |
// Get camera |
|
215 |
XMLEntity xmlProp = xml.getChild(childNumber); |
|
216 |
if (xmlProp.contains("eyeX")) { |
|
217 |
try { |
|
218 |
String className = xmlProp.getStringProperty("className"); |
|
219 |
Class classProp = Class.forName(className); |
|
220 |
Object obj = classProp.newInstance(); |
|
221 |
IPersistence objPersist = (IPersistence) obj; |
|
222 |
objPersist.setXMLEntity(xmlProp); |
|
223 |
projectCamera = (ProjectCamera) obj; |
|
224 |
} catch (Exception e) { |
|
205 |
// Read last child |
|
206 |
int childNumber = currentChild; |
|
225 | 207 |
|
226 |
} |
|
227 |
currentChild++; |
|
228 |
|
|
208 |
// Get camera |
|
209 |
XMLEntity xmlProp = xml.getChild(childNumber); |
|
210 |
if (xmlProp.contains("eyeX")) { |
|
211 |
try { |
|
212 |
String className = xmlProp.getStringProperty("className"); |
|
213 |
Class classProp = Class.forName(className); |
|
214 |
Object obj = classProp.newInstance(); |
|
215 |
IPersistence objPersist = (IPersistence) obj; |
|
216 |
objPersist.setXMLEntity(xmlProp); |
|
217 |
projectCamera = (ProjectCamera) obj; |
|
218 |
} catch (Exception e) { |
|
229 | 219 |
|
220 |
} |
|
221 |
currentChild++; |
|
222 |
|
|
230 | 223 |
int numViews = xml.getIntProperty("numViews"); |
231 | 224 |
ProjectDocument.NUMS.put(ProjectView3DFactory.registerName, |
232 | 225 |
new Integer(numViews)); |
... | ... | |
252 | 245 |
} |
253 | 246 |
getOrCreateView(); |
254 | 247 |
showErrors(); |
255 |
}
|
|
248 |
}
|
|
256 | 249 |
|
257 | 250 |
} |
258 | 251 |
|
259 | 252 |
public String getFrameName() { |
260 | 253 |
return PluginServices.getText(this, "Vista3D"); |
261 | 254 |
} |
262 |
|
|
255 |
|
|
263 | 256 |
public IViewerContainer getOrCreateCanvas3D() { |
264 | 257 |
// create libJOSG objects |
265 | 258 |
if (m_canvas3d == null) { |
... | ... | |
267 | 260 |
try { |
268 | 261 |
m_planetViewer = new PlanetViewer(); |
269 | 262 |
} catch (NodeException e1) { |
270 |
logger.error("Command: " + "Error creating planer viewer.", e1); |
|
263 |
logger.error("Command: " + "Error creating planer viewer.", e1);
|
|
271 | 264 |
} |
272 | 265 |
|
273 | 266 |
// Getting 3D preferences |
... | ... | |
292 | 285 |
.getOSGViewer())); |
293 | 286 |
|
294 | 287 |
// ViewerFactory.getInstance().startAnimator(); |
295 |
|
|
288 |
|
|
296 | 289 |
// |
297 | 290 |
m_canvas3d.getOSGViewer().setDisplaySettings(new DisplaySettings()); |
298 |
|
|
291 |
|
|
299 | 292 |
// |
300 | 293 |
m_planetViewer.setEnabledLighting(false); |
301 | 294 |
ViewerFactory.getInstance().startAnimator(); |
302 | 295 |
|
303 |
// try { |
|
304 |
// ((PlanetViewer) m_canvas3d.getOSGViewer()).activePlanet(0); |
|
305 |
// } catch (ChildIndexOutOfBoundsExceptions e1) { |
|
306 |
// // TODO Auto-generated catch block |
|
307 |
// e1.printStackTrace(); |
|
308 |
// } |
|
309 |
// ((PlanetViewer) m_canvas3d.getOSGViewer()).computeActiveCoordinateSystemNodePath(); |
|
310 |
|
|
296 |
// try { |
|
297 |
// ((PlanetViewer) m_canvas3d.getOSGViewer()).activePlanet(0); |
|
298 |
// } catch (ChildIndexOutOfBoundsExceptions e1) { |
|
299 |
// // TODO Auto-generated catch block |
|
300 |
// e1.printStackTrace(); |
|
301 |
// } |
|
302 |
// ((PlanetViewer) |
|
303 |
// m_canvas3d.getOSGViewer()).computeActiveCoordinateSystemNodePath(); |
|
304 |
|
|
311 | 305 |
// REPAINTING VIEWER |
312 | 306 |
if (m_canvas3d != null) |
313 | 307 |
m_canvas3d.repaint(); |
314 |
|
|
308 |
|
|
315 | 309 |
if (getBackGroundColor() != null) { |
316 | 310 |
float r, g, b, a; |
317 | 311 |
r = ((float) backgroundColor.getRed()) / 255.0f; |
... | ... | |
322 | 316 |
} |
323 | 317 |
try { |
324 | 318 |
m_planet = new Planet(); |
325 |
m_planet.setCoordinateSystemType(m_planetType); |
|
326 |
if (m_planetType == Planet.CoordinateSystemType.PROJECTED) { |
|
327 |
m_planet.setCoordinateSystemName("EPSG:23030"); |
|
328 |
double extent[] = new double[4]; |
|
329 |
extent[0] = CacheService.planeGlobalBounds.getMinX(); |
|
330 |
extent[1] = CacheService.planeGlobalBounds.getMinY(); |
|
331 |
extent[2] = CacheService.planeGlobalBounds.getMaxX(); |
|
332 |
extent[3] = CacheService.planeGlobalBounds.getMaxY(); |
|
333 |
m_planet.setExtent(extent); |
|
334 |
} |
|
319 |
m_planet.setCoordinateSystemType(m_planetType);
|
|
320 |
if (m_planetType == Planet.CoordinateSystemType.PROJECTED) {
|
|
321 |
m_planet.setCoordinateSystemName("EPSG:23030");
|
|
322 |
double extent[] = new double[4];
|
|
323 |
extent[0] = CacheService.planeGlobalBounds.getMinX();
|
|
324 |
extent[1] = CacheService.planeGlobalBounds.getMinY();
|
|
325 |
extent[2] = CacheService.planeGlobalBounds.getMaxX();
|
|
326 |
extent[3] = CacheService.planeGlobalBounds.getMaxY();
|
|
327 |
m_planet.setExtent(extent);
|
|
328 |
}
|
|
335 | 329 |
} catch (NodeException e2) { |
336 | 330 |
// TODO Auto-generated catch block |
337 | 331 |
e2.printStackTrace(); |
... | ... | |
477 | 471 |
} |
478 | 472 |
|
479 | 473 |
m_planetViewer.setEnabledLighting(true); |
480 |
|
|
474 |
|
|
481 | 475 |
} |
482 | 476 |
m_canvas3d.addKeyListener(new Key3DListener(this.m_planet)); |
483 |
|
|
477 |
|
|
484 | 478 |
return m_canvas3d; |
485 | 479 |
} |
486 |
|
|
480 |
|
|
487 | 481 |
public View3D getOrCreateView() { |
488 |
if(m_view == null) { |
|
482 |
if (m_view == null) {
|
|
489 | 483 |
m_view = new View3D(); |
490 | 484 |
|
491 | 485 |
m_view.setCanvas3d(getOrCreateCanvas3D()); |
492 | 486 |
|
493 | 487 |
m_view.setPlanet(m_planet); |
494 |
m_view.setModel(this); |
|
495 |
m_view.setNavMode(new NavigationMode(((PlanetViewer) m_planetViewer) |
|
496 |
.getCustomTerrainManipulator())); |
|
488 |
m_view.setModel(this); |
|
489 |
m_view.setNavMode(new NavigationMode( |
|
490 |
((PlanetViewer) m_planetViewer) |
|
491 |
.getCustomTerrainManipulator())); |
|
497 | 492 |
|
498 | 493 |
((MapContext3D) getMapContext()) |
499 | 494 |
.setVerticalExageration(verticalExaggeration); |
... | ... | |
507 | 502 |
// View allready exits. Return it. |
508 | 503 |
if (m_view != null) |
509 | 504 |
return m_view; |
510 |
|
|
505 |
|
|
511 | 506 |
getOrCreateView(); |
512 | 507 |
|
513 | 508 |
callCreateWindow(m_view); |
... | ... | |
550 | 545 |
this.exportToXMLLayerDependencies(layers.getLayer(i), root, |
551 | 546 |
project); |
552 | 547 |
} |
553 |
} else {
|
|
554 |
if (layer instanceof AlphanumericData) {
|
|
548 |
// TODO:COMENTADO PARA LA 2.0
|
|
549 |
// } else {
|
|
555 | 550 |
|
556 |
try { |
|
557 |
project |
|
558 |
.exportToXMLDataSource(root, |
|
559 |
((AlphanumericData) layer).getRecordset() |
|
560 |
.getName()); |
|
561 |
} catch (ReadDriverException e) { |
|
562 |
// TODO Auto-generated catch block |
|
563 |
e.printStackTrace(); |
|
564 |
} |
|
565 |
|
|
566 |
ProjectTable pt = project.getTable((AlphanumericData) layer); |
|
567 |
if (pt != null) { |
|
568 |
pt.exportToXML(root, project); |
|
569 |
} |
|
570 |
} |
|
551 |
// if (layer instanceof AlphanumericData) { |
|
552 |
// |
|
553 |
// try { |
|
554 |
// project |
|
555 |
// .exportToXMLDataSource(root, |
|
556 |
// ((AlphanumericData) layer).getRecordset() |
|
557 |
// .getName()); |
|
558 |
// } catch (ReadException e) { |
|
559 |
// // TODO Auto-generated catch block |
|
560 |
// e.printStackTrace(); |
|
561 |
// } |
|
562 |
// |
|
563 |
// ProjectTable pt = project.getTable((AlphanumericData) layer); |
|
564 |
// if (pt != null) { |
|
565 |
// pt.exportToXML(root, project); |
|
566 |
// } |
|
567 |
// } |
|
571 | 568 |
} |
572 | 569 |
} |
573 | 570 |
|
574 | 571 |
public void importFromXML(XMLEntity root, XMLEntity typeRoot, |
575 | 572 |
int elementIndex, Project project, boolean removeDocumentsFromRoot) |
576 |
throws XMLException, OpenException { |
|
577 |
XMLEntity element = typeRoot.getChild(elementIndex); |
|
578 |
|
|
579 |
this.setXMLEntity(element); |
|
580 |
project.addDocument(this); |
|
581 |
if (removeDocumentsFromRoot) { |
|
582 |
typeRoot.removeChild(elementIndex); |
|
583 |
} |
|
584 |
|
|
585 |
// Cargamos las tables vinculadas: |
|
586 |
|
|
587 |
// Recuperamos todos los nombres |
|
588 |
XMLEntity tablesRoot = project.getExportXMLTypeRootNode(root, |
|
589 |
ProjectTableFactory.registerName); |
|
590 |
int childIndex; |
|
591 |
XMLEntity child; |
|
592 |
// Lo hacemos en un map por si una vista se usa varias veces |
|
593 |
HashMap tablesName = new HashMap(); |
|
594 |
Iterator iterTables = tablesRoot.findChildren("viewName", this |
|
595 |
.getName()); |
|
596 |
while (iterTables.hasNext()) { |
|
597 |
child = (XMLEntity) iterTables.next(); |
|
598 |
tablesName.put(child.getStringProperty("name"), child |
|
599 |
.getStringProperty("name")); |
|
600 |
} |
|
601 |
|
|
602 |
XMLEntity tableXML; |
|
603 |
|
|
604 |
// Construimos un diccionario ordenado inversamente por el indice |
|
605 |
// del elemento (por si se van eliminando elementos al importar) y |
|
606 |
// como valor el nombre de la vista |
|
607 |
TreeMap tablesToImport = new TreeMap(new Comparator() { |
|
608 |
|
|
609 |
public int compare(Object o1, Object o2) { |
|
610 |
|
|
611 |
if (((Integer) o1).intValue() > ((Integer) o2).intValue()) { |
|
612 |
return -1; // o1 first |
|
613 |
} else if (((Integer) o1).intValue() < ((Integer) o2) |
|
614 |
.intValue()) { |
|
615 |
return 1; // o1 second |
|
616 |
} |
|
617 |
return 0; |
|
618 |
} |
|
619 |
|
|
620 |
}); |
|
621 |
Iterator iterTablesName = tablesName.keySet().iterator(); |
|
622 |
int tableIndex; |
|
623 |
String tableName; |
|
624 |
while (iterTablesName.hasNext()) { |
|
625 |
tableName = (String) iterTablesName.next(); |
|
626 |
tableIndex = tablesRoot.firstIndexOfChild("name", tableName); |
|
627 |
tablesToImport.put(new Integer(tableIndex), tableName); |
|
628 |
} |
|
629 |
|
|
630 |
ProjectTable table; |
|
631 |
ProjectDocumentFactory tableFactory = project |
|
632 |
.getProjectDocumentFactory(ProjectTableFactory.registerName); |
|
633 |
|
|
634 |
Iterator iterTablesToImport = tablesToImport.entrySet().iterator(); |
|
635 |
Entry entry; |
|
636 |
// Nos recorremos las vistas a importar |
|
637 |
while (iterTablesToImport.hasNext()) { |
|
638 |
entry = (Entry) iterTablesToImport.next(); |
|
639 |
tableName = (String) entry.getValue(); |
|
640 |
tableIndex = ((Integer) entry.getKey()).intValue(); |
|
641 |
table = (ProjectTable) tableFactory.create(project); |
|
642 |
try { |
|
643 |
table.importFromXML(root, tablesRoot, tableIndex, project, |
|
644 |
removeDocumentsFromRoot); |
|
645 |
} catch (ReadException e) { |
|
646 |
// TODO Auto-generated catch block |
|
647 |
e.printStackTrace(); |
|
648 |
} |
|
649 |
} |
|
573 |
throws XMLException { |
|
574 |
// TODO:COMENTADO PARA LA 2.0 |
|
575 |
// XMLEntity element = typeRoot.getChild(elementIndex); |
|
576 |
// |
|
577 |
// this.setXMLEntity(element); |
|
578 |
// project.addDocument(this); |
|
579 |
// if (removeDocumentsFromRoot) { |
|
580 |
// typeRoot.removeChild(elementIndex); |
|
581 |
// } |
|
582 |
// |
|
583 |
// // Cargamos las tables vinculadas: |
|
584 |
// |
|
585 |
// // Recuperamos todos los nombres |
|
586 |
// XMLEntity tablesRoot = project.getExportXMLTypeRootNode(root, |
|
587 |
// ProjectTableFactory.registerName); |
|
588 |
// int childIndex; |
|
589 |
// XMLEntity child; |
|
590 |
// // Lo hacemos en un map por si una vista se usa varias veces |
|
591 |
// HashMap tablesName = new HashMap(); |
|
592 |
// Iterator iterTables = tablesRoot.findChildren("viewName", this |
|
593 |
// .getName()); |
|
594 |
// while (iterTables.hasNext()) { |
|
595 |
// child = (XMLEntity) iterTables.next(); |
|
596 |
// tablesName.put(child.getStringProperty("name"), child |
|
597 |
// .getStringProperty("name")); |
|
598 |
// } |
|
599 |
// |
|
600 |
// XMLEntity tableXML; |
|
601 |
// |
|
602 |
// // Construimos un diccionario ordenado inversamente por el indice |
|
603 |
// // del elemento (por si se van eliminando elementos al importar) y |
|
604 |
// // como valor el nombre de la vista |
|
605 |
// TreeMap tablesToImport = new TreeMap(new Comparator() { |
|
606 |
// |
|
607 |
// public int compare(Object o1, Object o2) { |
|
608 |
// |
|
609 |
// if (((Integer) o1).intValue() > ((Integer) o2).intValue()) { |
|
610 |
// return -1; // o1 first |
|
611 |
// } else if (((Integer) o1).intValue() < ((Integer) o2) |
|
612 |
// .intValue()) { |
|
613 |
// return 1; // o1 second |
|
614 |
// } |
|
615 |
// return 0; |
|
616 |
// } |
|
617 |
// |
|
618 |
// }); |
|
619 |
// Iterator iterTablesName = tablesName.keySet().iterator(); |
|
620 |
// int tableIndex; |
|
621 |
// String tableName; |
|
622 |
// while (iterTablesName.hasNext()) { |
|
623 |
// tableName = (String) iterTablesName.next(); |
|
624 |
// tableIndex = tablesRoot.firstIndexOfChild("name", tableName); |
|
625 |
// tablesToImport.put(new Integer(tableIndex), tableName); |
|
626 |
// } |
|
627 |
// |
|
628 |
// ProjectTable table; |
|
629 |
// ProjectDocumentFactory tableFactory = project |
|
630 |
// .getProjectDocumentFactory(ProjectTableFactory.registerName); |
|
631 |
// |
|
632 |
// Iterator iterTablesToImport = tablesToImport.entrySet().iterator(); |
|
633 |
// Entry entry; |
|
634 |
// // Nos recorremos las vistas a importar |
|
635 |
// while (iterTablesToImport.hasNext()) { |
|
636 |
// entry = (Entry) iterTablesToImport.next(); |
|
637 |
// tableName = (String) entry.getValue(); |
|
638 |
// tableIndex = ((Integer) entry.getKey()).intValue(); |
|
639 |
// table = (ProjectTable) tableFactory.create(project); |
|
640 |
// try { |
|
641 |
// table.importFromXML(root, tablesRoot, tableIndex, project, |
|
642 |
// removeDocumentsFromRoot); |
|
643 |
// } catch (ReadException e) { |
|
644 |
// // TODO Auto-generated catch block |
|
645 |
// e.printStackTrace(); |
|
646 |
// } |
|
647 |
// } |
|
650 | 648 |
} |
651 | 649 |
|
652 | 650 |
public int getPlanetType() { |
... | ... | |
677 | 675 |
g = ((float) backgroundColor.getGreen()) / 255.0f; |
678 | 676 |
b = ((float) backgroundColor.getBlue()) / 255.0f; |
679 | 677 |
a = ((float) backgroundColor.getAlpha()) / 255.0f; |
680 |
|
|
678 |
|
|
681 | 679 |
m_planetViewer.setClearColor(r, g, b, a); |
682 | 680 |
} |
683 | 681 |
} |
... | ... | |
786 | 784 |
this.m_view = m_view; |
787 | 785 |
} |
788 | 786 |
|
787 |
public String getClassName() { |
|
788 |
// TODO Auto-generated method stub |
|
789 |
return null; |
|
790 |
} |
|
791 |
|
|
789 | 792 |
} |
branches/v2_0_0_prep/extensions/ext3Dgui/src/org/gvsig/gvsig3dgui/view/ViewPropertiesExtension3D.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
|
1 |
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
|
|
2 | 2 |
* |
3 | 3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
4 | 4 |
* |
... | ... | |
20 | 20 |
* |
21 | 21 |
* Generalitat Valenciana |
22 | 22 |
* Conselleria d'Infraestructures i Transport |
23 |
* Av. Blasco Ib??ez, 50
|
|
23 |
* Av. Blasco Ib��ez, 50
|
|
24 | 24 |
* 46010 VALENCIA |
25 | 25 |
* SPAIN |
26 | 26 |
* |
... | ... | |
38 | 38 |
* +34 963163400 |
39 | 39 |
* dac@iver.es |
40 | 40 |
*/ |
41 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
|
41 |
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
|
|
42 | 42 |
* |
43 | 43 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
44 | 44 |
* |
... | ... | |
60 | 60 |
* |
61 | 61 |
* Generalitat Valenciana |
62 | 62 |
* Conselleria d'Infraestructures i Transport |
63 |
* Av. Blasco Ib??ez, 50
|
|
63 |
* Av. Blasco Ib��ez, 50
|
|
64 | 64 |
* 46010 VALENCIA |
65 | 65 |
* SPAIN |
66 | 66 |
* |
... | ... | |
80 | 80 |
*/ |
81 | 81 |
package org.gvsig.gvsig3dgui.view; |
82 | 82 |
|
83 |
import com.iver.andami.PluginServices; |
|
84 |
import com.iver.andami.plugins.Extension; |
|
85 |
import com.iver.cit.gvsig.project.documents.view.IProjectView; |
|
83 |
import org.gvsig.andami.PluginServices; |
|
84 |
import org.gvsig.andami.plugins.Extension; |
|
85 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
|
86 |
import org.gvsig.app.project.documents.view.IProjectView; |
|
86 | 87 |
|
87 | 88 |
/** |
88 | 89 |
* DOCUMENT ME! |
... | ... | |
103 | 104 |
* DOCUMENT ME! |
104 | 105 |
*/ |
105 | 106 |
public void execute(String s) { |
106 |
com.iver.andami.ui.mdiManager.IWindow view = PluginServices
|
|
107 |
IWindow view = PluginServices |
|
107 | 108 |
.getMDIManager().getActiveWindow(); |
108 | 109 |
if (!(view instanceof View3D)) |
109 | 110 |
return; |
110 |
// System.out.println("RECUPERADA LA VISTA 3D"); |
|
111 |
|
|
111 | 112 |
View3D vista3D = (View3D) view; |
112 | 113 |
IProjectView model = vista3D.getModel(); |
113 | 114 |
|
... | ... | |
132 | 133 |
* @return DOCUMENT ME! |
133 | 134 |
*/ |
134 | 135 |
public boolean isVisible() { |
135 |
com.iver.andami.ui.mdiManager.IWindow f = PluginServices
|
|
136 |
IWindow f = PluginServices |
|
136 | 137 |
.getMDIManager().getActiveWindow(); |
137 | 138 |
if (f == null) { |
138 | 139 |
return false; |
branches/v2_0_0_prep/extensions/ext3Dgui/src/org/gvsig/gvsig3dgui/view/Export.java | ||
---|---|---|
4 | 4 |
* To change the template for this generated file go to |
5 | 5 |
* Window>Preferences>Java>Code Generation>Code and Comments |
6 | 6 |
*/ |
7 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
|
7 |
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
|
|
8 | 8 |
* |
9 | 9 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
10 | 10 |
* |
... | ... | |
26 | 26 |
* |
27 | 27 |
* Generalitat Valenciana |
28 | 28 |
* Conselleria d'Infraestructures i Transport |
29 |
* Av. Blasco Ib??ez, 50
|
|
29 |
* Av. Blasco Ib��ez, 50
|
|
30 | 30 |
* 46010 VALENCIA |
31 | 31 |
* SPAIN |
32 | 32 |
* |
... | ... | |
55 | 55 |
import javax.swing.JOptionPane; |
56 | 56 |
import javax.swing.filechooser.FileFilter; |
57 | 57 |
|
58 |
import org.gvsig.andami.PluginServices; |
|
59 |
import org.gvsig.andami.plugins.Extension; |
|
60 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
|
61 |
import org.gvsig.fmap.mapcontext.layers.FLayers; |
|
58 | 62 |
import org.gvsig.osgvp.viewer.IViewerContainer; |
59 | 63 |
|
60 |
import com.iver.andami.PluginServices; |
|
61 |
import com.iver.andami.plugins.Extension; |
|
62 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
|
63 | 64 |
|
64 | 65 |
|
65 |
|
|
66 | 66 |
/** |
67 |
* Extensi?n para exportar en algunos formatos raster la vista3D actual.
|
|
67 |
* Extensi�n para exportar en algunos formatos raster la vista3D actual.
|
|
68 | 68 |
* |
69 |
* @author ?ngel Fraile.
|
|
69 |
* @author �ngel Fraile.
|
|
70 | 70 |
*/ |
71 | 71 |
public class Export extends Extension { |
72 | 72 |
private String lastPath = null; |
... | ... | |
99 | 99 |
* @see com.iver.mdiApp.plugins.IExtension#isVisible() |
100 | 100 |
*/ |
101 | 101 |
public boolean isVisible() { |
102 |
com.iver.andami.ui.mdiManager.IWindow f = (com.iver.andami.ui.mdiManager.IWindow)
|
|
102 |
IWindow f = (IWindow)
|
|
103 | 103 |
PluginServices.getMDIManager().getActiveWindow(); |
104 | 104 |
|
105 | 105 |
if (f == null) { |
... | ... | |
152 | 152 |
jfc.setFileFilter((FileFilter)jimiExtensionsSupported.get("png")); |
153 | 153 |
if (jfc.showSaveDialog((Component) PluginServices.getMainFrame())==JFileChooser.APPROVE_OPTION){ |
154 | 154 |
|
155 |
com.iver.andami.ui.mdiManager.IWindow activeWindow = PluginServices
|
|
155 |
IWindow activeWindow = PluginServices |
|
156 | 156 |
.getMDIManager().getActiveWindow(); |
157 | 157 |
File f = jfc.getSelectedFile(); |
158 | 158 |
if (f.exists()){//file exists in the directory. |
... | ... | |
182 | 182 |
/** |
183 | 183 |
* |
184 | 184 |
* @version 14/08/2007 |
185 |
* @author Borja S?nchez Zamorano (borja.sanchez@iver.es)
|
|
185 |
* @author Borja S�nchez Zamorano (borja.sanchez@iver.es)
|
|
186 | 186 |
* |
187 | 187 |
*/ |
188 | 188 |
class MyFileFilter extends FileFilter{ |
branches/v2_0_0_prep/extensions/ext3Dgui/src/org/gvsig/gvsig3dgui/view/View3D.java | ||
---|---|---|
20 | 20 |
import javax.swing.JSplitPane; |
21 | 21 |
|
22 | 22 |
import org.cresques.cts.IProjection; |
23 |
import org.gvsig.andami.PluginServices; |
|
24 |
import org.gvsig.andami.ui.mdiManager.WindowInfo; |
|
25 |
import org.gvsig.app.project.documents.view.MapOverview; |
|
23 | 26 |
import org.gvsig.app.project.documents.view.gui.BaseView; |
27 |
import org.gvsig.app.project.documents.view.toc.gui.TOC; |
|
28 |
import org.gvsig.app.project.documents.view.toolListeners.InfoListener; |
|
29 |
import org.gvsig.fmap.crs.CRSFactory; |
|
30 |
import org.gvsig.fmap.mapcontext.ViewPort; |
|
31 |
import org.gvsig.fmap.mapcontext.events.ColorEvent; |
|
32 |
import org.gvsig.fmap.mapcontext.events.ExtentEvent; |
|
33 |
import org.gvsig.fmap.mapcontext.events.ProjectionEvent; |
|
34 |
import org.gvsig.fmap.mapcontext.events.listeners.ViewPortListener; |
|
35 |
import org.gvsig.fmap.mapcontext.layers.FLayers; |
|
36 |
import org.gvsig.fmap.mapcontrol.MapControl.MapToolListener; |
|
37 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.Behavior; |
|
38 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.PointBehavior; |
|
24 | 39 |
import org.gvsig.gvsig3d.listener.canvasListener; |
25 | 40 |
import org.gvsig.gvsig3d.map3d.MapContext3D; |
26 | 41 |
import org.gvsig.gvsig3d.map3d.MapControl3D; |
... | ... | |
40 | 55 |
import org.gvsig.osgvp.viewer.OSGViewer; |
41 | 56 |
|
42 | 57 |
import com.iver.ai2.gvsig3d.resources.ResourcesFactory; |
43 |
import com.iver.andami.PluginServices; |
|
44 |
import com.iver.andami.ui.mdiManager.WindowInfo; |
|
45 |
import com.iver.cit.gvsig.fmap.ColorEvent; |
|
46 |
import com.iver.cit.gvsig.fmap.ExtentEvent; |
|
47 |
import com.iver.cit.gvsig.fmap.ProjectionEvent; |
|
48 |
import com.iver.cit.gvsig.fmap.ViewPort; |
|
49 |
import com.iver.cit.gvsig.fmap.ViewPortListener; |
|
50 |
import com.iver.cit.gvsig.fmap.MapControl.MapToolListener; |
|
51 |
import com.iver.cit.gvsig.fmap.crs.CRSFactory; |
|
52 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
|
53 |
import com.iver.cit.gvsig.fmap.tools.Behavior.Behavior; |
|
54 |
import com.iver.cit.gvsig.fmap.tools.Behavior.PointBehavior; |
|
55 |
import com.iver.cit.gvsig.fmap.tools.Listeners.PolylineListener; |
|
56 |
import com.iver.cit.gvsig.project.documents.view.MapOverview; |
|
57 | 58 |
|
58 |
import com.iver.cit.gvsig.project.documents.view.toc.gui.TOC; |
|
59 |
import com.iver.cit.gvsig.project.documents.view.toolListeners.InfoListener; |
|
60 |
|
|
61 | 59 |
public class View3D extends BaseView { |
62 | 60 |
|
63 | 61 |
private static final long serialVersionUID = 1L; |
... | ... | |
127 | 125 |
-20000000.0, -10000000.0); |
128 | 126 |
} |
129 | 127 |
vp = new ViewPort3D(projection); |
130 |
vp.setExtent(extend); |
|
128 |
//TODO:COMENTADO para 2.0 |
|
129 |
// vp.setExtent(extend); |
|
131 | 130 |
fmap.setViewPort(vp); |
132 | 131 |
((ViewPort3D) vp).setPlanet(this.m_planet); |
133 | 132 |
|
branches/v2_0_0_prep/extensions/ext3Dgui/src/org/gvsig/gvsig3dgui/tocMenu/TocRefreshLayer.java | ||
---|---|---|
1 | 1 |
package org.gvsig.gvsig3dgui.tocMenu; |
2 | 2 |
|
3 |
import org.gvsig.andami.PluginServices; |
|
4 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
|
5 |
import org.gvsig.app.project.documents.view.IProjectView; |
|
6 |
import org.gvsig.app.project.documents.view.gui.BaseView; |
|
7 |
import org.gvsig.app.project.documents.view.toc.AbstractTocContextMenuAction; |
|
8 |
import org.gvsig.app.project.documents.view.toc.ITocItem; |
|
9 |
import org.gvsig.app.project.documents.view.toc.TocItemBranch; |
|
10 |
import org.gvsig.fmap.mapcontext.MapContext; |
|
11 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
|
12 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
|
3 | 13 |
import org.gvsig.gvsig3d.map3d.MapContext3D; |
4 | 14 |
import org.gvsig.gvsig3dgui.ProjectView3D; |
5 | 15 |
import org.gvsig.gvsig3dgui.view.View3D; |
16 |
import org.gvsig.wms.fmap.layers.FLyrWMS; |
|
6 | 17 |
|
7 | 18 |
import com.iver.ai2.gvsig3d.map3d.layers.Layer3DProps; |
8 |
import com.iver.andami.PluginServices; |
|
9 |
import com.iver.cit.gvsig.fmap.MapContext; |
|
10 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
|
11 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
|
12 |
import com.iver.cit.gvsig.fmap.layers.FLyrWMS; |
|
13 |
import com.iver.cit.gvsig.project.documents.view.IProjectView; |
|
14 |
import com.iver.cit.gvsig.project.documents.view.gui.BaseView; |
|
15 |
import com.iver.cit.gvsig.project.documents.view.toc.AbstractTocContextMenuAction; |
|
16 |
import com.iver.cit.gvsig.project.documents.view.toc.ITocItem; |
|
17 |
import com.iver.cit.gvsig.project.documents.view.toc.TocItemBranch; |
|
18 | 19 |
|
19 | 20 |
public class TocRefreshLayer extends AbstractTocContextMenuAction { |
20 | 21 |
|
... | ... | |
53 | 54 |
} |
54 | 55 |
|
55 | 56 |
public boolean isVisible(ITocItem item, FLayer[] selectedItems) { |
56 |
com.iver.andami.ui.mdiManager.IWindow f = PluginServices
|
|
57 |
IWindow f = PluginServices |
|
57 | 58 |
.getMDIManager().getActiveWindow(); |
58 | 59 |
|
59 | 60 |
if (f == null) { |
... | ... | |
77 | 78 |
public void execute(ITocItem item, FLayer[] selectedItems) { |
78 | 79 |
|
79 | 80 |
// Getting view3 |
80 |
com.iver.andami.ui.mdiManager.IWindow view = PluginServices
|
|
81 |
IWindow view = PluginServices |
|
81 | 82 |
.getMDIManager().getActiveWindow(); |
82 | 83 |
if (!(view instanceof View3D)) |
83 | 84 |
return; |
branches/v2_0_0_prep/extensions/ext3Dgui/src/org/gvsig/gvsig3dgui/tocMenu/TocEditingLayer.java | ||
---|---|---|
1 | 1 |
package org.gvsig.gvsig3dgui.tocMenu; |
2 | 2 |
|
3 |
import org.gvsig.andami.PluginServices; |
|
4 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
|
5 |
import org.gvsig.app.project.documents.view.IProjectView; |
|
6 |
import org.gvsig.app.project.documents.view.gui.BaseView; |
|
7 |
import org.gvsig.app.project.documents.view.toc.AbstractTocContextMenuAction; |
|
8 |
import org.gvsig.app.project.documents.view.toc.ITocItem; |
|
9 |
import org.gvsig.fmap.mapcontext.MapContext; |
|
10 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
|
3 | 11 |
import org.gvsig.gvsig3d.cacheservices.OSGCacheService; |
4 |
import org.gvsig.gvsig3dgui.layer.TransparencyPanel; |
|
5 | 12 |
import org.gvsig.gvsig3dgui.view.View3D; |
6 | 13 |
|
7 | 14 |
import com.iver.ai2.gvsig3d.map3d.layers.Layer3DProps; |
8 |
import com.iver.andami.PluginServices; |
|
9 |
import com.iver.cit.gvsig.fmap.MapContext; |
|
10 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
|
11 |
import com.iver.cit.gvsig.project.documents.view.IProjectView; |
|
12 |
import com.iver.cit.gvsig.project.documents.view.gui.BaseView; |
|
13 |
import com.iver.cit.gvsig.project.documents.view.toc.AbstractTocContextMenuAction; |
|
14 |
import com.iver.cit.gvsig.project.documents.view.toc.ITocItem; |
|
15 | 15 |
|
16 | 16 |
public class TocEditingLayer extends AbstractTocContextMenuAction { |
17 | 17 |
|
... | ... | |
57 | 57 |
} |
58 | 58 |
|
59 | 59 |
public boolean isVisible(ITocItem item, FLayer[] selectedItems) { |
60 |
com.iver.andami.ui.mdiManager.IWindow f = PluginServices
|
|
60 |
IWindow f = PluginServices |
|
61 | 61 |
.getMDIManager().getActiveWindow(); |
62 | 62 |
|
63 | 63 |
if (f == null) { |
... | ... | |
110 | 110 |
public String getText() { |
111 | 111 |
String result = "Desactivar edicion 3D"; |
112 | 112 |
|
113 |
com.iver.andami.ui.mdiManager.IWindow f = PluginServices
|
|
113 |
IWindow f = PluginServices |
|
114 | 114 |
.getMDIManager().getActiveWindow(); |
115 | 115 |
|
116 | 116 |
// Only isVisible = true, where the view3D have layers |
... | ... | |
127 | 127 |
Layer3DProps props = Layer3DProps.getLayer3DProps(lyr3D); |
128 | 128 |
if (!(props.isEditing()) |
129 | 129 |
&& (props.getType() == Layer3DProps.layer3DOSG)) { |
130 |
result = "Activar edici?n 3D";
|
|
130 |
result = "Activar edici�n 3D";
|
|
131 | 131 |
} |
132 | 132 |
} |
133 | 133 |
} |
branches/v2_0_0_prep/extensions/ext3Dgui/src/org/gvsig/gvsig3dgui/tocMenu/TocTransparencyPanel.java | ||
---|---|---|
1 | 1 |
package org.gvsig.gvsig3dgui.tocMenu; |
2 | 2 |
|
3 |
import org.gvsig.andami.PluginServices; |
|
4 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
|
5 |
import org.gvsig.app.project.documents.view.IProjectView; |
|
6 |
import org.gvsig.app.project.documents.view.gui.BaseView; |
|
7 |
import org.gvsig.app.project.documents.view.toc.AbstractTocContextMenuAction; |
|
8 |
import org.gvsig.app.project.documents.view.toc.ITocItem; |
|
9 |
import org.gvsig.fmap.mapcontext.MapContext; |
|
10 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
|
3 | 11 |
import org.gvsig.gvsig3dgui.layer.TransparencyPanel; |
4 | 12 |
import org.gvsig.gvsig3dgui.view.View3D; |
5 | 13 |
|
6 | 14 |
import com.iver.ai2.gvsig3d.map3d.layers.Layer3DProps; |
7 |
import com.iver.andami.PluginServices; |
|
8 |
import com.iver.cit.gvsig.fmap.MapContext; |
|
9 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
|
10 |
import com.iver.cit.gvsig.project.documents.view.IProjectView; |
|
11 |
import com.iver.cit.gvsig.project.documents.view.gui.BaseView; |
|
12 |
import com.iver.cit.gvsig.project.documents.view.toc.AbstractTocContextMenuAction; |
|
13 |
import com.iver.cit.gvsig.project.documents.view.toc.ITocItem; |
|
14 | 15 |
|
15 | 16 |
public class TocTransparencyPanel extends AbstractTocContextMenuAction { |
16 | 17 |
|
... | ... | |
56 | 57 |
} |
57 | 58 |
|
58 | 59 |
public boolean isVisible(ITocItem item, FLayer[] selectedItems) { |
59 |
com.iver.andami.ui.mdiManager.IWindow f = PluginServices |
|
60 |
.getMDIManager().getActiveWindow(); |
|
60 |
IWindow f = PluginServices.getMDIManager().getActiveWindow(); |
|
61 | 61 |
|
62 | 62 |
if (f == null) { |
63 | 63 |
return false; |
... | ... | |
72 | 72 |
IProjectView model = vista.getModel(); |
73 | 73 |
MapContext mapa = model.getMapContext(); |
74 | 74 |
|
75 |
// return mapa.getLayers().getLayersCount() > 0;
|
|
75 |
// return mapa.getLayers().getLayersCount() > 0;
|
|
76 | 76 |
|
77 | 77 |
FLayer[] selectedExtent = mapa.getLayers().getActives(); |
78 | 78 |
|
... | ... | |
91 | 91 |
public void execute(ITocItem item, FLayer[] selectedItems) { |
92 | 92 |
|
93 | 93 |
// Getting view3 |
94 |
com.iver.andami.ui.mdiManager.IWindow view = PluginServices |
|
95 |
.getMDIManager().getActiveWindow(); |
|
94 |
IWindow view = PluginServices.getMDIManager().getActiveWindow(); |
|
96 | 95 |
if (!(view instanceof View3D)) |
97 | 96 |
return; |
98 | 97 |
// Casting to View3D |
branches/v2_0_0_prep/extensions/ext3Dgui/src/org/gvsig/gvsig3dgui/layer/ViewSelectionControls3D.java | ||
---|---|---|
21 | 21 |
|
22 | 22 |
public void execute(String actionCommand) { |
23 | 23 |
// TODO Auto-generated method stub |
24 |
View3D vista = (View3D) PluginServices.getMDIManager().getActiveWindow(); |
|
24 |
View3D vista = (View3D) PluginServices.getMDIManager() |
|
25 |
.getActiveWindow(); |
|
25 | 26 |
IProjectView model = vista.getModel(); |
26 | 27 |
MapContext3D mapa = (MapContext3D) model.getMapContext(); |
27 | 28 |
MapControl3D mapCtrl = (MapControl3D) vista.getMapControl(); |
28 | 29 |
NavigationMode navigator = vista.getNavMode(); |
29 | 30 |
if (actionCommand.equals("SELRECT")) { |
30 | 31 |
mapCtrl.setTool("rectSelection"); |
31 |
// ((ProjectDocument)vista.getModel()).setModified(true); |
|
32 |
|
|
32 | 33 |
} else if (actionCommand.equals("SELPOINT")) { |
33 | 34 |
mapCtrl.setTool("pointSelection"); |
34 |
// ((ProjectDocument)vista.getModel()).setModified(true); |
|
35 |
|
|
35 | 36 |
} else if (actionCommand.equals("SELPOL")) { |
36 | 37 |
mapCtrl.setTool("polSelection"); |
37 |
// ((ProjectDocument)vista.getModel()).setModified(true); |
|
38 |
|
|
38 | 39 |
} else if (actionCommand.equals("SELECTIONBYSHAPE")) { |
39 |
// SelectionByTheme dlg = new SelectionByTheme(); |
|
40 |
// // FLayer[] layers = mapa.getLayers().getActives(); |
|
41 |
// // int count = 0; |
|
42 |
// dlg.setModel(new DefaultSelectionByThemeModel()); |
|
43 |
// dlg.addSelectionListener(new MySelectionByThemeListener()); |
|
44 |
// PluginServices.getMDIManager().addWindow(dlg); |
|
45 |
// ((ProjectDocument)vista.getModel()).setModified(true); |
|
40 |
|
|
46 | 41 |
} else if (actionCommand.equals("INVERT_SELECTION")) { |
47 | 42 |
for (int i = 0; i < mapa.getLayers().getActives().length; i++) { |
48 | 43 |
FLayer lyr = mapa.getLayers().getActives()[i]; |
49 | 44 |
if (lyr.isAvailable() && lyr instanceof FLyrVect) { |
50 | 45 |
FLyrVect lyrVect = (FLyrVect) lyr; |
51 |
SelectableDataSource sds; |
|
52 |
try { |
|
53 |
sds = lyrVect.getRecordset(); |
|
54 |
FBitSet selectedRows = sds.getSelection(); |
|
55 |
selectedRows.flip(0, (int)sds.getRowCount()); |
|
56 |
sds.setSelection(selectedRows); |
|
57 |
} catch (ReadException e) { |
|
58 |
e.printStackTrace(); |
|
59 |
NotificationManager.addError(e); |
|
60 |
} |
|
46 |
//TODO:COMENTADO 2.0 |
|
47 |
// SelectableDataSource sds; |
|
48 |
// try { |
|
49 |
// sds = lyrVect.getRecordset(); |
|
50 |
// FBitSet selectedRows = sds.getSelection(); |
|
51 |
// selectedRows.flip(0, (int)sds.getRowCount()); |
|
52 |
// sds.setSelection(selectedRows); |
|
53 |
// } catch (ReadException e) { |
|
54 |
// e.printStackTrace(); |
|
55 |
// NotificationManager.addError(e); |
|
56 |
// } |
|
61 | 57 |
|
62 | 58 |
} |
63 | 59 |
} |
64 |
((ProjectDocument)vista.getModel()).setModified(true); |
|
60 |
((ProjectDocument) vista.getModel()).setModified(true);
|
|
65 | 61 |
// Disabling All Navigation modes |
66 | 62 |
} |
67 | 63 |
navigator.removeAllModes(); |
... | ... | |
104 | 100 |
} |
105 | 101 |
return false; |
106 | 102 |
} |
107 |
|
|
103 |
|
|
108 | 104 |
private boolean hasVectorLayers(FLayers layers) { |
109 | 105 |
for (int i = 0; i < layers.getLayersCount(); i++) { |
110 |
FLayer lyr =layers.getLayer(i); |
|
111 |
if (lyr instanceof FLayers){ |
|
112 |
if (hasVectorLayers((FLayers) lyr)){ |
|
106 |
FLayer lyr = layers.getLayer(i);
|
|
107 |
if (lyr instanceof FLayers) {
|
|
108 |
if (hasVectorLayers((FLayers) lyr)) {
|
|
113 | 109 |
return true; |
114 | 110 |
} |
115 | 111 |
} else if (lyr instanceof FLyrVect) { |
branches/v2_0_0_prep/extensions/ext3Dgui/src/org/gvsig/gvsig3dgui/layer/properties/VectorialLayerListener3D.java | ||
---|---|---|
17 | 17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
18 | 18 |
*/ |
19 | 19 |
|
20 |
|
|
21 |
|
|
22 | 20 |
package org.gvsig.gvsig3dgui.layer.properties; |
23 | 21 |
|
24 | 22 |
import java.awt.geom.Rectangle2D; |
... | ... | |
31 | 29 |
import com.iver.ai2.gvsig3d.map3d.layers.Layer3DProps; |
32 | 30 |
|
33 | 31 |
/** |
34 |
* |
|
35 |
* @version
|
|
36 |
* @author �ngel Fraile Gri��n.(angel.fraile@iver.es) |
|
37 |
*/ |
|
32 |
*
|
|
33 |
* @version
|
|
34 |
* @author �ngel Fraile Gri��n.(angel.fraile@iver.es)
|
|
35 |
*/
|
|
38 | 36 |
|
39 | 37 |
public class VectorialLayerListener3D { |
40 | 38 |
|
... | ... | |
42 | 40 |
private Layer3DProps props3D; |
43 | 41 |
private MapContext3D context; |
44 | 42 |
private FLayer flyr; |
45 |
private static Logger logger = Logger.getLogger(VectorialLayerListener3D.class
|
|
46 |
.getName()); |
|
47 |
|
|
43 |
private static Logger logger = Logger |
|
44 |
.getLogger(VectorialLayerListener3D.class.getName());
|
|
45 |
|
|
48 | 46 |
public VectorialLayerListener3D(VectorialLayerPanel3D panel) { |
49 | 47 |
this.vectorialLayerPanel3D = panel; |
50 | 48 |
} |
51 |
|
|
49 |
|
|
52 | 50 |
/** |
53 | 51 |
* Actions to execute when the accept option is pressed |
54 | 52 |
*/ |
55 | 53 |
public void accept() { |
56 |
|
|
54 |
|
|
57 | 55 |
context = vectorialLayerPanel3D.getMapContext(); |
58 | 56 |
props3D = vectorialLayerPanel3D.getLayer3DProps(); |
59 | 57 |
flyr = vectorialLayerPanel3D.getLayer(); |
60 |
|
|
61 |
//Rastering the layer |
|
62 |
if (vectorialLayerPanel3D.isRasterOptionSelected() && (props3D.getType()!=Layer3DProps.layer3DImage)) { |
|
58 |
|
|
59 |
// Rastering the layer |
|
60 |
if (vectorialLayerPanel3D.isRasterOptionSelected() |
|
61 |
&& (props3D.getType() != Layer3DProps.layer3DImage)) { |
|
63 | 62 |
context.pepareLayerToRefresh(flyr); |
64 | 63 |
props3D.setType(Layer3DProps.layer3DImage); |
65 | 64 |
props3D.setCacheService(null); |
66 | 65 |
context.refreshLayer3DProps(flyr); |
67 |
} else if ((!vectorialLayerPanel3D.isZValueSelected())&&(!vectorialLayerPanel3D.isRasterOptionSelected())) { |
|
68 |
int new_h = 0; |
|
69 |
int actual_h = 0; |
|
70 |
|
|
71 |
try { |
|
72 |
actual_h = (int)Double.parseDouble(vectorialLayerPanel3D.getMyHeight()); |
|
73 |
new_h = (int)Double.parseDouble(vectorialLayerPanel3D.getJTextFieldHeight()); |
|
74 |
} catch (NumberFormatException e) { |
|
75 |
logger.error("Command: " |
|
76 |
+ "Error getting maximun range layer elevation value.", e); |
|
77 |
} |
|
78 |
|
|
79 |
if ((new_h > 0 && new_h!= actual_h) || (actual_h == vectorialLayerPanel3D.getDefaultElevation()) ) //aplicando una altura distinta, si es la misma no se hace nada |
|
80 |
{ |
|
81 |
context.pepareLayerToRefresh(flyr); |
|
82 |
props3D.setZEnable(false); |
|
83 |
props3D.setType(Layer3DProps.layer3DVector); |
|
84 |
props3D.setCacheService(null); |
|
85 |
props3D.setHeigth(new_h); |
|
86 |
context.refreshLayer3DProps(flyr); |
|
87 |
}//if |
|
88 |
//else if |
|
89 |
} else if(vectorialLayerPanel3D.isZValueSelected() && props3D.getType()!= Layer3DProps.layer3DVector){//Value Z associated to the layer |
|
66 |
} else if ((!vectorialLayerPanel3D.isZValueSelected()) |
|
67 |
&& (!vectorialLayerPanel3D.isRasterOptionSelected())) { |
|
68 |
int new_h = 0; |
|
69 |
int actual_h = 0; |
|
70 |
|
|
71 |
try { |
|
72 |
actual_h = (int) Double.parseDouble(vectorialLayerPanel3D |
|
73 |
.getMyHeight()); |
|
74 |
new_h = (int) Double.parseDouble(vectorialLayerPanel3D |
|
75 |
.getJTextFieldHeight()); |
|
76 |
} catch (NumberFormatException e) { |
|
77 |
logger.error("Command: " |
|
78 |
+ "Error getting maximun range layer elevation value.", |
|
79 |
e); |
|
80 |
} |
|
81 |
|
|
82 |
if ((new_h > 0 && new_h != actual_h) |
|
83 |
|| (actual_h == vectorialLayerPanel3D.getDefaultElevation())) // aplicando |
|
84 |
// una |
|
85 |
// altura |
|
86 |
// distinta, |
|
87 |
// si |
|
88 |
// es |
|
89 |
// la |
|
90 |
// misma |
|
91 |
// no |
|
92 |
// se |
|
93 |
// hace |
|
94 |
// nada |
|
95 |
{ |
|
90 | 96 |
context.pepareLayerToRefresh(flyr); |
97 |
props3D.setZEnable(false); |
|
91 | 98 |
props3D.setType(Layer3DProps.layer3DVector); |
92 | 99 |
props3D.setCacheService(null); |
93 |
props3D.setZEnable(true);
|
|
100 |
props3D.setHeigth(new_h);
|
|
94 | 101 |
context.refreshLayer3DProps(flyr); |
95 |
|
|
96 |
}//else |
|
97 |
|
|
98 |
if(vectorialLayerPanel3D.isDetailOptionSelected()) { |
|
99 |
Rectangle2D planetExtent = null; |
|
100 |
Rectangle2D extentLayer = null; |
|
101 |
|
|
102 |
try { |
|
103 |
planetExtent = context.getPlanet().getExtent(); |
|
104 |
extentLayer = flyr.getFullExtent(); |
|
105 |
|
|
106 |
} catch (ReadException e) { |
|
107 |
e.printStackTrace(); |
|
108 |
} |
|
109 |
double extPW = planetExtent.getWidth(); // planet width |
|
110 |
double extPH = planetExtent.getHeight();// planet hight |
|
111 |
double extW = extentLayer.getWidth(); // layer width |
|
112 |
double extH = extentLayer.getHeight(); // layer hight |
|
113 |
int depth = 0; |
|
114 |
|
|
115 |
while(extPW > extW && extPH > extH) {// Calculating level of depth (div x /(2 pow n)) |
|
116 |
|
|
117 |
extPW = extPW/2; |
|
118 |
extPH = extPH/2; |
|
119 |
|
|
120 |
depth++;//level of depth |
|
121 |
}//while |
|
122 |
|
|
123 |
int order = props3D.getTocOrder(); |
|
124 |
context.getPlanet().setMaxTextureResolution(order, depth);//setting new depth to the planet |
|
125 |
}//if |
|
126 |
else { |
|
127 |
int order = props3D.getTocOrder(); |
|
128 |
context.getPlanet().setMaxTextureResolution(order, vectorialLayerPanel3D.getDefaultDepth()); |
|
129 |
} |
|
130 |
|
|
131 |
if(vectorialLayerPanel3D.isRangeOptionSelected()) { |
|
132 |
|
|
133 |
int new_max = 0; |
|
134 |
int new_min = 0; |
|
135 |
|
|
136 |
int order = props3D.getTocOrder(); |
|
137 |
try { |
|
138 |
new_max = (int)Double.parseDouble(vectorialLayerPanel3D.getJTextFieldRangeMax()); |
|
139 |
new_min = (int)Double.parseDouble(vectorialLayerPanel3D.getJTextFieldRangeMin()); |
|
140 |
} catch (NumberFormatException e) { |
|
141 |
logger.error("Command: " |
|
142 |
+ "Number format must be a integer.", e); |
|
143 |
} |
|
144 |
|
|
145 |
if ((new_min > vectorialLayerPanel3D.getDefaultMinRange() || new_max < vectorialLayerPanel3D.getDefaultMaxRange())) //aplicando una altura distinta, si es la misma no se hace nada |
|
146 |
{ |
|
147 |
order = props3D.getTocOrder(); |
|
148 |
|
|
149 |
context.getPlanet().setMaxTextureRange(order, new_max); |
|
150 |
context.getPlanet().setMinTextureRange(order, new_min); |
|
151 |
}//if |
|
152 |
|
|
153 |
}//if |
|
154 |
else { |
|
155 |
int order = props3D.getTocOrder(); |
|
156 |
context.getPlanet().setMaxTextureRange(order, vectorialLayerPanel3D.getDefaultMaxRange()); |
|
157 |
context.getPlanet().setMinTextureRange(order, vectorialLayerPanel3D.getDefaultMinRange()); |
|
158 |
}//else |
|
159 |
|
|
102 |
}// if |
|
103 |
// else if |
|
104 |
} else if (vectorialLayerPanel3D.isZValueSelected() |
|
105 |
&& props3D.getType() != Layer3DProps.layer3DVector) {// Value Z |
|
106 |
// associated |
|
107 |
// to |
|
108 |
// the |
|
109 |
// layer |
|
110 |
context.pepareLayerToRefresh(flyr); |
|
111 |
props3D.setType(Layer3DProps.layer3DVector); |
|
112 |
props3D.setCacheService(null); |
|
113 |
props3D.setZEnable(true); |
|
114 |
context.refreshLayer3DProps(flyr); |
|
115 |
|
|
116 |
}// else |
|
117 |
|
|
118 |
if (vectorialLayerPanel3D.isDetailOptionSelected()) { |
|
119 |
Rectangle2D planetExtent = null; |
|
120 |
Rectangle2D extentLayer = null; |
|
121 |
|
|
122 |
//TODO:COMENTADO 2.0 |
|
123 |
// try { |
|
124 |
// planetExtent = context.getPlanet().getExtent(); |
|
125 |
// extentLayer = flyr.getFullExtent(); |
|
126 |
|
|
127 |
// } catch (ReadException e) { |
|
128 |
// e.printStackTrace(); |
|
129 |
// } |
|
130 |
double extPW = planetExtent.getWidth(); // planet width |
|
131 |
double extPH = planetExtent.getHeight();// planet hight |
|
132 |
double extW = extentLayer.getWidth(); // layer width |
|
133 |
double extH = extentLayer.getHeight(); // layer hight |
|
134 |
int depth = 0; |
|
135 |
|
|
136 |
while (extPW > extW && extPH > extH) {// Calculating level of depth |
|
137 |
// (div x /(2 pow n)) |
|
138 |
|
|
139 |
extPW = extPW / 2; |
|
140 |
extPH = extPH / 2; |
|
141 |
|
|
142 |
depth++;// level of depth |
|
143 |
}// while |
|
144 |
|
|
145 |
int order = props3D.getTocOrder(); |
|
146 |
context.getPlanet().setMaxTextureResolution(order, depth);// setting |
|
147 |
// new |
|
148 |
// depth |
|
149 |
// to |
|
150 |
// the |
|
151 |
// planet |
|
152 |
}// if |
|
153 |
else { |
|
154 |
int order = props3D.getTocOrder(); |
|
155 |
context.getPlanet().setMaxTextureResolution(order, |
|
156 |
vectorialLayerPanel3D.getDefaultDepth()); |
|
157 |
} |
|
158 |
|
|
159 |
if (vectorialLayerPanel3D.isRangeOptionSelected()) { |
|
160 |
|
|
161 |
int new_max = 0; |
|
162 |
int new_min = 0; |
|
163 |
|
|
164 |
int order = props3D.getTocOrder(); |
|
165 |
try { |
|
166 |
new_max = (int) Double.parseDouble(vectorialLayerPanel3D |
|
167 |
.getJTextFieldRangeMax()); |
|
168 |
new_min = (int) Double.parseDouble(vectorialLayerPanel3D |
|
169 |
.getJTextFieldRangeMin()); |
|
170 |
} catch (NumberFormatException e) { |
|
171 |
logger.error("Command: " + "Number format must be a integer.", |
|
172 |
e); |
|
173 |
} |
|
174 |
|
|
175 |
if ((new_min > vectorialLayerPanel3D.getDefaultMinRange() || new_max < vectorialLayerPanel3D |
|
176 |
.getDefaultMaxRange())) // aplicando una altura distinta, si |
|
177 |
// es la misma no se hace nada |
|
178 |
{ |
|
179 |
order = props3D.getTocOrder(); |
|
180 |
|
|
181 |
context.getPlanet().setMaxTextureRange(order, new_max); |
|
182 |
context.getPlanet().setMinTextureRange(order, new_min); |
|
183 |
}// if |
|
184 |
|
|
185 |
}// if |
|
186 |
else { |
|
187 |
int order = props3D.getTocOrder(); |
|
188 |
context.getPlanet().setMaxTextureRange(order, |
|
189 |
vectorialLayerPanel3D.getDefaultMaxRange()); |
|
190 |
context.getPlanet().setMinTextureRange(order, |
|
191 |
vectorialLayerPanel3D.getDefaultMinRange()); |
|
192 |
}// else |
|
193 |
|
|
160 | 194 |
} |
161 | 195 |
|
162 | 196 |
/** |
163 | 197 |
* Actions to execute when the apply option is pressed |
164 | 198 |
*/ |
165 |
|
|
199 |
|
|
166 | 200 |
public void apply() { |
167 |
|
|
201 |
|
|
168 | 202 |
accept(); |
169 | 203 |
} |
170 | 204 |
|
... | ... | |
172 | 206 |
* Actions to execute when the cancel option is pressed |
173 | 207 |
*/ |
174 | 208 |
public void cancel() { |
175 |
|
|
209 |
|
|
176 | 210 |
} |
177 |
|
|
211 |
|
|
178 | 212 |
} |
branches/v2_0_0_prep/extensions/ext3Dgui/src/org/gvsig/gvsig3dgui/layer/MenuZoom3D.java | ||
---|---|---|
18 | 18 |
|
19 | 19 |
public class MenuZoom3D extends Extension { |
20 | 20 |
|
21 |
|
|
22 | 21 |
private boolean activa = true; |
23 | 22 |
|
24 | 23 |
public void execute(String actionCommand) { |
25 | 24 |
// System.out.println("EXECUTE"); |
26 | 25 |
|
27 | 26 |
// Getting view3 |
28 |
IWindow view = PluginServices |
|
29 |
.getMDIManager().getActiveWindow(); |
|
27 |
IWindow view = PluginServices.getMDIManager().getActiveWindow(); |
|
30 | 28 |
if (!(view instanceof View3D)) |
31 | 29 |
return; |
32 | 30 |
// Casting to View3D |
... | ... | |
44 | 42 |
&& (selectedExtent[0] instanceof FLyrVect)) { |
45 | 43 |
// Getting selected layer |
46 | 44 |
FLyrVect lyr3D = (FLyrVect) selectedExtent[0]; |
45 |
|
|
46 |
// TODO:COMENTADO 2.0 |
|
47 | 47 |
// Gettin extend |
48 |
Rectangle2D ex = mapa.getSelectionBounds(); |
|
48 |
// Rectangle2D ex = mapa.getSelectionBounds();
|
|
49 | 49 |
// ex = lyr3D.getFullExtent(); |
50 |
if (ex != null) |
|
51 |
// Doing zoom
|
|
52 |
mapa.zoomToExtent(ex);
|
|
50 |
// if (ex != null)
|
|
51 |
// Doing zoom |
|
52 |
// mapa.zoomToExtent(ex);
|
|
53 | 53 |
} |
54 | 54 |
|
55 | 55 |
} |
... | ... | |
60 | 60 |
// If there is not one and is available |
61 | 61 |
if (selectedExtent.length == 1 && selectedExtent[0].isAvailable()) { |
62 | 62 |
// // && (selectedExtent[0] instanceof FLyrVect)) { |
63 |
FLayer lyr3D = selectedExtent[0];
|
|
63 |
FLayer lyr3D = selectedExtent[0]; |
|
64 | 64 |
Layer3DProps props = Layer3DProps.getLayer3DProps(lyr3D); |
65 | 65 |
if (props.getType() == Layer3DProps.layer3DImage) { |
66 | 66 |
// Generating transparency panel |
... | ... | |
79 | 79 |
} |
80 | 80 |
|
81 | 81 |
public void initialize() { |
82 |
|
|
82 |
|
|
83 | 83 |
// Register new icons |
84 | 84 |
// zoom to selection |
85 | 85 |
PluginServices.getIconTheme().registerDefault( |
86 | 86 |
"zoom-selection-icon", |
87 | 87 |
this.getClass().getClassLoader().getResource( |
88 |
"images/ZoomSeleccion.png")); |
|
88 |
"images/ZoomSeleccion.png"));
|
|
89 | 89 |
// transparency |
90 | 90 |
PluginServices.getIconTheme().registerDefault( |
91 | 91 |
"transparency-icon", |
92 |
this.getClass().getClassLoader().getResource( |
|
93 |
"images/Alpha.png")); |
|
94 |
|
|
95 |
|
|
92 |
this.getClass().getClassLoader() |
|
93 |
.getResource("images/Alpha.png")); |
|
94 |
|
|
96 | 95 |
this.setActiva(true); |
97 | 96 |
} |
98 | 97 |
|
... | ... | |
117 | 116 |
return false; |
118 | 117 |
} |
119 | 118 |
|
120 |
// if (selected.length == 1 && selected[0] instanceof FLyrVect |
|
121 |
// && selected[0].isAvailable()) { |
|
122 |
// return true; |
|
123 |
// } |
|
124 |
// if (selected.length == 1 && selected[0] instanceof FLyrWMS |
|
125 |
// && selected[0].isAvailable()) { |
|
126 |
// return true; |
|
127 |
// } |
|
128 | 119 |
return false; |
129 |
// return true; |
|
120 |
|
|
130 | 121 |
} |
Also available in: Unified diff