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


Java Frame.setUrl方法代码示例

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


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

示例1: Administration

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
/**
 * Administration
 */
public Administration() {
	iframe = new Frame("about:blank");

	DOM.setElementProperty(iframe.getElement(), "frameborder", "0");
	DOM.setElementProperty(iframe.getElement(), "marginwidth", "0");
	DOM.setElementProperty(iframe.getElement(), "marginheight", "0");
	DOM.setElementProperty(iframe.getElement(), "scrolling", "no");

	// Commented because on IE show clear if allowtransparency=true
	DOM.setElementProperty(iframe.getElement(), "allowtransparency", "false");

	iframe.setUrl(Main.CONTEXT + "/admin/index.jsp");
	iframe.setStyleName("okm-Iframe");

	initWidget(iframe);
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:20,代码来源:Administration.java

示例2: submitDownloadUrl

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
/**
 *
 * @param url
 * @param checkIntvlInMsec check interval in milliseconds
 * @param maxTries
 * @param confirmationCallback
 */
public static void submitDownloadUrl(String url, int checkIntvlInMsec, final int maxTries, final Command confirmationCallback) {
    if (checkIntvlInMsec > 0 && maxTries > 0 && confirmationCallback != null) {
        Frame f = Application.getInstance().getNullFrame();
        final String codId = String.valueOf(System.currentTimeMillis());
        url += (url.contains("?") ? "&" : "?") + COD_ID + "="+ codId;
        f.setUrl(url);
        Scheduler.get().scheduleFixedDelay(new Scheduler.RepeatingCommand() {
            int tries = 0;
            public boolean execute() {
                String c = Cookies.getCookie(COD_ID);
                tries++;
                if ((c != null && c.equals(codId)) || tries > maxTries) {
                    Cookies.removeCookie(COD_ID, "/");
                    confirmationCallback.execute();
                    return false;
                } else {
                    return true;
                }
            }
        }, checkIntvlInMsec);
    } else {
        showDebugMsg("InvalidArgumentException: submitDownloadUrl");
    }
}
 
开发者ID:lsst,项目名称:firefly,代码行数:32,代码来源:GwtUtil.java

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

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

示例5: getAdditionalProposalInfo

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public void getAdditionalProposalInfo(AsyncCallback<Widget> callback) {
  Frame frame = new Frame();
  frame.setSize("100%", "100%");
  frame.getElement().getStyle().setBorderStyle(Style.BorderStyle.NONE);
  frame.getElement().setAttribute("sandbox", ""); // empty value, not null
  frame.setUrl(client.getProposalDocUrl(id, sessionId));
  callback.onSuccess(frame);
}
 
开发者ID:eclipse,项目名称:che,代码行数:11,代码来源:JavaCompletionProposal.java

示例6: doStart

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
public void doStart() {
 for (TabItem item : advanced.getItems()) {
	 CIModel model = (CIModel)item.getData("model");
	 item.removeAll();
	 Frame f = new Frame();
	 item.add(f);
	 f.setUrl(getStartURL(model));
	 item.layout();
 }
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:11,代码来源:MDRStartWidget.java

示例7: onSuccess

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
public void onSuccess(String url) {
    if (!StringUtils.isEmpty(url)) {
        url= GWT.getModuleBaseURL()+url;
        Frame f= Application.getInstance().getNullFrame();
        f.setUrl(url);
    }
}
 
开发者ID:lsst,项目名称:firefly,代码行数:8,代码来源:DownloadScriptDialog.java

示例8: inputComplete

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
@Override
protected void inputComplete() {
    Frame f= Application.getInstance().getNullFrame();
    WebPlot plot= _pv.getPrimaryPlot();
    PlotState state= plot.getPlotState();
    String url;
    if (_dType.getValue().equals("fits")) {
        Band band= Band.NO_BAND;
        if (_bandSelect!=null) {
            band=  Band.parse(_bandSelect.getValue());
        }
        String fitsFile= state.getOriginalFitsFileStr(band)==null  || _whichOp.getValue().equals("modified")?
                         state.getWorkingFitsFileStr(band) :
                         state.getOriginalFitsFileStr(band);

        url= WebUtil.encodeUrl(GWT.getModuleBaseURL()+ "servlet/Download",
                                      new Param("file", fitsFile),
                                      new Param("return", makeFileName(state,band)),
                                      new Param("log", "true"));
        if (url!=null) f.setUrl(url);
    }
    else if (_dType.getValue().equals("region")) {
        retrieveRegion(plot);
    }
    else {
        retrievePng(plot);
    }

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

示例9: TabWorkspace

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
/**
 * TabWorkspace
 */
public TabWorkspace() {
	vPanel = new VerticalPanel();
	iframe = new Frame("about:blank");

	DOM.setElementProperty(iframe.getElement(), "frameborder", "0");
	DOM.setElementProperty(iframe.getElement(), "marginwidth", "0");
	DOM.setElementProperty(iframe.getElement(), "marginheight", "0");

	// Commented because on IE show clear if allowtransparency=true
	DOM.setElementProperty(iframe.getElement(), "allowtransparency", "false");
	DOM.setElementProperty(iframe.getElement(), "scrolling", "auto");

	iframe.setUrl(Main.CONTEXT + "/extra/index.jsp");
	iframe.setStyleName("okm-Iframe");

	vPanel.add(iframe);
	vPanel.setCellHorizontalAlignment(iframe, HasAlignment.ALIGN_CENTER);

	vPanel.setWidth("100%");
	vPanel.setHeight("100%");

	// User workspace values
	if (GeneralComunicator.getWorkspace() == null) {
		timer = new Timer() {
			@Override
			public void run() {
				if (GeneralComunicator.getWorkspace() == null) {
					firstTimeLoadingWorkspace();
				} else {
					init();
				}
			}
		};

		firstTimeLoadingWorkspace();
	} else {
		init();
	}

	initWidget(vPanel);
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:45,代码来源:TabWorkspace.java

示例10: onRender

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
@Override
protected void onRender(Element parent, int index) {
	super.onRender(parent, index);
	
	// Handle parameters...
	BaseModel param = item.getParams();
	String url = (String)param.get("url");
	String replacedURL = ExpressionHandler.replace(url);
	String newWindow = param.get("newWindow");
	
	if ("true".equalsIgnoreCase(newWindow)) {
		String newWindowName = param.get("newWindowName");
		if (newWindowName == null) {
			newWindowName = "OneCMDB_Window";
		}
		String newWindowFeatures = param.get("newWindowFeatures");
		if (newWindowFeatures == null) {
			newWindowFeatures = "";
		}
		newWindowName = newWindowName.replace(" ", "_");
		com.google.gwt.user.client.Window.open(replacedURL, newWindowName, "");
		if (getParent() instanceof Window) {
			((Window)getParent()).close();
		}
		return;
	}
	
	Frame f = new Frame();
	f.setUrl(replacedURL);
	f.setSize("100%", "100%");
	ContentPanel cp = new ContentPanel();
	cp.setHeaderVisible(false);
	cp.setLayout(new FitLayout());
	cp.add(f);
	ToolBar bottom = new ToolBar();
	bottom.add(new FillToolItem());
	bottom.add(new CloseTextToolItem(this));
	cp.setBottomComponent(bottom);
	add(cp);
	layout();
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:42,代码来源:CMDBURLFrameWidget.java

示例11: getZipFile

import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
public static void getZipFile(String url) {
    Frame f= Application.getInstance().getNullFrame();
    f.setUrl(url);
}
 
开发者ID:lsst,项目名称:firefly,代码行数:5,代码来源:PackageReadyWidget.java

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


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