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

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


    public void configureRegistry(IConfigRegistry configRegistry) {

        configRegistry.registerConfigAttribute(
                CellConfigAttributes.CELL_PAINTER, new CellPainterDecorator(
                        new TextPainter(), CellEdgeEnum.TOP, new ImagePainter(
                                GUIHelper.getImage("plus")),
                        this.paintDecorationdepentend), DisplayMode.NORMAL,
                CellPainterDecorator_Example.COLUMN_ONE_LABEL);

        configRegistry.registerConfigAttribute(
                CellConfigAttributes.CELL_PAINTER, new CellPainterDecorator(
                        new TextPainter(), CellEdgeEnum.BOTTOM,
                        new ImagePainter(GUIHelper.getImage("plus")),
                        this.paintDecorationdepentend), DisplayMode.NORMAL,
                CellPainterDecorator_Example.COLUMN_TWO_LABEL);

        configRegistry.registerConfigAttribute(
                CellConfigAttributes.CELL_PAINTER, new CellPainterDecorator(
                        new TextPainter(), CellEdgeEnum.LEFT, new ImagePainter(
                                GUIHelper.getImage("plus")),
                        this.paintDecorationdepentend), DisplayMode.NORMAL,
                CellPainterDecorator_Example.COLUMN_THREE_LABEL);

        configRegistry.registerConfigAttribute(
                CellConfigAttributes.CELL_PAINTER, new CellPainterDecorator(
                        new TextPainter(), CellEdgeEnum.RIGHT,
                        new ImagePainter(GUIHelper.getImage("plus")),
                        this.paintDecorationdepentend), DisplayMode.NORMAL,
                CellPainterDecorator_Example.COLUMN_FOUR_LABEL);

        configRegistry.registerConfigAttribute(
                CellConfigAttributes.CELL_PAINTER, new CellPainterDecorator(
                        new TextPainter(), CellEdgeEnum.TOP_LEFT,
                        new ImagePainter(GUIHelper.getImage("plus")),
                        this.paintDecorationdepentend), DisplayMode.NORMAL,
                CellPainterDecorator_Example.COLUMN_FIVE_LABEL);

        configRegistry.registerConfigAttribute(
                CellConfigAttributes.CELL_PAINTER, new CellPainterDecorator(
                        new TextPainter(), CellEdgeEnum.TOP_RIGHT,
                        new ImagePainter(GUIHelper.getImage("plus")),
                        this.paintDecorationdepentend), DisplayMode.NORMAL,
                CellPainterDecorator_Example.COLUMN_SIX_LABEL);

        configRegistry.registerConfigAttribute(
                CellConfigAttributes.CELL_PAINTER, new CellPainterDecorator(
                        new TextPainter(), CellEdgeEnum.BOTTOM_LEFT,
                        new ImagePainter(GUIHelper.getImage("plus")),
                        this.paintDecorationdepentend), DisplayMode.NORMAL,
                CellPainterDecorator_Example.COLUMN_SEVEN_LABEL);

        configRegistry.registerConfigAttribute(
                CellConfigAttributes.CELL_PAINTER, new CellPainterDecorator(
                        new TextPainter(), CellEdgeEnum.BOTTOM_RIGHT,
                        new ImagePainter(GUIHelper.getImage("plus")),
                        this.paintDecorationdepentend), DisplayMode.NORMAL,
                CellPainterDecorator_Example.COLUMN_EIGHT_LABEL);

    }
