use of org.eclipse.nebula.widgets.nattable.test.fixture.InitializeClientAreaCommandFixture in project nebula.widgets.nattable by eclipse.
the class CellSelectionTest method setUp.
@Before
public void setUp() {
this.gridLayer = new GridLayerFixture();
this.gridLayer.doCommand(new InitializeClientAreaCommandFixture());
}
use of org.eclipse.nebula.widgets.nattable.test.fixture.InitializeClientAreaCommandFixture in project nebula.widgets.nattable by eclipse.
the class ColumnHeaderLayerSelectionTest method setUp.
@Before
public void setUp() {
this.gridLayer = new GridLayerFixture();
this.gridLayer.doCommand(new InitializeClientAreaCommandFixture());
}
use of org.eclipse.nebula.widgets.nattable.test.fixture.InitializeClientAreaCommandFixture in project nebula.widgets.nattable by eclipse.
the class CompositeFreezeLayerTest method setup.
@Before
public void setup() {
TestLayer dataLayer = new TestLayer(4, 4, "0:0;100 | 1:1;100 | 2:2;100 | 3:3;100", "0:0;40 | 1:1;40 | 2:2;40 | 3:3;40", "A0 | B0 | C0 | D0 \n" + "A1 | B1 | C1 | D1 \n" + "A2 | B2 | C2 | D2 \n" + "A3 | B3 | C3 | D3 \n");
this.reorderLayer = new ColumnReorderLayer(dataLayer);
this.hideShowLayer = new ColumnHideShowLayer(this.reorderLayer);
this.selectionLayer = new SelectionLayer(this.hideShowLayer);
this.viewportLayer = new ViewportLayer(this.selectionLayer);
this.freezeLayer = new FreezeLayer(this.selectionLayer);
this.compositeFreezeLayer = new CompositeFreezeLayer(this.freezeLayer, this.viewportLayer, this.selectionLayer);
this.compositeFreezeLayer.setClientAreaProvider(new IClientAreaProvider() {
@Override
public Rectangle getClientArea() {
return new Rectangle(0, 0, 400, 160);
}
});
this.compositeFreezeLayer.doCommand(new InitializeClientAreaCommandFixture());
}
use of org.eclipse.nebula.widgets.nattable.test.fixture.InitializeClientAreaCommandFixture in project nebula.widgets.nattable by eclipse.
the class GridLayerTest method initRowHeaderHeight.
@Test
public void initRowHeaderHeight() throws Exception {
GridLayer gridLayer = new GridLayerFixture();
gridLayer.doCommand(new InitializeClientAreaCommandFixture());
ILayer rowHeader = gridLayer.getRowHeaderLayer();
// Only visible rows are counted
Assert.assertEquals(100, rowHeader.getHeight());
Assert.assertEquals(40, rowHeader.getWidth());
}
use of org.eclipse.nebula.widgets.nattable.test.fixture.InitializeClientAreaCommandFixture in project nebula.widgets.nattable by eclipse.
the class GridLayerTest method initBodyLayer.
// **** New tests using fixtures ****
/**
* @see ViewportLayerFixture#DEFAULT_CLIENT_AREA
*/
@Test
public void initBodyLayer() throws Exception {
DefaultGridLayer gridLayer = new GridLayerFixture();
ViewportLayer viewport = gridLayer.getBodyLayer().getViewportLayer();
viewport.setClientAreaProvider(new IClientAreaProvider() {
@Override
public Rectangle getClientArea() {
return new Rectangle(0, 0, 160, 80);
}
});
// Client area gets init when this command is fired
gridLayer.doCommand(new InitializeClientAreaCommandFixture());
Assert.assertEquals(160, viewport.getClientAreaWidth());
Assert.assertEquals(80, viewport.getClientAreaHeight());
Assert.assertEquals(160, viewport.getWidth());
Assert.assertEquals(80, viewport.getHeight());
}
Aggregations