當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。