root / branches / v2_0_0_prep / applications / appgvSIG / src / org / gvsig / app / extension / MetadataPropertiesExtension.java @ 33414
History | View | Annotate | Download (3.43 KB)
1 |
package org.gvsig.app.extension; |
---|---|
2 |
|
3 |
import org.gvsig.andami.plugins.Extension; |
4 |
//import org.gvsig.app.gui.dialogs.MetadataPropertiesPage;
|
5 |
//import org.gvsig.app.gui.toc.MetadataPropsTocMenuEntry;
|
6 |
import org.gvsig.app.project.documents.view.legend.gui.ThemeManagerWindow; |
7 |
import org.gvsig.app.project.documents.view.metadata.gui.MetadataInfoManager; |
8 |
import org.gvsig.app.tools.swing.serv.field.crs.JCRSDynFieldComponentFactory; |
9 |
//import org.gvsig.app.tools.swing.serv.field.date.JDateDynFieldComponentFactory;
|
10 |
import org.gvsig.fmap.dal.DataTypes; |
11 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
12 |
import org.gvsig.tools.ToolsLocator; |
13 |
import org.gvsig.tools.extensionpoint.ExtensionPoint; |
14 |
import org.gvsig.tools.service.spi.ServiceManager; |
15 |
//import org.gvsig.tools.swing.spi.ToolsSwingServiceLocator;
|
16 |
|
17 |
public class MetadataPropertiesExtension extends Extension { |
18 |
|
19 |
public void initialize() { |
20 |
// Adds an entry to the TOC's floating menu to those layers defined in this extension
|
21 |
// ExtensionPoint exPoint = ToolsLocator.getExtensionPointManager().add(
|
22 |
// "View_TocActions");
|
23 |
//
|
24 |
// exPoint.append("FLayerMetadata", "", new MetadataPropsTocMenuEntry());
|
25 |
|
26 |
// // Adds a new tab to the "add layer" wizard for WMS layer creation
|
27 |
// AddLayer.addWizard(WMSWizard.class);
|
28 |
//
|
29 |
// ToolsLocator.getExtensionPointManager().add("CatalogLayers").append(
|
30 |
// "OGC:WMS", "", FLyrWMS.class);
|
31 |
|
32 |
// ThemeManagerWindow.addPage(MetadataPropertiesPage.class);
|
33 |
// ThemeManagerWindow.setTabEnabledForLayer(MetadataPropertiesPage.class, FLyrVect.class, true);
|
34 |
//
|
35 |
|
36 |
ThemeManagerWindow.addPage(MetadataInfoManager.class); |
37 |
ThemeManagerWindow.setTabEnabledForLayer(MetadataInfoManager.class, FLyrVect.class, true);
|
38 |
|
39 |
initIcons(); |
40 |
} |
41 |
|
42 |
public void postInitialize(){ |
43 |
registerDynObjectFactories(); |
44 |
} |
45 |
|
46 |
private void registerDynObjectFactories() { |
47 |
// // Validate there is any implementation registered.
|
48 |
// ServiceManager dsManager = ToolsSwingServiceLocator.getServiceManager();
|
49 |
//
|
50 |
// //CRS Definition
|
51 |
// dsManager.addServiceFactory(new JCRSDynFieldComponentFactory());
|
52 |
//
|
53 |
// // Date and time
|
54 |
// dsManager.addServiceFactory(new JDateDynFieldComponentFactory());
|
55 |
// // Only date
|
56 |
// dsManager.addServiceFactory(new JDateDynFieldComponentFactory(DataTypes.DATE));
|
57 |
// // Only time
|
58 |
// dsManager.addServiceFactory(new JDateDynFieldComponentFactory(DataTypes.TIME));
|
59 |
// // Only time
|
60 |
// dsManager.addServiceFactory(new JDateDynFieldComponentFactory(DataTypes.TIMESTAMP));
|
61 |
} |
62 |
|
63 |
public void execute(String actionCommand) { |
64 |
// no commands, no code.
|
65 |
} |
66 |
|
67 |
public boolean isEnabled() { |
68 |
return true; |
69 |
} |
70 |
|
71 |
public boolean isVisible() { |
72 |
return false; |
73 |
} |
74 |
|
75 |
|
76 |
void initIcons(){
|
77 |
// // WMSParamsPanel.java
|
78 |
// PluginServices.getIconTheme().registerDefault(
|
79 |
// "aplication-preferences-uparrow",
|
80 |
// this.getClass().getClassLoader().getResource("images/up-arrow.png")
|
81 |
// );
|
82 |
//
|
83 |
// // WMSParamsPanel.java
|
84 |
// PluginServices.getIconTheme().registerDefault(
|
85 |
// "aplication-preferences-downarrow",
|
86 |
// this.getClass().getClassLoader().getResource("images/down-arrow.png")
|
87 |
// );
|
88 |
// PluginServices.getIconTheme().registerDefault(
|
89 |
// "icon-layer-wms",
|
90 |
// this.getClass().getClassLoader().getResource("images/icon-layer-wms.png")
|
91 |
// );
|
92 |
} |
93 |
} |