svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.raster.tools / org.gvsig.raster.tools.lib / org.gvsig.raster.tools.lib.api / src / main / java / org / gvsig / raster / tools / lib / api / RasterToolsLocator.java @ 44831
History | View | Annotate | Download (2.64 KB)
1 |
package org.gvsig.raster.tools.lib.api; |
---|---|
2 |
/* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright ? 2007-2017 gvSIG Association
|
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 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
|
25 |
|
26 |
import org.gvsig.tools.locator.BaseLocator; |
27 |
|
28 |
/**
|
29 |
* This locator is the entry point for the Publish swing library,
|
30 |
*
|
31 |
* @author gvSIG team
|
32 |
* @version $Id$
|
33 |
*/
|
34 |
public class RasterToolsLocator extends BaseLocator { |
35 |
|
36 |
/**
|
37 |
* Chart swing manager name.
|
38 |
*/
|
39 |
public static final String MANAGER_NAME = |
40 |
"Raster.tools.manager";
|
41 |
|
42 |
/**
|
43 |
* Chart swing manager description.
|
44 |
*/
|
45 |
public static final String MANAGER_DESCRIPTION = |
46 |
"Library of Raster Tools plugin";
|
47 |
|
48 |
private static final String LOCATOR_NAME = "Raster.tools.locator"; |
49 |
|
50 |
/**
|
51 |
* Unique instance.
|
52 |
*/
|
53 |
private static final RasterToolsLocator INSTANCE = |
54 |
new RasterToolsLocator();
|
55 |
|
56 |
/**
|
57 |
* Return the singleton instance.
|
58 |
*
|
59 |
* @return the singleton instance
|
60 |
*/
|
61 |
public static RasterToolsLocator getInstance() { |
62 |
return INSTANCE;
|
63 |
} |
64 |
|
65 |
/**
|
66 |
* Return the Locator's name
|
67 |
*
|
68 |
* @return a String with the Locator's name
|
69 |
*/
|
70 |
public final String getLocatorName() { |
71 |
return LOCATOR_NAME;
|
72 |
} |
73 |
|
74 |
/**
|
75 |
* Registers the Class implementing the PersistenceManager interface.
|
76 |
*
|
77 |
* @param clazz
|
78 |
* implementing the PersistenceManager interface
|
79 |
*/
|
80 |
public static void registerManager( |
81 |
Class<? extends RasterToolsManager> clazz) { |
82 |
getInstance().register(MANAGER_NAME, MANAGER_DESCRIPTION, |
83 |
clazz); |
84 |
} |
85 |
|
86 |
/**
|
87 |
* Gets the instance of the {@link ScriptingUIManager} registered.
|
88 |
*
|
89 |
* @return {@link ScriptingUIManager}
|
90 |
*/
|
91 |
public static RasterToolsManager getManager() { |
92 |
return (RasterToolsManager) getInstance()
|
93 |
.get(MANAGER_NAME); |
94 |
} |
95 |
|
96 |
} |