Created
May 7, 2014 22:37
-
-
Save branflake2267/19aabca3a79522fd9aac to your computer and use it in GitHub Desktop.
Window and with animated display fade in.
This file contains hidden or 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
| import com.google.gwt.dom.client.Style.Display; | |
| import com.google.gwt.user.client.ui.RootPanel; | |
| import com.sencha.gxt.fx.client.FxElement; | |
| import com.sencha.gxt.fx.client.animation.Fx; | |
| import com.sencha.gxt.widget.core.client.Window; | |
| import com.sencha.gxt.widget.core.client.button.TextButton; | |
| import com.sencha.gxt.widget.core.client.event.SelectEvent; | |
| import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler; | |
| public class WindowTest { | |
| public WindowTest() { | |
| TextButton button = new TextButton("Open"); | |
| RootPanel.get().add(button, 50, 50); | |
| button.addSelectHandler(new SelectHandler() { | |
| @Override | |
| public void onSelect(SelectEvent event) { | |
| displayWindow(); | |
| } | |
| }); | |
| } | |
| private void displayWindow() { | |
| Window window = new Window(); | |
| window.setPixelSize(200, 200); | |
| window.setShadow(false); | |
| window.show(); | |
| window.getElement().getStyle().setDisplay(Display.NONE); | |
| // use default settings | |
| //window.getElement().<FxElement> cast().fadeToggle(); | |
| // use custom settings | |
| Fx fx = new Fx(700); | |
| window.getElement().<FxElement> cast().fadeToggle(fx); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment