Revision 38608 branches/v2_0_0_prep/frameworks/_fwAndami/src/org/gvsig/andami/ui/mdiFrame/MDIFrame.java

View differences:

MDIFrame.java
1524 1524
        // Se registra y a�ade el menu
1525 1525
        JMenuItem nuevoMenu = createJMenuItem(loader, menu);
1526 1526
        nuevoMenu.addMouseListener(tooltipListener);
1527
        if( listener != null ) {
1527
        if( listener != null && menu.getName() != null && menu.getName().trim().length()>0 ) {
1528 1528
    		ActionInfoManager actionManager = PluginsLocator.getActionInfoManager();
1529 1529
    		final ActionInfo actionInfo = actionManager.getAction(menu.getName());
1530 1530
    		if( actionInfo != null ) {
......
1723 1723
        }
1724 1724
        return getMenu(menu, menuBar);
1725 1725
    }
1726

  
1727
	public void messageDialog(String message, String title, int messageType) {
1728
		messageDialog(message, null, title, messageType);
1729
	}
1730
	
1731
	public void messageDialog(String message, String messageArgs[], String title, int messageType) {
1732
		String msg = message;
1733
		String theTitle = title;
1734
		
1735
        if (message == null) {
1736
        	logger.info("message if null, message dialog not show.");
1737
            return;
1738
        }
1739
        if( theTitle == null ) {
1740
        	theTitle = "";
1741
        }
1742
        if (msg.startsWith("_")) {
1743
	        msg = org.gvsig.i18n.Messages.getText(message, messageArgs);
1744
	        if (msg == null) {
1745
	        	msg = "_"+message.replace("_", " ");
1746
	        }
1747
        }		
1748
        if (theTitle.startsWith("_")) {
1749
        	theTitle = org.gvsig.i18n.Messages.getText(theTitle);
1750
	        if (theTitle == null) {
1751
	        	theTitle = "_"+title.replace("_", " ");
1752
	        }
1753
        }		
1754
		JOptionPane.showMessageDialog(this, msg,theTitle, messageType);
1755
	}
1726 1756
}

Also available in: Unified diff