本文整理汇总了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);
}
}
}
示例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;
}
};
}
示例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;
}
示例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);
}
示例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());
}
}
示例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;
}
};
}
示例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();
}
示例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() + ")"));
}
示例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);
}