Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk Fauth2023-03-06 06:50:53 +0000
committerDirk Fauth2023-03-06 06:50:53 +0000
commit03219eefbd4e46e3f4e6ccdef378fc2936d10913 (patch)
treed3fe797469417fd0ad9cbf50feac52e96f54b5e3
parent4986d10f43c694be7b7bb342e9cab9a24260a9fa (diff)
downloadorg.eclipse.nebula.widgets.nattable-03219eefbd4e46e3f4e6ccdef378fc2936d10913.tar.gz
org.eclipse.nebula.widgets.nattable-03219eefbd4e46e3f4e6ccdef378fc2936d10913.tar.xz
org.eclipse.nebula.widgets.nattable-03219eefbd4e46e3f4e6ccdef378fc2936d10913.zip
Bug 581620 - Reapply combobox filter states on different collections
Simplification of the API. Setting the FilterRowComboBoxDataProvider is sufficient for configuring the inverted persistence. A boolean flag is not necessary and does not give an additional benefit. Signed-off-by: Dirk Fauth <dirk.fauth@googlemail.com> Change-Id: I61f7d445510f00c7f2ecfc4f756851bb22efc463
-rw-r--r--org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/filterrow/FilterRowDataProvider.java56
-rw-r--r--org.eclipse.nebula.widgets.nattable.examples/src/org/eclipse/nebula/widgets/nattable/examples/_800_Integration/_818_SortableAllFilterPerformanceColumnGroupExample.java240
-rw-r--r--org.eclipse.nebula.widgets.nattable.extension.glazedlists.test/src/org/eclipse/nebula/widgets/nattable/extension/glazedlists/filterrow/FilterRowDataProviderTest.java8
3 files changed, 164 insertions, 140 deletions
diff --git a/org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/filterrow/FilterRowDataProvider.java b/org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/filterrow/FilterRowDataProvider.java
index 7493d31a..60236e50 100644
--- a/org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/filterrow/FilterRowDataProvider.java
+++ b/org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/filterrow/FilterRowDataProvider.java
@@ -129,21 +129,11 @@ public class FilterRowDataProvider<T> implements IDataProvider, IPersistable {
private Map<Integer, Object> filterIndexToObjectMap = new HashMap<>();
/**
- * Flag to configure how filter collections are persisted. By default the
- * values in the collection are persisted as is. In case of Excel like
- * filters, it can be more feasible to store which values are NOT selected,
- * to be able to load the filter even for different values in the filter
- * list.
- *
- * @see #filterRowComboBoxDataProvider
- *
- * @since 2.1
- */
- private boolean invertCollectionPersistence = false;
-
- /**
- * The FilterRowComboBoxDataProvider that is needed to be able to support
- * inverted persistence of filter collections.
+ * The {@link FilterRowComboBoxDataProvider} that is needed to support
+ * inverted persistence of filter collections. By default the values in the
+ * collection are persisted as is. In case of Excel like filters, it can be
+ * more feasible to store which values are NOT selected, to be able to load
+ * the filter even for different values in the filter list.
*
* @see FilterRowDataProvider#invertCollectionPersistence
*
@@ -333,7 +323,7 @@ public class FilterRowDataProvider<T> implements IDataProvider, IPersistable {
builder.append("["); //$NON-NLS-1$
Collection<?> filterCollection = (Collection<?>) filterValue;
- if (!this.invertCollectionPersistence) {
+ if (this.filterRowComboBoxDataProvider == null) {
for (Iterator<?> iterator = filterCollection.iterator(); iterator.hasNext();) {
Object filterObject = iterator.next();
String displayValue = (String) converter.canonicalToDisplayValue(
@@ -436,7 +426,7 @@ public class FilterRowDataProvider<T> implements IDataProvider, IPersistable {
}
}
- if (this.invertCollectionPersistence) {
+ if (this.filterRowComboBoxDataProvider != null) {
if (filterCollection.isEmpty()) {
return EditConstants.SELECT_ALL_ITEMS_VALUE;
}
@@ -477,32 +467,18 @@ public class FilterRowDataProvider<T> implements IDataProvider, IPersistable {
/**
*
- * @return <code>true</code> if filter collections are persisted in an
- * inverted way, which means the values that are <b>NOT</b> selected
- * in the combo are persisted. By default this configuration is set
- * to <code>false</code> which means values in the collection are
- * persisted as is.
- *
- * @since 2.1
- */
- public boolean isInvertCollectionPersistence() {
- return this.invertCollectionPersistence;
- }
-
- /**
- *
- * @param invertCollectionPersistence
- * <code>true</code> if filter collections should be persisted in
- * an inverted way, which means the values that are <b>NOT</b>
- * selected in the combo are persisted.
+ * @param comboBoxDataProvider
+ * The {@link FilterRowComboBoxDataProvider} that should be used
+ * to support inverted persistence of filter collections. By
+ * default the values in the collection are persisted as is. In
+ * case of Excel like filters, it can be more feasible to store
+ * which values are NOT selected, to be able to load the filter
+ * even for different values in the filter list. Passing
+ * <code>null</code> will result in the default persistence.
*
* @since 2.1
*/
- public void setInvertCollectionPersistence(boolean invertCollectionPersistence, FilterRowComboBoxDataProvider<T> comboBoxDataProvider) {
- if (invertCollectionPersistence && comboBoxDataProvider == null) {
- throw new IllegalArgumentException("Can only invert the collection persistence if the FilterRowComboBoxDataProvider is provided"); //$NON-NLS-1$
- }
- this.invertCollectionPersistence = invertCollectionPersistence;
+ public void setFilterRowComboBoxDataProvider(FilterRowComboBoxDataProvider<T> comboBoxDataProvider) {
this.filterRowComboBoxDataProvider = comboBoxDataProvider;
}
diff --git a/org.eclipse.nebula.widgets.nattable.examples/src/org/eclipse/nebula/widgets/nattable/examples/_800_Integration/_818_SortableAllFilterPerformanceColumnGroupExample.java b/org.eclipse.nebula.widgets.nattable.examples/src/org/eclipse/nebula/widgets/nattable/examples/_800_Integration/_818_SortableAllFilterPerformanceColumnGroupExample.java
index c76cf174..2d5662fb 100644
--- a/org.eclipse.nebula.widgets.nattable.examples/src/org/eclipse/nebula/widgets/nattable/examples/_800_Integration/_818_SortableAllFilterPerformanceColumnGroupExample.java
+++ b/org.eclipse.nebula.widgets.nattable.examples/src/org/eclipse/nebula/widgets/nattable/examples/_800_Integration/_818_SortableAllFilterPerformanceColumnGroupExample.java
@@ -49,10 +49,10 @@ import org.eclipse.nebula.widgets.nattable.data.convert.DefaultIntegerDisplayCon
import org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter;
import org.eclipse.nebula.widgets.nattable.dataset.person.Address;
import org.eclipse.nebula.widgets.nattable.dataset.person.DataModelConstants;
+import org.eclipse.nebula.widgets.nattable.dataset.person.ExtendedPersonWithAddress;
import org.eclipse.nebula.widgets.nattable.dataset.person.Person;
import org.eclipse.nebula.widgets.nattable.dataset.person.Person.Gender;
import org.eclipse.nebula.widgets.nattable.dataset.person.PersonService;
-import org.eclipse.nebula.widgets.nattable.dataset.person.PersonWithAddress;
import org.eclipse.nebula.widgets.nattable.edit.EditConfigAttributes;
import org.eclipse.nebula.widgets.nattable.edit.editor.CheckBoxCellEditor;
import org.eclipse.nebula.widgets.nattable.edit.editor.ComboBoxCellEditor;
@@ -170,9 +170,9 @@ public class _818_SortableAllFilterPerformanceColumnGroupExample extends Abstrac
private ArrayList<Serializable> filterExcludes = new ArrayList<>();
- private List<PersonWithAddress> mixedPersons = PersonService.getPersonsWithAddress(1000);
- // private List<PersonWithAddress> mixedPersons = createPersons(0);
- private List<PersonWithAddress> alternativePersons = createAlternativePersons();
+ private List<ExtendedPersonWithAddress> mixedPersons = PersonService.getExtendedPersonsWithAddress(1000);
+ // private List<ExtendedPersonWithAddress> mixedPersons = createPersons(0);
+ private List<ExtendedPersonWithAddress> alternativePersons = createAlternativePersons();
private AtomicBoolean alternativePersonsActive = new AtomicBoolean(false);
@@ -213,7 +213,8 @@ public class _818_SortableAllFilterPerformanceColumnGroupExample extends Abstrac
"address.street",
"address.housenumber",
"address.postalCode",
- "address.city" };
+ "address.city",
+ "age", "money", "description", "favouriteFood", "favouriteDrinks" };
// mapping from property to label, needed for column header labels
Map<String, String> propertyToLabelMap = new HashMap<>();
@@ -226,13 +227,18 @@ public class _818_SortableAllFilterPerformanceColumnGroupExample extends Abstrac
propertyToLabelMap.put("address.housenumber", "Housenumber");
propertyToLabelMap.put("address.postalCode", "Postal Code");
propertyToLabelMap.put("address.city", "City");
+ propertyToLabelMap.put("age", "Age");
+ propertyToLabelMap.put("money", "Money");
+ propertyToLabelMap.put("description", "Description");
+ propertyToLabelMap.put("favouriteFood", "Food");
+ propertyToLabelMap.put("favouriteDrinks", "Drinks");
- IColumnPropertyAccessor<PersonWithAddress> columnPropertyAccessor =
+ IColumnPropertyAccessor<ExtendedPersonWithAddress> columnPropertyAccessor =
new ExtendedReflectiveColumnPropertyAccessor<>(propertyNames);
- IRowIdAccessor<PersonWithAddress> rowIdAccessor = PersonWithAddress::getId;
+ IRowIdAccessor<ExtendedPersonWithAddress> rowIdAccessor = ExtendedPersonWithAddress::getId;
- final BodyLayerStack<PersonWithAddress> bodyLayerStack =
+ final BodyLayerStack<ExtendedPersonWithAddress> bodyLayerStack =
new BodyLayerStack<>(
this.mixedPersons,
columnPropertyAccessor);
@@ -246,8 +252,8 @@ public class _818_SortableAllFilterPerformanceColumnGroupExample extends Abstrac
bodyLayerStack.getBodyDataLayer().setDataValue(2, 5, null);
// build the column header layer
- ColumnHeaderLayerStack<PersonWithAddress> columnHeaderLayerStack =
- new ColumnHeaderLayerStack<PersonWithAddress>(
+ ColumnHeaderLayerStack<ExtendedPersonWithAddress> columnHeaderLayerStack =
+ new ColumnHeaderLayerStack<ExtendedPersonWithAddress>(
propertyNames,
propertyToLabelMap,
columnPropertyAccessor,
@@ -343,7 +349,8 @@ public class _818_SortableAllFilterPerformanceColumnGroupExample extends Abstrac
.withAutoResizeSelectedColumnsMenuItem()
.withColumnStyleEditor()
.withColumnRenameDialog()
- .withClearAllFilters();
+ .withClearAllFilters()
+ .withFreezeColumnMenuItem();
}
});
@@ -366,7 +373,7 @@ public class _818_SortableAllFilterPerformanceColumnGroupExample extends Abstrac
});
// body menu configuration
- natTable.addConfiguration(new BodyMenuConfiguration<PersonWithAddress>(
+ natTable.addConfiguration(new BodyMenuConfiguration<ExtendedPersonWithAddress>(
natTable,
bodyLayerStack,
rowIdAccessor,
@@ -519,8 +526,9 @@ public class _818_SortableAllFilterPerformanceColumnGroupExample extends Abstrac
address.setHousenumber(42);
address.setPostalCode(12345);
address.setCity("In the clouds");
- PersonWithAddress person = new PersonWithAddress(42, "Ralph",
- "Wiggum", Gender.MALE, false, new Date(), address);
+ ExtendedPersonWithAddress person = new ExtendedPersonWithAddress(42, "Ralph",
+ "Wiggum", Gender.MALE, false, new Date(), address,
+ "password", "I am Ralph", 0.00, Arrays.asList("Chocolate", "Booger"), Arrays.asList("Saft"));
bodyLayerStack.getFilterList().add(person);
@@ -625,14 +633,14 @@ public class _818_SortableAllFilterPerformanceColumnGroupExample extends Abstrac
* @param themeConfiguration
*/
private void configureFilterExcludes(
- IRowIdAccessor<PersonWithAddress> rowIdAccessor,
- ComboBoxGlazedListsWithExcludeFilterStrategy<PersonWithAddress> filterStrategy,
- BodyLayerStack<PersonWithAddress> bodyLayerStack,
+ IRowIdAccessor<ExtendedPersonWithAddress> rowIdAccessor,
+ ComboBoxGlazedListsWithExcludeFilterStrategy<ExtendedPersonWithAddress> filterStrategy,
+ BodyLayerStack<ExtendedPersonWithAddress> bodyLayerStack,
ThemeConfiguration themeConfiguration) {
// register the Matcher to the
// ComboBoxGlazedListsWithExcludeFilterStrategy
- Matcher<PersonWithAddress> idMatcher = item -> _818_SortableAllFilterPerformanceColumnGroupExample.this.filterExcludes.contains(rowIdAccessor.getRowId(item));
+ Matcher<ExtendedPersonWithAddress> idMatcher = item -> _818_SortableAllFilterPerformanceColumnGroupExample.this.filterExcludes.contains(rowIdAccessor.getRowId(item));
filterStrategy.addExcludeFilter(idMatcher);
// register the IConfigLabelAccumulator to the body DataLayer
@@ -680,17 +688,17 @@ public class _818_SortableAllFilterPerformanceColumnGroupExample extends Abstrac
*/
private void configureSingleFieldFilter(
Text input,
- ComboBoxGlazedListsWithExcludeFilterStrategy<PersonWithAddress> filterStrategy,
- BodyLayerStack<PersonWithAddress> bodyLayerStack,
+ ComboBoxGlazedListsWithExcludeFilterStrategy<ExtendedPersonWithAddress> filterStrategy,
+ BodyLayerStack<ExtendedPersonWithAddress> bodyLayerStack,
ThemeConfiguration themeConfiguration,
NatTable natTable,
ILayer columnHeaderLayer) {
// define a TextMatcherEditor and add it as static filter
- TextMatcherEditor<PersonWithAddress> matcherEditor = new TextMatcherEditor<>(new TextFilterator<PersonWithAddress>() {
+ TextMatcherEditor<ExtendedPersonWithAddress> matcherEditor = new TextMatcherEditor<>(new TextFilterator<ExtendedPersonWithAddress>() {
@Override
- public void getFilterStrings(List<String> baseList, PersonWithAddress element) {
+ public void getFilterStrings(List<String> baseList, ExtendedPersonWithAddress element) {
// add all values that should be included in filtering
// Note:
// if special converters are involved in rendering,
@@ -908,7 +916,7 @@ public class _818_SortableAllFilterPerformanceColumnGroupExample extends Abstrac
columnPropertyAccessor);
this.filterRowComboBoxDataProvider.setDistinctNullAndEmpty(true);
this.filterRowComboBoxDataProvider.setCachingEnabled(true);
-// this.filterRowComboBoxDataProvider.disableUpdateEvents();
+ // this.filterRowComboBoxDataProvider.disableUpdateEvents();
this.filterStrategy =
new ComboBoxGlazedListsWithExcludeFilterStrategy<>(
@@ -944,6 +952,11 @@ public class _818_SortableAllFilterPerformanceColumnGroupExample extends Abstrac
// ComboBoxFilterRowHeaderComposite
this.filterRowHeaderLayer.addConfiguration(new FilterRowConfiguration());
+ this.filterRowHeaderLayer
+ .getFilterRowDataLayer()
+ .getFilterRowDataProvider()
+ .setFilterRowComboBoxDataProvider(this.filterRowComboBoxDataProvider);
+
setUnderlyingLayer(this.filterRowHeaderLayer);
}
@@ -988,7 +1001,8 @@ public class _818_SortableAllFilterPerformanceColumnGroupExample extends Abstrac
}
/**
- * The configuration to enable editing of {@link PersonWithAddress} objects.
+ * The configuration to enable editing of {@link ExtendedPersonWithAddress}
+ * objects.
*/
class EditConfiguration extends AbstractRegistryConfiguration {
@@ -1606,8 +1620,8 @@ public class _818_SortableAllFilterPerformanceColumnGroupExample extends Abstrac
}
}
- private List<PersonWithAddress> createAlternativePersons() {
- List<PersonWithAddress> result = new ArrayList<>();
+ private List<ExtendedPersonWithAddress> createAlternativePersons() {
+ List<ExtendedPersonWithAddress> result = new ArrayList<>();
for (int i = 0; i < 100; i++) {
Address address = new Address();
@@ -1615,15 +1629,18 @@ public class _818_SortableAllFilterPerformanceColumnGroupExample extends Abstrac
address.setHousenumber(732);
address.setPostalCode(54321);
address.setCity("Springfield");
- result.add(new PersonWithAddress(i,
+ result.add(new ExtendedPersonWithAddress(i,
"Ralph", "Wiggum", Gender.MALE, false, new Date(),
- address));
- result.add(new PersonWithAddress(i,
+ address,
+ "password", "I am Ralph", 0.00, Arrays.asList("Chocolate", "Booger"), Arrays.asList("Saft")));
+ result.add(new ExtendedPersonWithAddress(i,
"Clancy", "Wiggum", Gender.MALE, true, new Date(),
- address));
- result.add(new PersonWithAddress(i,
+ address,
+ "password", "Stop Police", 0.00, Arrays.asList("Donuts", "Burger", "Hot Dogs"), Arrays.asList("Milk", "Juice", "Lemonade")));
+ result.add(new ExtendedPersonWithAddress(i,
"Sarah", "Wiggum", Gender.FEMALE, true, new Date(),
- address));
+ address,
+ "password", "Where is Ralphie", 0.00, Arrays.asList("Salad", "Veggie"), Arrays.asList("Water")));
}
for (int i = 400; i < 500; i++) {
@@ -1632,16 +1649,17 @@ public class _818_SortableAllFilterPerformanceColumnGroupExample extends Abstrac
address.setHousenumber(19);
address.setPostalCode(54321);
address.setCity("Springfield");
- result.add(new PersonWithAddress(i,
+ result.add(new ExtendedPersonWithAddress(i,
"Nelson", "Muntz", Gender.MALE, false, new Date(),
- address));
+ address,
+ "GotCha", "Ha Ha", 0.00, Arrays.asList("Fish", "Cheese"), Arrays.asList("Water, Whiskey")));
}
return result;
}
- private static List<PersonWithAddress> createPersons(int startId) {
- List<PersonWithAddress> result = new ArrayList<>();
+ private static List<ExtendedPersonWithAddress> createPersons(int startId) {
+ List<ExtendedPersonWithAddress> result = new ArrayList<>();
Address evergreen = new Address();
evergreen.setStreet("Evergreen Terrace");
@@ -1661,101 +1679,131 @@ public class _818_SortableAllFilterPerformanceColumnGroupExample extends Abstrac
main.setPostalCode(33333);
main.setCity("Ogdenville");
- result.add(new PersonWithAddress(
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 1, "Homer", "Simpson", Gender.MALE, true, new Date()),
- evergreen));
- result.add(new PersonWithAddress(
+ evergreen,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 2, "Homer", "Simpson", Gender.MALE, true, new Date()),
- evergreen));
- result.add(new PersonWithAddress(
+ evergreen,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 3, "Marge", "Simpson", Gender.FEMALE, true, new Date()),
- evergreen));
- result.add(new PersonWithAddress(
+ evergreen,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 4, "Marge", "Simpson", Gender.FEMALE, true, new Date()),
- evergreen));
- result.add(new PersonWithAddress(
+ evergreen,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 5, "Marge", "Simpson", Gender.FEMALE, true, new Date(), null),
- evergreen));
- result.add(new PersonWithAddress(
+ evergreen,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 6, "Ned", null, Gender.MALE, true, new Date()),
- evergreen));
- result.add(new PersonWithAddress(
+ evergreen,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 7, "Maude", null, Gender.FEMALE, true, new Date()),
- evergreen));
+ evergreen,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
- result.add(new PersonWithAddress(
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 8, "Homer", "Simpson", Gender.MALE, true, new Date()),
- south));
- result.add(new PersonWithAddress(
+ south,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 9, "Homer", "Simpson", Gender.MALE, true, new Date()),
- south));
- result.add(new PersonWithAddress(
+ south,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 10, "Homer", "Simpson", Gender.MALE, true, new Date()),
- south));
- result.add(new PersonWithAddress(
+ south,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 11, "Bart", "Simpson", Gender.MALE, false, new Date()),
- south));
- result.add(new PersonWithAddress(
+ south,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 12, "Bart", "Simpson", Gender.MALE, false, new Date()),
- south));
- result.add(new PersonWithAddress(
+ south,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 13, "Bart", "Simpson", Gender.MALE, false, new Date()),
- south));
- result.add(new PersonWithAddress(
+ south,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 14, "Marge", "Simpson", Gender.FEMALE, true, new Date()),
- south));
- result.add(new PersonWithAddress(
+ south,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 15, "Marge", "Simpson", Gender.FEMALE, true, new Date()),
- south));
- result.add(new PersonWithAddress(
+ south,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 16, "Lisa", "Simpson", Gender.FEMALE, false, new Date()),
- south));
- result.add(new PersonWithAddress(
+ south,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 17, "Lisa", "Simpson", Gender.FEMALE, false, new Date()),
- south));
+ south,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
- result.add(new PersonWithAddress(
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 18, "Ned", "Flanders", Gender.MALE, true, new Date()),
- evergreen));
- result.add(new PersonWithAddress(
+ evergreen,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 19, "Ned", "Flanders", Gender.MALE, true, new Date()),
- evergreen));
- result.add(new PersonWithAddress(
+ evergreen,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 20, "Maude", "Flanders", Gender.FEMALE, true, new Date()),
- evergreen));
- result.add(new PersonWithAddress(
+ evergreen,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 21, "Maude", "Flanders", Gender.FEMALE, true, new Date()),
- evergreen));
- result.add(new PersonWithAddress(
+ evergreen,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 22, "Rod", "Flanders", Gender.MALE, false, new Date()),
- evergreen));
- result.add(new PersonWithAddress(
+ evergreen,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 23, "Rod", "Flanders", Gender.MALE, false, new Date()),
- evergreen));
- result.add(new PersonWithAddress(
+ evergreen,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 24, "Tod", "Flanders", Gender.MALE, false, new Date()),
- evergreen));
- result.add(new PersonWithAddress(
+ evergreen,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 25, "Tod", "Flanders", Gender.MALE, false, new Date()),
- evergreen));
+ evergreen,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
- result.add(new PersonWithAddress(
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 26, "Lenny", "Leonard", Gender.MALE, false, new Date()),
- main));
- result.add(new PersonWithAddress(
+ main,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 27, "Lenny", "Leonard", Gender.MALE, false, new Date()),
- main));
+ main,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
- result.add(new PersonWithAddress(
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 28, "Carl", "Carlson", Gender.MALE, false, new Date()),
- main));
- result.add(new PersonWithAddress(
+ main,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 29, "Carl", "Carlson", Gender.MALE, false, new Date()),
- main));
+ main,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
- result.add(new PersonWithAddress(
+ result.add(new ExtendedPersonWithAddress(
new Person(startId + 30, "Timothy", "Lovejoy", Gender.MALE, false, new Date()),
- main));
+ main,
+ "password", "Dough", 0.00, Arrays.asList("Burger", "Fries", "Donuts"), Arrays.asList("Beer")));
return result;
}
diff --git a/org.eclipse.nebula.widgets.nattable.extension.glazedlists.test/src/org/eclipse/nebula/widgets/nattable/extension/glazedlists/filterrow/FilterRowDataProviderTest.java b/org.eclipse.nebula.widgets.nattable.extension.glazedlists.test/src/org/eclipse/nebula/widgets/nattable/extension/glazedlists/filterrow/FilterRowDataProviderTest.java
index 0dcc01d8..e4ad1445 100644
--- a/org.eclipse.nebula.widgets.nattable.extension.glazedlists.test/src/org/eclipse/nebula/widgets/nattable/extension/glazedlists/filterrow/FilterRowDataProviderTest.java
+++ b/org.eclipse.nebula.widgets.nattable.extension.glazedlists.test/src/org/eclipse/nebula/widgets/nattable/extension/glazedlists/filterrow/FilterRowDataProviderTest.java
@@ -431,7 +431,7 @@ public class FilterRowDataProviderTest {
new DataLayer(new ListDataProvider<>(this.filterList, this.columnAccessor)),
this.baseList,
this.columnAccessor);
- this.dataProvider.setInvertCollectionPersistence(true, cbdp);
+ this.dataProvider.setFilterRowComboBoxDataProvider(cbdp);
// set filter to filter out AAA and aaa
this.dataProvider.setDataValue(2, 1, new ArrayList<>(Arrays.asList("A-", "AA", "B", "B-", "BB", "C", "a", "aa")));
@@ -467,7 +467,7 @@ public class FilterRowDataProviderTest {
new DataLayer(new ListDataProvider<>(this.filterList, this.columnAccessor)),
this.baseList,
this.columnAccessor);
- this.dataProvider.setInvertCollectionPersistence(true, cbdp);
+ this.dataProvider.setFilterRowComboBoxDataProvider(cbdp);
// set filter to select all, which means nothing is filtered
this.dataProvider.setDataValue(2, 1, new ArrayList<>(Arrays.asList("A-", "AA", "AAA", "B", "B-", "BB", "C", "a", "aa", "aaa")));
@@ -500,7 +500,7 @@ public class FilterRowDataProviderTest {
new DataLayer(new ListDataProvider<>(this.filterList, this.columnAccessor)),
this.baseList,
this.columnAccessor);
- this.dataProvider.setInvertCollectionPersistence(true, cbdp);
+ this.dataProvider.setFilterRowComboBoxDataProvider(cbdp);
this.filterList.get(0).setRating(null);
@@ -539,7 +539,7 @@ public class FilterRowDataProviderTest {
new DataLayer(new ListDataProvider<>(this.filterList, this.columnAccessor)),
this.baseList,
this.columnAccessor);
- this.dataProvider.setInvertCollectionPersistence(true, cbdp);
+ this.dataProvider.setFilterRowComboBoxDataProvider(cbdp);
this.filterList.get(0).setRating("");

Back to the top