Package org.eclipse.nebula.widgets.nattable.freeze.command

Source Code of org.eclipse.nebula.widgets.nattable.freeze.command.FreezeRowStrategy

/*******************************************************************************
* Copyright (c) 2013 Dirk Fauth and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*    Dirk Fauth <dirk.fauth@gmail.com> - initial API and implementation
*******************************************************************************/
package org.eclipse.nebula.widgets.nattable.freeze.command;

import org.eclipse.nebula.widgets.nattable.coordinate.PositionCoordinate;
import org.eclipse.nebula.widgets.nattable.freeze.FreezeLayer;

/**
* @author Dirk Fauth
*
*/
public class FreezeRowStrategy implements IFreezeCoordinatesProvider {

    private final FreezeLayer freezeLayer;

    private final int rowPosition;

    public FreezeRowStrategy(FreezeLayer freezeLayer, int rowPosition) {
        this.freezeLayer = freezeLayer;
        this.rowPosition = rowPosition;
    }

    @Override
    public PositionCoordinate getTopLeftPosition() {
        return new PositionCoordinate(freezeLayer, -1, 0);
    }

    @Override
    public PositionCoordinate getBottomRightPosition() {
        return new PositionCoordinate(freezeLayer, -1, rowPosition);
    }

}
TOP

Related Classes of org.eclipse.nebula.widgets.nattable.freeze.command.FreezeRowStrategy

TOP
Copyright © 2018 www.massapi.com. 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.