use of org.eclipse.nebula.widgets.nattable.data.ListDataProvider in project nebula.widgets.nattable by eclipse.
the class DataChangeLayerTempStorageTest method setup.
@Before
public void setup() {
this.dataModel = PersonService.getFixedPersons();
this.dataLayer = new DataLayer(new ListDataProvider<>(this.dataModel, new ReflectiveColumnPropertyAccessor<>(new String[] { "firstName", "lastName", "gender", "married", "birthday" })));
this.dataChangeLayer = new DataChangeLayer(this.dataLayer, new PointKeyHandler(), true);
this.listener = new LayerListenerFixture();
this.dataLayer.addLayerListener(this.listener);
}
use of org.eclipse.nebula.widgets.nattable.data.ListDataProvider in project nebula.widgets.nattable by eclipse.
the class ColumnHideShowLayerStructuralChangeEventTest method setUp.
@Before
public void setUp() {
this.contents = new ArrayList<List<String>>();
this.contents.add(new ArrayList<String>(Arrays.asList("one", "two", "three", "four", "five")));
this.underlyingLayer = new DataLayer(new ListDataProvider<List<String>>(this.contents, new IColumnAccessor<List<String>>() {
@Override
public Object getDataValue(List<String> rowObject, int columnIndex) {
return rowObject.get(columnIndex);
}
@Override
public void setDataValue(List<String> rowObject, int columnIndex, Object newValue) {
// ignore
}
@Override
public int getColumnCount() {
return ColumnHideShowLayerStructuralChangeEventTest.this.contents.get(0).size();
}
}));
this.columnHideShowLayer = new ColumnHideShowLayer(this.underlyingLayer);
}
use of org.eclipse.nebula.widgets.nattable.data.ListDataProvider in project nebula.widgets.nattable by eclipse.
the class RowReorderLayerStructuralChangeEventTest method setUp.
@Before
public void setUp() {
this.contents = new ArrayList<String>(Arrays.asList("one", "two", "three", "four"));
this.underlyingLayer = new DataLayer(new ListDataProvider<String>(this.contents, new IColumnAccessor<String>() {
@Override
public Object getDataValue(String rowObject, int columnIndex) {
return rowObject;
}
@Override
public void setDataValue(String rowObject, int columnIndex, Object newValue) {
// ignore
}
@Override
public int getColumnCount() {
return 1;
}
}));
this.rowReorderLayer = new RowReorderLayer(this.underlyingLayer);
}
use of org.eclipse.nebula.widgets.nattable.data.ListDataProvider in project nebula.widgets.nattable by eclipse.
the class ColumnReorderLayerStructuralChangeEventTest method setUp.
@Before
public void setUp() {
this.contents = new ArrayList<List<String>>();
this.contents.add(new ArrayList<String>(Arrays.asList("one", "two", "three", "four")));
this.underlyingLayer = new DataLayer(new ListDataProvider<List<String>>(this.contents, new IColumnAccessor<List<String>>() {
@Override
public Object getDataValue(List<String> rowObject, int columnIndex) {
return rowObject.get(columnIndex);
}
@Override
public void setDataValue(List<String> rowObject, int columnIndex, Object newValue) {
// ignore
}
@Override
public int getColumnCount() {
return ColumnReorderLayerStructuralChangeEventTest.this.contents.get(0).size();
}
}));
this.columnReorderLayer = new ColumnReorderLayer(this.underlyingLayer);
}
use of org.eclipse.nebula.widgets.nattable.data.ListDataProvider in project nebula.widgets.nattable by eclipse.
the class RowHideShowLayerStructuralChangeEventTest method setUp.
@Before
public void setUp() {
this.contents = new ArrayList<String>(Arrays.asList("one", "two", "three", "four", "five"));
this.underlyingLayer = new DataLayer(new ListDataProvider<String>(this.contents, new IColumnAccessor<String>() {
@Override
public Object getDataValue(String rowObject, int columnIndex) {
return rowObject;
}
@Override
public void setDataValue(String rowObject, int columnIndex, Object newValue) {
// ignore
}
@Override
public int getColumnCount() {
return 1;
}
}));
this.rowHideShowLayer = new RowHideShowLayer(this.underlyingLayer);
}
Aggregations