gvsig-raster / org.gvsig.raster.georeferencing / trunk / org.gvsig.raster.georeferencing / org.gvsig.raster.georeferencing.swing / org.gvsig.raster.georeferencing.swing.api / src / main / java / org / gvsig / raster / georeferencing / swing / GeoreferencingSwingLocator.java @ 1692
History | View | Annotate | Download (2.83 KB)
1 | 1226 | nbrodin | /* 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.georeferencing.swing; |
||
23 | |||
24 | import org.gvsig.tools.locator.BaseLocator; |
||
25 | |||
26 | /**
|
||
27 | * This locator is the entry point for the Validation swing library,
|
||
28 | * providing access to all Validation swing services through the
|
||
29 | * {@link GeoreferencingSwingManager} .
|
||
30 | *
|
||
31 | * @author gvSIG team
|
||
32 | * @version $Id$
|
||
33 | */
|
||
34 | public class GeoreferencingSwingLocator extends BaseLocator { |
||
35 | |||
36 | /**
|
||
37 | * Validation swing manager name.
|
||
38 | */
|
||
39 | public static final String SWING_MANAGER_NAME = |
||
40 | 1484 | nbrodin | "Georeferencing.swing.manager";
|
41 | 1226 | nbrodin | |
42 | /**
|
||
43 | * Validation swing manager description.
|
||
44 | */
|
||
45 | public static final String SWING_MANAGER_DESCRIPTION = |
||
46 | 1484 | nbrodin | "Georeferencing UIManager";
|
47 | 1226 | nbrodin | |
48 | 1484 | nbrodin | private static final String LOCATOR_NAME = "Georeferencing.swing.locator"; |
49 | 1226 | nbrodin | |
50 | /**
|
||
51 | * Unique instance.
|
||
52 | */
|
||
53 | private static final GeoreferencingSwingLocator INSTANCE = |
||
54 | new GeoreferencingSwingLocator();
|
||
55 | |||
56 | /**
|
||
57 | * Return the singleton instance.
|
||
58 | *
|
||
59 | * @return the singleton instance
|
||
60 | */
|
||
61 | public static GeoreferencingSwingLocator 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 registerSwingManager( |
||
81 | Class<? extends GeoreferencingSwingManager> clazz) { |
||
82 | getInstance().register(SWING_MANAGER_NAME, SWING_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 GeoreferencingSwingManager getSwingManager() { |
||
92 | return (GeoreferencingSwingManager) getInstance()
|
||
93 | .get(SWING_MANAGER_NAME); |
||
94 | } |
||
95 | |||
96 | } |