View Full Code Here


                                ColumnLabelAccumulator.COLUMN_LABEL_PREFIX + 0);

                configRegistry.registerConfigAttribute(
                        CellConfigAttributes.CELL_PAINTER,
                        new BackgroundPainter(new CellPainterDecorator(
                                new TextPainter() {
                                    @Override
                                    protected String convertDataType(
                                            ILayerCell cell,
                                            IConfigRegistry configRegistry) {
                                        Datum dataValue = (Datum) cell
View Full Code Here

        natTable.addConfiguration(new DefaultNatTableStyleConfiguration() {
            {
                // override the LineBorderDecorator here to show how to paint
                // borders on single sides of a cell
                cellPainter = new CustomLineBorderDecorator(new TextPainter());
                // set a border style
                borderStyle = new BorderStyle(2, GUIHelper.COLOR_BLUE,
                        LineStyleEnum.DASHDOT);
            }
        });
View Full Code Here

        natTableConfiguration.hAlign = HorizontalAlignmentEnum.LEFT;
        natTableConfiguration.vAlign = VerticalAlignmentEnum.TOP;

        // A custom painter can be plugged in to paint the cells differently
        natTableConfiguration.cellPainter = new PaddingDecorator(
                new TextPainter(), 1);

        // Setup even odd row colors - row colors override the NatTable default
        // colors
        DefaultRowStyleConfiguration rowStyleConfiguration = new DefaultRowStyleConfiguration();
        rowStyleConfiguration.oddRowBgColor = GUIHelper.getColor(254, 251, 243);
View Full Code Here

     * @deprecated Use constructor without IRowGroupModel reference
     */
    @SuppressWarnings("rawtypes")
    @Deprecated
    public RowGroupHeaderTextPainter(IRowGroupModel rowGroupModel) {
        this(rowGroupModel, new TextPainter());
    }
View Full Code Here

     * {@link TextPainter} as base {@link ICellPainter} and decorate it with the
     * {@link RowGroupExpandCollapseImagePainter} on the bottom edge of the
     * cell.
     */
    public RowGroupHeaderTextPainter() {
        this(new TextPainter());
    }
View Full Code Here

    }

    private void addButtonToColumn(IConfigRegistry configRegistry,
            Composite parent) {
        buttonPainter = new ButtonCellPainter(new CellPainterDecorator(
                new TextPainter(), CellEdgeEnum.RIGHT, new ImagePainter(
                        GUIHelper.getImage("preferences"))));

        configRegistry.registerConfigAttribute(
                CellConfigAttributes.CELL_PAINTER, buttonPainter,
                DisplayMode.NORMAL, CUSTOM_CELL_LABEL);
View Full Code Here

        tableContainer.setLayout(new GridLayout(6, true));
        GridDataFactory.fillDefaults().grab(true, true).applyTo(tableContainer);

        createNatTable(tableContainer, new GradientBackgroundPainter(
                new TextPainter(false, false, false), true));
        createNatTable(tableContainer, new TextPainter(true, true, false));
        createNatTable(tableContainer, new TextPainter(false, true, true));
        createNatTable(tableContainer, new TextPainter(true, true, true));
        createNatTable(tableContainer, new TextPainter(true, true, 5, true));
        createNatTable(tableContainer, new PaddingDecorator(new TextPainter(
                true, true, 5, true), 5));

        createVerticalHeaderNatTable(tableContainer, new VerticalTextPainter(
                false, true, false));
        createVerticalHeaderNatTable(tableContainer, new VerticalTextPainter(
                true, true, false));
        createVerticalHeaderNatTable(tableContainer,
                new GradientBackgroundPainter(new VerticalTextPainter(false,
                        false, true)));
        createVerticalHeaderNatTable(tableContainer, new VerticalTextPainter(
                true, true, true));
        createVerticalHeaderNatTable(tableContainer, new VerticalTextPainter(
                true, true, 5, true));
        createVerticalHeaderNatTable(tableContainer, new PaddingDecorator(
                new VerticalTextPainter(true, true, 5, true), 5));

        TextPainter underlineTextPainer = new TextPainter();
        underlineTextPainer.setUnderline(true);
        createNatTable2(tableContainer, underlineTextPainer);
        TextPainter strikethroughTextPainer = new TextPainter();
        strikethroughTextPainer.setStrikethrough(true);
        createNatTable2(tableContainer, strikethroughTextPainer);
        TextPainter underlineStrikethroughTextPainer = new TextPainter();
        underlineStrikethroughTextPainer.setUnderline(true);
        underlineStrikethroughTextPainer.setStrikethrough(true);
        createNatTable2(tableContainer, underlineStrikethroughTextPainer);

        VerticalTextPainter vunderlineTextPainer = new VerticalTextPainter(
                true, true, true);
        vunderlineTextPainer.setUnderline(true);
View Full Code Here

     *
     * @deprecated Use constructor without ColumnGroupModel reference
     */
    @Deprecated
    public ColumnGroupHeaderTextPainter(ColumnGroupModel columnGroupModel) {
        this(columnGroupModel, new TextPainter());
    }
View Full Code Here

     * {@link TextPainter} as base {@link ICellPainter} and decorate it with the
     * {@link ColumnGroupExpandCollapseImagePainter} on the right edge of the
     * cell.
     */
    public ColumnGroupHeaderTextPainter() {
        this(new TextPainter());
    }
View Full Code Here

TOP

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

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.