Hi all,
I am trying to have an animated effect that simulates 'maximization'
with SplitLayoutPanel, in which clicking on the 'north' widget will
maximizes it at the expense of 'center' and 'south'
.animate() works only for the first time of showing the widgets, but
is ignored afterwords.
Even overriding animate(int, AnimationCallback) with a hardcoded value
does not have an effect.
Can .animate() be used for that scenario?
Thanks a lot for your help.
public void onModuleLoad() {
final SplitLayoutPanel panel = new SplitLayoutPanel() {
@Override
public void animate(int duration, AnimationCallback
callback) {
super.animate(5000, callback);
}
};
final HTML center = new HTML("Center");
final HTML south = new HTML("South");
final Button button = new Button("Hello");
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
panel.remove(south);
panel.remove(center);
panel.remove(button);
panel.add(button);
panel.animate(5000);
}
});
panel.addNorth(button, 50);
panel.addSouth(south, 50);
panel.add(center);
RootLayoutPanel.get().add(panel);
}
--
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.