I'm using a HorizontalSplitPanel and need to determine when the
divider is moved (I'm displaying an image in a custom widget inside it
and need to resize it while preserving its aspect ratio).

I've wasted a lot of time trying to solve this problem and found
dozens and dozens of posts from other people who have similar
requirements but no satisfactory solutions. The main problem is that
HorizontalSplitPanel and VerticalSplitPanel are final (and that there
is no JavaScript DOM event to indicate when an element is resized,
only when the window or frame is resized).

I can see several possible solutions:

a) constantly poll to check the size of the split panel
b) copy the source code of HorizontalSplitPanel and include it in my
application
c) implement my own split panel
d) compile my own version of gwt-user.jar and don't make
HorizontalSplitPanel a final class
e) put my own class in com.google.gwt.user.client.ui that listens to
mouse events on the split panel (as addHandler is package protected)

It's difficult to know which of these sucks any more or less than any
other, they all suck equally in my opinion :-)

Pretty please, can this be fixed in GWT 2.0? At the very least, don't
make these classes final.

(Java rant: I don't see any good reason for making *any* classes other
than those in java.lang final, certainly not classes in a library
that's intended for use by others. Making things final implies a
certain arrogance on the part of the library designer, that they can
foresee every possible way every possible developer is going to use
those classes. If I'm developing an application I expect to be in
complete control of that application; I don't want someone else to
think they can second guess what I'm trying to do!)

-Rolf

--

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=.


Reply via email to