Java Code Examples for com.smartgwt.client.widgets.form.DynamicForm#setWidth100()
The following examples show how to use
com.smartgwt.client.widgets.form.DynamicForm#setWidth100() .
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: AutomationDialog.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
private Tab prepareScriptTab() { scriptForm = new DynamicForm(); scriptForm.setWidth100(); scriptForm.setHeight100(); scriptForm.setTitleOrientation(TitleOrientation.TOP); scriptForm.setNumCols(1); final TextAreaItem automation = ItemFactory.newTextAreaItemForAutomation("automation", "automation", null, null, false); automation.setShowTitle(false); automation.setStartRow(false); automation.setRequired(true); automation.setWidth("*"); automation.setHeight("*"); scriptForm.setItems(automation); Tab tab = new Tab(I18N.message("script")); tab.setPane(scriptForm); return tab; }
Example 2
Source File: KeystoreUploader.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
private void prepareForm() { form = new DynamicForm(); form.setWidth100(); form.setAlign(Alignment.LEFT); form.setColWidths("1px, 100%"); vm = new ValuesManager(); form.setValuesManager(vm); TextItem localCAalias = ItemFactory.newSimpleTextItem("localCAalias", "localcaalias", keystorePanel.getKeystore() != null ? keystorePanel.getKeystore().getOrganizationAlias() : null); localCAalias.setRequired(true); localCAalias.setSelectOnFocus(true); localCAalias.setWrapTitle(false); TextItem password = ItemFactory.newPasswordItem("password", "keystorepasswd", keystorePanel.getKeystore() != null ? keystorePanel.getKeystore().getPassword() : null); password.setRequired(false); password.setWrapTitle(false); form.setItems(localCAalias, password); }
Example 3
Source File: DesaExportAction.java From proarc with GNU General Public License v3.0 | 6 votes |
private DynamicForm createLogForm() { DynamicForm form = new DynamicForm(); form.setBrowserSpellCheck(false); form.setCanEdit(false); form.setWidth100(); form.setHeight("40%"); TextAreaItem textAreaItem = new TextAreaItem(ExportResourceApi.RESULT_ERROR_LOG); textAreaItem.setColSpan("*"); textAreaItem.setHeight("*"); textAreaItem.setWrap(TextAreaWrap.OFF); textAreaItem.setShowTitle(false); textAreaItem.setWidth("*"); textAreaItem.setCanEdit(false); form.setItems(textAreaItem); return form; }
Example 4
Source File: ImportBatchChooser.java From proarc with GNU General Public License v3.0 | 6 votes |
private DynamicForm createLogForm() { DynamicForm form = new DynamicForm(); form.setBrowserSpellCheck(false); form.setCanEdit(false); form.setWidth100(); form.setHeight("40%"); TextAreaItem textAreaItem = new TextAreaItem(ImportBatchDataSource.FIELD_LOG); textAreaItem.setColSpan("*"); textAreaItem.setHeight("*"); textAreaItem.setWrap(TextAreaWrap.OFF); textAreaItem.setShowTitle(false); textAreaItem.setWidth("*"); textAreaItem.setCanEdit(false); form.setItems(textAreaItem); return form; }
Example 5
Source File: DcEditor.java From proarc with GNU General Public License v3.0 | 6 votes |
private DynamicForm createFullForm() { DynamicForm f = new DynamicForm(); f.setWidth100(); f.setNumCols(2); f.setBrowserSpellCheck(false); f.setWrapItemTitles(false); f.setTitleOrientation(TitleOrientation.TOP); ArrayList<FormItem> items = new ArrayList<FormItem>(); addElement(items, DcConstants.CONTRIBUTOR, null, true); addElement(items, DcConstants.COVERAGE, null, true); addElement(items, DcConstants.CREATOR, null, true); addElement(items, DcConstants.DATE, null, true); addElement(items, DcConstants.DESCRIPTION, null, true); addElement(items, DcConstants.FORMAT, null, true); addElement(items, DcConstants.IDENTIFIER, null, true); addElement(items, DcConstants.LANGUAGE, null, true); addElement(items, DcConstants.PUBLISHER, null, true); addElement(items, DcConstants.RELATION, null, true); addElement(items, DcConstants.RIGHTS, null, true); addElement(items, DcConstants.SOURCE, null, true); addElement(items, DcConstants.SUBJECT, null, true); addElement(items, DcConstants.TITLE, null, true); addElement(items, DcConstants.TYPE, null, true); f.setFields(items.toArray(new FormItem[items.size()])); return f; }
Example 6
Source File: StringFormFactory.java From proarc with GNU General Public License v3.0 | 6 votes |
@Override public DynamicForm create() { DynamicForm form = new DynamicForm(); TextItem value = new TextItem(name, title); value.setShowTitle(showTitle); if (width == Integer.MAX_VALUE) { value.setWidth("100%"); form.setWidth100(); } else if (width > 0) { value.setWidth(width); } value.setRequired(required); value.setValidators(new StringTrimValidator()); form.setFields(value); return form; }
Example 7
Source File: ZonalOCRTemplateSettings.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
private void prepareForm() { form = new DynamicForm(); form.setWidth100(); form.setAlign(Alignment.LEFT); form.setColWidths("1px, 100%"); vm = new ValuesManager(); form.setValuesManager(vm); final StaticTextItem fileNameWaring = ItemFactory.newStaticTextItem("fileNameWarning", I18N.message("attention"), I18N.message("filenamewarning")); fileNameWaring.setRequired(true); TextItem name = ItemFactory.newTextItem("name", "name", ocrPanel.getSelectedOcrTemplate().getName()); name.setRequired(true); name.setDisabled(ocrPanel.getSelectedOcrTemplate().getId() != 0L); StaticTextItem id = ItemFactory.newStaticTextItem("id", I18N.message("id"), "" + ocrPanel.getSelectedOcrTemplate().getId()); id.setVisible(ocrPanel.getSelectedOcrTemplate().getId() != 0L); SpinnerItem batch = ItemFactory.newSpinnerItem("batch", "batch", Session.get().getConfigAsInt("zonalocr.batch")); batch.setStep(50); batch.setMin(1); TextAreaItem description = ItemFactory.newTextAreaItem("description", "description", ocrPanel.getSelectedOcrTemplate().getDescription()); description.setHeight(200); if (Session.get().isDefaultTenant()) form.setItems(id, name, description, batch); else form.setItems(id, name, description); }
Example 8
Source File: BarcodeTemplateSettings.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
private void prepareForm() { form = new DynamicForm(); form.setWidth100(); form.setAlign(Alignment.LEFT); form.setColWidths("1px, 100%"); vm = new ValuesManager(); form.setValuesManager(vm); TextItem name = ItemFactory.newTextItem("name", "name", template.getName()); name.setRequired(true); name.setDisabled(template.getId() != 0L); StaticTextItem id = ItemFactory.newStaticTextItem("id", I18N.message("id"), "" + template.getId()); id.setVisible(template != null && template.getId() != 0L); TextAreaItem description = ItemFactory.newTextAreaItem("description", "description", template.getDescription()); description.setHeight(200); // The optional batch SpinnerItem batch = ItemFactory.newSpinnerItem("batch", "batch", template.getBatch()); batch.setRequired(true); batch.setMin(1); batch.setStep(10); batch.setHintStyle("hint"); // The image threshold SpinnerItem resolutionThreshold = ItemFactory.newSpinnerItem("resolutionthreshold", I18N.message("resolutionthreshold"), template.getImageThreshold()); resolutionThreshold.setRequired(true); resolutionThreshold.setWrapTitle(false); resolutionThreshold.setMin(50); resolutionThreshold.setStep(100); resolutionThreshold.setHint("pixels"); if (Session.get().isDefaultTenant() && template.getId() != 0L) form.setItems(id, name, description, batch, resolutionThreshold); else form.setItems(id, name, description); }
Example 9
Source File: AutomationRoutineProperties.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
private void refresh() { vm.clearValues(); vm.clearErrors(false); if (formsContainer.getMembers() != null) formsContainer.removeMembers(formsContainer.getMembers()); DynamicForm form2 = new DynamicForm(); form2.setWidth100(); form2.setTitleOrientation(TitleOrientation.TOP); form2.setValuesManager(vm); form2.setNumCols(1); final TextAreaItem automation = ItemFactory.newTextAreaItemForAutomation("automation", "automation", routine.getAutomation(), changedHandler, false); automation.setStartRow(false); automation.setRequired(true); automation.setWidth("*"); form2.setItems(automation); DynamicForm form1 = new DynamicForm(); form1.setNumCols(1); form1.setTitleOrientation(TitleOrientation.TOP); form1.setValuesManager(vm); TextItem name = ItemFactory.newSimpleTextItem("name", I18N.message("name"), routine.getName()); name.addChangedHandler(changedHandler); name.setDisabled(routine.getId() != 0L); TextItem description = ItemFactory.newTextItem("description", I18N.message("description"), routine.getDescription()); description.addChangedHandler(changedHandler); description.setWidth(200); form1.setItems(name, description); formsContainer.setMembers(form1, form2); }
Example 10
Source File: SearchIndexCheckStatus.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public SearchIndexCheckStatus(String result) { super(); setWidth100(); setHeight100(); setHeaderControls(HeaderControls.HEADER_LABEL, HeaderControls.CLOSE_BUTTON); setTitle(I18N.message("checkfulltextindex")); setIsModal(true); setShowModalMask(true); centerInPage(); final DynamicForm form = new DynamicForm(); form.setHeight100(); form.setWidth100(); form.setTitleOrientation(TitleOrientation.TOP); final TextAreaItem status = new TextAreaItem(); status.setWidth(700); status.setHeight("100%"); status.setValue(result); status.setShowTitle(false); form.setFields(status); addItem(form); }
Example 11
Source File: TextEditor.java From proarc with GNU General Public License v3.0 | 5 votes |
private DynamicForm createForm(TextDataSource dataSource) { DynamicForm form = new DynamicForm(); form.setDataSource(dataSource); form.setWidth100(); form.setHeight100(); TextAreaItem textAreaItem = new TextAreaItem(TextDataSource.FIELD_CONTENT); textAreaItem.setColSpan("*"); textAreaItem.setHeight("*"); textAreaItem.setWrap(TextAreaWrap.OFF); textAreaItem.setShowTitle(false); textAreaItem.setWidth("*"); form.setFields(textAreaItem); return form; }
Example 12
Source File: WorkflowJobView.java From proarc with GNU General Public License v3.0 | 5 votes |
private DynamicForm createFilter() { DynamicForm form = new DynamicForm(); form.setBrowserSpellCheck(false); form.setValidateOnExit(true); form.setSaveOnEnter(true); form.setAutoHeight(); form.setWidth100(); form.setNumCols(3); // ???? return form; }
Example 13
Source File: WorkflowTasksView.java From proarc with GNU General Public License v3.0 | 5 votes |
private DynamicForm createFilter() { DynamicForm form = new DynamicForm(); form.setBrowserSpellCheck(false); form.setValidateOnExit(true); form.setSaveOnEnter(true); form.setAutoHeight(); form.setWidth100(); form.setNumCols(3); // ???? return form; }
Example 14
Source File: TwoFactorsAuthenticationPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
public TwoFactorsAuthenticationPanel(GUIUser user, boolean withNotify) { super(); this.user = user; DynamicForm form = new DynamicForm(); form.setWidth100(); form.setValuesManager(vm); form.setTitleOrientation(TitleOrientation.LEFT); notify = ItemFactory.newCheckbox("notify", "notifyuser"); notify.setValue(false); notify.setDisabled(true); SelectItem method = ItemFactory.new2AFMethodSelector("factor", user.getSecondFactor()); method.setWidth(250); method.addChangedHandler(new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { removeMember(setupPanel); if (event.getValue() == null || event.getValue().toString().isEmpty()) { setupPanel = new TwoFactorsAuthenticationSetup(); TwoFactorsAuthenticationPanel.this.user.setKey(null); TwoFactorsAuthenticationPanel.this.user.setSecondFactor(null); notify.setValue(false); notify.setDisabled(true); } else if (Constants.TWOFA_GOOGLE_AUTHENTICATOR.equals(event.getValue().toString())) { setupPanel = new GoogleAuthenticatorSetup(TwoFactorsAuthenticationPanel.this.user); notify.setValue(true); notify.setDisabled(false); } else if (Constants.TWOFA_YUBIKEY.equals(event.getValue().toString())) { setupPanel = new YubiKeySetup(TwoFactorsAuthenticationPanel.this.user); notify.setValue(false); notify.setDisabled(true); } addMember(setupPanel); } }); if (withNotify) form.setItems(method, notify); else form.setItems(method); setMembers(form); }
Example 15
Source File: AutomationTriggerProperties.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
private void refresh() { vm.clearValues(); vm.clearErrors(false); if (formsContainer.getMembers() != null) formsContainer.removeMembers(formsContainer.getMembers()); DynamicForm form2 = new DynamicForm(); form2.setWidth100(); form2.setTitleOrientation(TitleOrientation.TOP); form2.setValuesManager(vm); form2.setNumCols(1); final TextAreaItem automation = ItemFactory.newTextAreaItemForAutomation("automation", "automation", trigger.getAutomation(), changedHandler, false); automation.setStartRow(false); automation.setWidth("*"); automation.setDisabled(trigger.getRoutine()!=null); form2.setItems(automation); DynamicForm form1 = new DynamicForm(); form1.setNumCols(2); form1.setTitleOrientation(TitleOrientation.TOP); form1.setValuesManager(vm); form1.setHeight100(); SelectItem events = ItemFactory.newEventsSelector("events", I18N.message("triggeron"), changedHandler, true, true, true); events.setRowSpan(3); events.setValues(trigger.getEventsArray()); SpacerItem spacer = new SpacerItem(); spacer.setHeight(100); SelectItem routine = ItemFactory.newAutomationRoutineSelector("routine", trigger.getRoutine() != null ? trigger.getRoutine().getId() : null, changedHandler, true); routine.setEndRow(true); routine.addChangedHandler(changedHandler); ChangedHandler cngHandler = new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { if (event == null) { automation.setDisabled(false); } else { automation.setDisabled(event.getValue() != null && !event.getValue().toString().isEmpty()); } } }; routine.addChangedHandler(cngHandler); form1.setItems(events, folderSelector, routine, spacer); formsContainer.setMembers(form1, form2); }
Example 16
Source File: DigitalObjectSearchView.java From proarc with GNU General Public License v3.0 | 4 votes |
private DynamicForm createFilter() { DynamicForm form = new DynamicForm(); form.setBrowserSpellCheck(false); form.setValidateOnExit(true); form.setSaveOnEnter(true); form.setAutoHeight(); form.setWidth100(); form.setNumCols(6); final RadioGroupItem filterType = new RadioGroupItem(DigitalObjectResourceApi.SEARCH_TYPE_PARAM); filterType.setVertical(false); filterType.setShowTitle(false); filterType.setWrap(false); // setRedrawOnChange(true) enforces evaluation of other FormItem.setShowIfCondition filterType.setRedrawOnChange(true); filterType.setColSpan(5); final LinkedHashMap<String, String> filterMap = new LinkedHashMap<String, String>(); filterMap.put(FILTER_ALPHABETICAL, i18n.DigitalObjectSearchView_FilterGroupAlphabetical_Title()); filterMap.put(FILTER_LAST_CREATED, i18n.DigitalObjectSearchView_FilterGroupLastCreated_Title()); filterMap.put(FILTER_LAST_MODIFIED, i18n.DigitalObjectSearchView_FilterGroupLastModified_Title()); if (!Editor.getInstance().hasPermission("proarc.permission.repository.search.groupOwner")) { filterMap.put(FILTER_PHRASE, i18n.DigitalObjectSearchView_FilterGroupPhrase_Title()); } filterMap.put(FILTER_QUERY, i18n.DigitalObjectSearchView_FilterGroupAdvanced_Title()); if (Editor.getInstance().hasPermission("proarc.permission.admin")) { filterMap.put(FILTER_DELETED, i18n.DigitalObjectSearchView_FilterGroupDeleted_Title()); } filterType.setValueMap(filterMap); filterType.setValue(FILTER_LAST_CREATED); FormItemIfFunction showIfAdvanced = new StringMatchFunction(filterType, FILTER_QUERY, FILTER_DELETED); FormItemIfFunction showIfPhrase = new StringMatchFunction(filterType, FILTER_PHRASE); FormItemIfFunction showIfCreatedModifiedQuery = new StringMatchFunction(filterType, FILTER_LAST_CREATED, FILTER_LAST_MODIFIED, FILTER_QUERY, FILTER_DELETED, FILTER_ALPHABETICAL); FormItemIfFunction showIfAplhabetical = new StringMatchFunction(filterType, FILTER_LAST_CREATED, FILTER_LAST_MODIFIED, FILTER_ALPHABETICAL); final TextItem phrase = createAdvancedItem(DigitalObjectResourceApi.SEARCH_PHRASE_PARAM, i18n.DigitalObjectSearchView_FilterPhrase_Title(), showIfPhrase); phrase.setValidators(new RequiredIfValidator(new RequiredIfFunction() { @Override public boolean execute(FormItem formItem, Object value) { return FILTER_PHRASE.equals(filterType.getValueAsString()); } }), new LengthRangeValidator() {{ setMax(1000); }}); SubmitItem submit = new SubmitItem("search", i18n.DigitalObjectSearchView_FilterSearchButton_Title()); form.setFields(filterType, createSpacerItem("100%", null), phrase, createAdvancedItem(DigitalObjectResourceApi.SEARCH_QUERY_TITLE_PARAM, i18n.DigitalObjectSearchView_FilterAdvancedTitle_Title(), showIfAdvanced), createSpacerItem("100%", showIfAdvanced), createAdvancedItem(DigitalObjectResourceApi.SEARCH_QUERY_IDENTIFIER_PARAM, i18n.DigitalObjectSearchView_FilterAdvancedIdentifier_Title(), showIfAdvanced), createSpacerItem("100%", showIfAdvanced), createAdvancedItem(DigitalObjectResourceApi.SEARCH_QUERY_CREATOR_PARAM, i18n.DigitalObjectSearchView_FilterAdvancedCreator_Title(), showIfAdvanced), createSpacerItem("100%", showIfAdvanced), createAdvancedItem(DigitalObjectResourceApi.SEARCH_QUERY_LABEL_PARAM, i18n.DigitalObjectSearchView_FilterAdvancedLabel_Title(), showIfAdvanced), createSpacerItem("100%", showIfAdvanced), createAdvancedItem(DigitalObjectResourceApi.SEARCH_OWNER_PARAM, i18n.DigitalObjectSearchView_FilterAdvancedOwner_Title(), showIfAdvanced), createSpacerItem("100%", showIfAdvanced), createModelItem(i18n.DigitalObjectSearchView_FilterAdvancedModel_Title(), showIfCreatedModifiedQuery), createSortItem(i18n.DigitalObjectSearchView_FilterSort_Title(), showIfAplhabetical), createRememberModelItem(i18n.DigitalObjectSearchView_FilterAdvancedModel_Remember_Title(), showIfCreatedModifiedQuery), createSpacerItem("100%", showIfCreatedModifiedQuery), submit); form.addSubmitValuesHandler(new SubmitValuesHandler() { @Override public void onSubmitValues(SubmitValuesEvent event) { if (filters.validate(false)) { filter(); } } }); return form; }