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

The following are Jave code examples for showing how to use open() of the com.google.gwt.user.client.Window class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: EasyML   File: BaseWidgetMenuItemFactory.java   View Source Code Vote up 6 votes
/**
 * 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
Project: Mindustry   File: HtmlLauncher.java   View Source Code Vote up 5 votes
@Override
 public ApplicationListener createApplicationListener() {
     instance = this;
     setLogLevel(LOG_NONE);
     setLoadingListener(new LoadingListener() {
         @Override
         public void beforeSetup() {

         }

         @Override
         public void afterSetup() {
             scaleCanvas();
             setupResizeHook();
         }
     });

     Net.setClientProvider(new WebsocketClient());
     
     Mindustry.platforms = new PlatformFunction(){
     	DateTimeFormat format = DateTimeFormat.getFormat("EEE, dd MMM yyyy HH:mm:ss");

@Override
public String format(Date date){
	return format.format(date);
}

@Override
public String format(int number){
	return NumberFormat.getDecimalFormat().format(number);
}

@Override
public void openLink(String link){
	Window.open(link, "_blank", "");
}
     };
     
     return new Mindustry();
 }
 
Example 3
Project: empiria.player   File: LinkModule.java   View Source Code Vote up 5 votes
protected void processLink() {
    if (locked) {
        return;
    }
    if (itemIndex != -1) {
        flowRequestInvoker.invokeRequest(new FlowRequest.NavigateGotoItem(itemIndex));
    } else if (url != null) {
        Window.open(url, "_blank", "");
    }

}
 
Example 4
Project: appinventor-extensions   File: TopToolbar.java   View Source Code Vote up 5 votes
@Override
public void execute() {
  Window.open(url, WINDOW_OPEN_LOCATION, WINDOW_OPEN_FEATURES);
}
 
Example 5
Project: empiria.player   File: URLOpenService.java   View Source Code Vote up 4 votes
public void open(String path) {
    Window.open(path, "_blank", "");
}
 
Example 6
Project: appinventor-extensions   File: TopPanel.java   View Source Code Vote up 4 votes
@Override
public void onClick(ClickEvent clickEvent) {
  Window.open(url, WINDOW_OPEN_LOCATION, WINDOW_OPEN_FEATURES);
}