Java Code Examples for com.google.gwt.user.client.ui.PopupPanel#setGlassEnabled()

The following examples show how to use com.google.gwt.user.client.ui.PopupPanel#setGlassEnabled() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BootstrapServerDialog.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
BootstrapServerDialog(final BootstrapServerSetup serverSetup) {
    connectPage = new ConnectPage(serverSetup, this);
    configurePage = new ConfigurePage(serverSetup, this);

    deck = new DeckLayoutPanel();
    deck.addStyleName("window-content"); // white background for forms
    deck.addStyleName("default-window-content");
    deck.add(connectPage);
    deck.add(configurePage);

    int width = 750;
    popupPanel = new PopupPanel(false, true);
    popupPanel.setGlassEnabled(true);
    popupPanel.setAnimationEnabled(false);
    popupPanel.setWidget(deck);
    popupPanel.setWidth(String.valueOf(width) + "px");
    popupPanel.setHeight(String.valueOf(width / DefaultWindow.GOLDEN_RATIO) + "px");
    popupPanel.setStyleName("default-window");
}
 
Example 2
Source File: ContextMenu.java    From appinventor-extensions with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new context menu.
 */
public ContextMenu() {
  popupPanel = new PopupPanel(true);  // autoHide
  //Enabling Glass under the popups so that clicks on the iframe (blockly) also hide the panel
  popupPanel.setGlassEnabled(true);
  popupPanel.setGlassStyleName("none"); //No style is passed (the default grays out the window)
  menuBar = new MenuBar(true);
  menuBar.setStylePrimaryName("ode-ContextMenu");
  popupPanel.add(menuBar);
}
 
Example 3
Source File: GuidedTourHelper.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
static void init(BootstrapContext bootstrapContext) {
    String locale = Preferences.get(Preferences.Key.LOCALE, "en");
    String url = bootstrapContext.getProperty(ApplicationProperties.GUIDED_TOUR) + "/" +
            (bootstrapContext.isStandalone() ? "standalone" : "domain") + "/step1.html?setLng=" + locale;

    Frame tourFrame = new Frame(url);
    tourFrame.setWidth("100%");
    tourFrame.setHeight("100%");

    guidedTour = new PopupPanel(true, true) {
        {
            Window.addResizeHandler(resizeEvent -> {
                if (isShowing()) {
                    center();
                }
            });
        }

        @Override
        protected void onPreviewNativeEvent(Event.NativePreviewEvent event) {
            if (Event.ONKEYUP == event.getTypeInt()) {
                if (event.getNativeEvent().getKeyCode() == KeyboardEvent.KeyCode.ESC) {
                    hide();
                }
            }
        }
    };
    guidedTour.setGlassEnabled(true);
    guidedTour.setAnimationEnabled(false);
    guidedTour.setWidget(tourFrame);
    guidedTour.setWidth("1120px");
    guidedTour.setHeight("800px");
    guidedTour.setStyleName("default-window");

    exportCloseMethod();
}