use of org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture in project nebula.widgets.nattable by eclipse.
the class BlinkLayerTest method getPropertyChangeListener.
/**
* Listen for updates and put them in the {@link UpdateEventsCache}.
* BlinkLayer needs this cache to be updated in order to work.
*/
private PropertyChangeListener getPropertyChangeListener() {
return new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent event) {
PropertyUpdateEvent<BlinkingRowDataFixture> updateEvent = new PropertyUpdateEvent<BlinkingRowDataFixture>(new DataLayerFixture(), (BlinkingRowDataFixture) event.getSource(), event.getPropertyName(), event.getOldValue(), event.getNewValue());
BlinkLayerTest.this.layerUnderTest.handleLayerEvent(updateEvent);
}
};
}
use of org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture in project nebula.widgets.nattable by eclipse.
the class ChooseColumnsFromCategoriesCommandHandlerTest method setup.
@Before
public void setup() {
this.hideShowLayerFixture = new ColumnHideShowLayerFixture();
this.commandHandler = new ChooseColumnsFromCategoriesCommandHandler(this.hideShowLayerFixture, new ColumnHeaderLayerFixture(), new DataLayerFixture(), new ColumnCategoriesModelFixture());
}
use of org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture in project nebula.widgets.nattable by eclipse.
the class CommandPropagationTest method shouldPropagateToUnderlyingLayer.
@Test
public void shouldPropagateToUnderlyingLayer() {
LayerCommandFixture command = new LayerCommandFixture();
this.layer.doCommand(command);
Assert.assertTrue(command.getTargetLayer() instanceof DataLayerFixture);
}
use of org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture in project nebula.widgets.nattable by eclipse.
the class ShowColumnPositionsEventDiffTest method before.
@Before
public void before() {
this.dataLayer = new DataLayerFixture(20, 20, 100, 40);
this.hideShowLayer = new ColumnHideShowLayer(this.dataLayer);
this.viewportLayer = new ViewportLayer(this.hideShowLayer);
this.viewportLayer.setClientAreaProvider(new IClientAreaProvider() {
@Override
public Rectangle getClientArea() {
return new Rectangle(0, 0, 800, 400);
}
});
this.viewportLayer.setOriginX(this.viewportLayer.getStartXOfColumnPosition(2));
this.viewportLayer.setOriginY(this.viewportLayer.getStartYOfRowPosition(2));
this.event = new ShowColumnPositionsEvent(this.dataLayer, Arrays.asList(new Integer[] { 2, 4, 7, 8, 9 }));
}
use of org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture in project nebula.widgets.nattable by eclipse.
the class ShowRowPositionsEventDiffTest method before.
@Before
public void before() {
this.dataLayer = new DataLayerFixture(20, 20, 100, 40);
this.hideShowLayer = new RowHideShowLayer(this.dataLayer);
this.viewportLayer = new ViewportLayer(this.hideShowLayer);
this.viewportLayer.setClientAreaProvider(new IClientAreaProvider() {
@Override
public Rectangle getClientArea() {
return new Rectangle(0, 0, 800, 400);
}
});
this.viewportLayer.setOriginX(this.viewportLayer.getStartXOfColumnPosition(2));
this.viewportLayer.setOriginY(this.viewportLayer.getStartYOfRowPosition(2));
this.event = new ShowRowPositionsEvent(this.dataLayer, Arrays.asList(new Integer[] { 2, 4, 7, 8, 9 }));
}
Aggregations