Revision 100 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/ToolsSwingLibrary.java
ToolsSwingLibrary.java | ||
---|---|---|
25 | 25 |
import org.gvsig.tools.library.LibraryException; |
26 | 26 |
import org.gvsig.tools.locator.ReferenceNotRegisteredException; |
27 | 27 |
import org.gvsig.tools.swing.api.dynobject.DynObjectSwingManager; |
28 |
import org.gvsig.tools.swing.api.usability.UsabilitySwingManager; |
|
28 | 29 |
|
29 | 30 |
/** |
30 | 31 |
* Initialization of the Tools swing library. |
... | ... | |
36 | 37 |
@Override |
37 | 38 |
protected void doInitialize() throws LibraryException { |
38 | 39 |
// Do nothing |
39 |
|
|
40 | 40 |
} |
41 | 41 |
|
42 | 42 |
@Override |
43 | 43 |
protected void doPostInitialize() throws LibraryException { |
44 | 44 |
// Validate there is any DynObjectSwingManager implementation |
45 | 45 |
// registered. |
46 |
DynObjectSwingManager uiManager = ToolsSwingLocator.getDynObjectSwingManager(); |
|
46 |
DynObjectSwingManager dynObjectSwingManager = ToolsSwingLocator |
|
47 |
.getDynObjectSwingManager(); |
|
47 | 48 |
|
48 |
if (uiManager == null) {
|
|
49 |
if (dynObjectSwingManager == null) {
|
|
49 | 50 |
throw new ReferenceNotRegisteredException( |
50 |
ToolsSwingLocator.DYNOBJECT_SWING_MANAGER_NAME, ToolsSwingLocator
|
|
51 |
.getInstance());
|
|
51 |
ToolsSwingLocator.DYNOBJECT_SWING_MANAGER_NAME, |
|
52 |
ToolsSwingLocator.getInstance());
|
|
52 | 53 |
} |
54 |
|
|
55 |
// Validate there is any UsabilitySwingManager implementation |
|
56 |
// registered. |
|
57 |
UsabilitySwingManager usabilitySwingManager = ToolsSwingLocator |
|
58 |
.getUsabilitySwingManager(); |
|
59 |
|
|
60 |
if (usabilitySwingManager == null) { |
|
61 |
throw new ReferenceNotRegisteredException( |
|
62 |
ToolsSwingLocator.USABILITY_SWING_MANAGER_NAME, |
|
63 |
ToolsSwingLocator.getInstance()); |
|
64 |
} |
|
53 | 65 |
} |
54 |
|
|
55 | 66 |
} |
Also available in: Unified diff