Example usage for org.eclipse.jface.viewers.deferred LazySortedCollection LazySortedCollection

List of usage examples for org.eclipse.jface.viewers.deferred LazySortedCollection LazySortedCollection

Introduction

In this page you can find the example usage for org.eclipse.jface.viewers.deferred LazySortedCollection LazySortedCollection.

Prototype

public LazySortedCollection(Comparator c) 

Source Link

Document

Creates a new sorted collection using the given comparator to determine sort order.

Usage

From source file:org.polymap.core.data.ui.featuretable.DeferredFeatureContentProvider.java

License:Open Source License

DeferredFeatureContentProvider(FeatureTableViewer viewer, FeatureSource fs, Filter filter,
        Comparator sortOrder) {/*from  w  w w .j  a  v a 2  s  .c om*/
    super(sortOrder);
    this.viewer = viewer;
    this.fs = fs;
    this.filter = filter;
    this.tableForeground = this.viewer.getTable().getForeground();
    this.sortedElements = new LazySortedCollection(sortOrder);
}

From source file:org.polymap.core.data.ui.featuretable.DeferredFeatureContentProvider.java

License:Open Source License

public void setSortOrder(Comparator sortOrder) {
    this.sortedElements = new LazySortedCollection(sortOrder);
    super.setSortOrder(sortOrder);
}

From source file:org.polymap.rhei.table.DeferredFeatureContentProvider.java

License:Open Source License

@Override
public void sortContent(IFeatureTableColumn column, int dir) {
    Comparator<IFeatureTableElement> comparator = column.newComparator(dir);
    this.sortedElements = new LazySortedCollection(comparator);
    super.setSortOrder(comparator);
}