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

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


     */
    public ColumnGroupHeaderTextPainter(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


     *            flag to configure how the bounds of the base painter should be
     *            calculated
     */
    public ColumnGroupHeaderTextPainter(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

        natTable.addConfiguration(editableGridConfiguration(
                columnLabelAccumulator, dataProvider));

        final ColumnHeaderCheckBoxPainter columnHeaderCheckBoxPainter = new ColumnHeaderCheckBoxPainter(
                bodyDataLayer);
        final ICellPainter column9HeaderPainter = new BeveledBorderDecorator(
                new CellPainterDecorator(new TextPainter(), CellEdgeEnum.RIGHT,
                        columnHeaderCheckBoxPainter));
        natTable.addConfiguration(new AbstractRegistryConfiguration() {
            @Override
            public void configureRegistry(IConfigRegistry configRegistry) {
View Full Code Here

                            .getResourceAsStream(
                                    "/org/eclipse/nebula/widgets/nattable/examples/resources/selected_column_header_bg.png"));

            TextPainter txtPainter = new TextPainter(false, false);

            ICellPainter bgImagePainter = new BackgroundImagePainter(
                    txtPainter, bgImage, GUIHelper.getColor(192, 192, 192));

            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER, bgImagePainter,
                    DisplayMode.NORMAL, GridRegion.COLUMN_HEADER);
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER, bgImagePainter,
                    DisplayMode.NORMAL, GridRegion.CORNER);

            ICellPainter selectedHeaderPainter = new BackgroundImagePainter(
                    txtPainter, selectedBgImage, GUIHelper.getColor(192, 192,
                            192));

            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER, selectedHeaderPainter,
View Full Code Here

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

        ICellPainter sortPainter = new SortIconPainter(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 SortableHeaderTextPainter(ICellPainter interiorPainter,
            boolean paintBg, boolean interiorPainterToSpanFullWidth) {
        ICellPainter sortPainter = new SortIconPainter(paintBg);
        CellPainterDecorator painter = new CellPainterDecorator(
                interiorPainter, CellEdgeEnum.RIGHT, 0, sortPainter,
                !interiorPainterToSpanFullWidth, paintBg);
        setWrappedPainter(painter);
    }
View Full Code Here

    public void configureRegistry(IConfigRegistry configRegistry) {
        Image bgImage = tableModel.tableStyle.columnHeaderBgImage;

        if (ObjectUtils.isNotNull(bgImage)) {
            TextPainter txtPainter = new TextPainter(false, false);
            ICellPainter cellPainter = new BackgroundImagePainter(txtPainter,
                    bgImage, GUIHelper.getColor(192, 192, 192));

            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER,
                    new ColumnGroupHeaderTextPainter(columnGroupModel,
View Full Code Here

        addSelectedModeStyling(configRegistry);
    }

    private void addSelectedModeStyling(IConfigRegistry configRegistry) {
        Image selectedBgImage = tableStyle.columnHeaderSelectedBgImage;
        ICellPainter sortHeaderPainter;

        if (ObjectUtils.isNotNull(selectedBgImage)) {
            TextPainter txtPainter = new TextPainter(false, false);
            ICellPainter selectedCellPainter = new BackgroundImagePainter(
                    txtPainter, selectedBgImage, GUIHelper.getColor(192, 192,
                            192));
            sortHeaderPainter = new SortableHeaderTextPainter(
                    selectedCellPainter, false, false);
        } else {
View Full Code Here

        // Gradient painter
        Image bgImage = tableStyle.columnHeaderBgImage;

        if (ObjectUtils.isNotNull(bgImage)) {
            TextPainter txtPainter = new TextPainter(false, false);
            ICellPainter cellPainter = new BackgroundImagePainter(txtPainter,
                    bgImage, GUIHelper.getColor(192, 192, 192));
            SortableHeaderTextPainter sortHeaderPainter = new SortableHeaderTextPainter(
                    cellPainter, false, false);

            configRegistry.registerConfigAttribute(
View Full Code Here

            // was performed on a cell
            // cell == null can happen if the viewport is quite large and
            // contains not enough cells to fill it.
            if (cell != null) {
                IConfigRegistry configRegistry = natTable.getConfigRegistry();
                ICellPainter cellPainter = cell.getLayer().getCellPainter(
                        columnPosition, rowPosition, cell, configRegistry);

                GC gc = new GC(natTable.getDisplay());
                try {
                    Rectangle adjustedCellBounds = natTable.getLayerPainter()
                            .adjustCellBounds(columnPosition, rowPosition,
                                    cell.getBounds());

                    ICellPainter clickedCellPainter = cellPainter
                            .getCellPainterAt(event.x, event.y, cell, gc,
                                    adjustedCellBounds, configRegistry);
                    if (clickedCellPainter != null) {
                        if ((targetCellPainter != null && targetCellPainter == clickedCellPainter)
                                || (targetCellPainterClass != null && targetCellPainterClass
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.