Examples of LayerCell


Examples of org.eclipse.nebula.widgets.nattable.layer.cell.LayerCell

        return 0;
    }

    @Override
    public ILayerCell getCellByPosition(int columnPosition, int rowPosition) {
        return new LayerCell(this, 0, 0, 0, 0, getColumnCount(), 1);
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.layer.cell.LayerCell

        this.layerPainter = layerPainter;
    }

    @Override
    public ILayerCell getCellByPosition(int columnPosition, int rowPosition) {
        return new LayerCell(this, 0, 0, columnPosition, rowPosition,
                getHorizontalLayerDependency().getColumnCount(),
                getVerticalLayerDependency().getRowCount());
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.layer.cell.LayerCell

        int bodyColumnIndex = getColumnIndexByPosition(columnPosition);

        // Column group header cell
        if (model.isPartOfAGroup(bodyColumnIndex)) {
            if (rowPosition == 0) {
                return new LayerCell(this,
                        getStartPositionOfGroup(columnPosition), rowPosition,
                        columnPosition, rowPosition,
                        getColumnSpan(columnPosition), 1);
            } else {
                return new LayerCell(this, columnPosition, rowPosition);
            }
        } else {
            // render column header w/ rowspan = 2
            // as in this case we ask the column header layer for the cell
            // position
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.layer.cell.LayerCell

     * @return A temporary sub cell of the given parent cell used to paint and
     *         calculate inner cells.
     */
    protected ILayerCell createSubLayerCell(final ILayerCell cell,
            final Object dataValue) {
        LayerCell subCell = new LayerCell(cell.getLayer(),
                cell.getOriginColumnPosition(), cell.getOriginRowPosition(),
                cell.getColumnPosition(), cell.getRowPosition(), 0, 0) { // no
                                                                         // spanning

            @Override
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.layer.cell.LayerCell

        }

        DataCell dataCell = getDataProvider().getCellByPosition(columnPosition,
                rowPosition);

        return new LayerCell(this, columnPosition, rowPosition, dataCell);
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.layer.cell.LayerCell

    public ILayerCell getCellByPosition(int columnPosition, int rowPosition) {
        int bodyColumnIndex = getColumnIndexByPosition(columnPosition);

        if (rowPosition == 0) {
            if (model.isPartOfAGroup(bodyColumnIndex)) {
                return new LayerCell(this,
                        getStartPositionOfGroup(columnPosition), rowPosition,
                        columnPosition, rowPosition,
                        getColumnSpan(columnPosition), 1);
            } else {
                ILayerCell underlyingCell = columnGroupHeaderLayer
                        .getCellByPosition(columnPosition, rowPosition);
                return new LayerCell(this,
                        underlyingCell.getOriginColumnPosition(),
                        underlyingCell.getOriginRowPosition(), columnPosition,
                        rowPosition, underlyingCell.getColumnSpan(),
                        underlyingCell.getRowSpan() + 1);
            }
        } else if (rowPosition == 1) {
            ILayerCell underlyingCell = columnGroupHeaderLayer
                    .getCellByPosition(columnPosition, rowPosition - 1);
            boolean partOfAGroup = model.isPartOfAGroup(bodyColumnIndex);
            return new LayerCell(this,
                    underlyingCell.getOriginColumnPosition(),
                    underlyingCell.getOriginRowPosition()
                            + (partOfAGroup ? 1 : 0), columnPosition,
                    rowPosition, underlyingCell.getColumnSpan(),
                    underlyingCell.getRowSpan() + (partOfAGroup ? 0 : 1));
        } else if (rowPosition == 2) {
            ILayerCell underlyingCell = columnGroupHeaderLayer
                    .getCellByPosition(columnPosition, rowPosition - 1);
            boolean partOfAGroup = model.isPartOfAGroup(bodyColumnIndex)
                    || columnGroupHeaderLayer.isColumnInGroup(bodyColumnIndex);
            return new LayerCell(this,
                    underlyingCell.getOriginColumnPosition(),
                    underlyingCell.getOriginRowPosition()
                            + (partOfAGroup ? 1 : 0), columnPosition,
                    rowPosition, underlyingCell.getColumnSpan(),
                    underlyingCell.getRowSpan() + (partOfAGroup ? 0 : 1));
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.layer.cell.LayerCell

        if (columnPosition < 0 || columnPosition >= getColumnCount()
                || rowPosition < 0 || rowPosition >= getRowCount()) {
            return null;
        }

        return new LayerCell(this, columnPosition, rowPosition);
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.layer.cell.LayerCell

        int bodyRowIndex = getRowIndexByPosition(rowPosition);

        // Row group header cell
        if (RowGroupUtils.isPartOfAGroup(model, bodyRowIndex)) {
            if (columnPosition == 0) {
                return new LayerCell(this, columnPosition,
                        getStartPositionOfGroup(rowPosition), columnPosition,
                        rowPosition, 1, getRowSpan(rowPosition));
            } else {
                return new LayerCell(this, columnPosition, rowPosition);
            }
        } else {
            // render row header w/ columnspan = 2
            // as in this case we ask the row header layer for the cell position
            // and the row header layer asks his data provider for the column
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.layer.cell.LayerCell

    }

    @Override
    public ILayerCell getCellByPosition(int columnPosition, int rowPosition) {
        if (isSummaryRowPosition(rowPosition)) {
            return new LayerCell(this, columnPosition, rowPosition);
        }
        return super.getCellByPosition(columnPosition, rowPosition);
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.layer.cell.LayerCell

        buttonCellPainter = new ButtonCellPainter(buttonRaisedPainter,
                buttonPressedPainter);
        buttonCellPainter.setButtonFlashTime(500);

        natTable = new NatTableFixture();
        cellFixture = new LayerCell(natTable, 1, 5);
        gcFixture = new GC(natTable);

        mouseClickEvent = new MouseEvent(SWTUtils.getLeftClickEvent(100, 100,
                0, natTable));
        mouseClickEvent.data = NatEventData
View Full Code Here
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.