Package org.eclipse.nebula.widgets.nattable.style

Examples of org.eclipse.nebula.widgets.nattable.style.BorderStyle


            {
                // 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);
            }
        });
        // Custom style for label "FOO"
        natTable.addConfiguration(new AbstractRegistryConfiguration() {
View Full Code Here


        DefaultSelectionStyleConfiguration selectionStyle = new DefaultSelectionStyleConfiguration();
        selectionStyle.selectionFont = GUIHelper.getFont(new FontData(
                "Verdana", 8, SWT.NORMAL));
        selectionStyle.selectionBgColor = GUIHelper.getColor(217, 232, 251);
        selectionStyle.selectionFgColor = GUIHelper.COLOR_BLACK;
        selectionStyle.anchorBorderStyle = new BorderStyle(1,
                GUIHelper.COLOR_DARK_GRAY, LineStyleEnum.SOLID);
        selectionStyle.anchorBgColor = GUIHelper.getColor(65, 113, 43);
        selectionStyle.selectedHeaderBgColor = GUIHelper
                .getColor(156, 209, 103);
View Full Code Here

        private void registerColumnTwoTextPainterStyle(
                IConfigRegistry configRegistry) {
            Style style = new Style();
            style.setAttributeValue(CellStyleAttributes.BORDER_STYLE,
                    new BorderStyle(2, GUIHelper.COLOR_BLUE,
                            LineStyleEnum.DASHDOT));

            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_STYLE, style, DisplayMode.NORMAL,
                    _4222_CellPainterExample.COLUMN_TWO_LABEL);
View Full Code Here

            // know where to render a border
            // within the cell
            configRegistry.registerConfigAttribute(
                    CellConfigAttributes.CELL_PAINTER,
                    new CustomLineBorderDecorator(new PaddingDecorator(
                            new TextPainter(), 0, 5, 0, 0), new BorderStyle(2,
                            GUIHelper.COLOR_GREEN, LineStyleEnum.SOLID)),
                    DisplayMode.NORMAL,
                    _4222_CellPainterExample.COLUMN_SIX_LABEL);

            // don't forget to register the Double converter!
View Full Code Here

    public BorderStyle getNewValue() {
        if (!noBordersCheckBox.getSelection()) {
            Color borderColor = colorPicker.getSelectedColor();
            LineStyleEnum lineStyle = lineStylePicker.getSelectedLineStyle();
            int borderThickness = thicknessPicker.getSelectedThickness();
            return new BorderStyle(borderThickness, borderColor, lineStyle);
        }
        return null;
    }
View Full Code Here

        cellStyle.setAttributeValue(CellStyleAttributes.IMAGE,
                selectionAnchorSelectionImage);

        // if there is not explicitly another border style configured use the
        // same as in getSelectionAnchorStyle()
        BorderStyle border = selectionAnchorSelectionBorderStyle != null ? selectionAnchorSelectionBorderStyle
                : selectionAnchorBorderStyle;
        cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, border);

        cellStyle.setAttributeValue(CellStyleAttributes.PASSWORD_ECHO_CHAR,
                selectionAnchorSelectionPWEchoChar);
View Full Code Here

            style.setAttributeValue(CellStyleAttributes.FONT, font);
        }

        // Border Style
        String borderPrefix = prefix + DOT + BORDER_PREFIX;
        BorderStyle borderStyle = loadBorderStyle(borderPrefix, properties);
        if (borderStyle != null) {
            style.setAttributeValue(CellStyleAttributes.BORDER_STYLE,
                    borderStyle);
        }
View Full Code Here

    private static BorderStyle loadBorderStyle(String borderPrefix,
            Properties properties) {
        String borderStyle = properties.getProperty(borderPrefix);
        if (borderStyle != null) {
            return new BorderStyle(borderStyle);
        }
        return null;
    }
View Full Code Here

    }

    @Override
    public int getPreferredWidth(ILayerCell cell, GC gc,
            IConfigRegistry configRegistry) {
        BorderStyle borderStyle = getBorderStyle(cell, configRegistry);
        int borderThickness = borderStyle != null ? borderStyle.getThickness()
                : 0;

        int borderLineCount = 0;
        // check how many border lines are configured for that cell
        List<String> labels = cell.getConfigLabels().getLabels();
View Full Code Here

    }

    @Override
    public int getPreferredHeight(ILayerCell cell, GC gc,
            IConfigRegistry configRegistry) {
        BorderStyle borderStyle = getBorderStyle(cell, configRegistry);
        int borderThickness = borderStyle != null ? borderStyle.getThickness()
                : 0;

        int borderLineCount = 0;
        // check how many border lines are configured for that cell
        List<String> labels = cell.getConfigLabels().getLabels();
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.style.BorderStyle

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.