What you are describing is very similar to worldofsolitaire.com.  I
suggest that you play around with it for a bit and use firebug to
inspect how he does things in html.  I believe he is using just one
image for each card and letting the browser scale it.  This way you
only need one image for each card and you just let the browser handle
the sizing.  He is also doing some stuff that I have had difficulty
getting to work in the past, but is a necessity with such an
application.  You need to be able to sense both when the browser
resizes(easy) or when the layout is changed on the screen(more
difficult as this requires you to set up your own eventing for
whenever the size of anything changes and therefore becomes very
heavy).  I do however believe you will be able to get away with just
one set of cards letting the browser resize it for you.  Like I said
in order to do so you will need to use the img tag, therefore
ImageBundle is not a good solution because it creates an image with
the background therefore not allowing for client side resizing.
Firebug is your friend with GWT development, so if you aren't sure
what the Java code is producing inspect it with firebug and make sure
it's what you want.

On Sep 9, 5:46 pm, pete <bobobo...@hotmail.com> wrote:
> This one app is a card game, with approx. some hundred cards when
> fully designed. So each card has a small image shown in the UI
> (dragable, if possible 2 rows a 5 small cards independent of the
> resolution) and on click shows a popup with the full image including
> card description. Furthermore 5 small views of stacks to the left on
> top of each other, which mainly consist of smaller versions of the
> same cards. The popups from the small stacks are the same images in
> different sizes once again...
>
> I created widgets for this card type, to take care of presenting the
> small image with possibility to display the full one, etc. Furthermore
> options to automatically scale the card to a certain height (by using
> the setHeight() , setWidth() methods). It all works, once the browser
> was refreshed. I also dynamically create the playfield, left an area
> for card stacks, right side a play field with drag and drop support.
> But even the play area is not proportioned correctly until refresh...
> (I set 1/5 percentage of Window.getClientWidth() for the card stack
> area)
>
> The caching of the images is right now to present each card image once
> on the screen, cause I only know that way to cache the images in the
> browser (since ImageBundle doesn't work for my case I guess...). So I
> have a timer running switching through every possible card with a
> certain speed low enough to show the cards on screen...
>
> So this all together is everything but satisfying... For the cards I
> either need different resolutions on the server, so I can adjust to
> the client window size, or I have to create them dynamically...
> I want this to run on the GAE for now, so the more work the client
> does, the better, right? (With respect to quotas)
>
> Anyway, I really appreciate your help :-) You're quite right that I
> don't have much experience in web development ;-)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to