List of usage examples for com.google.gwt.user.client Window open
public static void open(String url, String name, String features)
From source file:nl.mpi.tg.eg.experiment.client.view.ComplexView.java
License:Open Source License
public void addImage(SafeUri imagePath, final SafeUri linkUrl, int percentOfPage, int maxHeight, int maxWidth, String align) {//w w w .ja v a2 s .co m final Image image = new Image(imagePath); addSizeAttributes(image.getElement(), percentOfPage, maxHeight, maxWidth); final SingleShotEventListner singleShotEventListner = new SingleShotEventListner() { @Override protected void singleShotFired() { Window.open(linkUrl.asString(), "_system", ""); } }; image.addClickHandler(singleShotEventListner); image.addTouchStartHandler(singleShotEventListner); image.addTouchMoveHandler(singleShotEventListner); image.addTouchEndHandler(singleShotEventListner); getActivePanel().add(image); }
From source file:nl.mpi.tg.eg.experiment.client.view.ComplexView.java
License:Open Source License
public void addLink(String label, final String target) { final Anchor anchor = new Anchor(new SafeHtmlBuilder().appendEscapedLines(label).toSafeHtml()); // this link relies on the org.apache.cordova.inappbrowser which offers secure viewing of external html pages and handles user navigation such as back navigation. // in this case the link will be opend in the system browser rather than in the cordova application. getActivePanel().add(anchor);// www.ja v a 2s . c om final SingleShotEventListner singleShotEventListner = new SingleShotEventListner() { @Override protected void singleShotFired() { Window.open(target, "_system", ""); } }; anchor.addClickHandler(singleShotEventListner); anchor.addTouchStartHandler(singleShotEventListner); anchor.addTouchMoveHandler(singleShotEventListner); anchor.addTouchEndHandler(singleShotEventListner); anchor.addStyleName("pageLink"); }
From source file:nl.ru.languageininteraction.language.client.view.ComplexView.java
License:Open Source License
public void addLink(String label, final String target) { final Anchor anchor = new Anchor(new SafeHtmlBuilder().appendEscapedLines(label).toSafeHtml()); // this link relies on the org.apache.cordova.inappbrowser which offers secure viewing of external html pages and handles user navigation such as back navigation. // in this case the link will be opend in the system browser rather than in the cordova application. outerPanel.add(anchor);/* w ww . j a va2 s. c o m*/ anchor.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { event.preventDefault(); Window.open(target, "_system", ""); } }); anchor.addTouchEndHandler(new TouchEndHandler() { @Override public void onTouchEnd(TouchEndEvent event) { event.preventDefault(); Window.open(target, "_system", ""); } }); anchor.addStyleName("pageLink"); }
From source file:nl.ru.languageininteraction.synaesthesia.client.view.ComplexView.java
License:Open Source License
public void addImage(SafeUri imagePath, final String linkUrl, int percentWidth) { final Image image = new Image(imagePath); image.setWidth(percentWidth + "%"); final SingleShotEventListner singleShotEventListner = new SingleShotEventListner() { @Override// ww w .ja v a 2s. c om protected void singleShotFired() { Window.open(linkUrl, "_system", ""); } }; image.addClickHandler(singleShotEventListner); image.addTouchStartHandler(singleShotEventListner); image.addTouchMoveHandler(singleShotEventListner); image.addTouchEndHandler(singleShotEventListner); outerPanel.add(image); }
From source file:nl.ru.languageininteraction.synaesthesia.client.view.ComplexView.java
License:Open Source License
public void addLink(String label, final String target) { final Anchor anchor = new Anchor(new SafeHtmlBuilder().appendEscapedLines(label).toSafeHtml()); // this link relies on the org.apache.cordova.inappbrowser which offers secure viewing of external html pages and handles user navigation such as back navigation. // in this case the link will be opend in the system browser rather than in the cordova application. outerPanel.add(anchor);//from w ww.ja va 2 s .c om final SingleShotEventListner singleShotEventListner = new SingleShotEventListner() { @Override protected void singleShotFired() { Window.open(target, "_system", ""); } }; anchor.addClickHandler(singleShotEventListner); anchor.addTouchStartHandler(singleShotEventListner); anchor.addTouchMoveHandler(singleShotEventListner); anchor.addTouchEndHandler(singleShotEventListner); anchor.addStyleName("pageLink"); }
From source file:olanto.myTerm.client.ContainerPanels.StatusPanel.java
License:Open Source License
private void mailto(String address, String subject) { Window.open("mailto:" + address + "?subject=" + URL.encode(subject), "_blank", ""); }
From source file:org.activityinfo.ui.client.component.form.field.image.ImageUploadRow.java
License:Open Source License
private void download() { Window.open(buildImageUrl(), "_blank", null); }
From source file:org.activityinfo.ui.client.page.app.AppBar.java
License:Open Source License
@UiHandler("logo") void handleLogoClick(ClickEvent e) { Window.open("http://about.activityinfo.org/", "_blank", null); }
From source file:org.activityinfo.ui.client.page.config.DbUserEditor.java
License:Open Source License
private void export() { Window.open(GWT.getModuleBaseURL() + "export/users?dbUsers=" + db.getId(), "_blank", null); }
From source file:org.activityinfo.ui.client.page.config.design.DesignPresenter.java
License:Open Source License
@Override public void onUIAction(String actionId) { super.onUIAction(actionId); if (UIActions.EXPORT.equals(actionId)) { Window.open("/resources/database/" + db.getId() + "/schema.csv", "_blank", null); } else if (UIActions.IMPORT.equals(actionId)) { SchemaImporter importer = new SchemaImporter(service, db); SchemaImportDialog dialog = new SchemaImportDialog(importer); dialog.show().then(new Function<Void, Object>() { @Nullable// w ww .j ava 2 s . c om @Override public Object apply(@Nullable Void input) { refresh(); return null; } }); } else if (UIActions.EDIT.equals(actionId)) { ResourceId formClassId = getSelectedActivity(view.getSelection()).getFormClassId(); eventBus.fireEvent(new NavigationEvent(NavigationHandler.NAVIGATION_REQUESTED, new InstancePlace(formClassId, InstancePage.DESIGN_PAGE_ID))); } else if (UIActions.OPEN_TABLE.equals(actionId)) { IsFormClass formClass = (IsFormClass) view.getSelection(); eventBus.fireEvent(new NavigationEvent(NavigationHandler.NAVIGATION_REQUESTED, new InstancePlace(formClass.getResourceId(), InstancePage.TABLE_PAGE_ID))); } }