Package org.eclipse.nebula.widgets.nattable.painter.cell

Examples of org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter


                    IConfigRegistry configRegistry) {
                Datum dataValue = (Datum) cell.getDataValue();
                return dataValue.isOn();
            }
        };
        final ICellPainter checkBoxPainter = new TreeCheckBoxPainter() {
            @Override
            protected CheckBoxStateEnum getCheckBoxState(ILayerCell cell) {
                Datum dataValue = (Datum) cell.getDataValue();
                return dataValue.getCheckBoxState();
            }
View Full Code Here


     */
    public RowGroupHeaderTextPainter(ICellPainter interiorPainter,
            CellEdgeEnum cellEdge, boolean paintBg, int spacing,
            boolean paintDecorationDependent) {

        ICellPainter sortPainter = new RowGroupExpandCollapseImagePainter(
                paintBg);
        CellPainterDecorator painter = new CellPainterDecorator(
                interiorPainter, cellEdge, spacing, sortPainter,
                paintDecorationDependent, paintBg);
        setWrappedPainter(painter);
View Full Code Here

     *            flag to configure how the bounds of the base painter should be
     *            calculated
     */
    public RowGroupHeaderTextPainter(ICellPainter interiorPainter,
            boolean paintBg, boolean interiorPainterToSpanFullWidth) {
        ICellPainter sortPainter = new RowGroupExpandCollapseImagePainter(
                paintBg);
        CellPainterDecorator painter = new CellPainterDecorator(
                interiorPainter, CellEdgeEnum.BOTTOM, 0, sortPainter,
                !interiorPainterToSpanFullWidth, paintBg);
        setWrappedPainter(painter);
View Full Code Here

            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, groupByObjectStyle,
                    DisplayMode.NORMAL, GroupByDataLayer.GROUP_BY_OBJECT);
        }

        ICellPainter cellPainter = getGroupByObjectCellPainter();
        if (cellPainter != null) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER, cellPainter,
                    DisplayMode.NORMAL, GroupByDataLayer.GROUP_BY_OBJECT);
        }
View Full Code Here

            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, groupByObjectStyle,
                    DisplayMode.SELECT, GroupByDataLayer.GROUP_BY_OBJECT);
        }

        ICellPainter cellPainter = getGroupByObjectSelectionCellPainter();
        if (cellPainter != null) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER, cellPainter,
                    DisplayMode.SELECT, GroupByDataLayer.GROUP_BY_OBJECT);
        }
View Full Code Here

            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, groupBySummaryStyle,
                    DisplayMode.NORMAL, GroupByDataLayer.GROUP_BY_SUMMARY);
        }

        ICellPainter cellPainter = getGroupBySummaryCellPainter();
        if (cellPainter != null) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER, cellPainter,
                    DisplayMode.NORMAL, GroupByDataLayer.GROUP_BY_SUMMARY);
        }
View Full Code Here

            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, groupBySummaryStyle,
                    DisplayMode.SELECT, GroupByDataLayer.GROUP_BY_SUMMARY);
        }

        ICellPainter cellPainter = getGroupBySummarySelectionCellPainter();
        if (cellPainter != null) {
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER, cellPainter,
                    DisplayMode.SELECT, GroupByDataLayer.GROUP_BY_SUMMARY);
        }
View Full Code Here

    protected void paintCell(ILayerCell cell, GC gc,
            IConfigRegistry configRegistry) {
        ILayer layer = cell.getLayer();
        int columnPosition = cell.getColumnPosition();
        int rowPosition = cell.getRowPosition();
        ICellPainter cellPainter = layer.getCellPainter(columnPosition,
                rowPosition, cell, configRegistry);
        Rectangle adjustedCellBounds = layer
                .getLayerPainter()
                .adjustCellBounds(columnPosition, rowPosition, cell.getBounds());
        if (cellPainter != null) {
            Rectangle originalClipping = gc.getClipping();

            int startX = getStartXOfColumnPosition(columnPosition);
            int startY = getStartYOfRowPosition(rowPosition);

            int endX = getStartXOfColumnPosition(cell.getOriginColumnPosition()
                    + cell.getColumnSpan());
            int endY = getStartYOfRowPosition(cell.getOriginRowPosition()
                    + cell.getRowSpan());

            Rectangle cellClipBounds = originalClipping
                    .intersection(new Rectangle(startX, startY, endX - startX,
                            endY - startY));
            gc.setClipping(cellClipBounds.intersection(adjustedCellBounds));

            cellPainter.paintCell(cell, gc, adjustedCellBounds, configRegistry);

            gc.setClipping(originalClipping);
        }
    }
View Full Code Here

    @Deprecated
    public ColumnGroupHeaderTextPainter(ColumnGroupModel columnGroupModel,
            ICellPainter interiorPainter, CellEdgeEnum cellEdge,
            boolean paintBg, int spacing, boolean paintDecorationDependent) {

        ICellPainter sortPainter = new ColumnGroupExpandCollapseImagePainter(
                paintBg);
        CellPainterDecorator painter = new CellPainterDecorator(
                interiorPainter, cellEdge, spacing, sortPainter,
                paintDecorationDependent, paintBg);
        setWrappedPainter(painter);
View Full Code Here

     */
    @Deprecated
    public ColumnGroupHeaderTextPainter(ColumnGroupModel columnGroupModel,
            ICellPainter interiorPainter, boolean paintBg,
            boolean interiorPainterToSpanFullWidth) {
        ICellPainter sortPainter = new ColumnGroupExpandCollapseImagePainter(
                paintBg);
        CellPainterDecorator painter = new CellPainterDecorator(
                interiorPainter, CellEdgeEnum.RIGHT, 0, sortPainter,
                !interiorPainterToSpanFullWidth, paintBg);
        setWrappedPainter(painter);
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter

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.