Package org.eclipse.nebula.widgets.nattable.test.fixture.layer

Examples of org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture


    @Test
    public void shouldNotSaveIfNothingIsSorted() throws Exception {
        sortModel = SortModelFixture.getEmptyModel();
        sortHeaderLayer = new SortHeaderLayer<RowDataFixture>(
                new DataLayerFixture(10, 20, 100, 20), sortModel);
        sortStatePersistor = new SortStatePersistor<RowDataFixture>(sortModel);

        sortStatePersistor.saveState(TEST_PREFIX, properties);
        assertNull(properties.getProperty(KEY));
    }
View Full Code Here


    @Test
    public void loadStateFromProperties() throws Exception {
        properties.put(KEY, "0:DESC:3|3:ASC:2|5:DESC:1|6:ASC:0|");
        sortModel = SortModelFixture.getEmptyModel();
        sortHeaderLayer = new SortHeaderLayer<RowDataFixture>(
                new DataLayerFixture(10, 20, 100, 20), sortModel);
        sortStatePersistor = new SortStatePersistor<RowDataFixture>(sortModel);
        sortStatePersistor.loadState(TEST_PREFIX, properties);
        ISortModel sortModel = sortHeaderLayer.getSortModel();

        // Sort direction
View Full Code Here

    private Properties testProperties;

    @Before
    public void setUp() {
        labelAccumulator = new ColumnOverrideLabelAccumulator(
                new DataLayerFixture());
        testProperties = new Properties();
    }
View Full Code Here

    private ViewportLayer viewportLayer;
    private NatTableFixture natTable;

    @Before
    public void setUp() {
        this.dataLayer = new DataLayerFixture(10, 10, 100, 20);
        this.selectionLayer = new SelectionLayer(this.dataLayer);
        this.viewportLayer = new ViewportLayer(this.selectionLayer);
        this.viewportLayer.setRegionName(GridRegion.BODY);

        this.viewportLayer.addConfiguration(new DefaultEditBindings());
View Full Code Here

    private DataLayerFixture dataLayer;
    private LayerListenerFixture firstListener;

    @Before
    public void setup() {
        dataLayer = new DataLayerFixture();

        firstListener = new LayerListenerFixture();
        dataLayer.addLayerListener(firstListener);
    }
View Full Code Here

    private NatTable natTable;
    private DataLayerFixture underlyingLayerFixture;

    @Before
    public void setup() {
        underlyingLayerFixture = new DataLayerFixture(10, 5, 100, 20);
        natTable = new NatTable(new Shell(Display.getDefault()),
                underlyingLayerFixture);
    }
View Full Code Here

    private ColumnHideShowLayer columnHideShowLayer;

    @Before
    public void setup() {
        columnHideShowLayer = new ColumnHideShowLayer(new DataLayerFixture());
    }
View Full Code Here

public class MultiColumnResizeCommandTest {

    @Test
    public void getColumnWidth() throws Exception {
        MultiColumnResizeCommand resizeCommand = new MultiColumnResizeCommand(
                new DataLayerFixture(), new int[] { 5, 9 },
                new int[] { 12, 20 });

        Assert.assertEquals(12, resizeCommand.getColumnWidth(5));
        Assert.assertEquals(20, resizeCommand.getColumnWidth(9));
View Full Code Here

    }

    @Test
    public void getCommonColumnWidth() throws Exception {
        MultiColumnResizeCommand resizeCommand = new MultiColumnResizeCommand(
                new DataLayerFixture(), new int[] { 1, 2 }, 100);

        Assert.assertEquals(100, resizeCommand.getCommonColumnWidth());
        Assert.assertEquals(100, resizeCommand.getColumnWidth(1));
    }
View Full Code Here

    }

    @Test
    public void getColumnWidthWhenTheColumnPositionsHaveBeenConverted()
            throws Exception {
        DataLayerFixture dataLayer = new DataLayerFixture();
        // Indexes re-ordered: 4 1 0 2 3
        ColumnReorderLayer reorderLayerFixture = new ColumnReorderLayerFixture(
                dataLayer);

        MultiColumnResizeCommand resizeCommand = new MultiColumnResizeCommand(
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.test.fixture.layer.DataLayerFixture

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.