Search in sources :

Example 36 with DummyGridLayerStack

use of org.eclipse.nebula.widgets.nattable.layer.stack.DummyGridLayerStack in project nebula.widgets.nattable by eclipse.

the class NatTableFixture method scrollToRow.

public void scrollToRow(int gridRowPosition) {
    DummyGridLayerStack gridLayer = (DummyGridLayerStack) getUnderlyingLayerByPosition(1, 1);
    ViewportLayer viewportLayer = gridLayer.getBodyLayer().getViewportLayer();
    viewportLayer.invalidateVerticalStructure();
    viewportLayer.setOriginY(viewportLayer.getStartYOfRowPosition(gridRowPosition));
}
Also used : DummyGridLayerStack(org.eclipse.nebula.widgets.nattable.layer.stack.DummyGridLayerStack) ViewportLayer(org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer)

Example 37 with DummyGridLayerStack

use of org.eclipse.nebula.widgets.nattable.layer.stack.DummyGridLayerStack in project nebula.widgets.nattable by eclipse.

the class NatTableFixture method scrollToColumn.

public void scrollToColumn(int gridColumnPosition) {
    DummyGridLayerStack gridLayer = (DummyGridLayerStack) getUnderlyingLayerByPosition(1, 1);
    ViewportLayer viewportLayer = gridLayer.getBodyLayer().getViewportLayer();
    viewportLayer.invalidateHorizontalStructure();
    viewportLayer.setOriginX(viewportLayer.getStartXOfColumnPosition(gridColumnPosition));
}
Also used : DummyGridLayerStack(org.eclipse.nebula.widgets.nattable.layer.stack.DummyGridLayerStack) ViewportLayer(org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer)

Example 38 with DummyGridLayerStack

use of org.eclipse.nebula.widgets.nattable.layer.stack.DummyGridLayerStack in project nebula.widgets.nattable by eclipse.

the class Tooltips method createExampleControl.

@Override
public Control createExampleControl(Composite parent) {
    NatTable natTable = new NatTable(parent, new DummyGridLayerStack(20, 100));
    attachToolTip(natTable);
    return natTable;
}
Also used : DummyGridLayerStack(org.eclipse.nebula.widgets.nattable.layer.stack.DummyGridLayerStack) NatTable(org.eclipse.nebula.widgets.nattable.NatTable)

Aggregations

DummyGridLayerStack (org.eclipse.nebula.widgets.nattable.layer.stack.DummyGridLayerStack)38 Test (org.junit.Test)23 GridLayer (org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer)13 NatTableFixture (org.eclipse.nebula.widgets.nattable.test.fixture.NatTableFixture)13 NatTable (org.eclipse.nebula.widgets.nattable.NatTable)11 DataLayer (org.eclipse.nebula.widgets.nattable.layer.DataLayer)9 AbstractDpiConverter (org.eclipse.nebula.widgets.nattable.layer.AbstractDpiConverter)8 IDpiConverter (org.eclipse.nebula.widgets.nattable.layer.IDpiConverter)8 ConfigureScalingCommand (org.eclipse.nebula.widgets.nattable.layer.command.ConfigureScalingCommand)8 Before (org.junit.Before)6 ViewportLayer (org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer)5 Shell (org.eclipse.swt.widgets.Shell)4 IUniqueIndexLayer (org.eclipse.nebula.widgets.nattable.layer.IUniqueIndexLayer)3 SelectColumnCommand (org.eclipse.nebula.widgets.nattable.selection.command.SelectColumnCommand)3 LayerListenerFixture (org.eclipse.nebula.widgets.nattable.test.fixture.layer.LayerListenerFixture)3 Range (org.eclipse.nebula.widgets.nattable.coordinate.Range)2 RowHideCommand (org.eclipse.nebula.widgets.nattable.hideshow.command.RowHideCommand)2 HideRowPositionsEvent (org.eclipse.nebula.widgets.nattable.hideshow.event.HideRowPositionsEvent)2 ColumnResizeCommand (org.eclipse.nebula.widgets.nattable.resize.command.ColumnResizeCommand)2 SelectRowsCommand (org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand)2