19/04/2009
SmartGWT Icon Names Convention
Posted in SmartGWT tagged icon name convention, SmartGWT at 12:10 by vanje
The SmartGWT component ImgButton is ideal for icon-only buttons. With setSrc("Plus.png") you set the image file. SmartGWT then looks for the file "images/Plus.png" relative to the war root. The ImgButton component is also capable to display different icons based on the button state (like disabled, highlighted, …).
But I found no method to set the other icon files. I searched the SmartGWT and SmartClient APIs and the Forum. I found one post which mentioned a file name convention for icon files. Luckily the GWT console logs all HTTP requests, so with that help it is easy to figure out the convention.
If the base icon file name is Plus.png then SmartGWT looks for Plus_Disabled.png for the disabled state icon and Plus_Over.png for the mouse over state in the same directory.