Revision 42349

View differences:

trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/mdiFrame/MDIFrame.java
561 561

  
562 562
    }
563 563

  
564
    public void addTool(final ActionInfo action, final String toolBarName) {
565
        I18nManager i18nManager = ToolsLocator.getI18nManager();
566

  
567
        if ( !SwingUtilities.isEventDispatchThread() ) {
568
            SwingUtilities.invokeLater(new Runnable() {
569
                public void run() {
570
                    addTool(action, toolBarName);
571
                }
572
            });
573
            return;
574
        }
575
        JToolBarButton btn = new JToolBarButton(action.getIcon());
576
        btn.setMargin(new Insets(0, 0, 0, 0));
577
        btn.addMouseListener(tooltipListener);
578
        btn.addActionListener(this);
579
        btn.setFocusable(false);
580
        btn.setActionCommand(action.getCommand());
581
        btn.setEnabled(false);
582
        btn.setVisible(false);
583
        btn.setName(action.getName());
584
        if ( action.getTooltip() != null ) {
585
            btn.setToolTip(i18nManager.getTranslation(action.getTooltip()));
586
            btn.setToolTipKey(action.getTooltip());
587
        }
588

  
589
        SelectableToolBar jtb = getToolBar(toolBarName);
590
        jtb.add(btn);
591

  
592
        addControl(btn);
593

  
594
    }
595
    
564 596
    /**
565 597
     * Creates the needed menu structure to add the menu to the bar.
566 598
     * Returns the father which must hold the menu which was
trunk/org.gvsig.desktop/pom.xml
1392 1392
                <version>2.0.104-SNAPSHOT</version>
1393 1393
            </dependency>
1394 1394

  
1395
            <dependency>
1396
              <groupId>org.gvsig</groupId>
1397
              <artifactId>org.gvsig.fmap.geometry.jts</artifactId>
1398
              <version>2.0.104-SNAPSHOT</version>
1399
            </dependency>
1400
            <dependency>
1401
              <groupId>org.gvsig</groupId>
1402
              <artifactId>org.gvsig.fmap.geometry.operation.jts</artifactId>
1403
              <version>2.0.104-SNAPSHOT</version>
1404
            </dependency>
1405 1395
        </dependencies>
1406 1396
    </dependencyManagement>
1407 1397

  
1408 1398

  

Also available in: Unified diff