Fix icon for static figures 58/14358/2
Vincent COUVERT [Mon, 7 Apr 2014 14:06:11 +0000 (16:06 +0200)]
Change-Id: Ifc56c3523da2b09770b45f4cd65a4a2c8b796e79

scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/tab/SwingScilabStaticPanel.java

index 4cadfbd..b6ff1d3 100644 (file)
@@ -26,10 +26,12 @@ import java.awt.event.ComponentListener;
 import java.awt.event.HierarchyBoundsListener;
 import java.awt.event.HierarchyEvent;
 
+import javax.swing.ImageIcon;
 import javax.swing.JLayeredPane;
 import javax.swing.SwingUtilities;
 
 import org.scilab.modules.action_binding.InterpreterManagement;
+import org.scilab.modules.commons.gui.FindIconHelper;
 import org.scilab.modules.graphic_objects.figure.Figure;
 import org.scilab.modules.graphic_objects.graphicController.GraphicController;
 import org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties;
@@ -91,7 +93,7 @@ public class SwingScilabStaticPanel extends SwingScilabScrollPane implements Swi
             }
         };
         addHierarchyBoundsListener(ancestorListener);
-        
+
         /* Manage figure_size property */
         componentListener = new ComponentListener() {
             public void componentShown(ComponentEvent arg0) {
@@ -190,6 +192,7 @@ public class SwingScilabStaticPanel extends SwingScilabScrollPane implements Swi
 
     public void setParentWindowId(String parentWindowId) {
         this.parentWindowId = parentWindowId;
+        SwingScilabWindow.allScilabWindows.get(parentWindowId).setIconImage(new ImageIcon(FindIconHelper.findIcon("graphic-window", "256x256")).getImage());
     }
 
     public void setWindowIcon(String windowIcon) {