Revision 270 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.spi/src/main/java/org/gvsig/tools/swing/spi/ToolsSwingServiceLocator.java
ToolsSwingServiceLocator.java | ||
---|---|---|
35 | 35 |
|
36 | 36 |
private static final String LOCATOR_NAME = "Tools.swing.service.locator"; |
37 | 37 |
|
38 |
public static final String DYNOBJECT_SWING_SERVICE_MANAGER_NAME = "Tools.swing.service.manager"; |
|
38 |
public static final String DYNOBJECT_SWING_SERVICE_MANAGER_NAME = |
|
39 |
"Tools.swing.service.manager"; |
|
39 | 40 |
|
40 |
public static final String DYNOBJECT_SWING_SERVICE_MANAGER_DESCRIPTION = "Tools DynObject Swing Service Manager"; |
|
41 |
public static final String DYNOBJECT_SWING_SERVICE_MANAGER_DESCRIPTION = |
|
42 |
"Tools DynObject Swing Service Manager"; |
|
41 | 43 |
|
42 | 44 |
/** |
43 | 45 |
* Unique instance. |
44 | 46 |
*/ |
45 |
private static final ToolsSwingServiceLocator instance = new ToolsSwingServiceLocator(); |
|
47 |
private static final ToolsSwingServiceLocator instance = |
|
48 |
new ToolsSwingServiceLocator(); |
|
46 | 49 |
|
47 | 50 |
/** |
48 | 51 |
* Return the singleton instance. |
... | ... | |
50 | 53 |
* @return the singleton instance |
51 | 54 |
*/ |
52 | 55 |
public static ToolsSwingServiceLocator getInstance() { |
53 |
return instance;
|
|
56 |
return instance;
|
|
54 | 57 |
} |
55 | 58 |
|
56 | 59 |
/** |
... | ... | |
59 | 62 |
* @return {@link DynObjectSwingManager} |
60 | 63 |
*/ |
61 | 64 |
public static DynObjectSwingServiceManager getServiceManager() { |
62 |
return (DynObjectSwingServiceManager) getInstance().get(
|
|
63 |
DYNOBJECT_SWING_SERVICE_MANAGER_NAME);
|
|
65 |
return (DynObjectSwingServiceManager) getInstance().get(
|
|
66 |
DYNOBJECT_SWING_SERVICE_MANAGER_NAME);
|
|
64 | 67 |
} |
65 | 68 |
|
66 | 69 |
/** |
... | ... | |
70 | 73 |
* implementing the DynObjectSwingManager interface |
71 | 74 |
*/ |
72 | 75 |
public static void registerDynObjectServiceManager( |
73 |
Class<? extends ServiceManager> clazz) {
|
|
74 |
getInstance().register(DYNOBJECT_SWING_SERVICE_MANAGER_NAME,
|
|
75 |
DYNOBJECT_SWING_SERVICE_MANAGER_DESCRIPTION, clazz);
|
|
76 |
Class<? extends ServiceManager> clazz) {
|
|
77 |
getInstance().register(DYNOBJECT_SWING_SERVICE_MANAGER_NAME,
|
|
78 |
DYNOBJECT_SWING_SERVICE_MANAGER_DESCRIPTION, clazz);
|
|
76 | 79 |
} |
77 | 80 |
|
78 | 81 |
/** |
... | ... | |
82 | 85 |
*/ |
83 | 86 |
@Override |
84 | 87 |
public String getLocatorName() { |
85 |
return LOCATOR_NAME;
|
|
88 |
return LOCATOR_NAME;
|
|
86 | 89 |
} |
87 |
} |
|
90 |
} |
Also available in: Unified diff