當前位置: 首頁>>代碼示例>>Java>>正文


Java PopupPanel.setGlassEnabled方法代碼示例

本文整理匯總了Java中com.google.gwt.user.client.ui.PopupPanel.setGlassEnabled方法的典型用法代碼示例。如果您正苦於以下問題:Java PopupPanel.setGlassEnabled方法的具體用法?Java PopupPanel.setGlassEnabled怎麽用?Java PopupPanel.setGlassEnabled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.gwt.user.client.ui.PopupPanel的用法示例。


在下文中一共展示了PopupPanel.setGlassEnabled方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: ContextMenu

import com.google.gwt.user.client.ui.PopupPanel; //導入方法依賴的package包/類
/**
 * 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);
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:13,代碼來源:ContextMenu.java

示例2: showDetails

import com.google.gwt.user.client.ui.PopupPanel; //導入方法依賴的package包/類
private void showDetails(final KieContainer container) {
    final PopupPanel detailsPopup = new PopupPanel();
    detailsPopup.setTitle(Constants.INSTANCE.detailsForContainer() + " " + container.getId());
    detailsPopup.setAutoHideEnabled(true);
    detailsPopup.setModal(true);
    detailsPopup.setGlassEnabled(true);
    detailsPopup.add(detailsWidget);
    detailsPopup.center();
    detailsPopup.show();
    detailsWidget.show(container);
}
 
開發者ID:kiegroup,項目名稱:kie-docker-ci,代碼行數:12,代碼來源:ContainersView.java

示例3: openPopupPanel

import com.google.gwt.user.client.ui.PopupPanel; //導入方法依賴的package包/類
public static void openPopupPanel(PopupPanel panel, Focusable focusable, boolean animate, boolean modal) {
    panel.setGlassEnabled(true);
    panel.setAnimationEnabled(animate);
    panel.center();
    if (focusable != null) {
        focusable.setFocus(true);
    }
    panel.setModal(modal);
}
 
開發者ID:rkfg,項目名稱:gwtutil,代碼行數:10,代碼來源:ClientUtils.java

示例4: setInstructions

import com.google.gwt.user.client.ui.PopupPanel; //導入方法依賴的package包/類
public void setInstructions(final String instructions, final String infoButtonChar, final String closeButtonLabel) {
        final HTML instructionsLabel = new HTML(instructions);
        final PopupPanel popupPanel = new PopupPanel(false); // the close action to this panel causes background buttons to be clicked
        popupPanel.setGlassEnabled(true);
        popupPanel.setStylePrimaryName("stimulusHelpPanel");
        instructionsLabel.setStylePrimaryName("stimulusHelpText");
        instructionsScrollPanel = new ScrollPanel(instructionsLabel);
        instructionsScrollPanel.getElement().getStyle().setPropertyPx("maxHeight", Window.getClientHeight() - 150);
        final VerticalPanel verticalPanel = new VerticalPanel();
        verticalPanel.add(instructionsScrollPanel);
        final Button closeButton = new Button(closeButtonLabel);
        verticalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
        verticalPanel.add(closeButton);
        popupPanel.setWidget(verticalPanel);
        infoButton.setText(infoButtonChar);
        final SingleShotEventListner infoSingleShotEventListner = new SingleShotEventListner() {

            @Override
            protected void singleShotFired() {
                if (infoButton.isEnabled()) {
//                    outerGrid.clear(); // users found that hiding the picker screen made it hard to understand the instruction text
                    popupPanel.center();
                    infoButton.setEnabled(false);
                    resetSingleShot();
                }
            }
        };
        infoButton.addClickHandler(infoSingleShotEventListner);
        infoButton.addTouchStartHandler(infoSingleShotEventListner);
        infoButton.addTouchMoveHandler(infoSingleShotEventListner);
        infoButton.addTouchEndHandler(infoSingleShotEventListner);
        final SingleShotEventListner instructionsSingleShotEventListner1 = new SingleShotEventListner() {

            @Override
            protected void singleShotFired() {
                popupPanel.hide();
                resizeView();
                infoButton.setEnabled(true);
                resetSingleShot();
            }
        };
        closeButton.addClickHandler(instructionsSingleShotEventListner1);
        closeButton.addTouchStartHandler(instructionsSingleShotEventListner1);
        closeButton.addTouchMoveHandler(instructionsSingleShotEventListner1);
        closeButton.addTouchEndHandler(instructionsSingleShotEventListner1);
        popupPanel.addCloseHandler(new CloseHandler<PopupPanel>() {

            @Override
            public void onClose(CloseEvent<PopupPanel> event) {
                instructionsScrollPanel = null;
//                instructionsSingleShotEventListner1.eventFired();
//                infoButton.setEnabled(true);
//                resizeView();
            }
        });
        popupPanel.center();
    }
 
開發者ID:languageininteraction,項目名稱:GraphemeColourSynaesthesiaApp,代碼行數:58,代碼來源:ColourPickerCanvasView.java

示例5: showWidgetPopup

import com.google.gwt.user.client.ui.PopupPanel; //導入方法依賴的package包/類
public void showWidgetPopup(final PresenterEventListner saveEventListner, IsWidget popupContentWidget) {
    final PopupPanel popupPanel = new PopupPanel(false); // the close action to this panel causes background buttons to be clicked
    popupPanel.setGlassEnabled(true);
    popupPanel.setStylePrimaryName("svgPopupPanel");
    final VerticalPanel popupverticalPanel = new VerticalPanel();
    popupverticalPanel.add(popupContentWidget);

    popupverticalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
    final SingleShotEventListner cancelSingleShotEventListner = new SingleShotEventListner() {

        @Override
        protected void singleShotFired() {
            popupPanel.hide();
        }
    };
    final HorizontalPanel buttonPanel = new HorizontalPanel();
    final Button cancelButton = new Button(messages.popupCancelButtonLabel());
    cancelButton.addClickHandler(cancelSingleShotEventListner);
    cancelButton.addTouchStartHandler(cancelSingleShotEventListner);
    cancelButton.addTouchMoveHandler(cancelSingleShotEventListner);
    cancelButton.addTouchEndHandler(cancelSingleShotEventListner);
    buttonPanel.add(cancelButton);
    if (saveEventListner != null) {
        final SingleShotEventListner okSingleShotEventListner = new SingleShotEventListner() {

            @Override
            protected void singleShotFired() {
                popupPanel.hide();
                saveEventListner.eventFired(null);
            }
        };
        final Button okButton = new Button(saveEventListner.getLabel());
        okButton.addClickHandler(okSingleShotEventListner);
        okButton.addTouchStartHandler(okSingleShotEventListner);
        okButton.addTouchMoveHandler(okSingleShotEventListner);
        okButton.addTouchEndHandler(okSingleShotEventListner);
        buttonPanel.add(okButton);
    }
    popupverticalPanel.add(buttonPanel);
    popupPanel.setWidget(popupverticalPanel);
    popupPanel.setPopupPositionAndShow(new PopupPanel.PositionCallback() {

        @Override
        public void setPosition(int offsetWidth, int offsetHeight) {
            final int topPosition = Window.getClientHeight() / 2 - offsetHeight;
            // topPosition is used to make sure the dialogue is above the half way point on the screen to avoid the software keyboard covering the box
            // topPosition is also checked to make sure it does not show above the top of the page
            popupPanel.setPopupPosition(Window.getClientWidth() / 2 - offsetWidth / 2, (topPosition < 0) ? 0 : topPosition);
        }
    });
}
 
開發者ID:languageininteraction,項目名稱:LanguageMemoryApp,代碼行數:52,代碼來源:AbstractSvgView.java


注:本文中的com.google.gwt.user.client.ui.PopupPanel.setGlassEnabled方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。