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

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


     * @return The last cell of the current selection in the specified
     *         {@link SelectionLayer}. Will return <code>null</code> if there is
     *         no selection.
     */
    public static ILayerCell getLastSelectedCell(SelectionLayer selectionLayer) {
        PositionCoordinate selectionAnchor = selectionLayer.getSelectionAnchor();
        return selectionLayer.getCellByPosition(selectionAnchor.columnPosition, selectionAnchor.rowPosition);
    }
View Full Code Here


        return this.topLeftPosition;
    }

    public void setTopLeftPosition(int leftColumnPosition, int topRowPosition) {
        this.topLeftPosition =
                new PositionCoordinate(this, leftColumnPosition, topRowPosition);
    }
View Full Code Here

        return initialValue;
    }

    @Override
    public InlineCellEditEvent cloneEvent() {
        return new InlineCellEditEvent(layer, new PositionCoordinate(
                cellCoordinate), parent, configRegistry, initialValue);
    }
View Full Code Here

        return this.bottomRightPosition;
    }

    public void setBottomRightPosition(int rightColumnPosition, int bottomRowPosition) {
        this.bottomRightPosition =
                new PositionCoordinate(this, rightColumnPosition, bottomRowPosition);
    }
View Full Code Here

     * @param viewportLayer
     *            The ViewportLayer of the grid to perform the freeze action.
     */
    public static void resetViewport(FreezeLayer freezeLayer,
            ViewportLayer viewportLayer) {
        PositionCoordinate topLeftPosition = freezeLayer.getTopLeftPosition();
        viewportLayer.resetOrigin(
                viewportLayer.getScrollableLayer().getStartXOfColumnPosition(
                        Math.max(0, topLeftPosition.columnPosition)),
                viewportLayer.getScrollableLayer().getStartYOfRowPosition(
                        Math.max(0, topLeftPosition.rowPosition)));
View Full Code Here

    // Persistence

    @Override
    public void saveState(String prefix, Properties properties) {
        PositionCoordinate coord = this.freezeLayer.getTopLeftPosition();
        properties.setProperty(
                prefix + FreezeLayer.PERSISTENCE_TOP_LEFT_POSITION,
                coord.columnPosition + IPersistable.VALUE_SEPARATOR + coord.rowPosition);

        coord = this.freezeLayer.getBottomRightPosition();
View Full Code Here

    @Override
    public void loadState(String prefix, Properties properties) {
        String property = properties.getProperty(
                prefix + FreezeLayer.PERSISTENCE_TOP_LEFT_POSITION);
        PositionCoordinate topLeftPosition = null;
        if (property != null) {
            StringTokenizer tok = new StringTokenizer(property,
                    IPersistable.VALUE_SEPARATOR);
            String columnPosition = tok.nextToken();
            String rowPosition = tok.nextToken();
            topLeftPosition = new PositionCoordinate(
                    this.freezeLayer,
                    Integer.valueOf(columnPosition),
                    Integer.valueOf(rowPosition));
        }

        property = properties.getProperty(
                prefix + FreezeLayer.PERSISTENCE_BOTTOM_RIGHT_POSITION);
        PositionCoordinate bottomRightPosition = null;
        if (property != null) {
            StringTokenizer tok =
                    new StringTokenizer(property, IPersistable.VALUE_SEPARATOR);
            String columnPosition = tok.nextToken();
            String rowPosition = tok.nextToken();
            bottomRightPosition = new PositionCoordinate(
                    this.freezeLayer,
                    Integer.valueOf(columnPosition),
                    Integer.valueOf(rowPosition));
        }
View Full Code Here

        this.rowPosition = rowPosition;
    }

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

        return new PositionCoordinate(freezeLayer, -1, 0);
    }

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

            // the viewport first
            if (freezeLayer.isFrozen() && override) {
                FreezeHelper.resetViewport(freezeLayer, viewportLayer);
            }

            final PositionCoordinate topLeftPosition = coordinatesProvider
                    .getTopLeftPosition();
            final PositionCoordinate bottomRightPosition = coordinatesProvider
                    .getBottomRightPosition();

            FreezeHelper.freeze(freezeLayer, viewportLayer, topLeftPosition,
                    bottomRightPosition);
        } else if (toggle) {
View Full Code Here

TOP

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

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.