Java Code Examples for com.google.gwt.user.client.Window#open()

The following examples show how to use com.google.gwt.user.client.Window#open() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
/**
 * Create DownloadDataItem
 * @param com
 * @return DownloadDataItem
 */
public static MenuItem createDownloadData(HasRightMouseUpMenu com) {
	Command command = new MenuItemCommand(com) {

		@Override
		public void execute() {

			DatasetWidget widget = (DatasetWidget) this.component;
			widget.getContextMenu().hide();
			OutNodeShape shape = widget.getOutNodeShapes().get(0);
			String filename = shape.getAbsolutePath() + "/" + shape.getFileId();
			String url = GWT.getModuleBaseURL().split("EMLStudio")[0]
					+ "EMLStudioMonitor/filedownload?filename=" + filename;
			Window.open(url, "_blank", "status=0,toolbar=0,menubar=0,location=0");

		}

	};

	MenuItem item = new MenuItem("Download", command);
	return item;
}
 
Example 2
public void onClick(ClickEvent event) {
	Log.debug("onClick(" + event + ")");
	hide();
	// Removes all previous text for next errors messages, varios errors can be added simultanealy
	// on show(String msg )
	text.setText("");

	if (logout) {
		Log.debug("onClick: redirect");
		Window.open("index.jsp", "_self", "");
	}

	Log.debug("onClick: void");
}
 
Example 3
public void view(String pid, String batchId) {
    if (pid == null) {
        throw new IllegalArgumentException("pid");
    }
    StringBuilder sb = new StringBuilder();
    sb.append(RestConfig.URL_DIGOBJECT_DISSEMINATION);
    sb.append('?').append(DigitalObjectResourceApi.DIGITALOBJECT_PID).append('=').append(pid);
    if (batchId != null) {
        sb.append('&').append(DigitalObjectResourceApi.BATCHID_PARAM).append('=').append(batchId);
    }
    Window.open(sb.toString(), "_blanc", "");
}
 
Example 4
Source Project: unitime   File: UniTimeMobileMenu.java    License: Apache License 2.0 5 votes vote down vote up
protected void openUrl(String name, String url, String target) {
	if (target == null)
		LoadingWidget.getInstance().show();
	if ("dialog".equals(target)) {
		UniTimeFrameDialog.openDialog(name, url);
	} else if ("download".equals(target)) {
		ToolBox.open(url);
	} else if ("eval".equals(target)) {
		ToolBox.eval(url);
	} else if ("tab".equals(target)) {
		Window.open(url, "_blank", "");
	} else {
		ToolBox.open(GWT.getHostPageBaseURL() + url);
	}
}
 
Example 5
Source Project: unitime   File: UniTimeSideBar.java    License: Apache License 2.0 5 votes vote down vote up
protected void openUrl(String name, String url, String target) {
	if (target == null)
		LoadingWidget.getInstance().show();
	if ("dialog".equals(target)) {
		UniTimeFrameDialog.openDialog(name, url);
	} else if ("download".equals(target)) {
		ToolBox.open(url);
	} else if ("eval".equals(target)) {
		ToolBox.eval(url);
	} else if ("tab".equals(target)) {
		Window.open(url, "_blank", "");
	} else {
		ToolBox.open(GWT.getHostPageBaseURL() + url);
	}
}
 
Example 6
Source Project: unitime   File: UniTimeMenuBar.java    License: Apache License 2.0 5 votes vote down vote up
protected void openUrl(String name, String url, String target) {
	if (target == null)
		LoadingWidget.getInstance().show();
	if ("dialog".equals(target)) {
		UniTimeFrameDialog.openDialog(name, url);
	} else if ("eval".equals(target)) {
		ToolBox.eval(url);
	} else if ("download".equals(target)) {
		ToolBox.open(url);
	} else if ("tab".equals(target)) {
		Window.open(url, "_blank", "");
	} else {
		ToolBox.open(GWT.getHostPageBaseURL() + url);
	}
}
 
Example 7
@Process(actionType = DownloadLogFile.class)
public void downloadLogFile(final DownloadLogFile action, final Dispatcher.Channel channel) {
    if (bootstrap.isSsoEnabled()) 
        DownloadUtil.downloadHttpGet(streamUrl(action.getName()), action.getName(), DMRHandler.getBearerToken());
    else 
        Window.open(streamUrl(action.getName()), "", "");
    
    channel.ack();
}
 
Example 8
public void onSuccess(RepresentationResponse result) {
    removeRequest();
    try {
        FileResponse resp = (FileResponse) result;
        Window.open(GWT.getHostPageBaseURL() + resp.getURL(), "_blank", "width=500,height=500");
        EventBus.getMainEventBus().fireEvent(new ExportFinishedEvent());
    }
    catch (Exception e) {
        ExceptionHandler.handleUnexpectedException(e);
    }
}
 
Example 9
@Override
public void execute() {
  Window.open(url, WINDOW_OPEN_LOCATION, WINDOW_OPEN_FEATURES);
}
 
Example 10
Source Project: appinventor-extensions   File: TopPanel.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void onClick(ClickEvent clickEvent) {
  Window.open(url, WINDOW_OPEN_LOCATION, WINDOW_OPEN_FEATURES);
}
 
Example 11
public void onClick(ClickEvent event) {
	super.hide();
	Window.open("index.jsp", "_self", null);
}
 
Example 12
@Override
public void execute() {
	Window.open(Main.CONTEXT + "/admin/index.jsp", "Administration", "");
}
 
Example 13
public void viewDocumentById(String resourceId) {
    final String url = getResourceUrl(resourceId);
    if (url != null && !url.isEmpty()) {
        Window.open(url, "_blank", "");
    }
}
 
Example 14
@UiHandler("imgGPlus")
void onGPlus(ClickEvent e) {
    Window.open("https://plus.google.com/communities/108005250093449814286", "", "_blank");
}
 
Example 15
@UiHandler("btnDemoStarter")
void onDemoStarter(ClickEvent e) {
    Window.open(constants.demoStarterUrl(), "_blank", "");
}
 
Example 16
@UiHandler("btnSourceStarter")
void onSourceStarter(ClickEvent e) {
    Window.open(constants.sourceStarterUrl(), "_blank", "");
}
 
Example 17
Source Project: dashbuilder   File: TableDisplayerView.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void exportFileUrl(String url) {
    Window.open(url, "downloading", "resizable=no,scrollbars=yes,status=no");
}
 
Example 18
protected void socialize() {
	String url = this.buildSocialUrl();
	Window.open(url, "", this.buildPopupFeature());
}