Package org.eclipse.nebula.widgets.nattable.coordinate

Examples of org.eclipse.nebula.widgets.nattable.coordinate.ColumnPositionCoordinate


    protected final void setColumnPositions(ILayer layer,
            int... columnPositions) {
        columnPositionCoordinates = new HashSet<ColumnPositionCoordinate>();
        for (int columnPosition : columnPositions) {
            columnPositionCoordinates.add(new ColumnPositionCoordinate(layer,
                    columnPosition));
        }
    }
View Full Code Here


    public boolean convertToTargetLayer(ILayer targetLayer) {
        Collection<ColumnPositionCoordinate> convertedColumnPositionCoordinates = new HashSet<ColumnPositionCoordinate>();

        for (ColumnPositionCoordinate columnPositionCoordinate : columnPositionCoordinates) {
            ColumnPositionCoordinate convertedColumnPositionCoordinate = LayerCommandUtil
                    .convertColumnPositionToTargetContext(
                            columnPositionCoordinate, targetLayer);
            if (convertedColumnPositionCoordinate != null) {
                convertedColumnPositionCoordinates
                        .add(convertedColumnPositionCoordinate);
View Full Code Here

public abstract class AbstractColumnCommand implements ILayerCommand {

    private ColumnPositionCoordinate columnPositionCoordinate;

    protected AbstractColumnCommand(ILayer layer, int columnPosition) {
        columnPositionCoordinate = new ColumnPositionCoordinate(layer,
                columnPosition);
    }
View Full Code Here

    protected AbstractColumnCommand(AbstractColumnCommand command) {
        this.columnPositionCoordinate = command.columnPositionCoordinate;
    }

    public boolean convertToTargetLayer(ILayer targetLayer) {
        ColumnPositionCoordinate targetColumnPositionCoordinate = LayerCommandUtil
                .convertColumnPositionToTargetContext(columnPositionCoordinate,
                        targetLayer);
        if (targetColumnPositionCoordinate != null) {
            columnPositionCoordinate = targetColumnPositionCoordinate;
            return true;
View Full Code Here

            Collection<ILayer> underlyingLayers = layer
                    .getUnderlyingLayersByColumnPosition(columnPosition);
            if (underlyingLayers != null) {
                for (ILayer underlyingLayer : underlyingLayers) {
                    if (underlyingLayer != null) {
                        ColumnPositionCoordinate convertedColumnPositionCoordinate = convertColumnPositionToTargetContext(
                                new ColumnPositionCoordinate(underlyingLayer,
                                        underlyingColumnPosition), targetLayer);
                        if (convertedColumnPositionCoordinate != null) {
                            return convertedColumnPositionCoordinate;
                        }
                    }
View Full Code Here

    private ColumnPositionCoordinate toColumnPositionCoordinate;
    private boolean reorderToLeftEdge;

    public ColumnReorderCommand(ILayer layer, int fromColumnPosition,
            int toColumnPosition) {
        fromColumnPositionCoordinate = new ColumnPositionCoordinate(layer,
                fromColumnPosition);

        if (toColumnPosition < layer.getColumnCount()) {
            reorderToLeftEdge = true;
        } else {
            reorderToLeftEdge = false;
            toColumnPosition--;
        }

        toColumnPositionCoordinate = new ColumnPositionCoordinate(layer,
                toColumnPosition);
    }
View Full Code Here

    public boolean isReorderToLeftEdge() {
        return reorderToLeftEdge;
    }

    public boolean convertToTargetLayer(ILayer targetLayer) {
        ColumnPositionCoordinate targetFromColumnPositionCoordinate = LayerCommandUtil
                .convertColumnPositionToTargetContext(
                        fromColumnPositionCoordinate, targetLayer);
        ColumnPositionCoordinate targetToColumnPositionCoordinate = LayerCommandUtil
                .convertColumnPositionToTargetContext(
                        toColumnPositionCoordinate, targetLayer);
        if (targetFromColumnPositionCoordinate != null
                && targetToColumnPositionCoordinate != null) {
            fromColumnPositionCoordinate = targetFromColumnPositionCoordinate;
View Full Code Here

    public MultiColumnReorderCommand(ILayer layer,
            List<Integer> fromColumnPositions, int toColumnPosition,
            boolean reorderToLeftEdge) {
        fromColumnPositionCoordinates = new ArrayList<ColumnPositionCoordinate>();
        for (Integer fromColumnPosition : fromColumnPositions) {
            fromColumnPositionCoordinates.add(new ColumnPositionCoordinate(
                    layer, fromColumnPosition.intValue()));
        }

        toColumnPositionCoordinate = new ColumnPositionCoordinate(layer,
                toColumnPosition);

        this.reorderToLeftEdge = reorderToLeftEdge;
    }
View Full Code Here

    public boolean convertToTargetLayer(ILayer targetLayer) {
        List<ColumnPositionCoordinate> convertedFromColumnPositionCoordinates = new ArrayList<ColumnPositionCoordinate>();

        for (ColumnPositionCoordinate fromColumnPositionCoordinate : fromColumnPositionCoordinates) {
            ColumnPositionCoordinate convertedFromColumnPositionCoordinate = LayerCommandUtil
                    .convertColumnPositionToTargetContext(
                            fromColumnPositionCoordinate, targetLayer);
            if (convertedFromColumnPositionCoordinate != null) {
                convertedFromColumnPositionCoordinates
                        .add(convertedFromColumnPositionCoordinate);
            }
        }

        ColumnPositionCoordinate targetToColumnPositionCoordinate = LayerCommandUtil
                .convertColumnPositionToTargetContext(
                        toColumnPositionCoordinate, targetLayer);

        if (convertedFromColumnPositionCoordinates.size() > 0
                && targetToColumnPositionCoordinate != null) {
View Full Code Here

     */
    public MultiColumnResizeCommand(ILayer layer, int[] columnPositions,
            int[] columnWidths) {
        super(layer, columnPositions);
        for (int i = 0; i < columnPositions.length; i++) {
            colPositionToWidth.put(new ColumnPositionCoordinate(layer,
                    columnPositions[i]), Integer.valueOf(columnWidths[i]));
        }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.coordinate.ColumnPositionCoordinate

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.