mgwtでは “AnimationHelper”というクラスが用意されており、このクラスに描画したい画面(パネル)と遷移効果を指定することで、あたかも画面が切り替わったかのような処理をしてくれます。
下記は公式サイトにあるサンプルの例ですけど、最後の処理がポイント。第2引数でいろいろ効果を変えることができます。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//animationhelperをルートに配置しておきます | |
AnimationHelper animationHelper = new AnimationHelper(); | |
RootPanel.get().add(animationHelper); | |
//画面をパネルに配置します | |
LayoutPanel layoutPanel = new LayoutPanel(); | |
Button button = new Button("Hello mgwt"); | |
layoutPanel.add(button); | |
//ここで画面遷移が実行されます | |
animationHelper.goTo(layoutPanel, Animation.SLIDE); |
mgwt面白いですね!
返信削除記事楽しみにしてますw
今、コメントに気づきました。記事は増えてませんがラボではmgwtを本格的に利用しています。
削除