Java Code Examples for com.smartgwt.client.widgets.form.DynamicForm#setAutoHeight()
The following examples show how to use
com.smartgwt.client.widgets.form.DynamicForm#setAutoHeight() .
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: ExportAction.java From proarc with GNU General Public License v3.0 | 6 votes |
private final DynamicForm createOptionsForm() { DynamicForm f = new DynamicForm(); f.setAutoHeight(); f.setLayoutAlign(Alignment.CENTER); f.setWidth(350); formItems = createExportFormOptions(); if (formItems == null || formItems.isEmpty()) { return null; } FormItem fields[] = new FormItem[formItems.size()]; for (int i = 0; i < formItems.size(); i++) { fields[i] = formItems.get(i); formItems.get(i); } f.setFields(fields); return f; }
Example 2
Source File: DigitalObjectChildrenEditor.java From proarc with GNU General Public License v3.0 | 6 votes |
private DynamicForm createParamsForm() { ClientMessages i18n = GWT.create(ClientMessages.class); DynamicForm f = new DynamicForm(); f.setAutoHeight(); TextItem newPid = new TextItem(DigitalObjectDataSource.FIELD_PID); newPid.setTitle(i18n.NewDigObject_OptionPid_Title()); newPid.setTooltip(i18n.NewDigObject_OptionPid_Hint()); newPid.setRequired(true); newPid.setLength(36 + 5); newPid.setWidth((36 + 5) * 8); newPid.setValidators(new CustomUUIDValidator(i18n)); f.setFields(newPid); f.setAutoFocus(true); return f; }
Example 3
Source File: CopyPageMetadataWidget.java From proarc with GNU General Public License v3.0 | 6 votes |
private DynamicForm createForm() { DynamicForm form = new DynamicForm(); form.setWrapItemTitles(false); // form.setAutoWidth(); form.setAutoHeight(); form.setBrowserSpellCheck(false); allowPageIndexes = new CheckboxItem("fillPageIndexes", i18n.PageMetadataEditor_CheckboxPageIndices_Title()); allowPageIndexes.setStartRow(true); allowPageIndexes.setColSpan("*"); allowPageIndexes.setShowTitle(false); allowPageNumbers = new CheckboxItem("fillPageNumbers", i18n.PageMetadataEditor_CheckboxPageNubers_Title()); allowPageNumbers.setStartRow(true); allowPageNumbers.setColSpan("*"); allowPageNumbers.setShowTitle(false); allowPageTypes = new CheckboxItem("fillPageTypes", i18n.PageMetadataEditor_CheckboxPageTypes_Title()); allowPageTypes.setStartRow(true); allowPageTypes.setColSpan("*"); allowPageTypes.setShowTitle(false); form.setFields(allowPageTypes, allowPageIndexes, allowPageNumbers); return form; }
Example 4
Source File: DigitalObjectDataSource.java From proarc with GNU General Public License v3.0 | 5 votes |
public static DynamicForm createDeleteOptionsForm() { if (!Editor.getInstance().hasPermission("proarc.permission.admin")) { return null; } ClientMessages i18n = GWT.create(ClientMessages.class); DynamicForm f = new DynamicForm(); BooleanItem opPermanently = new BooleanItem(DigitalObjectResourceApi.DELETE_PURGE_PARAM, i18n.DigitalObjectDeleteAction_OptionPermanently_Title()); opPermanently.setTooltip(i18n.DigitalObjectDeleteAction_OptionPermanently_Hint()); f.setFields(opPermanently); f.setAutoHeight(); return f; }
Example 5
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 6
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 7
Source File: PageMetadataEditor.java From proarc with GNU General Public License v3.0 | 5 votes |
private DynamicForm createForm() { DynamicForm form = new DynamicForm(); form.setWrapItemTitles(false); // form.setAutoWidth(); form.setAutoHeight(); form.setBrowserSpellCheck(false); form.setSaveOnEnter(true); form.addSubmitValuesHandler(formSubmitHandler); return form; }
Example 8
Source File: TreeExpandAction.java From proarc with GNU General Public License v3.0 | 4 votes |
private DynamicForm createExpandOptionsForm() { DynamicForm f = new DynamicForm(); f.setAutoHeight(); return f; }
Example 9
Source File: MediaEditor.java From proarc with GNU General Public License v3.0 | 4 votes |
private static DynamicForm createExpandOptionsForm() { DynamicForm f = new DynamicForm(); f.setAutoHeight(); return f; }
Example 10
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; }