Revision 42161 trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/mdiFrame/MDIFrame.java
MDIFrame.java | ||
---|---|---|
205 | 205 |
private static final String noIcon = "no-icon"; |
206 | 206 |
|
207 | 207 |
private Map<JComponent,IExtension> control2extensions = new HashMap<JComponent, IExtension>(); |
208 |
|
|
208 |
|
|
209 | 209 |
private MDIFrame() { |
210 | 210 |
|
211 | 211 |
} |
... | ... | |
213 | 213 |
public static boolean isInitialized() { |
214 | 214 |
return instance!=null ; |
215 | 215 |
} |
216 |
|
|
216 |
|
|
217 | 217 |
public static MDIFrame getInstance() { |
218 | 218 |
if ( instance == null ) { |
219 | 219 |
instance = new MDIFrame(); |
... | ... | |
328 | 328 |
jtb.add(dropDownButton); |
329 | 329 |
addControl(dropDownButton); |
330 | 330 |
} |
331 |
dropDownButton.add(action); |
|
331 |
dropDownButton.add(actionManager.getTranslated(action));
|
|
332 | 332 |
} |
333 | 333 |
return; |
334 | 334 |
} |
335 |
|
|
335 |
|
|
336 | 336 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
337 | 337 |
|
338 | 338 |
JToolBarToggleButton btn; |
... | ... | |
444 | 444 |
jtb.add(dropDownButton); |
445 | 445 |
addControl(dropDownButton); |
446 | 446 |
} |
447 |
dropDownButton.add(action); |
|
447 |
dropDownButton.add(actionManager.getTranslated(action));
|
|
448 | 448 |
} |
449 | 449 |
return; |
450 | 450 |
} |
451 |
|
|
451 |
|
|
452 | 452 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
453 | 453 |
|
454 | 454 |
JToolBarButton btn; |
... | ... | |
493 | 493 |
jtb.addSeparator(); |
494 | 494 |
} |
495 | 495 |
} |
496 |
|
|
496 |
|
|
497 | 497 |
private SelectableToolBar getToolBar(final String toolBarName) { |
498 | 498 |
SelectableToolBar jtb = (SelectableToolBar) toolBarMap.get(toolBarName); |
499 | 499 |
if ( jtb == null ) { |
... | ... | |
505 | 505 |
} |
506 | 506 |
return jtb; |
507 | 507 |
} |
508 |
|
|
508 |
|
|
509 | 509 |
public void addTool(final ActionInfo action, final String toolBarName, final String dropDownName) { |
510 | 510 |
if ( !SwingUtilities.isEventDispatchThread() ) { |
511 | 511 |
SwingUtilities.invokeLater(new Runnable() { |
... | ... | |
521 | 521 |
dropDownButton = new DropDownButton(); |
522 | 522 |
jtb.add(dropDownButton); |
523 | 523 |
} |
524 |
dropDownButton.add(action); |
|
524 |
ActionInfoManager actionManager = PluginsLocator.getActionInfoManager(); |
|
525 |
dropDownButton.add(actionManager.getTranslated(action)); |
|
525 | 526 |
} |
526 |
|
|
527 |
|
|
527 | 528 |
public void addTool(final ActionInfo action, final String toolBarName) { |
528 | 529 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
529 | 530 |
|
... | ... | |
1649 | 1650 |
public void addToolBarControl(Class<?> extensionClass, JToolBar control, String name) { |
1650 | 1651 |
toolBars.add(control); |
1651 | 1652 |
addControl(control); |
1652 |
|
|
1653 |
|
|
1653 | 1654 |
PluginsManager pluginsManager = PluginsLocator.getManager(); |
1654 | 1655 |
IExtension extension = pluginsManager.getExtension((Class<? extends IExtension>) extensionClass); |
1655 | 1656 |
this.control2extensions.put(control, extension); |
... | ... | |
1691 | 1692 |
/* |
1692 | 1693 |
* We also add action listener for menu with |
1693 | 1694 |
* no name but with text: |
1694 |
*
|
|
1695 |
* |
|
1695 | 1696 |
* Window/Project manager |
1696 | 1697 |
* Window/View - 1 |
1697 | 1698 |
* Window/View - 2 |
Also available in: Unified diff