Search in sources :

Example 6 with IUniqueIndexLayer

use of net.sourceforge.nattable.layer.IUniqueIndexLayer in project translationstudio8 by heartsome.

the class ViewportSelectColumnCommandHandler method doCommand.

@Override
protected boolean doCommand(ViewportSelectColumnCommand command) {
    IUniqueIndexLayer scrollableLayer = viewportLayer.getScrollableLayer();
    int scrollableColumnPosition = viewportLayer.localToUnderlyingColumnPosition(command.getColumnPosition());
    int scrollableRowPosition = viewportLayer.getOriginRowPosition();
    scrollableLayer.doCommand(new SelectColumnCommand(scrollableLayer, scrollableColumnPosition, scrollableRowPosition, command.isWithShiftMask(), command.isWithControlMask()));
    return true;
}
Also used : SelectColumnCommand(net.sourceforge.nattable.selection.command.SelectColumnCommand) IUniqueIndexLayer(net.sourceforge.nattable.layer.IUniqueIndexLayer)

Example 7 with IUniqueIndexLayer

use of net.sourceforge.nattable.layer.IUniqueIndexLayer in project translationstudio8 by heartsome.

the class ViewportSelectRowCommandHandler method doCommand.

@Override
protected boolean doCommand(ViewportSelectRowCommand command) {
    IUniqueIndexLayer scrollableLayer = viewportLayer.getScrollableLayer();
    int scrollableColumnPosition = viewportLayer.getOriginColumnPosition();
    int scrollableRowPosition = viewportLayer.localToUnderlyingRowPosition(command.getRowPosition());
    scrollableLayer.doCommand(new SelectRowsCommand(scrollableLayer, scrollableColumnPosition, new int[] { scrollableRowPosition }, command.isWithShiftMask(), command.isWithControlMask()));
    return true;
}
Also used : IUniqueIndexLayer(net.sourceforge.nattable.layer.IUniqueIndexLayer) SelectRowsCommand(net.sourceforge.nattable.selection.command.SelectRowsCommand)

Example 8 with IUniqueIndexLayer

use of net.sourceforge.nattable.layer.IUniqueIndexLayer in project translationstudio8 by heartsome.

the class FreezeLayer method getStartXOfColumnPosition.

@Override
public int getStartXOfColumnPosition(int columnPosition) {
    IUniqueIndexLayer underlyingLayer = (IUniqueIndexLayer) getUnderlyingLayer();
    final int underlyingColumnPosition = LayerUtil.convertColumnPosition(this, columnPosition, underlyingLayer);
    return underlyingLayer.getStartXOfColumnPosition(underlyingColumnPosition) - underlyingLayer.getStartXOfColumnPosition(topLeftPosition.columnPosition);
}
Also used : IUniqueIndexLayer(net.sourceforge.nattable.layer.IUniqueIndexLayer)

Aggregations

IUniqueIndexLayer (net.sourceforge.nattable.layer.IUniqueIndexLayer)8 ClientAreaResizeCommand (net.sourceforge.nattable.grid.command.ClientAreaResizeCommand)2 Event (org.eclipse.swt.widgets.Event)2 Listener (org.eclipse.swt.widgets.Listener)2 ScrollBar (org.eclipse.swt.widgets.ScrollBar)2 HashSet (java.util.HashSet)1 SelectColumnCommand (net.sourceforge.nattable.selection.command.SelectColumnCommand)1 SelectRowsCommand (net.sourceforge.nattable.selection.command.SelectRowsCommand)1 ViewportLayer (net.sourceforge.nattable.viewport.ViewportLayer)1