com.smartgwt.client.widgets.form.fields.events.ChangedHandler Java Examples
The following examples show how to use
com.smartgwt.client.widgets.form.fields.events.ChangedHandler.
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: SyndicationStandardProperties.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
public SyndicationStandardProperties(GUISyndication syndication, final ChangedHandler changedHandler) { super(syndication, changedHandler); setWidth100(); setHeight100(); setMembers(formsContainer); sourceSelector = new FolderSelector("source", false); sourceSelector.setRequired(true); sourceSelector.setWidth(250); sourceSelector.setTitle(I18N.message("sourcefolder")); if (syndication.getSourceFolder() != null) sourceSelector.setFolder(syndication.getSourceFolder()); sourceSelector.addFolderChangeListener(new FolderChangeListener() { @Override public void onChanged(GUIFolder folder) { changedHandler.onChanged(null); } }); refresh(); }
Example #2
Source File: StationSelector.java From SensorWebClient with GNU General Public License v2.0 | 6 votes |
FormItem createFilterCategorySelectionGroup(String serviceUrl) { if (stationFilterGroups.containsKey(serviceUrl)) { RadioGroupItem selector = stationFilterGroups.get(serviceUrl); return selector; } RadioGroupItem radioGroup = new RadioGroupItem("sosDataSource"); radioGroup.setShowTitle(false); radioGroup.addChangedHandler(new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { Object value = event.getValue(); if (value != null) { hideInfoWindow(); controller.setStationFilter(value.toString()); controller.updateContentUponStationFilter(); } } }); stationFilterGroups.put(serviceUrl, radioGroup); return radioGroup; }
Example #3
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 #4
Source File: TemplateDetailsPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
protected void refresh() { disableSave(); /* * Prepare the standard properties tab */ if (propertiesPanel != null) { propertiesPanel.destroy(); if (propertiesTabPanel.contains(propertiesPanel)) propertiesTabPanel.removeMember(propertiesPanel); } ChangedHandler changeHandler = new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { onModified(); } }; propertiesPanel = new TemplatePropertiesPanel(template, changeHandler, this); propertiesTabPanel.addMember(propertiesPanel); }
Example #5
Source File: ExtendedPropertiesPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
public ExtendedPropertiesPanel(GUIExtensibleObject object, ChangedHandler changedHandler, ChangedHandler templateChangedHandler, boolean updateEnabled, boolean checkMandatory, boolean allowTemplateSelection) { super(); this.object = object; this.changedHandler = changedHandler; this.templateChangedHandler = templateChangedHandler; this.updateEnabled = updateEnabled; this.checkMandatory = checkMandatory; this.allowTemplateSelection = allowTemplateSelection; setWidth100(); setHeight100(); setMembersMargin(20); refresh(); addResizedHandler(new ResizedHandler() { @Override public void onResized(ResizedEvent event) { adaptForms(); } }); }
Example #6
Source File: UserPropertiesPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
public UserPropertiesPanel(GUIUser user, ChangedHandler changedHandler) { if (user == null) { setMembers(UsersPanel.SELECT_USER); } else { this.user = user; this.changedHandler = changedHandler; setWidth100(); setHeight100(); setMembersMargin(20); layout.setWidth(300); idLabel = new Label(I18N.message("id") + ": " + Long.toString(user.getId())); idLabel.setHeight(15); layout.addMember(idLabel, 0); prepareGUI(); } }
Example #7
Source File: SubscriptionListGrid.java From SensorWebClient with GNU General Public License v2.0 | 6 votes |
protected ChangedHandler createActivateChangedHandler(final ListGridRecord ruleRecord) { return new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { CheckboxItem checkbox = (CheckboxItem) event.getSource(); boolean checked = checkbox.getValueAsBoolean().booleanValue(); String uuid = ruleRecord.getAttribute(UUID); String medium = ruleRecord.getAttribute(MEDIUM); String format = ruleRecord.getAttribute(FORMAT); ruleRecord.setAttribute(SUBSCRIBED, checked); if(checked) { getMainEventBus().fireEvent(new SubscribeEvent(currentSession(), uuid, medium, format)); } else { getMainEventBus().fireEvent(new UnsubscribeEvent(currentSession(), uuid, medium, format)); } } }; }
Example #8
Source File: ImportFolderStandardProperties.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
public ImportFolderStandardProperties(GUIImportFolder importFolder, final ChangedHandler changedHandler) { super(importFolder, changedHandler); setWidth100(); setHeight100(); setMembers(formsContainer); targetSelector = new FolderSelector("target", false); targetSelector.setRequired(true); targetSelector.setWidth(250); targetSelector.setTitle(I18N.message("targetfolder")); if (importFolder.getTarget() != null) targetSelector.setFolder(importFolder.getTarget()); targetSelector.addFolderChangeListener(new FolderChangeListener() { @Override public void onChanged(GUIFolder folder) { changedHandler.onChanged(null); } }); refresh(); }
Example #9
Source File: DigitalObjectPreview.java From proarc with GNU General Public License v3.0 | 6 votes |
/** * Gets widget to zoom image in the preview panel. * @return */ public Canvas getPreviewZoomer() { SelectItem zoomItem = createZoomForm(); zoomItem.addChangedHandler(new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { onZoomChange(event); } }); DynamicForm form = new DynamicForm(); form.setValuesManager(zoomValues); form.setFields(zoomItem); form.setLayoutAlign(Alignment.CENTER); return form; }
Example #10
Source File: SyndicationDetailsPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
private void refresh() { tabSet.hideSave(); /* * Prepare the standard properties tab */ if (standardPanel != null) { standardPanel.destroy(); if (standardTabPanel.contains(standardPanel)) standardTabPanel.removeMember(standardPanel); } ChangedHandler changeHandler = new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { onModified(); } }; standardPanel = new SyndicationStandardProperties(syndication, changeHandler); standardTabPanel.addMember(standardPanel); }
Example #11
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
public static SelectItem newEventSelector(String name, String title, final ChangedHandler handler, boolean folder, boolean workflow, boolean user) { final SelectItem select = newSelectItem(filterItemName(name), title); select.setWidth(350); select.setMultiple(false); select.setOptionDataSource(new EventsDS(folder, workflow, user)); select.setValueField("code"); select.setDisplayField("label"); if (handler != null) select.addChangedHandler(handler); PickerIcon clear = new PickerIcon(PickerIcon.CLEAR, new FormItemClickHandler() { @Override public void onFormItemClick(FormItemIconClickEvent event) { select.clearValue(); select.setValue((String) null); if (handler != null) handler.onChanged(null); } }); select.setIcons(clear); select.setIconVAlign(VerticalAlignment.TOP); return select; }
Example #12
Source File: ImportSettingsPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
public ImportSettingsPanel(GUIArchive archive, ChangedHandler changedHandler) { this.archive = archive; form.setValuesManager(vm); form.setTitleOrientation(TitleOrientation.TOP); TextItem description = ItemFactory.newTextItem("description", "description", archive.getDescription()); description.addChangedHandler(changedHandler); description.setDisabled(archive.getStatus() != GUIArchive.STATUS_OPENED); RadioGroupItem importTemplates = ItemFactory.newBooleanSelector("importtemplates", "importtemplates"); importTemplates.setValue(archive.getImportTemplate() == 1 ? "yes" : "no"); importTemplates.addChangedHandler(changedHandler); importTemplates.setDisabled(archive.getStatus() != GUIArchive.STATUS_OPENED); SelectItem options = ItemFactory.newImportCustomIds(); options.setWidth(200); options.setValue(Integer.toString(archive.getImportCustomId())); options.addChangedHandler(changedHandler); options.setDisabled(archive.getStatus() != GUIArchive.STATUS_OPENED); form.setFields(description, importTemplates, options); addMember(form); }
Example #13
Source File: TenantPropertiesPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
public TenantPropertiesPanel(GUITenant tenant, ChangedHandler changedHandler) { if (tenant == null) { setMembers(TenantsPanel.SELECT_TENANT); } else { this.tenant = tenant; this.changedHandler = changedHandler; setWidth100(); setHeight100(); setMembersMargin(20); layout.setWidth(300); idLabel = new Label(I18N.message("id") + ": " + Long.toString(tenant.getId())); idLabel.setHeight(15); layout.addMember(idLabel, 0); refresh(); } }
Example #14
Source File: IncrementalDetailsPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
protected void refresh() { if (savePanel != null) savePanel.setVisible(false); ChangedHandler changeHandler = new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { onModified(); } }; /* * Prepare the versions tab */ if (settingsPanel != null) { settingsPanel.destroy(); if (settingsTabPanel.contains(settingsPanel)) settingsTabPanel.removeMember(settingsPanel); } settingsPanel = new IncrementalSettingsPanel(incremental, changeHandler, this); settingsTabPanel.addMember(settingsPanel); }
Example #15
Source File: ReportStandardProperties.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
public ReportStandardProperties(GUIReport report, final ChangedHandler changedHandler) { super(report, changedHandler); setWidth100(); setHeight100(); this.report = report; setMembers(columns); outputFolderSelector = new FolderSelector("outputFolder", false); outputFolderSelector.setRequired(true); outputFolderSelector.setWidth(250); outputFolderSelector.setTitle(I18N.message("outputfolder")); if (report.getOutputFolder() != null) outputFolderSelector.setFolder(report.getOutputFolder()); outputFolderSelector.addFolderChangeListener(new FolderChangeListener() { @Override public void onChanged(GUIFolder folder) { changedHandler.onChanged(null); } }); refresh(); }
Example #16
Source File: DocumentDetailTab.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
/** * * @param document The document this instance refers to * @param changedHandler The handler to be invoked in case of changes in the * document */ public DocumentDetailTab(GUIDocument document, ChangedHandler changedHandler) { super(); this.document = document; this.changedHandler = changedHandler; if (Session.get().getUser().isMemberOf(Constants.GROUP_ADMIN) && document.getImmutable() == 0 && document.getStatus() == Constants.DOC_UNLOCKED) { updateEnabled = true; deleteEnabled = true; } else { updateEnabled = (document.getImmutable() == 0 && document.getStatus() == Constants.DOC_UNLOCKED && document .getFolder().isWrite()); deleteEnabled = (document.getImmutable() == 0 && document.getStatus() == Constants.DOC_UNLOCKED && document .getFolder().isDelete()); } }
Example #17
Source File: AutomationTriggerProperties.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
public AutomationTriggerProperties(GUIAutomationTrigger trigger, final ChangedHandler changedHandler) { super(trigger, changedHandler); setWidth100(); setHeight100(); setMembers(formsContainer); folderSelector = new FolderSelector("folder", true); folderSelector.setWidth(200); folderSelector.setEndRow(true); folderSelector.setTitle(I18N.message("folder")); if (trigger.getFolder() != null) folderSelector.setFolder(trigger.getFolder()); folderSelector.addFolderChangeListener(new FolderChangeListener() { @Override public void onChanged(GUIFolder folder) { changedHandler.onChanged(null); } }); refresh(); }
Example #18
Source File: MainMenu.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
private SelectItem getDensitySelector() { SelectItem density = ItemFactory.newDensitySelector(); density.setShowTitle(false); String dens = Session.get().getInfo().getConfig("gui.density"); if (CookiesManager.get(CookiesManager.COOKIE_DENSITY) != null) dens = CookiesManager.get(CookiesManager.COOKIE_DENSITY); density.setValue(dens); density.addChangedHandler(new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { String newDensity = event.getValue().toString(); Session.get().getInfo().setConfig(Session.get().getTenantName() + ".gui.density", newDensity); CookiesManager.save(CookiesManager.COOKIE_DENSITY, newDensity); Util.setupDensity(Session.get().getInfo()); com.google.gwt.user.client.Window.Location.reload(); } }); return density; }
Example #19
Source File: CreateSimpleRuleLayout.java From SensorWebClient with GNU General Public License v2.0 | 6 votes |
private void setEntryOperatorRuleItem() { this.entryOperatorItem = new SelectItem(); this.entryOperatorItem.setWidth(this.entryItemWidth); this.entryOperatorItem.setTitle(i18n.operator()); this.entryOperatorItem.setTitleOrientation(TitleOrientation.TOP); this.entryOperatorItem.setValueMap(getMathSymbols()); this.entryOperatorItem.setDefaultValue(">"); this.entryOperatorItem.setTextAlign(Alignment.CENTER); this.entryOperatorItem.addChangedHandler(new ChangedHandler() { public void onChanged(ChangedEvent event) { if (exitOperatorItem != null) { TextItem exitOperatorTextItem = (TextItem) event.getSource(); exitOperatorItem.setValue(getInverse(exitOperatorTextItem.getValueAsString())); } } }); }
Example #20
Source File: ImportFolderAdvancedProperties.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public ImportFolderAdvancedProperties(GUIImportFolder importFolder, ChangedHandler changedHandler) { super(importFolder, changedHandler); setWidth100(); setHeight100(); setMembers(formsContainer); refresh(); }
Example #21
Source File: EmailAccountAdvancedProperties.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public EmailAccountAdvancedProperties(GUIEmailAccount account, ChangedHandler changedHandler) { super(account, changedHandler); setWidth100(); setHeight100(); setMembers(formsContainer); refresh(); }
Example #22
Source File: FirewallPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public FirewallPanel(GUIUser user, ChangedHandler changedHandler) { super(); this.user = user; this.changedHandler = changedHandler; setWidth100(); setHeight100(); setMembersMargin(20); init(); setMembers(form); }
Example #23
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public static SelectItem newEventsSelector(String name, String title, final ChangedHandler handler, boolean folder, boolean workflow, boolean user) { final SelectItem select = newMultipleSelector(filterItemName(name), title); select.setWidth(350); select.setHeight(250); select.setMultipleAppearance(MultipleAppearance.GRID); select.setMultiple(true); select.setOptionDataSource(new EventsDS(folder, workflow, user)); select.setValueField("code"); select.setDisplayField("label"); if (handler != null) select.addChangedHandler(handler); PickerIcon clear = new PickerIcon(PickerIcon.CLEAR, new FormItemClickHandler() { @Override public void onFormItemClick(FormItemIconClickEvent event) { select.clearValue(); select.setValue((String) null); if (handler != null) handler.onChanged(null); } }); select.setIcons(clear); select.setIconVAlign(VerticalAlignment.TOP); return select; }
Example #24
Source File: OverUndershootRuleTemplate.java From SensorWebClient with GNU General Public License v2.0 | 5 votes |
private ChangedHandler createUnitSelectionChangedHandler() { return new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { // TODO Auto-generated method stub } }; }
Example #25
Source File: DocumentExtendedPropertiesPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public DocumentExtendedPropertiesPanel(GUIDocument document, ChangedHandler changedHandler, ChangedHandler templateChangedHandler) { super(document, changedHandler); setWidth100(); setHeight100(); setMembersMargin(1); extPropertiesPanel = new ExtendedPropertiesPanel(document, changedHandler, templateChangedHandler, updateEnabled, true, true); setMembers(extPropertiesPanel); }
Example #26
Source File: DocumentOCRPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public DocumentOCRPanel(GUIDocument document, ChangedHandler changedHandler, boolean processButton) { super(document, changedHandler); setWidth100(); setHeight100(); setMembersMargin(20); this.processButton = processButton; refresh(document.getTemplateId()); }
Example #27
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public static ColorPickerItem newColorItemPicker(String name, String title, String value, boolean clearOption, ChangedHandler changedHandler) { ColorPickerItem item = new ColorPickerItem(filterItemName(name)); if (title != null) item.setTitle(I18N.message(title)); else item.setShowTitle(false); if (value != null) item.setValue(value); if (clearOption) { PickerIcon clear = new PickerIcon(PickerIcon.CLEAR, new FormItemClickHandler() { @Override public void onFormItemClick(FormItemIconClickEvent event) { item.setValue((String) null); if (changedHandler != null) changedHandler.onChanged(null); } }); item.setIcons(clear); item.setIconVAlign(VerticalAlignment.CENTER); } if (changedHandler != null) item.addChangedHandler(changedHandler); return item; }
Example #28
Source File: ComparatorAssociationsDialog.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public ComparatorAssociationsDialog(final ListGrid srcGrid) { this.srcGrid = srcGrid; setHeaderControls(HeaderControls.HEADER_LABEL, HeaderControls.CLOSE_BUTTON); setTitle(I18N.message("associations")); setWidth(320); setHeight(360); setCanDragResize(true); setIsModal(true); setShowModalMask(true); centerInPage(); comparator = ItemFactory.newComparatorSelector(); comparator.setWidth(290); comparator.setRequired(true); comparator.setValue(DEFAULT_COMPARATOR); comparator.addChangedHandler(new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { refresh(); } }); DynamicForm form = new DynamicForm(); form.setTitleOrientation(TitleOrientation.TOP); form.setNumCols(1); form.setItems(comparator); addItem(form); refresh(); }
Example #29
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 #30
Source File: OverUndershootRuleTemplate.java From SensorWebClient with GNU General Public License v2.0 | 5 votes |
private ChangedHandler createEntryValueChangedHandler() { return new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { TextItem valueItem = (TextItem) event.getSource(); String value = valueItem.getValueAsString(); controller.getOverUndershootEntryConditions().setValue(value); exitValueItem.setValue(value); // setting exit value does not invoke ChangedHandler :( controller.getOverUndershootExitConditions().setValue(value); } }; }