Java Code Examples for com.smartgwt.client.widgets.Label#setStyleName()
The following examples show how to use
com.smartgwt.client.widgets.Label#setStyleName() .
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: SessionTimeout.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
private SessionTimeout() { setShowEdges(false); setShowHeader(false); centerInPage(); setIsModal(true); setVertical(true); setAlign(Alignment.CENTER); setMargin(2); setMembersMargin(0); setBodyColor("white"); setBackgroundColor("white"); setOverflow(Overflow.HIDDEN); setHeight100(); setWidth100(); Label message = new Label(I18N.message("sessiontimeout")); message.setWrap(false); message.setAlign(Alignment.CENTER); message.setStyleName("sessiontimeout"); message.setLayoutAlign(Alignment.CENTER); message.setLayoutAlign(VerticalAlignment.CENTER); message.setHeight(50); message.setBackgroundColor("white"); addMember(message); }
Example 3
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 4
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 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: InteractionWindow.java From SensorWebClient with GNU General Public License v2.0 | 5 votes |
public InteractionWindow(Layout content) { this.setContent(content); title = new Label(); title.setWidth100(); title.setAutoHeight(); title.setStyleName("n52_sensorweb_client_interactionmenuHeader"); title.setWrap(false); title.hide(); addMember(title); addMember(content); setStyleName("n52_sensorweb_client_interactionmenu"); }
Example 7
Source File: Toaster.java From SensorWebClient with GNU General Public License v2.0 | 5 votes |
public void addErrorMessage(String error) { Date d = new Date(); String timeStamp = DateTimeFormat.getFormat("dd.MM.yyyy HH:mm").format(d); Label l = new Label(timeStamp + " " + error); l.setCanSelectText(true); l.setStyleName("n52_sensorweb_client_toasterErrorMsg"); l.setAutoHeight(); for (int i = 0; i < this.messages.size(); i++) { this.layout.removeMember(this.messages.get(i)); } this.messages.add(l); for (int i = this.messages.size() - 1; i >= 0; i--) { this.layout.addMember(this.messages.get(i)); } this.left = this.toasterWindow.getParentElement().getWidth().intValue() - this.width - 10; this.top = this.toasterWindow.getParentElement().getHeight().intValue() - this.height - 30; this.toasterWindow.setLeft(this.left); this.toasterWindow.setTop(this.top); animateToaster(); }
Example 8
Source File: Toaster.java From SensorWebClient with GNU General Public License v2.0 | 5 votes |
public void addMessage(String msg) { Date d = new Date(); String timeStamp = DateTimeFormat.getFormat("dd.MM.yyyy HH:mm").format(d); Label l = new Label(timeStamp + " " + msg); l.setCanSelectText(true); l.setStyleName("n52_sensorweb_client_toasterMsg"); l.setAutoHeight(); this.messages.add(l); for (int i = 0; i < this.messages.size(); i++) { if (this.layout.hasMember(this.messages.get(i))) { this.layout.removeMember(this.messages.get(i)); } } for (int i = this.messages.size() - 1; i >= 0; i--) { this.layout.addMember(this.messages.get(i)); } // this.left = this.toasterWindow.getParentElement().getWidth().intValue() - this.width - 10; // this.top = this.toasterWindow.getParentElement().getHeight().intValue() - this.height - 30; // // this.toasterWindow.setLeft(this.left); // this.toasterWindow.setTop(this.top); animateToaster(); }
Example 9
Source File: LoginHeaderLayout.java From SensorWebClient with GNU General Public License v2.0 | 5 votes |
private Label getHeaderLinkLabel(String labelText) { Label label = new Label(labelText); label.setStyleName("n52_sensorweb_client_headerlink"); label.setAutoWidth(); label.setWrap(false); return label; }
Example 10
Source File: Header.java From SensorWebClient with GNU General Public License v2.0 | 5 votes |
private Label getHeaderLinkLabel(String labelText) { Label label = new Label(labelText); label.setStyleName("n52_sensorweb_client_headerlink"); label.setAutoWidth(); label.setWrap(false); return label; }
Example 11
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 12
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 13
Source File: WorkflowTasksView.java From proarc with GNU General Public License v3.0 | 5 votes |
private Label createPanelLabel() { Label lblHeader = new Label(); String title = ClientUtils.format("<b>%s</b>", i18n.WorkflowTask_View_Title()); lblHeader.setContents(title); lblHeader.setAutoHeight(); lblHeader.setPadding(4); lblHeader.setStyleName(Editor.CSS_PANEL_DESCRIPTION_TITLE); return lblHeader; }
Example 14
Source File: WorkflowNewJobView.java From proarc with GNU General Public License v3.0 | 5 votes |
private Label createPanelLabel() { Label lblHeader = new Label(); String title = ClientUtils.format("<b>%s</b>", i18n.WorkflowJob_NewJobView_Title()); lblHeader.setContents(title); lblHeader.setAutoHeight(); lblHeader.setPadding(4); lblHeader.setStyleName(Editor.CSS_PANEL_DESCRIPTION_TITLE); return lblHeader; }
Example 15
Source File: WorkflowJobView.java From proarc with GNU General Public License v3.0 | 5 votes |
private Label createPanelLabel() { Label lblHeader = new Label(); String title = ClientUtils.format("<b>%s</b>", i18n.WorkflowJob_View_Title()); lblHeader.setContents(title); lblHeader.setAutoHeight(); lblHeader.setPadding(4); lblHeader.setStyleName(Editor.CSS_PANEL_DESCRIPTION_TITLE); return lblHeader; }
Example 16
Source File: DeviceManager.java From proarc with GNU General Public License v3.0 | 5 votes |
public DeviceManagerWidget(ClientMessages i18n) { this.i18n = i18n; actionSource = new ActionSource(this); widget = new VLayout(); Label lblHeader = new Label(); String title = ClientUtils.format("<b>%s</b>", i18n.DeviceManager_Title()); lblHeader.setContents(title); lblHeader.setAutoHeight(); lblHeader.setPadding(4); lblHeader.setStyleName(Editor.CSS_PANEL_DESCRIPTION_TITLE); ToolStrip toolbar = createToolbar(i18n); deviceList = createDeviceList(i18n); form = createForm(); premisForm = createPremisForm(); descriptionForm = createDescriptionForm(); valuesManager = new ValuesManager(); valuesManager.addMember(form); valuesManager.addMember(premisForm); valuesManager.addMember(descriptionForm); valuesManager.setDataSource(DeviceDataSource.getInstance()); VLayout forms = new VLayout(); forms.setOverflow(Overflow.AUTO); forms.setMembers(form, premisForm, descriptionForm); HLayout hLayout = new HLayout(); deviceList.setWidth100(); forms.setWidth100(); hLayout.setMembers(deviceList, forms); widget.addMember(lblHeader); widget.addMember(toolbar); widget.addMember(hLayout); }
Example 17
Source File: UpdatePanel.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
private void onUpdateUnavailable() { Label message = new Label(); message.setContents(I18N.message("updatepackagenotfound")); message.setWrap(false); message.setAlign(Alignment.LEFT); message.setStyleName("updateunavailable"); message.setLayoutAlign(Alignment.LEFT); message.setLayoutAlign(VerticalAlignment.TOP); message.setHeight(20); setMembers(message); }
Example 18
Source File: Setup.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
private void initGUI(final GUIInfo info) { WindowUtils.setTitle(info.getBranding().getProductName() + " " + info.getRelease() + (info.getLicensee() != null ? " - " + I18N.message("licensedto") + ": " + info.getLicensee() : "")); WindowUtils.setFavicon(info); // Prepare a value manager that will include all forms spanned in each // tab vm = new ValuesManager(); // Create all the tabs each one for a specific setup step tabs = new TabSet(); tabs.setWidth(600); tabs.setHeight(250); Tab registrationTab = setupRegistration(vm); Tab repositoryTab = setupRepository(vm, info); Tab databaseTab = setupDatabase(vm, info); tabs.setTabs(registrationTab, repositoryTab, databaseTab); // This is the button used to confirm each step submit = new IButton(); submit.setTitle(I18N.message("next")); submit.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { onSubmit(info); } }); // Prepare the heading panel with Logo and Title // Prepare the logo image to be shown inside the login form Label header = new Label(I18N.message("setup")); header.setStyleName("setupHeader"); header.setIcon(info.getBranding().getLogoSrc()); header.setIconWidth(205); header.setIconHeight(40); header.setHeight(45); // Prepare a panel to layout setup components VLayout layout = new VLayout(); layout.setHeight(500); layout.setWidth(400); layout.setMembersMargin(5); layout.addMember(header); layout.addMember(tabs); layout.addMember(submit); // Panel for horizontal centering VLayout vPanel = new VLayout(); vPanel.setDefaultLayoutAlign(Alignment.CENTER); vPanel.setWidth100(); vPanel.setHeight(300); vPanel.addMember(layout); RootPanel.get().add(vPanel); // Remove the loading frame RootPanel.getBodyElement().removeChild(RootPanel.get("loadingwrapper-setup").getElement()); }
Example 19
Source File: Header.java From SensorWebClient with GNU General Public License v2.0 | 4 votes |
private Label getSeparator(){ Label pipe = new Label("|"); pipe.setStyleName("n52_sensorweb_client_pipe"); pipe.setAutoWidth(); return pipe; }
Example 20
Source File: LoginHeaderLayout.java From SensorWebClient with GNU General Public License v2.0 | 4 votes |
private Label getSeparator(){ Label pipe = new Label("|"); pipe.setStyleName("n52_sensorweb_client_pipe"); pipe.setAutoWidth(); return pipe; }