Index: IconThemeDevelTool.java
===================================================================
--- IconThemeDevelTool.java	(revision 47410)
+++ IconThemeDevelTool.java	(revision 47411)
@@ -23,6 +23,7 @@
  */
 package org.gvsig.app.extension.develtools;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
@@ -30,24 +31,116 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
-
 import javax.swing.ImageIcon;
-
+import javax.swing.JOptionPane;
 import org.gvsig.andami.PluginsLocator;
 import org.gvsig.andami.actioninfo.ActionInfo;
+import org.gvsig.desktopopen.DesktopOpen;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.exception.BaseException;
+import org.gvsig.tools.folders.FoldersManager;
+import org.gvsig.tools.i18n.I18nManager;
+import org.gvsig.tools.swing.api.SimpleImage;
 import org.gvsig.tools.swing.api.ToolsSwingLocator;
+import org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager;
 import org.gvsig.tools.swing.api.windowmanager.WindowManager;
 import org.gvsig.tools.swing.icontheme.IconTheme;
 import org.gvsig.tools.swing.icontheme.IconThemeManager;
+import org.gvsig.tools.util.ToolsUtilLocator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class IconThemeDevelTool {
+    
+    public static final Logger LOGGER = LoggerFactory.getLogger(IconThemeDevelTool.class);
 
 	public void showDefaultIconTheme() {
-		String html = "<html>\n<body>\n"+ this.getIconThemeInformationByGroup()+"</body>\n</html>\n";
-		InfoPanel.save2file("icontheme-report", html);
-		InfoPanel.showPanel("Icon theme information", WindowManager.MODE.WINDOW, html);
+            try {
+                IconThemeManager manager = ToolsSwingLocator.getIconThemeManager();
+		String html = "<html>"
+                        + "<style type=\"text/css\" media=\"print\">"
+                        + "@page {\n"
+                        + "  size: A4 landscape;\n"
+                        + "}"
+                        + "</style>"
+                        + "\n<body>\n"+ this.getIconThemeInformationByGroup(manager.getDefault())+"</body>\n</html>\n";
+                FoldersManager fm = ToolsLocator.getFoldersManager();
+                File f = fm.createTemporaryFile("defaulticontheme-report.html", html);
+                DesktopOpen desktopOpen = ToolsUtilLocator.getToolsUtilManager().createDesktopOpen();
+                desktopOpen.browse(f.toURI());
+                
+ 
+//                ActionInfoManager actionManager = PluginsLocator.getActionInfoManager();
+//                ActionInfo showPdf = actionManager.getAction("show-pdf");
+//                if(showPdf == null) {
+//                    InfoPanel.save2file("defaulticontheme-report", html);
+//                    InfoPanel.showPanel("Default icon theme information", WindowManager.MODE.WINDOW, html);
+//                } else {
+//                    showPdf.execute(
+//                            new Object[]{
+//                                "--title=", "Default icon theme information",
+//                                "--mode=", WindowManager.MODE.WINDOW,
+//                                "--source=", html
+//                            }
+//                    );
+//                }
+            } catch (Exception ex) {
+                LOGGER.warn("Can't show default icon theme.'", ex);
+                I18nManager i18n = ToolsLocator.getI18nManager();
+                ThreadSafeDialogsManager dialogs = ToolsSwingLocator.getThreadSafeDialogsManager();
+                dialogs.messageDialog(
+                        i18n.getTranslation("_Cant_show_default_icon_theme") + ")\n\n"+BaseException.getMessageStack(ex, 0),
+                        i18n.getTranslation("_Show_default_icon_theme"),
+                        JOptionPane.WARNING_MESSAGE
+                );
+            }
+
+                
 	}
 
+	public void showCurrentIconTheme() {
+            try {
+                IconThemeManager manager = ToolsSwingLocator.getIconThemeManager();
+                String html = "<html>"
+                        + "<style type=\"text/css\" media=\"print\">"
+                        + "@page {\n"
+                        + "  size: A4 landscape;\n"
+                        + "}"
+                        + "</style>"
+                        + "\n<body>\n"+ this.getIconThemeInformationByGroup(manager.getCurrent())+"</body>\n</html>\n";
+ 
+                FoldersManager fm = ToolsLocator.getFoldersManager();
+                File f = fm.createTemporaryFile("currenticontheme-report.html", html);
+                DesktopOpen desktopOpen = ToolsUtilLocator.getToolsUtilManager().createDesktopOpen();
+                desktopOpen.browse(f.toURI());
+
+//                ActionInfoManager actionManager = PluginsLocator.getActionInfoManager();
+//                ActionInfo showPdf = actionManager.getAction("show-pdf");
+//                if(showPdf == null) {
+//                    InfoPanel.save2file("currenticontheme-report", html);
+//                    InfoPanel.showPanel("Current icon theme information", WindowManager.MODE.WINDOW, html);
+//                } else {
+//                    showPdf.execute(
+//                            new Object[]{
+//                                "--title=", "Current icon theme information",
+//                                "--mode=", WindowManager.MODE.WINDOW,
+//                                "--source=", html
+//                            }
+//                    );
+//                }
+            } catch (Exception ex) {
+                LOGGER.warn("Can't show current icon theme.'", ex);
+                I18nManager i18n = ToolsLocator.getI18nManager();
+                ThreadSafeDialogsManager dialogs = ToolsSwingLocator.getThreadSafeDialogsManager();
+                dialogs.messageDialog(
+                        i18n.getTranslation("_Cant_show_current_icon_theme") + ")\n\n"+BaseException.getMessageStack(ex, 0),
+                        i18n.getTranslation("_Show_current_icon_theme"),
+                        JOptionPane.WARNING_MESSAGE
+                );
+            }
+
+	}
+
 	public void showDefaultIconThemeByPlugin() {
 		String html = "<html>\n<body>\n"+ this.getIconThemeInformationByPlugin()+"</body>\n</html>\n";
 		InfoPanel.save2file("icontheme-report", html);
@@ -101,9 +194,7 @@
 		return getIconThemeInformation(theme, themeIconsIt);
 	}
 	
-	private String getIconThemeInformationByGroup() {
-		IconThemeManager manager = ToolsSwingLocator.getIconThemeManager();
-		IconTheme theme = manager.getDefault();
+	private String getIconThemeInformationByGroup(IconTheme theme) {
 		
 		List<IconTheme.Icon>themeIcons = new ArrayList<IconTheme.Icon>();
 		Iterator<IconTheme.Icon> themeIconsIt = theme.getThemeIcons();
@@ -181,19 +272,31 @@
 			if( themeIcon.getLabel().length()>0 && themeIcon.getImageIcon()!=null ) {
 				try {
 					ImageIcon img = themeIcon.getImageIcon();
+                                        SimpleImage simpleImg = ToolsSwingLocator.getToolsSwingManager().createSimpleImage(img);
 					if( img.getIconHeight() > 48 || img.getIconWidth() > 48 ) {
 						buffer
 							.append("    <td nowrap>")
-							.append("<img width=\"48\" height=\"48\" src=\"")
-							.append(themeIcon.getLabel())
-							.append("\">(*)</td>");
+							.append("<img width=\"48\" height=\"48\" src=\"data:image/")
+                                                        .append(simpleImg.getFormatName())
+                                                        .append(";base64,")
+                                                        .append(simpleImg.toStringBase64())
+                                                        .append("\"><sup>(1)</sup>");
+//                                                buffer.append("</td>");
 					} else {
 						buffer
 							.append("    <td>")
-							.append("<img src=\"")
-							.append(themeIcon.getLabel())
-							.append("\"></td>");
+							.append("<img src=\"data:image/")
+                                                        .append(simpleImg.getFormatName())
+                                                        .append(";base64,")
+                                                        .append(simpleImg.toStringBase64())
+							.append("\">");
+//                                                buffer.append("</td>");
 					}
+                                        if(!theme.isMyIcon(themeIcon.getName())){
+                                            buffer.append("<sup>(2)</sup>");
+                                        }
+                                        buffer.append("</td>");
+                                        
 				} catch(Exception ex) {
 					buffer
 						.append("    <td>")
@@ -279,6 +382,7 @@
 			buffer.append("  </tr>\n");
 		}
 		buffer.append("</table>\n");
+                buffer.append("<p><sup>(1)</sup> Resized Icon<br><sup>(2)</sup> Icon in default theme</p>");
 		buffer.append("</div>\n");
 
 		return buffer.toString();
