gvsig-raster / org.gvsig.raster / trunk / org.gvsig.raster / org.gvsig.raster.app / org.gvsig.raster.app.common / src / main / java / org / gvsig / raster / mainplugin / RasterMainPluginExtension.java @ 2861
History | View | Annotate | Download (2.88 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
package org.gvsig.raster.mainplugin; |
23 |
|
24 |
import org.gvsig.andami.IconThemeHelper; |
25 |
import org.gvsig.andami.plugins.Extension; |
26 |
import org.gvsig.i18n.Messages; |
27 |
import org.gvsig.raster.mainplugin.properties.RasterPropertiesTocMenuEntry; |
28 |
import org.gvsig.tools.ToolsLocator; |
29 |
import org.gvsig.tools.extensionpoint.ExtensionPoint; |
30 |
import org.gvsig.tools.extensionpoint.ExtensionPointManager; |
31 |
|
32 |
|
33 |
/**
|
34 |
* Main plugin for raster
|
35 |
*
|
36 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
37 |
*/
|
38 |
public class RasterMainPluginExtension extends Extension { |
39 |
|
40 |
public void initialize() { |
41 |
Messages.addResourceFamily("org.gvsig.raster.mainplugin.i18n.text",
|
42 |
RasterMainPluginExtension.class.getClassLoader(), |
43 |
RasterMainPluginExtension.class.getClass().getName()); |
44 |
|
45 |
IconThemeHelper.registerIcon(null, "map-ok-ico", this); |
46 |
IconThemeHelper.registerIcon("action", "layer-properties-raster", this); |
47 |
|
48 |
ExtensionPointManager extensionPoints = ToolsLocator.getExtensionPointManager(); |
49 |
ExtensionPoint point = null;
|
50 |
|
51 |
//Registro punto de extensi?n del cuadro de propiedades
|
52 |
if (!extensionPoints.has("RasterSEPropertiesDialog")) { |
53 |
point = extensionPoints.add("RasterSEPropertiesDialog");
|
54 |
point.setDescription("Raster Properties registrable panels (register instances of javax.swing.JPanel)");
|
55 |
} |
56 |
|
57 |
//Entradas del men? del toc de raster
|
58 |
if (!extensionPoints.has("View_TocActions")) { |
59 |
point = extensionPoints.add("View_TocActions");
|
60 |
} |
61 |
point = extensionPoints.get("View_TocActions");
|
62 |
point.append("RasterSEProperties", "Raster Properties", RasterPropertiesTocMenuEntry.getSingleton()); |
63 |
|
64 |
//A?ade las propiedades de raster a la barra de herramientas. Si nadie registra paneles estar? vacio
|
65 |
//cuando se abra
|
66 |
|
67 |
point = extensionPoints.add("GenericToolBarMenu");
|
68 |
point.append("RasterProperties", "", RasterPropertiesTocMenuEntry.getSingleton()); |
69 |
} |
70 |
|
71 |
public void execute(String actionCommand) { |
72 |
|
73 |
} |
74 |
|
75 |
public boolean isEnabled() { |
76 |
return false; |
77 |
} |
78 |
|
79 |
public boolean isVisible() { |
80 |
return false; |
81 |
} |
82 |
|
83 |
} |