com.smartgwt.client.types.SortDirection Java Examples
The following examples show how to use
com.smartgwt.client.types.SortDirection.
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: EventsWindow.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public void addEvent(GUIEvent event) { ListGridRecord record = new ListGridRecord(); record.setAttribute("date", event.getDate()); record.setAttribute("detail", event.getDetail()); record.setAttribute("severity", event.getSeverity()); record.setAttribute("severityLabel", I18N.message(event.getSeverity())); grid.addData(record); grid.sort("date", SortDirection.DESCENDING); }
Example #2
Source File: WorkflowJobView.java From proarc with GNU General Public License v3.0 | 4 votes |
private ListGrid createSubjobList() { ListGrid g = new ListGrid(); subjobGrid = g; subjobsPersistance = new ListGridPersistance("WorkflowJobView.subjobList", g); CanvasSizePersistence sizePersistence = new CanvasSizePersistence("WorkflowJobView.subjobList", g); g.setHeight(sizePersistence.getHeight()); g.setSelectionType(SelectionStyle.SINGLE); g.setCanGroupBy(false); g.setDataFetchMode(FetchMode.BASIC); g.setDataSource(WorkflowJobDataSource.getInstance(), new ListGridField(WorkflowJobDataSource.FIELD_LABEL), new ListGridField(WorkflowJobDataSource.FIELD_ID, 30), new ListGridField(WorkflowJobDataSource.FIELD_STATE, 50), new ListGridField(WorkflowJobDataSource.FIELD_PROFILE_ID, 80), new ListGridField(WorkflowJobDataSource.FIELD_OWNER, 50), new ListGridField(WorkflowJobDataSource.FIELD_PRIORITY, 60), new ListGridField(WorkflowJobDataSource.FIELD_CREATED, 100), new ListGridField(WorkflowJobDataSource.FIELD_MODIFIED, 100), new ListGridField(WorkflowJobDataSource.FIELD_FINANCED, 100), new ListGridField(WorkflowJobDataSource.FIELD_MBARCODE, 60), new ListGridField(WorkflowJobDataSource.FIELD_MDETAIL, 100), new ListGridField(WorkflowJobDataSource.FIELD_MFIELD001, 60), new ListGridField(WorkflowJobDataSource.FIELD_MISSUE, 60), new ListGridField(WorkflowJobDataSource.FIELD_MSIGLA, 60), new ListGridField(WorkflowJobDataSource.FIELD_MSIGNATURE, 60), new ListGridField(WorkflowJobDataSource.FIELD_MVOLUME, 60), new ListGridField(WorkflowJobDataSource.FIELD_MYEAR, 60), new ListGridField(WorkflowJobDataSource.FIELD_NOTE) ); g.setSortField(WorkflowJobDataSource.FIELD_CREATED); g.setSortDirection(SortDirection.ASCENDING); SelectItem profileFilter = new SelectItem(); profileFilter.setOptionDataSource(WorkflowProfileDataSource.getInstance()); profileFilter.setValueField(WorkflowProfileDataSource.FIELD_ID); profileFilter.setDisplayField(WorkflowProfileDataSource.FIELD_LABEL); g.getField(WorkflowJobDataSource.FIELD_PROFILE_ID).setFilterEditorProperties(profileFilter); SelectItem owner = new SelectItem(); owner.setOptionDataSource(UserDataSource.getInstance()); owner.setValueField(UserDataSource.FIELD_ID); owner.setDisplayField(UserDataSource.FIELD_USERNAME); g.getField(WorkflowJobDataSource.FIELD_OWNER).setFilterEditorProperties(owner); g.addSelectionUpdatedHandler((SelectionUpdatedEvent event) -> { if (!ignoreSubjobSelection) { editSubjobSelection(); } ignoreSubjobSelection = false; }); return g; }