当前位置: 首页>>代码示例>>Java>>正文


Java Frame.setVisible方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.Frame.setVisible方法的典型用法代码示例。如果您正苦于以下问题:Java Frame.setVisible方法的具体用法?Java Frame.setVisible怎么用?Java Frame.setVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.ui.Frame的用法示例。


在下文中一共展示了Frame.setVisible方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createFrame

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
private Frame createFrame() {
	final Frame frame = new Frame(DEFAULT_TEMPLATE_PATH);
	frame.getElement().setId(DEFAULT_FRAME_NAME);
	frame.setTitle(UIMessages.INSTANCE.previewTitle());
	frame.setWidth("500px");
	frame.setHeight("500px");
	frame.getElement().getStyle().setBackgroundColor("gray");

	frame.setVisible(true);
	RootPanel.get().add(frame);

	frame.addLoadHandler(new LoadHandler() {

		@Override
		public void onLoad(LoadEvent event) {
			frame.getElement().getStyle().setBackgroundColor("white");
			zoomPageComboBox.setValue(75);
		}

	});

	return frame;
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:24,代码来源:PreviewWidget.java

示例2: startDownloadRequest

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
public void startDownloadRequest(String aUrlPrefix, final int aRequestType, Map<String, String> aParams, RequestBuilder.Method aMethod) throws Exception {
	final Frame frame = new Frame();
	frame.setVisible(false);

	frame.addLoadHandler(new LoadHandler() {

		@Override
		public void onLoad(LoadEvent event) {
			Timer timer = new Timer() {

				@Override
				public void run() {
					frame.removeFromParent();
				}
			};
			timer.schedule(2000);
		}
	});
	String query = "";
	for (Map.Entry<String, String> ent : aParams.entrySet()) {
		query += param(ent.getKey(), ent.getValue()) + "&";
	}
	query += param(PlatypusHttpRequestParams.TYPE, String.valueOf(aRequestType));
	frame.setUrl(apiUrl + aUrlPrefix + "?" + query);
	RootPanel.get().add(frame);
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:27,代码来源:AppClient.java

示例3: createHiddenFrame

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
private void createHiddenFrame(PrintFinishedInfo info) {
	final Frame frame = new Frame();
	frame.setVisible(false);
	UrlBuilder builder = new UrlBuilder(info.getUrl());
	for (String name : info.getParams().keySet()) {
		builder.addParameter(name, info.getParams().get(name));
	}
	frame.setUrl(builder.toString());
	frame.setPixelSize(0, 0);
	frame.getElement().getStyle().setPosition(Style.Position.ABSOLUTE);
	frame.getElement().getStyle().setBorderWidth(0, Style.Unit.PX);
	frame.addLoadHandler(new LoadHandler() {

		@Override
		public void onLoad(LoadEvent event) {
			frame.removeFromParent();
		}
	});
	RootPanel.get().add(frame);
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:21,代码来源:DefaultPrintRequestHandler.java

示例4: downloadSelectPartition

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
private void downloadSelectPartition() {
    PartitionModel pm = grid.getSelectionModel().getSelectedItem();
    if (RootPanel.get("downloadiframe") != null) {
        Widget widgetFrame = (Widget) RootPanel
                .get("downloadiframe");
        widgetFrame.removeFromParent();
    }
    Frame frame = new Frame(GWT.getHostPageBaseURL()
            + "partition_download.do" + "?path=" + pm.getPath()
            + "&table=" + panel.getTable().getName() + "&dbname=" + panel.getTable().getDbName());
    frame.setVisible(false);
    frame.setSize("0px", "0px");
    RootPanel.get().add(frame);
}
 
开发者ID:ctripcorp,项目名称:dataworks-zeus,代码行数:15,代码来源:PartitionTab.java

示例5: DownloadContainer

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
@Inject
public DownloadContainer() {
  frame = new Frame();
  frame.getElement().setAttribute("name", TARGET);
  frame.setSize("0px", "0px");
  frame.setVisible(false);
  frame.ensureDebugId(TARGET);

  RootLayoutPanel.get().add(frame);
}
 
开发者ID:eclipse,项目名称:che,代码行数:11,代码来源:DownloadContainer.java

示例6: downloadSelectPartition

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
private void downloadSelectPartition() {
    PartitionModel pm = grid.getSelectionModel().getSelectedItem();
    if (RootPanel.get("downloadiframe") != null) {
        Widget widgetFrame = (Widget) RootPanel
                .get("downloadiframe");
        widgetFrame.removeFromParent();
    }
    Frame frame = new Frame(GWT.getHostPageBaseURL()
            + "partition_download.do" + "?path=" + pm.getPath()
            + "&table=" + panel.getTable().getName());
    frame.setVisible(false);
    frame.setSize("0px", "0px");
    RootPanel.get().add(frame);
}
 
开发者ID:zogwei,项目名称:zeus3,代码行数:15,代码来源:PartitionTab.java

示例7: initAndShow

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
private void initAndShow() {

        // initialize JossoUtil... supply context information
        JossoUtil.init(
                Application.getInstance().getProperties().getProperty("sso.server.url"),
                GWT.getModuleBaseURL(),
                Application.getInstance().getProperties().getProperty("sso.user.profile.url")
        );

        commandTable = creator.makeCommandTable();
        toolBar = creator.getToolBar();
        layoutManager = creator.makeLayoutManager();
        if (creator.isApplication()) {
            requestHandler = getRequestHandler();
            History.addValueChangeHandler(requestHandler);
        }


        nullFrame = new Frame();
        nullFrame.setSize("0px", "0px");
        nullFrame.setVisible(false);

        RootPanel root = RootPanel.get();
        root.clear();
        root.add(nullFrame);
        if (BrowserUtil.isTouchInput()) root.addStyleName("disable-select");

        if (getLayoutManager()!=null) getLayoutManager().layout(creator.getLoadingDiv());

        checkMobilAppInstall();

        if (SupportedBrowsers.isSupported()) {
            if (appReady != null) {
                appReady.ready();
            }

            if (creator.isApplication()) {
                // save the current state when you leave.
                DeferredCommand.addCommand(new Command() {
                    public void execute() {
                        Window.addCloseHandler(new CloseHandler<Window>() {
                            public void onClose(CloseEvent<Window> windowCloseEvent) {
                                gotoUrl(null, false);
                            }
                        });
                    }
                });

                // coming back from prior session
                String ssoBackTo = Cookies.getCookie(PRIOR_STATE);
                final Request prevState = Request.parse(ssoBackTo);
                if (prevState != null && prevState.isSearchResult()) {
                    Cookies.removeCookie(PRIOR_STATE);
                    History.newItem(ssoBackTo, true);
                } else {
                    // url contains request params
                    String qs = Window.Location.getQueryString().replace("?", "");
                    if (!StringUtils.isEmpty(qs) && !qs.contains(IGNORE_QUERY_STR)) {
                        String qsDecoded = URL.decodeQueryString(qs);
                        String base = Window.Location.getHref();
                        base = base.substring(0, base.indexOf("?"));
                        String newUrl = base + "#" + URL.encodePathSegment(qsDecoded);
                        Window.Location.replace(newUrl);
                    } else {
                        String startToken = History.getToken();
                        if (StringUtils.isEmpty(startToken)) {
                            goHome();
                        } else {
                            requestHandler.processToken(startToken);
                        }
                    }
                }
                if (backgroundMonitor!=null) backgroundMonitor.syncWithCache(null);
            }
        } else {
            hideDefaultLoadingDiv();
            SupportedBrowsers.showUnsupportedMessage();
        }


    }
 
开发者ID:lsst,项目名称:firefly,代码行数:82,代码来源:Application.java

示例8: createExportComposite

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
private void createExportComposite(final QPagingScrollTable table, HorizontalPanel hPanel) {
    createExportLabelsAndImages();

    final DisclosurePanel exportPanel = new DisclosurePanel("Export");
    String[] labels = getExportLabels(table.getSource().getExportFormats());
    Image[] exportImages = getExportImages(labels);

    FlexTable gridExportPanel = new FlexTable();
    hPanel.add(exportPanel);
    exportPanel.add(gridExportPanel);
    final Frame frame = new Frame();
    frame.setHeight("0");
    frame.setWidth("0");
    frame.setVisible(false);
    final String moduleRelativeURL = GWT.getModuleBaseURL() + "/rpc.export";
    gridExportPanel.setWidget(0,0,frame);

    final CheckBox generateColumnHeaderBox= new CheckBox("Generate Column Header");
    gridExportPanel.getFlexCellFormatter().setColSpan(1,1, 7);
    gridExportPanel.setWidget(2, 1,generateColumnHeaderBox);
    gridExportPanel.getFlexCellFormatter().setColSpan(2,1,6);

    for (int i = 0; i < labels.length; i++) {

    	exportImages[i].setStylePrimaryName("datagridexportlabel");
    	exportImages[i].setTitle(labels[i]);
    	gridExportPanel.setWidget(0, i+1,exportImages[i]);

    	exportImages[i].addClickHandler(new ClickHandler() {

    		@Override
            public void onClick(ClickEvent event) {
    			if (event.getSource() instanceof Image) {
    				Image image = (Image) (event.getSource());
    				final String exportCode = image.getTitle();
    				RPCServiceAsync service = MainFactoryActions.createService();
    				AsyncCallback<?> callback = new AsyncCallback<Object>() {
    					@Override
                        public void onSuccess(Object result) {
    						String uuid = (String) result;
    						// set frame
    						frame.setUrl(moduleRelativeURL + "?uuid=" + uuid);
    						ClientApplicationContext.getInstance().setBusy(false);
    					}

    					@Override
                        public void onFailure(Throwable caught) {

    						ClientApplicationContext.getInstance().log("Export failed", "Export failed for " + exportCode + " ", true, true, caught);
    						ClientApplicationContext.getInstance().setBusy(false);
    						FunctionsExecutor.setProcessedBuiltIn(true);
    					}
    				};
    				List<DataContainerGVO> dList = new ArrayList<DataContainerGVO>();
    				// following loop is to maintain the order of rows while exporting.
    				for(int i=0;i<(table.getAbsoluteLastRowIndex()+1);i++){
    					dList.add(table.getRowValue(i));
    				}
    				service.prepareForExport(dList, exportCode, null, generateColumnHeaderBox.getValue().booleanValue(),  callback);
    			}
    		}
    	});
    }
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:65,代码来源:QPagingScrollTableOperation.java

示例9: IPhoneDataServiceImp

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
public IPhoneDataServiceImp() {
	init();
	frame = new Frame();
	frame.setVisible(false);
	Document.get().getBody().appendChild(frame.getElement());
}
 
开发者ID:Antokolos,项目名称:iambookmaster,代码行数:7,代码来源:IPhoneDataServiceImp.java

示例10: sendSignal

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
private static void sendSignal(String url) {
	Frame frame = new Frame();
	frame.setVisible(false);
	Document.get().getBody().appendChild(frame.getElement());
	frame.setUrl(url);
}
 
开发者ID:Antokolos,项目名称:iambookmaster,代码行数:7,代码来源:IPhoneFeedbackPanel.java

示例11: IPhoneContentPlayer

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
public IPhoneContentPlayer() {
	frame = new Frame();
	frame.setVisible(false);
	Document.get().getBody().appendChild(frame.getElement());
	
}
 
开发者ID:Antokolos,项目名称:iambookmaster,代码行数:7,代码来源:IPhoneContentPlayer.java


注:本文中的com.google.gwt.user.client.ui.Frame.setVisible方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。