Question

I used applyTo(image) on a AbstractImagePrototype in the past. But now resources are mainly created with a @Resource AbstractImagePrototype line.

http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/AbstractImagePrototype.html

The applyTo(Image) method provides an efficient way to replace the contents of an existing Image. This is useful in cases where an image changes its appearance based on a user's action. Instead of creating two Image objects then alternately hiding/showing them, one can use the applyTo(Image) method of two AbstractImagePrototype objects to transform a single Image object between two (or more) visual representations.

But now it seems better to use a ClientBundle with @Source ImageResource. Unfortunately this ImageResource does not provide a applyTo(image) method. What to I have to change to have the same functionality to just replace an image?

Était-ce utile?
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top