concept image resource in category gwt

This is an excerpt from Manning's book GWT in Action.
In the Java code, you create a Java object of the type Image and pass the location of the image resource into the constructor. The GWT.getModuleBaseURL method returns the path to your web application, onto which the image filename, stored as a constant for future maintainability, is appended to give the full path, showing the logo as in figure 3.3.
To generate the rotations you schedule
a RepeatingCommand
to cycle through the ImageResource array provided at instantiation. Each invocation of the execute method changes the image resource set in the icon
and returns true
so that the RepeatingCommand will continue to be scheduled. The images array allows the ImageRotator to be reused with any array of ImageResources you want to supply it with, but for now, you’ll build a client bundle with a bunch of social media icons. We expect you’ll see that this is created in the rather familiar way now.
a RepeatingCommand
to cycle through the ImageResource array provided at instantiation. Each invocation of the execute method changes the image resource set in the icon
and returns true
so that the RepeatingCommand will continue to be scheduled. The images array allows the ImageRotator to be reused with any array of ImageResources you want to supply it with, but for now, you’ll build a client bundle with a bunch of social media icons. We expect you’ll see that this is created in the rather familiar way now.