Java Code Examples for com.smartgwt.client.widgets.grid.ListGridField#setCanSort()
The following examples show how to use
com.smartgwt.client.widgets.grid.ListGridField#setCanSort() .
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: AliasesPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
@Override protected void onDraw() { ListGridField id = new ListGridField("id", I18N.message("id"), 50); id.setHidden(true); ListGridField name = new ListGridField("name", I18N.message("name"), 200); ListGridField path = new ListGridField("path", I18N.message("path")); ListGridField icon = new ListGridField("icon", " ", 20); icon.setType(ListGridFieldType.IMAGE); icon.setCanSort(false); icon.setAlign(Alignment.CENTER); icon.setShowDefaultContextMenu(false); icon.setImageURLPrefix(Util.imagePrefix()); icon.setImageURLSuffix(".png"); icon.setCanFilter(false); listGrid = new ListGrid(); listGrid.setEmptyMessage(I18N.message("notitemstoshow")); listGrid.setCanFreezeFields(true); listGrid.setAutoFetchData(true); dataSource = new FolderAliasesDS(folder.getId()); listGrid.setDataSource(dataSource); listGrid.setFields(id, icon, name, path); addMember(listGrid); listGrid.addDoubleClickHandler(new DoubleClickHandler() { @Override public void onDoubleClick(DoubleClickEvent event) { FolderNavigator.get().openFolder(listGrid.getSelectedRecord().getAttributeAsLong("id")); } }); }
Example 2
Source File: GUILanguagesPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
@Override public void onDraw() { ListGridField enabled = new ListGridField("eenabled", " ", 24); enabled.setType(ListGridFieldType.IMAGE); enabled.setCanSort(false); enabled.setAlign(Alignment.CENTER); enabled.setShowDefaultContextMenu(false); enabled.setImageURLPrefix(Util.imagePrefix()); enabled.setImageURLSuffix(".gif"); enabled.setCanFilter(false); ListGridField code = new ListGridField("code", I18N.message("code"), 80); code.setCanEdit(false); ListGridField name = new ListGridField("name", I18N.message("name")); name.setCanEdit(false); list = new ListGrid(); list.setEmptyMessage(I18N.message("notitemstoshow")); list.setCanEdit(false); list.setWidth100(); list.setHeight100(); list.setAutoFetchData(true); list.setDataSource(new LanguagesDS(true)); list.setSelectionType(SelectionStyle.SINGLE); list.setFields(enabled, code, name); addMember(list); if (Feature.enabled(Feature.GUI_LANGUAGES)) list.addCellContextClickHandler(new CellContextClickHandler() { @Override public void onCellContextClick(CellContextClickEvent event) { showContextMenu(); event.cancel(); } }); }
Example 3
Source File: AliasesPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
@Override protected void onDraw() { ListGridField id = new ListGridField("id", I18N.message("id"), 50); id.setHidden(true); ListGridField folderId = new ListGridField("folderId", I18N.message("id"), 50); folderId.setHidden(true); ListGridField filename = new ListGridField("filename", I18N.message("filename"), 200); filename.setHidden(true); ListGridField path = new ListGridField("path", I18N.message("path")); ListGridField icon = new ListGridField("icon", " ", 20); icon.setType(ListGridFieldType.IMAGE); icon.setCanSort(false); icon.setAlign(Alignment.CENTER); icon.setShowDefaultContextMenu(false); icon.setImageURLPrefix(Util.imagePrefix()); icon.setImageURLSuffix(".png"); icon.setCanFilter(false); listGrid = new ListGrid(); listGrid.setEmptyMessage(I18N.message("notitemstoshow")); listGrid.setCanFreezeFields(true); listGrid.setAutoFetchData(true); dataSource = new DocumentAliasesDS(document.getId()); listGrid.setDataSource(dataSource); listGrid.setFields(id, icon, filename, path, folderId); addMember(listGrid); listGrid.addDoubleClickHandler(new DoubleClickHandler() { @Override public void onDoubleClick(DoubleClickEvent event) { DocumentsPanel.get().openInFolder(listGrid.getSelectedRecord().getAttributeAsLong("folderId"), listGrid.getSelectedRecord().getAttributeAsLong("id")); } }); }
Example 4
Source File: SubscriptionsLayout.java From SensorWebClient with GNU General Public License v2.0 | 5 votes |
private void layoutDeleteRuleField(SubscriptionListGrid grid) { ListGridField deleteField = grid.getDeleteField(); deleteField.setWidth("15%"); deleteField.setAlign(CENTER); deleteField.setCanFilter(false); deleteField.setCanSort(false); }
Example 5
Source File: SubscriptionsLayout.java From SensorWebClient with GNU General Public License v2.0 | 5 votes |
private void layoutActivateRuleField(SubscriptionListGrid grid) { ListGridField activatedField = grid.getActivatedField(); activatedField.setWidth("15%"); activatedField.setAlign(CENTER); activatedField.setCanFilter(false); activatedField.setCanSort(false); }
Example 6
Source File: SearchIndexingPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
private Tab fillLanguagesTab() { Tab languagesTab = new Tab(I18N.message("languages")); Layout languagesTabPanel = new HLayout(); languagesTabPanel.setWidth100(); languagesTabPanel.setHeight100(); ListGridField enabled = new ListGridField("eenabled", " ", 24); enabled.setType(ListGridFieldType.IMAGE); enabled.setCanSort(false); enabled.setAlign(Alignment.CENTER); enabled.setShowDefaultContextMenu(false); enabled.setImageURLPrefix(Util.imagePrefix()); enabled.setImageURLSuffix(".gif"); enabled.setCanFilter(false); ListGridField code = new ListGridField("code", I18N.message("code"), 80); code.setCanEdit(false); ListGridField name = new ListGridField("name", I18N.message("name")); name.setCanEdit(false); langsList = new ListGrid(); langsList.setCanEdit(false); langsList.setWidth100(); langsList.setHeight100(); langsList.setAutoFetchData(true); langsList.setDataSource(new LanguagesDS(false)); langsList.setShowFilterEditor(true); langsList.setFilterOnKeypress(true); langsList.setSelectionType(SelectionStyle.SINGLE); langsList.setFields(enabled, code, name); languagesTabPanel.addMember(langsList); languagesTab.setPane(languagesTabPanel); if (Feature.enabled(Feature.INDEX_LANGUAGES)) langsList.addCellContextClickHandler(new CellContextClickHandler() { @Override public void onCellContextClick(CellContextClickEvent event) { showLanguagesMenu(); event.cancel(); } }); return languagesTab; }
Example 7
Source File: TrashPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
@Override public void onDraw() { ListGridField id = new ListGridField("id"); id.setHidden(true); ListGridField fileName = new ListGridField("filename", I18N.message("name")); fileName.setCanFilter(true); fileName.setWidth("*"); ListGridField icon = new ListGridField("icon", " ", 24); icon.setType(ListGridFieldType.IMAGE); icon.setCanSort(false); icon.setAlign(Alignment.CENTER); icon.setShowDefaultContextMenu(false); icon.setImageURLPrefix(Util.imagePrefix()); icon.setImageURLSuffix(".png"); icon.setCanFilter(false); ListGridField lastModified = new ListGridField("lastModified", I18N.message("lastmodified"), 110); lastModified.setAlign(Alignment.CENTER); lastModified.setType(ListGridFieldType.DATE); lastModified.setCellFormatter(new DateCellFormatter(false)); lastModified.setCanFilter(false); lastModified.setHidden(true); ListGridField customId = new ListGridField("customId", I18N.message("customid"), 110); customId.setType(ListGridFieldType.TEXT); customId.setCanFilter(true); customId.setHidden(true); list = new RefreshableListGrid(); list.setEmptyMessage(I18N.message("notitemstoshow")); list.setWidth100(); list.setHeight100(); list.setAutoFetchData(true); list.setFields(icon, fileName, customId, lastModified); list.setSelectionType(SelectionStyle.MULTIPLE); list.setDataSource(new GarbageDS()); list.setShowFilterEditor(true); list.setFilterOnKeypress(true); addMember(list); if (Session.get().getCurrentFolder() != null && Session.get().getCurrentFolder().isWrite()) list.addCellContextClickHandler(new CellContextClickHandler() { @Override public void onCellContextClick(CellContextClickEvent event) { showContextMenu(); event.cancel(); } }); }
Example 8
Source File: RunLevelPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
private SectionStack prepareAspectsTable() { ListGridField id = new ListGridField("id", I18N.message("aspect"), 300); id.setCanEdit(false); id.setCanSort(false); id.setAutoFitWidth(true); id.setCellFormatter(new CellFormatter() { @Override public String format(Object value, ListGridRecord record, int rowNum, int colNum) { return I18N.message("aspect." + record.getAttributeAsString("id")); } }); ListGridField _default = new ListGridField("default", I18N.message("default"), 60); _default.setType(ListGridFieldType.BOOLEAN); _default.setCanEdit(true); _default.setAutoFitWidth(true); _default.setCanSort(false); ListGridField bulkload = new ListGridField("bulkload", I18N.message("bulkload"), 60); bulkload.setType(ListGridFieldType.BOOLEAN); bulkload.setCanEdit(true); bulkload.setAutoFitWidth(true); bulkload.setCanSort(false); ListGridField slave = new ListGridField("slave", I18N.message("slave"), 60); slave.setType(ListGridFieldType.BOOLEAN); slave.setCanEdit(true); slave.setAutoFitWidth(true); slave.setCanSort(false); ListGridField devel = new ListGridField("devel", I18N.message("devel"), 60); devel.setType(ListGridFieldType.BOOLEAN); devel.setCanEdit(true); devel.setAutoFitWidth(true); devel.setCanSort(false); ListGridField demo = new ListGridField("demo", I18N.message("demo"), 60); demo.setType(ListGridFieldType.BOOLEAN); demo.setCanEdit(true); demo.setAutoFitWidth(true); demo.setCanSort(false); aspects = new ListGrid(); aspects.setEmptyMessage(I18N.message("notitemstoshow")); aspects.setCanFreezeFields(true); aspects.setAutoFetchData(true); aspects.setDataSource(new AspectsDS()); aspects.setFields(id, _default, bulkload, slave, devel, demo); aspects.setHeaderHeight(44); aspects.setHeaderSpans(new HeaderSpan(I18N.message("runlevels"), new String[] { "default", "bulkload", "slave", "devel", "demo" })); SectionStack stack = new SectionStack(); stack.setWidth100(); stack.setHeight100(); SectionStackSection section = new SectionStackSection(I18N.message("aspects")); section.setCanCollapse(false); section.setExpanded(true); section.setItems(aspects); stack.setSections(section); return stack; }