Index: openide/src/org/openide/nodes/AbstractNode.java @@ -60,6 +60,28 @@ // opened mono 32x32 "Open32.gif" // NOI18N }; + + // <> Allow nodes to use the .png icons in addition to the .gif icons. + private static final String[] icon2s = { + // color 16x16 + ".png", // NOI18N + // color 32x32 + "32.png", // NOI18N + // mono 16x16 + ".png", // NOI18N + // mono 32x32 + "32.png", // NOI18N + // opened color 16x16 + "Open.png", // NOI18N + // opened color 32x32 + "Open32.png", // NOI18N + // opened mono 16x16 + "Open.png", // NOI18N + // opened mono 32x32 + "Open32.png" // NOI18N + }; + // + /** To index normal icon from previous array use * + ICON_BASE. */ @@ -244,6 +266,14 @@ if (im != null) return im; +// <> + // Try .png too + res = iconBase + icon2s[type + ib]; + im = Utilities.loadImage (res); + + if (im != null) return im; +// + // try the first icon res = iconBase + icons[java.beans.BeanInfo.ICON_COLOR_16x16 + ib]; @@ -251,6 +281,14 @@ if (im != null) return im; +// <> + // Try .png too + res = iconBase + icon2s[java.beans.BeanInfo.ICON_COLOR_16x16 + ib]; + im = Utilities.loadImage (res); + + if (im != null) return im; +// + if (ib == OPENED_ICON_BASE) { // try closed icon also return findIcon (type, ICON_BASE);