com.smartgwt.client.widgets.IButton Java Examples
The following examples show how to use
com.smartgwt.client.widgets.IButton.
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: DataControlsSes.java From SensorWebClient with GNU General Public License v2.0 | 6 votes |
public void highlightSelectedButton(IButton selectedButton) { this.loginButton.setSelected(false); this.logoutButton.setSelected(false); this.registerButton.setSelected(false); this.getPasswordButton.setSelected(false); this.editProfileButton.setSelected(false); this.aboRuleButton.setSelected(false); this.createSimpleRuleButton.setSelected(false); this.createComplexRuleButton.setSelected(false); this.editRulesButton.setSelected(false); this.manageUserButton.setSelected(false); this.manageRulesButton.setSelected(false); // this.searchRulesButton.setSelected(false); this.helpButton.setSelected(false); selectedButton.setSelected(true); this.helpButton.setSelected(false); }
Example #2
Source File: BrandingPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
private void initGUI() { tenantBranding = new TenantBrandingPanel(tenant, new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { } }); IButton save = new IButton(I18N.message("save")); save.setMinWidth(80); save.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { if (tenantBranding.validate()) onSave(); } }); body.setMembers(tenantBranding); addMember(save); }
Example #3
Source File: PreviewPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
private void showReloadPanel() { IButton reloadButton = new IButton(I18N.message("reload")); reloadButton.setAutoFit(true); reloadButton.setSnapTo("C"); reloadButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { redraw(); } }); reload = new Canvas(); reload.setWidth100(); reload.setHeight100(); reload.setAlign(Alignment.CENTER); reload.addChild(reloadButton); addMember(reload); }
Example #4
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
public static MultiComboBoxItem newMultiComboBoxItem(String name, String title, DataSource options, Object[] values) { MultiComboBoxItem item = new MultiComboBoxItem(name, I18N.message(title)); item.setLayoutStyle(MultiComboBoxLayoutStyle.FLOW); item.setWidth(200); item.setMultiple(true); if (options != null) { item.setOptionDataSource(options); item.setAutoFetchData(true); } IButton closeButton = new IButton(); closeButton.setIcon("[SKIN]/headerIcons/close.gif"); closeButton.setIconOrientation("body"); item.setButtonProperties(closeButton); if (values != null) { item.setValue(values); } return item; }
Example #5
Source File: ExportAction.java From proarc with GNU General Public License v3.0 | 6 votes |
protected final void dsAddData(DataSource dataSource, Record record, DSCallback dsCallback, DSRequest dsRequest) { DynamicForm optionsForm = createOptionsForm(); if (optionsForm == null) { dataSource.addData(record, dsCallback, dsRequest); SC.say(i18n.ExportAction_Sent_Msg()); return; } Dialog d = new Dialog(i18n.ExportAction_Request_Title()); d.getDialogContentContainer().addMember(optionsForm); IButton okButton = d.addOkButton((ClickEvent eventX) -> { setRequestOptions(record); dataSource.addData(record, dsCallback, dsRequest); d.destroy(); SC.say(i18n.ExportAction_Sent_Msg()); }); d.addCancelButton(() -> d.destroy()); d.setWidth(400); d.show(); okButton.focus(); }
Example #6
Source File: LoginWindow.java From proarc with GNU General Public License v3.0 | 6 votes |
private Canvas createButtons() { IButton btnSubmit = new IButton(i18nSgwt.dialog_LoginButtonTitle(), new ClickHandler() { @Override public void onClick(ClickEvent event) { submitCredentials(); } }); HStack btnLayout = new HStack(5); btnLayout.setAutoHeight(); btnLayout.setLayoutTopMargin(20); btnLayout.setLayoutAlign(Alignment.CENTER); btnLayout.setMembers(btnSubmit); return btnLayout; }
Example #7
Source File: ImportParentChooser.java From proarc with GNU General Public License v3.0 | 6 votes |
SelectionView(ClientMessages i18n) { this.i18n = i18n; setAutoHeight(); setIsGroup(true); setGroupTitle(i18n.ImportParentChooser_SelectionForm_Title()); setLayoutMargin(4); selection = new Canvas(); selection.setWidth100(); selection.setAutoHeight(); selection.setMargin(4); selection.setCanSelectText(Boolean.TRUE); clear = new IButton(i18n.ImportParentChooser_SelectionForm_Clear_Title()); clear.setTooltip(i18n.ImportParentChooser_SelectionForm_Clear_Hint()); clear.setAutoFit(Boolean.TRUE); setMembers(selection, clear); }
Example #8
Source File: AllRulesListGrid.java From SensorWebClient with GNU General Public License v2.0 | 6 votes |
protected Canvas createDeleteRuleButton(final ListGridRecord record) { IButton deleteButton = new IButton(i18n.delete()); deleteButton.setShowDown(false); deleteButton.setShowRollOver(false); deleteButton.setLayoutAlign(CENTER); deleteButton.setPrompt(i18n.deleteThisRule()); deleteButton.setHeight(16); deleteButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { SC.ask(i18n.reallyDeleteRule(), new BooleanCallback() { public void execute(Boolean value) { if (value) { String uuid = record.getAttribute(UUID); String userRole = getLoggedInUser(); DeleteRuleEvent deleteRuleEvent = new DeleteRuleEvent(currentSession(), uuid, userRole); EventBus.getMainEventBus().fireEvent(deleteRuleEvent); } } }); } }); return deleteButton; }
Example #9
Source File: OwnRulesListGrid.java From SensorWebClient with GNU General Public License v2.0 | 6 votes |
private Canvas createDeleteRuleButtonm(final ListGridRecord ruleRecord) { IButton deleteButton = new IButton(i18n.delete()); deleteButton.setShowDown(false); deleteButton.setShowRollOver(false); deleteButton.setLayoutAlign(Alignment.CENTER); deleteButton.setPrompt(i18n.deleteThisRule()); deleteButton.setHeight(16); deleteButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { SC.ask(i18n.reallyDeleteRule(), new BooleanCallback() { public void execute(Boolean value) { if (value) { String uuid = ruleRecord.getAttribute(UUID); String userRole = getLoggedInUserRole(); EventBus.getMainEventBus().fireEvent(new DeleteRuleEvent(currentSession(), uuid, userRole)); } } }); } }); return deleteButton; }
Example #10
Source File: OwnRulesListGrid.java From SensorWebClient with GNU General Public License v2.0 | 6 votes |
private Canvas createPublishRuleButton(final ListGridRecord ruleRecord) { IButton publishButton = new IButton(i18n.publishButton()); publishButton.setShowDown(false); publishButton.setShowRollOver(false); publishButton.setLayoutAlign(Alignment.CENTER); publishButton.setHeight(16); publishButton.setAutoFit(true); final boolean published = ruleRecord.getAttributeAsBoolean(PUBLISHED); if (published) { publishButton.setTitle(i18n.unpublishButton()); publishButton.setPrompt(i18n.cancelPublication()); } else { publishButton.setTitle(i18n.publishButton()); publishButton.setPrompt(i18n.publishThisRule()); } publishButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { String ruleName = ruleRecord.getAttribute(NAME); EventBus.getMainEventBus().fireEvent(new PublishRuleEvent(currentSession(), ruleName, !published, "USER")); } }); return publishButton; }
Example #11
Source File: OwnRulesListGrid.java From SensorWebClient with GNU General Public License v2.0 | 6 votes |
private Canvas createEditRuleButton(final ListGridRecord ruleRecord) { // subscribe button IButton editButton = new IButton(i18n.edit()); editButton.setShowDown(false); editButton.setShowRollOver(false); editButton.setLayoutAlign(Alignment.CENTER); editButton.setPrompt(i18n.editThisRule()); editButton.setHeight(16); editButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { String name = ruleRecord.getAttribute(NAME); EventBus.getMainEventBus().fireEvent(new GetAllPublishedRulesEvent(currentSession(), 1)); EventBus.getMainEventBus().fireEvent(new EditRuleEvent(name)); } }); return editButton; }
Example #12
Source File: AllRulesListGrid.java From SensorWebClient with GNU General Public License v2.0 | 6 votes |
protected Canvas createEditRuleButton(final ListGridRecord ruleRecord) { String userID = getLoggedInUser(); String ruleOwnerID = ruleRecord.getAttribute(OWNERID); if (ruleOwnerID.equals(userID)) { IButton editButton = new IButton(i18n.edit()); editButton.setShowDown(false); editButton.setShowRollOver(false); editButton.setLayoutAlign(Alignment.CENTER); editButton.setPrompt(i18n.editThisRule()); editButton.setHeight(16); editButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { String name = ruleRecord.getAttribute(NAME); EventBus.getMainEventBus().fireEvent(new EditRuleEvent(name)); } }); return editButton; } else { return null; } }
Example #13
Source File: BarcodeTemplateSettings.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public BarcodeTemplateSettings(BarcodeTemplatesPanel panel, GUIBarcodeTemplate template) { setHeaderControls(HeaderControls.HEADER_LABEL, HeaderControls.CLOSE_BUTTON); setTitle(I18N.message("barcodetemplate")); setCanDragResize(true); setIsModal(true); setShowModalMask(true); centerInPage(); setAutoSize(true); this.panel = panel; this.template = template; save = new IButton(I18N.message("save")); save.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() { @Override public void onClick(com.smartgwt.client.widgets.events.ClickEvent event) { onSave(); } }); prepareForm(); VLayout layout = new VLayout(); layout.setMembersMargin(5); layout.setWidth100(); layout.addMember(form); layout.addMember(save); addItem(layout); }
Example #14
Source File: BruteForcePanel.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public BruteForcePanel() { super("bruteforceprevention"); IButton save = new IButton(); save.setAutoFit(true); save.setTitle(I18N.message("save")); save.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { onSave(); } }); addMember(save); SettingService.Instance.get().loadSettingsByNames( new String[] { "throttle.enabled", "throttle.username.max", "throttle.username.wait", "throttle.username.wait", "throttle.ip.max", "throttle.ip.wait" }, new AsyncCallback<GUIParameter[]>() { @Override public void onFailure(Throwable caught) { Log.serverError(caught); } @Override public void onSuccess(GUIParameter[] params) { Map<String, String> p = new HashMap<String, String>(); for (GUIParameter par : params) p.put(par.getName(), par.getValue()); initForm(p); } }); }
Example #15
Source File: WorkflowUploader.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public WorkflowUploader(WorkflowDesigner designer) { setHeaderControls(HeaderControls.HEADER_LABEL, HeaderControls.CLOSE_BUTTON); this.designer = designer; setTitle(I18N.message("uploadworkflow")); setCanDragResize(true); setIsModal(true); setShowModalMask(true); setAutoSize(true); centerInPage(); layout.setMembersMargin(2); layout.setMargin(2); // Create a new uploader panel and attach it to the window uploader = new MultiUploader(); uploader.setMaximumFiles(1); uploader.setStyleName("upload"); uploader.setFileInputPrefix("LDOC"); uploader.setWidth("400px"); uploader.reset(); uploader.setHeight("40px"); // Add a finish handler which will load the image once the upload // finishes uploader.addOnFinishUploadHandler(onFinishUploaderHandler); sendButton = new IButton(I18N.message("send")); sendButton.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() { @Override public void onClick(com.smartgwt.client.widgets.events.ClickEvent event) { onSend(); } }); layout.addMember(uploader); layout.addMember(sendButton); addItem(layout); }
Example #16
Source File: QuotaPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
private void initGUI() { tenantQuota = new TenantQuotaPanel(tenant, new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { } }); IButton save = new IButton(I18N.message("save")); save.setMinWidth(80); save.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { if (tenantQuota.validate()) TenantService.Instance.get().save(tenant, new AsyncCallback<GUITenant>() { @Override public void onFailure(Throwable caught) { Log.serverError(caught); } @Override public void onSuccess(GUITenant ten) { QuotaPanel.this.tenant = ten; Log.info(I18N.message("settingssaved"), null); } }); } }); body.setMembers(tenantQuota); addMember(save); }
Example #17
Source File: FillForm.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public FillForm(GUIDocument frm) { setHeaderControls(HeaderControls.HEADER_LABEL, HeaderControls.CLOSE_BUTTON); setTitle(I18N.message("form") + " - " + Util.getBaseName(frm.getFileName())); setWidth(500); setHeight(400); setCanDragResize(true); setIsModal(true); setShowModalMask(true); centerInPage(); IButton save = new IButton(); save.setTitle(I18N.message("save")); save.setAutoFit(true); save.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() { @Override public void onClick(com.smartgwt.client.widgets.events.ClickEvent event) { onSave(); } }); HLayout buttonsBar = new HLayout(); buttonsBar.setWidth100(); buttonsBar.setHeight(25); buttonsBar.setMembers(save); propertiesPanel = new ExtendedPropertiesPanel(frm, null, true, true, false); VLayout layout = new VLayout(); layout.setMargin(3); layout.setMembersMargin(3); layout.setMembers(propertiesPanel, buttonsBar); addItem(layout); }
Example #18
Source File: FirewallPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public FirewallPanel() { setWidth100(); setMembersMargin(5); setMargin(5); init(); Tab tab = new Tab(); tab.setTitle(I18N.message("firewall")); tab.setPane(form); TabSet tabs = new TabSet(); tabs.setWidth100(); tabs.setHeight100(); tabs.setTabs(tab); IButton save = new IButton(); save.setAutoFit(true); save.setTitle(I18N.message("save")); save.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { onSave(); } }); setMembers(tabs, save); }
Example #19
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public static MultiComboBoxItem newBarcodeFormatsComboBoxItem(String name, String title, String[] values) { MultiComboBoxItem item = new MultiComboBoxItem(name, I18N.message(title)); item.setLayoutStyle(MultiComboBoxLayoutStyle.FLOW); item.setWidth(200); item.setMultiple(true); IButton closeButton = new IButton(); closeButton.setIcon("[SKIN]/headerIcons/close.gif"); closeButton.setIconOrientation("body"); item.setButtonProperties(closeButton); LinkedHashMap<String, String> map = new LinkedHashMap<String, String>(); map.put("CODE_39", "CODE_39"); map.put("CODE_128", "CODE_128"); map.put("EAN_8", "EAN_8"); map.put("EAN_13", "EAN_13"); map.put("QR_CODE", "QR_CODE"); map.put("AZTEC", "AZTEC"); map.put("CODE_93", "CODE_93"); map.put("RSS_14", "RSS_14"); map.put("RSS_EXPANDED", "RSS_EXPANDED"); map.put("UPC_A", "UPC_A"); map.put("UPC_E", "UPC_E"); map.put("DATA_MATRIX", "DATA_MATRIX"); map.put("ITF", "ITF"); map.put("PDF_417", "PDF_417"); map.put("CODABAR", "CODABAR"); map.put("MAXICODE", "MAXICODE"); item.setValueMap(map); if (values != null) item.setValue(values); return item; }
Example #20
Source File: ProgressTracker.java From proarc with GNU General Public License v3.0 | 5 votes |
public ProgressTracker(ClientMessages i18n) { this.i18n = i18n; widget = new VLayout(4); label = new Label(); label.setWidth100(); label.setAutoHeight(); progressbar = new Progressbar(); progressbar.setVertical(false); progressbar.setLength(400); progressbar.setBreadth(24); widget.setMembers(label, progressbar); widget.setWidth100(); widget.setAutoHeight(); progressPrefix = i18n.ProgressTracker_Progress_0(); closeBtn = new IButton(i18n.ProgressTracker_CloseBtn_Title(), new ClickHandler() { @Override public void onClick(ClickEvent event) { stop(); } }); closeBtn.setTooltip(i18n.ProgressTracker_CloseBtn_Hint()); closeBtn.setAutoFit(true); }
Example #21
Source File: OtherUserRulesListGrid.java From SensorWebClient with GNU General Public License v2.0 | 5 votes |
@Override protected Canvas createRecordComponent(final ListGridRecord record, Integer colNum) { if (record != null) { String fieldName = this.getFieldName(colNum); if (fieldName.equals(EditRulesLayout.EDIT_RULES_COPY)) { // Copy button IButton copyButton = new IButton(i18n.copy()); copyButton.setShowDown(false); copyButton.setShowRollOver(false); copyButton.setHeight(17); copyButton.setLayoutAlign(Alignment.CENTER); copyButton.setAlign(Alignment.CENTER); copyButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { System.out.println("copy " + record.getAttribute("name")); String userID = getLoggedInUserId(); EventBus.getMainEventBus().fireEvent(new CopyEvent(userID, record.getAttribute("name"))); } }); return copyButton; } return null; } return null; }
Example #22
Source File: Dialog.java From proarc with GNU General Public License v3.0 | 5 votes |
private IButton addCancelButton(String title, DialogCloseHandler closeHandler) { DialogCloseHandlerImpl dch = new DialogCloseHandlerImpl(closeHandler); IButton btn = new IButton(title, dch); addCloseClickHandler(dch); getDialogButtonsContainer().addMember(btn); return btn; }
Example #23
Source File: DataControlsSes.java From SensorWebClient with GNU General Public License v2.0 | 4 votes |
public void setGetPasswordButton(IButton getPasswordButton) { this.getPasswordButton = getPasswordButton; }
Example #24
Source File: DataControlsSes.java From SensorWebClient with GNU General Public License v2.0 | 4 votes |
public void setAboRuleButton(IButton aboRuleButton) { this.aboRuleButton = aboRuleButton; }
Example #25
Source File: DataControlsSes.java From SensorWebClient with GNU General Public License v2.0 | 4 votes |
public IButton getAboRuleButton() { return aboRuleButton; }
Example #26
Source File: DataControlsSes.java From SensorWebClient with GNU General Public License v2.0 | 4 votes |
public void setEditProfileButton(IButton editProfileButton) { this.editProfileButton = editProfileButton; }
Example #27
Source File: DataControlsSes.java From SensorWebClient with GNU General Public License v2.0 | 4 votes |
public void setRegisterButton(IButton registerButton) { this.registerButton = registerButton; }
Example #28
Source File: DataControlsSes.java From SensorWebClient with GNU General Public License v2.0 | 4 votes |
public void setLogoutButton(IButton logoutButton) { this.logoutButton = logoutButton; }
Example #29
Source File: DataControlsSes.java From SensorWebClient with GNU General Public License v2.0 | 4 votes |
public IButton getRegisterButton() { return registerButton; }
Example #30
Source File: DataControlsSes.java From SensorWebClient with GNU General Public License v2.0 | 4 votes |
public IButton getEditProfileButton() { return editProfileButton; }