That's correct, The whole point of ImageBundle is that it combines all  
of the images into a single file, and then uses clipping at runtime to  
only show the portion related to a particular image.

The idea here is to reduce the request count, and byte count overall  
for a page.

-jason
On Nov 7, 2008, at 4:34 PM, Lucas86 wrote:

>
> Yes, I'm using 1.5. I've tried loading the images from the same
> location as the class, it had the same result. Everything seems to
> work in the sense that it all compiles and runs. It's just that when
> images are accessed they come out as two or three of the image files
> mashed together.
>
> On Nov 7, 1:44 am, mon3y <[EMAIL PROTECTED]> wrote:
>> Hi
>>
>> Are you using GWT 1.5?
>> Have you tried putting the images in the same level as the
>> MyImageBundle.java class?
>>
>> so it would look like
>> @Resource("images/border_bottom.gif") (<--or wherever your
>> MyImageBundle.java is)
>> public AbstractImagePrototype border_bottom();
>>
>> i'm using 1.4 and it looks like this(just a snippet)
>>
>> public interface Images extends ImageBundle {
>>
>>         /**
>>          * @gwt.resource gogo.png
>>          */
>>         AbstractImagePrototype gogo();
>>
>> }
>>
>> Other class that uses the Images class
>>
>> public class Test{
>> Images images;//ImageBundle implementation.
>> Image gogoImage=null; //Normal  GWT image object
>>
>>     public void createImages(){
>>        images = (Images) GWT.create(Images.class);
>>       gogoImage=images.gogo().createImage();
>>     )
>>
>> }
>>
>> This might not help if you're using 1.5. I haven't tried using
>> ImageBundle in 1.5
>>
>> HTH a little, :)
>>
>> On Nov 7, 8:19 am, Lucas86 <[EMAIL PROTECTED]> wrote:
>>
>>> I'm using the following code to set up an ImageBundle. I show the  
>>> code
>>> after that I use to add the image. It all compiles fine, but when I
>>> access the images most of them come up as a combination of several  
>>> of
>>> the images that I've added to the ImageBundle. Has anyone else had
>>> this problem? Is there anything I need to consider about the images
>>> themselves?
>>> ===
>>> public interface MyImageBundle extends ImageBundle {
>>
>>> @Resource("com/ljlowry/sharoncsteel/public/images/ 
>>> border_bottom.gif")
>>> public AbstractImagePrototype border_bottom();
>>
>>> @Resource("com/ljlowry/sharoncsteel/public/images/border_right.gif")
>>> public AbstractImagePrototype border_right();
>>
>>> @Resource("com/ljlowry/sharoncsteel/public/images/menu_contact.gif")
>>> public AbstractImagePrototype menu_contact();
>>
>>> @Resource("com/ljlowry/sharoncsteel/public/images/border_top.gif")
>>> public AbstractImagePrototype border_top();
>>
>>> @Resource("com/ljlowry/sharoncsteel/public/images/copyright.gif")
>>> public AbstractImagePrototype copyright();
>>
>>> @Resource("com/ljlowry/sharoncsteel/public/images/ 
>>> corner_flowers.gif")
>>> public AbstractImagePrototype corner_flowers();}
>>
>>> ===
>>>         //Testing the Image Bundle
>>>         MyImageBundle images_test = GWT.create(MyImageBundle.class);
>>>         AbstractImagePrototype testImagePrototype =
>>> images_test.border_right();
>>>         AbstractImagePrototype test1 = images_test.border_top();
>>>         AbstractImagePrototype test2 = images_test.copyright();
>>>         AbstractImagePrototype test3 = images_test.corner_flowers();
>>>         //End testing
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to