Example usage for com.google.gwt.user.client.ui PopupPanel setAnimationType

List of usage examples for com.google.gwt.user.client.ui PopupPanel setAnimationType

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui PopupPanel setAnimationType.

Prototype

void setAnimationType(AnimationType type) 

Source Link

Document

Enable or disable animation of the PopupPanel .

Usage

From source file:com.google.gwt.sample.stockwatcher.client.Menu.java

public void setPopupParam(PopupPanel popup, final VerticalPanel vpanel) {
    popup.addStyleName("gwt-PopUpPanel");
    popup.setAnimationEnabled(true);/*from w w  w .j  av  a  2  s  .co m*/
    popup.setAnimationType(AnimationType.ROLL_DOWN);
    popup.setAutoHideEnabled(true);
    popup.getElement().getStyle().setBorderWidth(0, Unit.PX);
    popup.getElement().getStyle().setBackgroundColor("black");
    popup.hide();

    popup.addCloseHandler(new CloseHandler<PopupPanel>() {
        @Override
        public void onClose(CloseEvent<PopupPanel> event) {
            vpanel.getElement().getStyle().setBackgroundColor("#000000");
        }
    });
}

From source file:com.google.gwt.sample.stockwatcher.client.SitePage.java

private static void popupControllers(String siteName) {
    try {//from w ww.j ava2 s .c o m
        for (PopupPanel popup : siteControllerPopupList.get(siteName)) {
            popup.setAnimationEnabled(true);
            popup.setAnimationType(AnimationType.CENTER);
            popup.setVisible(true);
        }
    } catch (Exception e) {
    }
}

From source file:com.google.gwt.sample.stockwatcher.client.SitePage.java

private static void popupSensors(String controllerName, Boolean state) {
    try {//from w  w  w  .j a v a2s.  c o m
        for (PopupPanel popup : controllerSensorPopupList.get(controllerName)) {
            popup.setAnimationEnabled(true);
            popup.setAnimationType(AnimationType.CENTER);
            popup.setVisible(state);
        }
    } catch (Exception e) {
    }
}

From source file:com.google.gwt.sample.stockwatcher.client.SitePage.java

private static void popupActuators(String controllerName, Boolean state) {
    try {//w  w w.j av a  2s  . c o m
        for (PopupPanel popup : controllerActuatorPopupList.get(controllerName)) {
            popup.setAnimationEnabled(true);
            popup.setAnimationType(AnimationType.CENTER);
            popup.setVisible(state);
        }
    } catch (Exception e) {
    }
}