Java Code Examples for com.smartgwt.client.widgets.Label#addClickHandler()
The following examples show how to use
com.smartgwt.client.widgets.Label#addClickHandler() .
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
Source File: Legend.java From SensorWebClient with GNU General Public License v2.0 | 7 votes |
private Label createCSVLabel() { Label toCSV = new Label(i18n.toCSV()); toCSV.setWrap(false); toCSV.setAutoFit(true); toCSV.setPadding(3); toCSV.setWidth100(); toCSV.setStyleName("n52_sensorweb_client_exportEntry"); toCSV.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { controller.exportTo(ExportType.CSV_ZIP); exportMenu.hide(); } }); return toCSV; }
Example 2
Source File: StationSelector.java From SensorWebClient with GNU General Public License v2.0 | 6 votes |
private Canvas createSelectionMenuButton() { showSelectionMenuButton = new Label(i18n.chooseDataSource()); showSelectionMenuButton.setStyleName("n52_sensorweb_client_legendbuttonPrimary"); showSelectionMenuButton.setZIndex(1000000); showSelectionMenuButton.setAutoHeight(); showSelectionMenuButton.setAutoWidth(); showSelectionMenuButton.setWrap(false); showSelectionMenuButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { if (selectionMenu.isVisible()) { selectionMenu.animateHide(AnimationEffect.SLIDE); } else { selectionMenu.animateShow(AnimationEffect.SLIDE); } } }); setSelectionMenuButtonPosition(); return showSelectionMenuButton; }
Example 3
Source File: DataControlsTimeSeries.java From SensorWebClient with GNU General Public License v2.0 | 6 votes |
private Canvas createAutoScaleButton() { Layout layout = new Layout(); layout.setStyleName("n52_sensorweb_client_scaleButtonLayout"); autoScaleButton = new Label(i18n.resetScale()); autoScaleButton.setStyleName("n52_sensorweb_client_scaleButton"); autoScaleButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { EventBus.getMainEventBus().fireEvent(new SwitchAutoscaleEvent(true), new EventCallback() { public void onEventFired() { EventBus.getMainEventBus().fireEvent(new RequestDataEvent()); } }); } }); autoScaleButton.setWidth(80); autoScaleButton.setWrap(false); return autoScaleButton; }
Example 4
Source File: Legend.java From SensorWebClient with GNU General Public License v2.0 | 6 votes |
private Label createPDFLabel() { Label toPDF = new Label(i18n.toPDF()); toPDF.setWrap(false); toPDF.setAutoFit(true); toPDF.setPadding(3); toPDF.setWidth100(); toPDF.setStyleName("n52_sensorweb_client_exportEntry"); toPDF.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { controller.exportTo(ExportType.PDF_ALL_IN_ONE); exportMenu.hide(); } }); return toPDF; }
Example 5
Source File: Legend.java From SensorWebClient with GNU General Public License v2.0 | 6 votes |
private Label createExportLabelButton() { Label export = new Label(i18n.export()); export.setStyleName("n52_sensorweb_client_legendbuttonDisabled"); export.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { if (exportMenu.isVisible()) { exportMenu.hide(); } else { exportMenu.setLeft(exportButton.getAbsoluteLeft() - 2); exportMenu.setWidth(exportButton.getWidth()); exportMenu.show(); } } }); return export; }
Example 6
Source File: Header.java From SensorWebClient with GNU General Public License v2.0 | 6 votes |
private Label getCopyrightLink() { DateTimeFormat dateFormatter = DateTimeFormat.getFormat("yyyy"); String year = dateFormatter.format(new Date()); Label copyright = getHeaderLinkLabel("© 52°North, GmbH " + year); copyright.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { String url = "http://www.52north.org"; Window.open(url, "_blank", ""); } }); return copyright; }
Example 7
Source File: Header.java From SensorWebClient with GNU General Public License v2.0 | 6 votes |
private Label getImprintLink() { Label imprint = getHeaderLinkLabel(i18n.Impressum()); imprint.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { com.smartgwt.client.widgets.Window w = new com.smartgwt.client.widgets.Window(); w.setTitle(i18n.Impressum()); w.setWidth(450); w.setHeight(460); w.centerInPage(); w.setIsModal(true); VLayout layout = new VLayout(); HTMLPane pane = new HTMLPane(); pane.setContentsURL(i18n.imprintPath()); layout.setStyleName("n52_sensorweb_client_imprint_content"); layout.addMember(pane); w.addItem(layout); w.show(); } }); return imprint; }
Example 8
Source File: Legend.java From SensorWebClient with GNU General Public License v2.0 | 5 votes |
private Label createAddTimeSeriesLabelButton() { Label addTS = new Label(i18n.picker()); addTS.setStyleName("n52_sensorweb_client_legendbuttonPrimary"); addTS.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { StationSelector.getInst().show(); } }); return addTS; }
Example 9
Source File: Legend.java From SensorWebClient with GNU General Public License v2.0 | 5 votes |
private Label createSESTabLabelButton() { Label sesTabLabelButton = new Label(i18n.editProfile()); sesTabLabelButton.setStyleName("n52_sensorweb_client_legendbutton"); sesTabLabelButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Legend.this.showProfileWindow(); } }); sesTabLabelButton.setVisible(true); return sesTabLabelButton; }
Example 10
Source File: Header.java From SensorWebClient with GNU General Public License v2.0 | 5 votes |
private Label getMetadatareset() { Label label = getHeaderLinkLabel("reset Metadata"); label.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Toaster.getToasterInstance().addMessage("Update protected services"); EventBus.getMainEventBus().fireEvent(new UpdateSOSMetadataEvent()); } }); return label; }
Example 11
Source File: Header.java From SensorWebClient with GNU General Public License v2.0 | 5 votes |
private Label getVersionInfo() { String version = "foobar"; Label versionLabel = getHeaderLinkLabel("Version: " + version); versionLabel.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Window.open("version-info.txt", "_blank", ""); } }); return versionLabel; }
Example 12
Source File: Header.java From SensorWebClient with GNU General Public License v2.0 | 5 votes |
private Label getAddBookmarkLink() { Label addToFavorites = getHeaderLinkLabel(i18n.addToBookmarks()); addToFavorites.addClickHandler(new ClickHandler() { public void onClick(ClickEvent evt) { addToFavorites(); } }); return addToFavorites; }
Example 13
Source File: Header.java From SensorWebClient with GNU General Public License v2.0 | 5 votes |
private Label getHelpLink() { Label help = getHeaderLinkLabel(i18n.help()); help.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() { public void onClick(com.smartgwt.client.widgets.events.ClickEvent event) { String helpUrl = GWT.getHostPageBaseURL() + i18n.helpPath(); Window.open(helpUrl, "", ""); } }); return help; }