当前位置: 首页>>代码示例>>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;未经允许,请勿转载。