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


Java PopupPanel.setAnimationEnabled方法代碼示例

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


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

示例1: CustomOverlayWidget

import com.google.gwt.user.client.ui.PopupPanel; //導入方法依賴的package包/類
/**
 * The constructor should first call super() to initialize the component and
 * then handle any initialization relevant to Vaadin.
 */
public CustomOverlayWidget() {
    setWidget(new HTML()); // Seems that we need this one
    overlay = new PopupPanel();
    overlay.addStyleName(CLASSNAME);
    overlay.setAutoHideEnabled(false);
    overlay.setAnimationEnabled(false);
    overlay.setModal(false);

    Event.addNativePreviewHandler(new NativePreviewHandler() {
        public void onPreviewNativeEvent(NativePreviewEvent event) {
            int typeInt = event.getTypeInt();
            // We're only listening for these
            if (typeInt == Event.ONSCROLL) {
                CustomOverlayWidget.this.updateOverlayPosition();
            }
        }
    });
}
 
開發者ID:Haulmont,項目名稱:vaadin-overlays,代碼行數:23,代碼來源:CustomOverlayWidget.java

示例2: showMinimalError

import com.google.gwt.user.client.ui.PopupPanel; //導入方法依賴的package包/類
public static void showMinimalError(Widget anchor, String msg) {
    final PopupPanel p = new PopupPanel(true);
    p.setAnimationEnabled(true);
    p.addStyleName("onTopDialog");
    p.setWidget(new HTML(msg));
    p.setPopupPosition(anchor.getAbsoluteLeft() + anchor.getOffsetWidth(), anchor.getAbsoluteTop() + anchor.getOffsetHeight());
    p.show();
    new Timer(){
            public void run() {
                p.hide();
            }
        }.schedule(4000);

}
 
開發者ID:lsst,項目名稱:firefly,代碼行數:15,代碼來源:PopupUtil.java

示例3: animationIconCSS

import com.google.gwt.user.client.ui.PopupPanel; //導入方法依賴的package包/類
private void animationIconCSS(int mills, int startX, int startY) {
    Image icon = new Image(ONE_GEAR_ICON_LARGE);
    final PopupPanel popup= new PopupPanel();
    popup.setStyleName("");
    popup.addStyleName("animationLevel");
    popup.setAnimationEnabled(false);
    popup.setWidget(icon);
    Widget w= button.getIcon()!=null ? button.getIcon() : button;
    int endX= w.getAbsoluteLeft();
    int endY= w.getAbsoluteTop();
    setupCssAnimation(startX,startY,endX,endY);
    int extra= 35;
    CssAnimation.setAnimationStyle(popup,"iconAnimate "+ (mills+extra) +"ms ease-in-out 1 normal");
    popup.setPopupPosition(endX, endY);
    popup.show();
    Timer t= new Timer() {
        @Override
        public void run() {
            popup.hide();
        }
    };
    t.schedule( mills);
}
 
開發者ID:lsst,項目名稱:firefly,代碼行數:24,代碼來源:BackgroundManager.java

示例4: PopupPane

import com.google.gwt.user.client.ui.PopupPanel; //導入方法依賴的package包/類
public PopupPane(String header,
                 Widget content,
                 PopupType ptype,
                 boolean pointerPopup,
                 boolean modal,
                 boolean autoHide,
                 HeaderType headerType) {
    cnt++;
    this.header = header;
    _ptype= isStyleImplemented(ptype) ? ptype : PopupType.STANDARD;
    _pointerPopup= pointerPopup;
    _pointerIm= null;
    _headerType= headerType;
    _anStyleName = "ppDrop"+cnt;

    init(modal,autoHide, headerType);
    if (content!=null) setWidget(content);




    popup.setAnimationEnabled(true);
    _masking= modal;

    if (Application.getInstance().getDefZIndex()>0) {
        GwtUtil.setStyle(popup,"zIndex", Application.getInstance().getDefZIndex()+"");
    }

    if (_masking) {
        _maskPanel = new PopupPanel(false, false);
        _maskPanel.setAnimationEnabled(false);
        _maskPanel.setStyleName("firefly-mask-ui");
        addZIndexStyle(popup,"onTopDialog" );
        _maskPanel.setWidget(new Label()); // needed for style to take effect
    }
    else {
        _maskPanel = null;
    }

    popup.addCloseHandler(new CloseHandler<PopupPanel>() {
        public void onClose(CloseEvent<PopupPanel> ev) {
            CloseEvent.fire(PopupPane.this, PopupPane.this, ev.isAutoClosed());
        }
    });
}
 
開發者ID:lsst,項目名稱:firefly,代碼行數:46,代碼來源:PopupPane.java

示例5: showMenu

import com.google.gwt.user.client.ui.PopupPanel; //導入方法依賴的package包/類
protected void showMenu() {
	if (menu != null) {
		final PopupPanel pp = new PopupPanel();
		pp.setAutoHideEnabled(true);
		pp.setAutoHideOnHistoryEventsEnabled(true);
		pp.setAnimationEnabled(true);
		pp.setWidget(menu);
		pp.showRelativeTo(chevronMenu);
	}
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:11,代碼來源:DropDownButton.java

示例6: 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

示例7: DatasetButton

import com.google.gwt.user.client.ui.PopupPanel; //導入方法依賴的package包/類
public DatasetButton() {
    choose = new PushButton("Data Set");
    choose.setTitle("Select a Data Set.");
    choose.addStyleDependentName("SMALLER");
    choose.addClickHandler(openClick);
    datasetPanel = new PopupPanel(false);
    datasetPanel.setAnimationEnabled(true);
    datasetWidget = new DatasetWidget();
    datasetWidget.setName(name);
    datasetWidget.setHeight("650px");
    datasetWidget.addSelectionHandler(new SelectionHandler<TreeItem>() {
        @Override
        public void onSelection(SelectionEvent<TreeItem> event) {
            TreeItem item = event.getSelectedItem();
            Object u = item.getUserObject();
            if ( u instanceof VariableSerializable ) {
                selectedVariable = (VariableSerializable) u;
                dataset_name.setText(selectedVariable.getDSName());
                variable_name.setText(selectedVariable.getName());
                datasetWidget.setName(name); // setting the name of this datasetWidget as it will be the source of the re-firing of event
                eventBus.fireEvent(event); // this datasetWidget is now the source                    
            }
        }
    });
    datasetWidget.init();
    popupGrid = new Grid(3, 1);
    close = new Button("close");
    close.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent arg0) {
            datasetPanel.hide();
        }
    });
    verticalPanel.add(dataset_name);
    verticalPanel.add(variable_name);
    selection.add(verticalPanel);
    treePanel.add(datasetWidget);
    popupGrid.setWidget(0, 0, close);
    popupGrid.setWidget(1, 0, selection);
    popupGrid.setWidget(2, 0, treePanel);
    datasetPanel.add(popupGrid);
    datasetPanel.hide();
    initWidget(choose);
}
 
開發者ID:NOAA-PMEL,項目名稱:LAS,代碼行數:45,代碼來源:DatasetButton.java


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