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


Java GWT.getHostPageBaseURL方法代码示例

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


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

示例1: refresh

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
@Override
public void refresh() {
	clear();
	RoomCookie cookie = RoomCookie.getInstance();
	if (iPattern != null && !iPattern.isEmpty() && !cookie.isGridAsText()) {
		final Image availability = new Image(GWT.getHostPageBaseURL() + "pattern?pref=" + iPattern + "&v=" + (cookie.areRoomsHorizontal() ? "0" : "1") + (cookie.hasMode() ? "&s=" + cookie.getMode() : ""));
		availability.setStyleName("grid");
		add(availability);
	} else {
		for (PreferenceInfo p: iPreferences) {
			P prf = new P("prf");
			prf.setText(p.getOwnerName());
			PreferenceInterface preference = iProperties.getPreference(p.getPreference());
			if (preference != null) {
				prf.getElement().getStyle().setColor(preference.getColor());
				prf.setTitle(preference.getName() + " " + p.getOwnerName());
			}
			add(prf);
		}
	}
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:22,代码来源:TimePreferenceCell.java

示例2: createUrlToShare

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
private SelectHandler createUrlToShare(final VerticalPanel geoDataContainer) {
	return new SelectHandler() {
		@Override
		public void onSelect(SelectEvent event) {
			urlToShareAnchor.setHref(getHref());
			urlToShareAnchor.setText(
					UIMessages.INSTANCE.seeOtherWindow("GeoWE Project"),
					Direction.LTR);

			urlShared.setText(getHref());
			urlPanel.setVisible(true);
			urlShared.setVisible(true);
		}

		private String getHref() {
			String baseUrl = GWT.getHostPageBaseURL();

			baseUrl += "?projectUrl="
					+ URL.encodeQueryString(urlTextField.getValue());

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

示例3: getPopupWidget

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
protected P getPopupWidget() {
	if (iPopupWidget == null) {
		iPopupWidget = new P("unitime-RoomPictureHint");
		Image image = new Image(GWT.getHostPageBaseURL() + "picture?id=" + iPicture.getUniqueId());
		image.setStyleName("picture");
		iPopupWidget.add(image);
		P caption = new P("caption");
		caption.setText(iPicture.getName() + (iPicture.getPictureType() == null ? "" : " (" + iPicture.getPictureType().getAbbreviation() + ")"));
		iPopupWidget.add(caption);
	}
	return iPopupWidget;
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:13,代码来源:RoomsTable.java

示例4: LinkCell

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
LinkCell(RoomPictureInterface picture) {
super(new Image(RESOURCES.download()), GWT.getHostPageBaseURL() + "picture?id=" + picture.getUniqueId());
setStyleName("link");
setTitle(picture.getName() + (picture.getPictureType() == null ? "" : " (" + picture.getPictureType().getLabel() + ")"));
setText(picture.getName() + (picture.getPictureType() == null ? "" : " (" + picture.getPictureType().getAbbreviation() + ")"));
      setTarget("_blank");
      sinkEvents(Event.ONCLICK);
  }
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:9,代码来源:RoomsTable.java

示例5: lodaDataFromURL

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
private void lodaDataFromURL(final String url) {
	final String urlBase = GWT.getHostPageBaseURL() + "gwtOpenLayersProxy";
	try {
		autoMessageBox.show();
		RestClient.create(URLFileRestService.class, urlBase,
				new RemoteCallback<String>() {
					@Override
					public void callback(String response) {
						parseCsvData(response);
						autoMessageBox.hide();
					}
				}, new RestErrorCallback() {
					@Override
					public boolean error(Request message,
							Throwable throwable) {
						autoMessageBox.hide();

						showAlert("Error"
								+ UIMessages.INSTANCE.unexpectedError());
						return false;
					}
				}, Response.SC_OK).getContent(url);
	} catch (Exception e) {
		autoMessageBox.hide();
		showAlert("Error loading data..." + e.getMessage());
	}
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:28,代码来源:JoinDataTool.java

示例6: createUrlToShare

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
private SelectHandler createUrlToShare(final VerticalPanel geoDataContainer) {
	return new SelectHandler() {
		@Override
		public void onSelect(SelectEvent event) {
			urlToShareAnchor.setHref(getHref());
			urlToShareAnchor.setText(
					UIMessages.INSTANCE.seeOtherWindow(getLayerName()),
					Direction.LTR);

			urlShared.setText(getHref());
			urlPanel.setVisible(true);
			urlShared.setVisible(true);
		}

		private String getHref() {
			String baseUrl = GWT.getHostPageBaseURL();

			baseUrl += "?layerUrl="
					+ URL.encodeQueryString(urlTextField.getValue())
					+ "&layerName=" + getLayerName() + "&layerProj="
					+ getProjectionName() + "&layerFormat="
					+ getDataFormat();

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

示例7: execute

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
@Override
public void execute(final ProjectNode node) {
  // Display a barcode for an url pointing at our server's download servlet
  String barcodeUrl = GWT.getHostPageBaseURL()
    + "b/" + Ode.getInstance().getNonce();
  OdeLog.log("Barcode url is: " + barcodeUrl);
  new BarcodeDialogBox(node.getName(), barcodeUrl).center();
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:9,代码来源:ShowBarcodeCommand.java

示例8: LinkCell

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
LinkCell(RoomPictureInterface picture) {
	super(new Image(RESOURCES.download()), GWT.getHostPageBaseURL() + "picture?id=" + picture.getUniqueId());
	setStyleName("link");
	setTitle(picture.getName() + (picture.getPictureType() == null ? "" : " (" + picture.getPictureType().getLabel() + ")"));
	setText(picture.getName() + (picture.getPictureType() == null ? "" : " (" + picture.getPictureType().getAbbreviation() + ")"));
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:7,代码来源:RoomDetail.java

示例9: print

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
public static void print(String title, String user, String session, Widget... widgets) {
	String content = "";
	for (Widget w: widgets)
		content += "<div class=\"unitime-PrintedComponent\">" + w.getElement().getString() + "</div>";
	String html = "<html><header>" +
		"<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">" +
		"<link type=\"text/css\" rel=\"stylesheet\" href=\"" + GWT.getHostPageBaseURL() + "unitime/gwt/standard/standard.css\">" +
		"<link type=\"text/css\" rel=\"stylesheet\" href=\"" + GWT.getHostPageBaseURL() + "styles/unitime.css\">" +
	    "<link rel=\"shortcut icon\" href=\"" + GWT.getHostPageBaseURL() + "images/timetabling.ico\">" +
	    "<title>UniTime " + CONSTANTS.version() + "| University Timetabling Application</title>" +
		"</header><body class='unitime-Body'>" + 
	    "<span class='unitime-Page'>" +
			"<span class='body'>"+
				"<span class='unitime-PageHeader'>" +
					"<span class='row'>"+
						"<span class='logo'><img src='" + GWT.getHostPageBaseURL() + "images/unitime.png' border='0'/></span>"+
						"<span class='content'>"+
							"<span id='UniTimeGWT:Title' class='title'>" + title + "</span>"+
							"<span class='unitime-Header'>" +
								"<span class='unitime-InfoPanel'>"+
									"<span class='row'>" +
										"<span class='cell middle'>" + user + "</span>" +
										"<span class='cell right'>" + session + "</span>" +
									"</span>" +
								"</span>" +
							"</span>" +
						"</span>" +
					"</span>" +
				"</span>" +
				"<span class='content'>" + content + "</span>" +
			"</span>" +
			"<span class='footer'>" +
				"<span class='unitime-Footer'>" +
					"<span class='row'>" +
						"<span class='cell left'>Printed from UniTime " + CONSTANTS.version() + " | University Timetabling Application</span>" +
						"<span class='cell middle'>" + CONSTANTS.copyright() + "</span>" +
						"<span class='cell right'>" + DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_MEDIUM).format(new Date()) + "</span>" +
					"</span>" +
				"</span>" +
			"</span>" +
		"</span></body></html>";
	printf(html);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:44,代码来源:ToolBox.java


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