Index: buix/src/java/org/codelutin/buix/ShelfButton.java diff -u buix/src/java/org/codelutin/buix/ShelfButton.java:1.4 buix/src/java/org/codelutin/buix/ShelfButton.java:1.5 --- buix/src/java/org/codelutin/buix/ShelfButton.java:1.4 Thu Jul 1 16:25:41 2004 +++ buix/src/java/org/codelutin/buix/ShelfButton.java Thu Aug 12 14:54:04 2004 @@ -23,9 +23,9 @@ * * @author Aurelie Mazelier * Copyright Code Lutin - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ * - * Mise a jour: $Date: 2004/07/01 16:25:41 $ + * Mise a jour: $Date: 2004/08/12 14:54:04 $ * par : $Author: mazelier $ */ @@ -36,6 +36,7 @@ import javax.swing.JToggleButton; import java.awt.Component; +import java.beans.BeanInfo; /** * Classe abstraite des boutons des onglets a gauche @@ -51,7 +52,7 @@ protected ShelfButton(Class beanClass){ this(beanClass.getName()); this.beanClass = beanClass; - Icon icon = WidgetManager.getIcon(beanClass); + Icon icon = WidgetManager.getIcon(beanClass, BeanInfo.ICON_COLOR_32x32); if(icon != null){ setIcon(icon); setText(null); Index: buix/src/java/org/codelutin/buix/ShelfTreeCellRenderer.java diff -u buix/src/java/org/codelutin/buix/ShelfTreeCellRenderer.java:1.6 buix/src/java/org/codelutin/buix/ShelfTreeCellRenderer.java:1.7 --- buix/src/java/org/codelutin/buix/ShelfTreeCellRenderer.java:1.6 Thu Jul 1 16:25:41 2004 +++ buix/src/java/org/codelutin/buix/ShelfTreeCellRenderer.java Thu Aug 12 14:54:04 2004 @@ -23,9 +23,9 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * - * Mise a jour: $Date: 2004/07/01 16:25:41 $ + * Mise a jour: $Date: 2004/08/12 14:54:04 $ * par : $Author: mazelier $ */ @@ -37,6 +37,7 @@ import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.JTree; +import java.beans.BeanInfo; /** * Classe qui permet l'affichage des composants dans l'arbre @@ -54,6 +55,7 @@ if(value instanceof SwingTreeNode){ Component comp = ((SwingTreeNode)value).getComponent(); setText("[" + comp.getClass().getName() + "] " + comp.getName()); + setLeafIcon(WidgetManager.getIcon(comp.getClass(), BeanInfo.ICON_COLOR_16x16)); } if(value instanceof LayoutTreeNode){ LayoutManager layout = ((LayoutTreeNode)value).getLayout(); Index: buix/src/java/org/codelutin/buix/WidgetManager.java diff -u buix/src/java/org/codelutin/buix/WidgetManager.java:1.19 buix/src/java/org/codelutin/buix/WidgetManager.java:1.20 --- buix/src/java/org/codelutin/buix/WidgetManager.java:1.19 Tue Jul 20 15:59:39 2004 +++ buix/src/java/org/codelutin/buix/WidgetManager.java Thu Aug 12 14:54:04 2004 @@ -23,9 +23,9 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.19 $ + * @version $Revision: 1.20 $ * - * Mise a jour: $Date: 2004/07/20 15:59:39 $ + * Mise a jour: $Date: 2004/08/12 14:54:04 $ * par : $Author: mazelier $ */ @@ -259,20 +259,20 @@ return result; } - public static Icon getIcon(Class clazz) { + public static Icon getIcon(Class clazz, int field) { Icon result = null; if (clazz != null){ try{ BeanInfo info = Introspector.getBeanInfo(clazz); if(info != null){ - Image image = info.getIcon(info.ICON_COLOR_32x32); + Image image = info.getIcon(field); //System.out.println("image for:"+clazz+" is " +image); if(image != null){ result = new ImageIcon(image); }else{ - result = getIcon(clazz.getSuperclass()); + result = getIcon(clazz.getSuperclass(), field); } } }catch(IntrospectionException eee){