Revision 447 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.api/src/main/java/org/gvsig/tools/swing/api/ToolsSwingLocator.java
ToolsSwingLocator.java | ||
---|---|---|
24 | 24 |
import org.gvsig.tools.locator.BaseLocator; |
25 | 25 |
import org.gvsig.tools.locator.Locator; |
26 | 26 |
import org.gvsig.tools.swing.api.dynobject.DynObjectSwingManager; |
27 |
import org.gvsig.tools.swing.api.task.TaskStatusSwingManager; |
|
27 | 28 |
import org.gvsig.tools.swing.api.usability.UsabilitySwingManager; |
28 | 29 |
|
29 | 30 |
/** |
... | ... | |
49 | 50 |
public static final String USABILITY_SWING_MANAGER_DESCRIPTION = |
50 | 51 |
"Tools Usability Swing Manager"; |
51 | 52 |
|
52 |
/** |
|
53 |
private static final String TASKSTATUS_SWING_MANAGER_NAME = "Tools.task.swing.manager"; |
|
54 |
|
|
55 |
private static final String TASKSTATUS_SWING_MANAGER_DESCRIPTION = "Tools Task Swing Manager"; |
|
56 |
|
|
57 |
/** |
|
53 | 58 |
* Unique instance. |
54 | 59 |
*/ |
55 | 60 |
private static final ToolsSwingLocator instance = new ToolsSwingLocator(); |
... | ... | |
74 | 79 |
} |
75 | 80 |
|
76 | 81 |
/** |
77 |
* Gets the instance of the {@link UsabilitySwingManager} registered.
|
|
82 |
* Return the {@link Locator}'s name
|
|
78 | 83 |
* |
79 |
* @return {@link UsabilitySwingManager}
|
|
84 |
* @return a String with the {@link Locator}'s name
|
|
80 | 85 |
*/ |
81 |
public static UsabilitySwingManager getUsabilitySwingManager() {
|
|
82 |
return (UsabilitySwingManager) getInstance().get(
|
|
83 |
USABILITY_SWING_MANAGER_NAME);
|
|
86 |
@Override
|
|
87 |
public String getLocatorName() {
|
|
88 |
return LOCATOR_NAME;
|
|
84 | 89 |
} |
85 | 90 |
|
86 | 91 |
/** |
... | ... | |
97 | 102 |
} |
98 | 103 |
|
99 | 104 |
/** |
105 |
* Gets the instance of the {@link UsabilitySwingManager} registered. |
|
106 |
* |
|
107 |
* @return {@link UsabilitySwingManager} |
|
108 |
*/ |
|
109 |
public static UsabilitySwingManager getUsabilitySwingManager() { |
|
110 |
return (UsabilitySwingManager) getInstance().get( |
|
111 |
USABILITY_SWING_MANAGER_NAME); |
|
112 |
} |
|
113 |
|
|
114 |
/** |
|
100 | 115 |
* Registers the Class implementing the {@link UsabilitySwingManager} |
101 | 116 |
* interface. |
102 | 117 |
* |
... | ... | |
110 | 125 |
} |
111 | 126 |
|
112 | 127 |
/** |
113 |
* Return the {@link Locator}'s name
|
|
128 |
* Gets the instance of the {@link TaskStatusSwingManager} registered.
|
|
114 | 129 |
* |
115 |
* @return a String with the {@link Locator}'s name
|
|
130 |
* @return {@link TaskStatusSwingManager}
|
|
116 | 131 |
*/ |
117 |
@Override
|
|
118 |
public String getLocatorName() {
|
|
119 |
return LOCATOR_NAME;
|
|
132 |
public static TaskStatusSwingManager getTaskStatusSwingManager() {
|
|
133 |
return (TaskStatusSwingManager) getInstance().get(
|
|
134 |
TASKSTATUS_SWING_MANAGER_NAME);
|
|
120 | 135 |
} |
121 | 136 |
|
137 |
/** |
|
138 |
* Registers the Class implementing the {@link TaskStatusSwingManager} |
|
139 |
* interface. |
|
140 |
* |
|
141 |
* @param clazz |
|
142 |
* implementing the {@link TaskStatusSwingManager} interface |
|
143 |
*/ |
|
144 |
public static void registerTaskStatusSwingManager( |
|
145 |
Class<? extends TaskStatusSwingManager> clazz) { |
|
146 |
getInstance().register(TASKSTATUS_SWING_MANAGER_NAME, |
|
147 |
TASKSTATUS_SWING_MANAGER_DESCRIPTION, clazz); |
|
148 |
} |
|
149 |
|
|
150 |
|
|
122 | 151 |
} |
Also available in: Unified diff