HTML just doesn't tell you when something changes size. Major bummer.
What you CAN find out is when the window changes size. RootLayoutPanel
listens for window size change events. When it hears one, it tells all its children, "Hey, you probably just changed size. Check it out." Then all of those children are supposed to tell all of THEIR children, "Hey, check your size, guys. Might be different."
So. Your AbsolutePanel
that implements ProvidesResize
has to be hooked into this process somehow. If you add it to RootLayoutPanel
, you can get the message by also implementing RequiresResize
. If you're not adding it into the RootLayoutPanel
chain, you have to find out resize information yourself somehow. You could either listen for window size events, or trigger the size calculation when you know something else changed in the layout. Whatever you want. Unfortunately this can't be done for you unless you have a continuous chain of RequiresResize
and ProvidesResize
widgets all the way up to RootLayoutPanel
.