Search in sources :

Example 31 with DataLayerFixture

use of org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture in project nebula.widgets.nattable by eclipse.

the class NatTableTest method setup.

@Before
public void setup() {
    this.underlyingLayerFixture = new DataLayerFixture(10, 5, 100, 20);
    this.natTable = new NatTable(new Shell(Display.getDefault()), this.underlyingLayerFixture);
}
Also used : Shell(org.eclipse.swt.widgets.Shell) DataLayerFixture(org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture) Before(org.junit.Before)

Example 32 with DataLayerFixture

use of org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture in project nebula.widgets.nattable by eclipse.

the class PositionCoordinateTest method setup.

@Before
public void setup() {
    ILayer layer = new DataLayerFixture();
    this.p1 = new PositionCoordinate(layer, 1, 2);
    this.p2 = new PositionCoordinate(layer, 1, 2);
}
Also used : ILayer(org.eclipse.nebula.widgets.nattable.layer.ILayer) DataLayerFixture(org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture) PositionCoordinate(org.eclipse.nebula.widgets.nattable.coordinate.PositionCoordinate) Before(org.junit.Before)

Example 33 with DataLayerFixture

use of org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture in project nebula.widgets.nattable by eclipse.

the class AbstractLayerTest method setup.

@Before
public void setup() {
    this.dataLayer = new DataLayerFixture();
    this.firstListener = new LayerListenerFixture();
    this.dataLayer.addLayerListener(this.firstListener);
}
Also used : DataLayerFixture(org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture) LayerListenerFixture(org.eclipse.nebula.widgets.nattable.test.fixture.layer.LayerListenerFixture) Before(org.junit.Before)

Example 34 with DataLayerFixture

use of org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture in project nebula.widgets.nattable by eclipse.

the class CompositeLayerTest method getWidth.

@Test
public void getWidth() throws Exception {
    assertEquals(150, this.layerFixture.getWidth());
    // 20 columns total - 100 wide each
    this.layerFixture.setChildLayer(GridRegion.CORNER, new DataLayerFixture(10, 10, 100, 20), 0, 0);
    this.layerFixture.setChildLayer(GridRegion.COLUMN_HEADER, new DataLayerFixture(10, 10, 100, 20), 1, 0);
    assertEquals(2000, this.layerFixture.getWidth());
}
Also used : DataLayerFixture(org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture) Test(org.junit.Test)

Example 35 with DataLayerFixture

use of org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture in project nebula.widgets.nattable by eclipse.

the class DataLayerCommandHandlingTest method setup.

@Before
public void setup() {
    this.dataLayer = new DataLayerFixture();
    this.command = new UpdateDataCommand(this.dataLayer, 2, 2, TEST_VALUE);
}
Also used : DataLayerFixture(org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture) UpdateDataCommand(org.eclipse.nebula.widgets.nattable.edit.command.UpdateDataCommand) Before(org.junit.Before)

Aggregations

DataLayerFixture (org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture)57 Test (org.junit.Test)28 Before (org.junit.Before)27 BaseDataLayerFixture (org.eclipse.nebula.widgets.nattable.test.fixture.layer.BaseDataLayerFixture)11 LayerListenerFixture (org.eclipse.nebula.widgets.nattable.test.fixture.layer.LayerListenerFixture)7 Rectangle (org.eclipse.swt.graphics.Rectangle)7 DefaultBodyLayerStack (org.eclipse.nebula.widgets.nattable.layer.stack.DefaultBodyLayerStack)6 ViewportLayer (org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer)6 NatTableFixture (org.eclipse.nebula.widgets.nattable.test.fixture.NatTableFixture)5 IClientAreaProvider (org.eclipse.nebula.widgets.nattable.util.IClientAreaProvider)5 SelectionLayer (org.eclipse.nebula.widgets.nattable.selection.SelectionLayer)4 ColumnOverrideLabelAccumulator (org.eclipse.nebula.widgets.nattable.layer.cell.ColumnOverrideLabelAccumulator)3 LayerCommandFixture (org.eclipse.nebula.widgets.nattable.test.fixture.command.LayerCommandFixture)3 ColumnGroupModelFixture (org.eclipse.nebula.widgets.nattable.test.fixture.group.ColumnGroupModelFixture)3 Properties (java.util.Properties)2 IConfigRegistry (org.eclipse.nebula.widgets.nattable.config.IConfigRegistry)2 IDataProvider (org.eclipse.nebula.widgets.nattable.data.IDataProvider)2 RowDataFixture (org.eclipse.nebula.widgets.nattable.dataset.fixture.data.RowDataFixture)2 ColumnHideShowLayer (org.eclipse.nebula.widgets.nattable.hideshow.ColumnHideShowLayer)2 RowHideShowLayer (org.eclipse.nebula.widgets.nattable.hideshow.RowHideShowLayer)2