com.smartgwt.client.types.MultipleAppearance Java Examples
The following examples show how to use
com.smartgwt.client.types.MultipleAppearance.
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: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
public static SelectItem newTemplateSelector(boolean withEmpty, Long selectedTemplateId) { SelectItem templateItem = new SelectItem("template", I18N.message("template")); templateItem.setDisplayField("name"); templateItem.setValueField("id"); templateItem.setWidth(150); templateItem.setMultiple(false); templateItem.setWrapTitle(false); templateItem.setMultipleAppearance(MultipleAppearance.PICKLIST); templateItem.setOptionDataSource(new TemplatesDS(withEmpty, selectedTemplateId, null)); if (!Feature.enabled(Feature.TEMPLATE)) templateItem.setDisabled(true); if (selectedTemplateId != null) templateItem.setValue(selectedTemplateId.toString()); return templateItem; }
Example #2
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
/** * Creates a select list with the barcode templates * * @param withEmpty id an empty row must be shown * @param filterTemplateId the document template id to filter the ocr * templates * @param selectedTemplateId identifier of the template to be selected by * default * * @return the item */ public static SelectItem newBarcodeTemplateSelector(boolean withEmpty, Long filterTemplateId, Long selectedTemplateId) { SelectItem templateItem = new SelectItem("barcodetemplate", I18N.message("barcodetemplate")); templateItem.setDisplayField("name"); templateItem.setValueField("id"); templateItem.setWidth(150); templateItem.setMultiple(false); templateItem.setWrapTitle(false); templateItem.setMultipleAppearance(MultipleAppearance.PICKLIST); templateItem.setOptionDataSource(new BarcodeTemplatesDS(withEmpty, filterTemplateId)); if (selectedTemplateId != null) templateItem.setValue(selectedTemplateId.toString()); return templateItem; }
Example #3
Source File: NewIssueEditor.java From proarc with GNU General Public License v3.0 | 6 votes |
private SelectItem createDayChooser(String fName) { SelectItem issueDays = new SelectItem(fName, i18n.NewIssueEditor_daysIncluded_Title()); issueDays.setTooltip(i18n.NewIssueEditor_daysIncluded_Hint()); issueDays.setWidth("*"); issueDays.setHeight(105); // issueDays.setMultiple(true); issueDays.setRequired(true); issueDays.setMultipleAppearance(MultipleAppearance.GRID); LinkedHashMap<Integer, String> weekMap = new LinkedHashMap<>(); weekMap.put(1, i18nSGwt.date_dayNames_2()); weekMap.put(2, i18nSGwt.date_dayNames_3()); weekMap.put(3, i18nSGwt.date_dayNames_4()); weekMap.put(4, i18nSGwt.date_dayNames_5()); weekMap.put(5, i18nSGwt.date_dayNames_6()); weekMap.put(6, i18nSGwt.date_dayNames_7()); weekMap.put(7, i18nSGwt.date_dayNames_1()); issueDays.setValueMap(weekMap); return issueDays; }
Example #4
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public static SelectItem newTagsMultiplePickList(String name, String title, TagsDS options, Object[] tags) { final SelectItem item = newSelectItem(name, title); item.setMultiple(true); item.setMultipleAppearance(MultipleAppearance.PICKLIST); item.setValueField("word"); item.setDisplayField("word"); item.setOptionDataSource(options); if (tags != null) item.setValue(tags); return item; }
Example #5
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 #6
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
/** * Creates a select list with the OCR templates * * @param withEmpty id an empty row must be shown * @param filterTemplateId the document template id to filter the ocr * templates * @param selectedTemplateId identifier of the template to be selected by * default * * @return the item */ public static SelectItem newOCRTemplateSelector(boolean withEmpty, Long filterTemplateId, Long selectedTemplateId) { SelectItem templateItem = new SelectItem("ocrtemplate", I18N.message("ocrtemplate")); templateItem.setDisplayField("name"); templateItem.setValueField("id"); templateItem.setWidth(150); templateItem.setMultiple(false); templateItem.setWrapTitle(false); templateItem.setMultipleAppearance(MultipleAppearance.PICKLIST); templateItem.setOptionDataSource(new OCRTemplatesDS(withEmpty, filterTemplateId)); if (selectedTemplateId != null) templateItem.setValue(selectedTemplateId.toString()); return templateItem; }
Example #7
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public static SelectItem newAttributeSetSelector() { final SelectItem selectItem = new SelectItem("attributeset", I18N.message("attributeset")); selectItem.setMultiple(false); selectItem.setMultipleAppearance(MultipleAppearance.PICKLIST); selectItem.setDisplayField("name"); selectItem.setValueField("id"); selectItem.setWidth(120); selectItem.setOptionDataSource(new AttributeSetsDS(false, GUIAttributeSet.TYPE_DEFAULT)); selectItem.setWrapTitle(false); return selectItem; }
Example #8
Source File: ItemFactory.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public static SelectItem newAttributesSelector() { final SelectItem selectItem = new SelectItem("attributes", I18N.message("attributes")); selectItem.setMultiple(true); selectItem.setMultipleAppearance(MultipleAppearance.PICKLIST); selectItem.setDisplayField("label"); selectItem.setValueField("name"); selectItem.setPickListWidth(150); selectItem.setOptionDataSource(new AttributesDS()); selectItem.setWrapTitle(false); return selectItem; }
Example #9
Source File: WorkflowTasksView.java From proarc with GNU General Public License v3.0 | 4 votes |
private SelectItem createMultiSelectColumnFilter() { SelectItem options = new SelectItem(); options.setMultiple(true); options.setMultipleAppearance(MultipleAppearance.PICKLIST); return options; }