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:at.ait.dme.yuma.suite.apps.image.core.client.treeview.ImageAnnotationTreeNode.java
License:EUPL
protected HorizontalPanel createHeader() { HorizontalPanel headerPanel = new HorizontalPanel(); headerPanel.setStyleName("imageAnnotation-header"); Image avatar = new Image(annotation.getCreatedBy().getGravatarURL()); avatar.setStyleName("imageAnnotation-header-avatar"); headerPanel.add(avatar);/*from w ww. j a v a2 s . c o m*/ Label userLabel = new Label(annotation.getCreatedBy().getUsername()); userLabel.setStyleName("imageAnnotation-header-user"); userLabel.getElement().setAttribute("property", "dc:creator"); headerPanel.add(userLabel); Label dateLabel = new Label("(" + DateTimeFormat.getFormat(DateTimeFormat.PredefinedFormat.DATE_TIME_SHORT) .format(annotation.getLastModified()) + ")"); dateLabel.setStyleName("imageAnnotation-header-date"); headerPanel.add(dateLabel); PushButton feedIcon = new PushButton(new Image("images/feed-icon-14x14.png")); feedIcon.setStyleName("imageAnnotation-header-feedicon"); feedIcon.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { Window.open(YUMACoreProperties.getFeedUrl() + "replies/" + annotation.getId(), "_self", ""); } }); headerPanel.add(feedIcon); return headerPanel; }
From source file:br.com.pegasus.solutions.smartgwt.lib.client.view.impl.util.HttpRequestUtil.java
License:Apache License
/** * open windown/*w w w. ja va2s .co m*/ * * @param url {@link String} * @param name {@link String} * @return void */ public static void openWindow(String url, String name) { Window.open(url, name, null); }
From source file:burrito.client.crud.widgets.ImagePicker.java
License:Apache License
public ImagePicker(boolean required, String value, int width, int height) { setValue(value);//from www . j ava 2s.c om this.required = required; validationError.addStyleName("validationError"); validationError.setVisible(false); popup = new ImagePickerPopup(width, height); previewThumbnail.setSize("120px", "67px"); previewThumbnail.addStyleName("k5-ImagePicker-thumb"); previewThumbnail.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { if (currentImage != null) { Window.open(currentImage, "_blank", null); } } }); popup.addSaveHandler(new ImagePickerPopup.SaveHandler() { public void saved(String value) { setValue("/images/view/" + value); } }); chooseImage.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { popup.center(); popup.show(); } }); chooseImage.addStyleName("k5-ImagePicker-choose"); removeImage.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { setValue(null); } }); Label label = new Label( height == 0 ? labels.requiredImageWidth(width) : labels.requiredImageSize(width, height)); label.addStyleName("k5-ImagePicker-description"); wrapper.add(label); wrapper.add(validationError); wrapper.add(previewThumbnail); wrapper.add(chooseImage); wrapper.add(removeImage); initWidget(wrapper); addStyleName("k5-ImagePicker"); }
From source file:cc.alcina.framework.gwt.client.util.WidgetUtils.java
License:Apache License
public static void showInNewTabOrThisWindow(String url) { Event currentEvent = Event.getCurrentEvent(); currentEvent.preventDefault();/* w w w . j ava 2 s.c o m*/ if (WidgetUtils.isNewTabModifier(currentEvent)) { Window.open(url, "_blank", ""); } else { Window.Location.assign(url); } }
From source file:cc.kune.common.client.ui.KuneWindowUtils.java
License:GNU Affero Public License
/** * Open./*from w w w . j a v a 2 s . c o m*/ * * @param url * the url */ public static void open(final String url) { Window.open(url, "_blank", ""); }
From source file:ccc.client.gwt.core.GWTWindow.java
License:Open Source License
/** {@inheritDoc} */ @Override/*from w ww . j av a 2 s . c o m*/ public void openUrl(final String url, final String windowName, final String params) { Window.open(url, windowName, params); }
From source file:ccc.client.gwt.views.gxt.EditTemplateDialog.java
License:Open Source License
private void populateThirdScreen() { _third.setMethod(Method.POST); _third.setTarget("_templatePreview"); _third.setWidth("100%"); _third.setBorders(false);// ww w . ja va 2s .c o m _third.setBodyBorder(false); _third.setHeaderVisible(false); _postBody.setName("hiddenbody"); _third.add(_postBody); _targetPath.setFieldLabel(constants().path()); _targetPath.setValue(""); _targetPath.addListener(Events.TriggerClick, new TargetListener()); final Button previewButton = new Button("preview", new SelectionListener<ButtonEvent>() { @Override public void componentSelected(final ButtonEvent ce) { Window.open("", "_templatePreview", ""); _third.setAction(InternalServices.globals.appURL() + "previewtemplate" + _targetPath.getValue()); _postBody.setValue(_body.getEditorCode()); _third.submit(); } }); final HorizontalPanel previewPanel = new HorizontalPanel(); final FormLayout layout = new FormLayout(); final LayoutContainer lc = new LayoutContainer(layout); lc.add(_targetPath); previewPanel.setWidth("95%"); previewPanel.setTableWidth("100%"); final TableData tdr = new TableData(); final TableData tdl = new TableData(); tdr.setHorizontalAlign(HorizontalAlignment.RIGHT); tdl.setHorizontalAlign(HorizontalAlignment.LEFT); previewPanel.add(lc, tdl); previewPanel.add(previewButton, tdr); _third.add(previewPanel); _bodyMime.setFieldLabel(getUiConstants().type()); _bodyMime.setDisplayField(ResourceSummary.Properties.NAME); _bodyMime.setEditable(false); _bodyMime.setForceSelection(true); _bodyMime.setTriggerAction(TriggerAction.ALL); _bodyMime.addSelectionChangedListener(new SelectionChangedListener<EnumModelData<TemplateTypes>>() { @Override public void selectionChanged(final SelectionChangedEvent<EnumModelData<TemplateTypes>> se) { final String bodyParser = parserForMimeType(se.getSelectedItem().getValue()); _body.setParser(bodyParser); } }); _third.add(_bodyMime, new FormData("95%")); final Text fieldName = new Text(getUiConstants().body()); fieldName.setStyleName("x-form-item"); _third.add(fieldName); _body = new CodeMirrorEditor("body", this, CodeMirrorEditor.Type.BODY, false, TEXT_AREA_HEIGHT - 40); _third.add(_body, new FormData("95%")); }
From source file:ch.heftix.mailxel.client.AttachmentLink.java
License:Open Source License
public AttachmentLink(final String text, final String target) { setText(text);/*from w w w. j a v a 2 s. c o m*/ addClickHandler(new ClickHandler() { public void onClick(ClickEvent sender) { Window.open(target, "_blank", "menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=no"); } }); }
From source file:co.fxl.gui.gwt.GWTWebsite.java
License:Open Source License
@Override public IWebsite uRI(String uRI) { Window.open(uRI, title, PARAMS); return this; }
From source file:com.adamantium.company.gwtp.client.application.details.DetailsPresenter.java
License:Apache License
@Override public void goToCompanyList() { Window.open("#list", "_self", null); // PlaceRequest responsePlaceRequest = new PlaceRequest.Builder() // .nameToken(NameTokens.list) // .build(); // placeManager.revealPlace(responsePlaceRequest); }