O'Reilly logo

ExtGWT Rich Internet Application Cookbook by Odili Charles Opute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. Custom Icons in GXT

The GXT toolkit contains many cool widgets, but there's no pre-built collection of icons for garnishing the UIs we often want to build. Even if there was such a collection, it's just a matter of time before we start wanting to use custom icons here and there. The solution is quite simple and extensible too.

GXT icons

We will create a custom interface that extends ClientBundle and call it Icons, to encapsulate methods that return the icon images as instances of ImageResource.

public interface Icons extends ClientBundle {
ImageResource people();
ImageResource home();
ImageResource orgchart();
}

Our sample Icons interface extends ClientBundle and declares three methods, each named with the exact name of an image placed ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required