Examples of StolenColorEditor


Examples of org.locationtech.udig.style.advanced.utils.StolenColorEditor

        // font color
        Label fontColorLabel = new Label(mainComposite, SWT.NONE);
        fontColorLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
        fontColorLabel.setText(Messages.LineLabelsParametersComposite_7);

        fontColorEditor = new StolenColorEditor(mainComposite, this);
        fontColorButton = fontColorEditor.getButton();
        GridData fontColorButtonGD = new GridData(SWT.FILL, SWT.CENTER, true, false);
        fontColorButtonGD.horizontalSpan = 2;
        fontColorButton.setLayoutData(fontColorButtonGD);
        Color tmpColor = null;;
        try {
            tmpColor = Color.decode(textSymbolizerWrapper.getColor());
        } catch (Exception e) {
            tmpColor = Color.black;
        }
        fontColorEditor.setColor(tmpColor);

        // label halo
        Label haloLabel = new Label(mainComposite, SWT.NONE);
        haloLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
        haloLabel.setText(Messages.LineLabelsParametersComposite_8);

        haloColorEditor = new StolenColorEditor(mainComposite, this);
        haloColorButton = haloColorEditor.getButton();
        GridData haloColorButtonGD = new GridData(SWT.FILL, SWT.CENTER, true, false);
        haloColorButton.setLayoutData(haloColorButtonGD);
        tmpColor = null;;
        try {
View Full Code Here

Examples of org.locationtech.udig.style.advanced.utils.StolenColorEditor

        colorMaskButton = new Button(colorMaskGroup, SWT.CHECK);
        colorMaskButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
        colorMaskButton.setText(Messages.CoverageColorMaskStyleEditorPage_1);
        colorMaskButton.addSelectionListener(this);

        maskColorEditor = new StolenColorEditor(colorMaskGroup);
        if (maskColorString != null) {
            String[] colorSplit = maskColorString.split(":"); //$NON-NLS-1$
            Color color = new Color(Integer.parseInt(colorSplit[0]), Integer.parseInt(colorSplit[1]),
                    Integer.parseInt(colorSplit[2]));
            maskColorEditor.setColor(color);
View Full Code Here

Examples of org.locationtech.udig.style.advanced.utils.StolenColorEditor

        try {
            tmpColor = Color.decode(color);
        } catch (Exception e) {
            tmpColor = Color.gray;
        }
        borderColorEditor = new StolenColorEditor(mainComposite, this);
        borderColorEditor.setColor(tmpColor);
        borderColorButton = borderColorEditor.getButton();
        GridData borderColorButtonSIMPLEGD = new GridData(SWT.FILL, SWT.CENTER, true, false);
        borderColorButton.setLayoutData(borderColorButtonSIMPLEGD);
View Full Code Here

Examples of org.locationtech.udig.style.advanced.utils.StolenColorEditor

        // font color
        Label fontColorLabel = new Label(mainComposite, SWT.NONE);
        fontColorLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
        fontColorLabel.setText(Messages.PolygonLabelsParametersComposite_6);

        fontColorEditor = new StolenColorEditor(mainComposite, this);
        fontColorButton = fontColorEditor.getButton();
        GridData fontColorButtonGD = new GridData(SWT.FILL, SWT.CENTER, true, false);
        fontColorButtonGD.horizontalSpan = 2;
        fontColorButton.setLayoutData(fontColorButtonGD);
        Color tmpColor = null;;
        try {
            tmpColor = Color.decode(textSymbolizerWrapper.getColor());
        } catch (Exception e) {
            tmpColor = Color.black;
        }
        fontColorEditor.setColor(tmpColor);

        // label halo
        Label haloLabel = new Label(mainComposite, SWT.NONE);
        haloLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
        haloLabel.setText(Messages.PolygonLabelsParametersComposite_7);

        haloColorEditor = new StolenColorEditor(mainComposite, this);
        haloColorButton = haloColorEditor.getButton();
        GridData haloColorButtonGD = new GridData(SWT.FILL, SWT.CENTER, true, false);
        haloColorButton.setLayoutData(haloColorButtonGD);
        tmpColor = null;;
        try {
View Full Code Here

Examples of org.locationtech.udig.style.advanced.utils.StolenColorEditor

        // font color
        Label fontColorLabel = new Label(mainComposite, SWT.NONE);
        fontColorLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
        fontColorLabel.setText(Messages.PointLabelsParametersComposite_8);

        fontColorEditor = new StolenColorEditor(mainComposite, this);
        fontColorButton = fontColorEditor.getButton();
        GridData fontColorButtonGD = new GridData(SWT.FILL, SWT.CENTER, true, false);
        fontColorButtonGD.horizontalSpan = 2;
        fontColorButton.setLayoutData(fontColorButtonGD);
        Color tmpColor = null;;
        try {
            tmpColor = Color.decode(textSymbolizerWrapper.getColor());
        } catch (Exception e) {
            tmpColor = Color.black;
        }
        fontColorEditor.setColor(tmpColor);

        // label halo
        Label haloLabel = new Label(mainComposite, SWT.NONE);
        haloLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
        haloLabel.setText(Messages.PointLabelsParametersComposite_9);

        haloColorEditor = new StolenColorEditor(mainComposite, this);
        haloColorButton = haloColorEditor.getButton();
        GridData haloColorButtonGD = new GridData(SWT.FILL, SWT.CENTER, true, false);
        haloColorButton.setLayoutData(haloColorButtonGD);
        tmpColor = null;;
        try {
View Full Code Here

Examples of org.locationtech.udig.style.advanced.utils.StolenColorEditor

        try {
            tmpColor = Color.decode(color);
        } catch (Exception e) {
            tmpColor = Color.gray;
        }
        fillColorEditor = new StolenColorEditor(mainComposite, this);
        fillColorEditor.setColor(tmpColor);
        fillColorButton = fillColorEditor.getButton();
        GridData fillColorButtonGD = new GridData(SWT.FILL, SWT.CENTER, true, false);
        fillColorButton.setLayoutData(fillColorButtonGD);

        fillColorAttributecombo = new Combo(mainComposite, SWT.DROP_DOWN | SWT.READ_ONLY);
        fillColorAttributecombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
        fillColorAttributecombo.setItems(stringAttributesArrays);
        fillColorAttributecombo.addSelectionListener(this);
        fillColorAttributecombo.select(0);
        if (tmpColor == null) {
            int index = getAttributeIndex(color, stringAttributesArrays);
            if (index != -1) {
                fillColorAttributecombo.select(index);
            }
        }

        // graphics fill
        Label graphicsFillLabel = new Label(mainComposite, SWT.RADIO);
        graphicsFillLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
        graphicsFillLabel.setText(Messages.PolygonFillParametersComposite_2);

        Composite pathComposite = new Composite(mainComposite, SWT.NONE);
        GridData pathCompositeGD = new GridData(SWT.FILL, SWT.FILL, true, false);
        pathCompositeGD.horizontalSpan = 2;
        pathComposite.setLayoutData(pathCompositeGD);
        GridLayout pathLayout = new GridLayout(2, false);
        pathLayout.marginWidth = 0;
        pathLayout.marginHeight = 0;
        pathComposite.setLayout(pathLayout);
        graphicsPathText = new Text(pathComposite, SWT.SINGLE | SWT.LEAD | SWT.BORDER);
        graphicsPathText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
        try {
            graphicsPathText.setText(polygonSymbolizerWrapper.getFillExternalGraphicFillPath());
        } catch (Exception e) {
            graphicsPathText.setText(""); //$NON-NLS-1$
        }
        graphicsPathText.addModifyListener(this);
        Button pathButton = new Button(pathComposite, SWT.PUSH);
        pathButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
        pathButton.setText("..."); //$NON-NLS-1$
        pathButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter(){
            public void widgetSelected( org.eclipse.swt.events.SelectionEvent e ) {
                FileDialog fileDialog = new FileDialog(graphicsPathText.getShell(), SWT.OPEN);
                String path = fileDialog.open();
                if (path == null || path.length() < 1) {
                    graphicsPathText.setText(""); //$NON-NLS-1$
                } else {
                    graphicsPathText.setText(path);
                }
            }
        });

        // well known marks
        Label wkmLabel = new Label(mainComposite, SWT.RADIO);
        wkmLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
        wkmLabel.setText(Messages.PolygonFillParametersComposite_3);

        wkmarkNameCombo = new Combo(mainComposite, SWT.DROP_DOWN | SWT.READ_ONLY);
        GridData wkmarkNameComboGD = new GridData(SWT.FILL, SWT.FILL, false, false);
        wkmarkNameComboGD.horizontalSpan = 2;
        wkmarkNameCombo.setLayoutData(wkmarkNameComboGD);
        wkmarkNameCombo.setItems(Utilities.getAllMarksArray());
        wkmarkNameCombo.addSelectionListener(this);

        String wkMarkNameFill = polygonSymbolizerWrapper.getWkMarkNameFill();
        int attributeIndex = getAttributeIndex(wkMarkNameFill, Utilities.getAllMarksArray());
        if (attributeIndex != -1) {
            wkmarkNameCombo.select(attributeIndex);
        }

        new Label(mainComposite, SWT.NONE);

        Composite wkmarkComposite = new Composite(mainComposite, SWT.NONE);
        GridData wkmarkCompositeGD = new GridData(SWT.FILL, SWT.FILL, true, false);
        wkmarkCompositeGD.horizontalSpan = 2;
        wkmarkComposite.setLayoutData(wkmarkCompositeGD);
        GridLayout wkmarkCompositeLayout = new GridLayout(3, false);
        wkmarkCompositeLayout.marginWidth = 0;
        wkmarkCompositeLayout.marginHeight = 0;
        wkmarkComposite.setLayout(wkmarkCompositeLayout);

        // mark width
        wkmWidthSpinner = new Spinner(wkmarkComposite, SWT.BORDER);
        wkmWidthSpinner.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
        wkmWidthSpinner.setMaximum(200);
        wkmWidthSpinner.setMinimum(0);
        wkmWidthSpinner.setIncrement(1);
        wkmWidthSpinner.setToolTipText(Messages.PolygonFillParametersComposite_4);

        String wkMarkWidth = polygonSymbolizerWrapper.getWkMarkWidthFill();
        Double tmpWidth = isDouble(wkMarkWidth);
        int tmpWidthInt = 1;
        if (tmpWidth != null) {
            tmpWidthInt = tmpWidth.intValue();
        }
        wkmWidthSpinner.setSelection(tmpWidthInt * 10);
        wkmWidthSpinner.setDigits(1);
        wkmWidthSpinner.addSelectionListener(this);

        // mark size
        wkmSizeSpinner = new Spinner(wkmarkComposite, SWT.BORDER);
        wkmSizeSpinner.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
        wkmSizeSpinner.setMaximum(1000);
        wkmSizeSpinner.setMinimum(0);
        wkmSizeSpinner.setIncrement(1);
        wkmSizeSpinner.setToolTipText(Messages.PolygonFillParametersComposite_5);

        String wkMarkSize = polygonSymbolizerWrapper.getWkMarkSizeFill();
        Double tmpSize = isDouble(wkMarkSize);
        int tmpSizeInt = 5;
        if (tmpSize != null) {
            tmpSizeInt = tmpSize.intValue();
        }
        wkmSizeSpinner.setSelection(tmpSizeInt * 10);
        wkmSizeSpinner.setDigits(1);
        wkmSizeSpinner.addSelectionListener(this);

        // mark color
        String wkMarkColor = polygonSymbolizerWrapper.getWkMarkColorFill();
        Color tmpWkmColor;
        try {
            tmpWkmColor = Color.decode(wkMarkColor);
        } catch (Exception e) {
            tmpWkmColor = Color.gray;
        }
        wkmColorEditor = new StolenColorEditor(wkmarkComposite, this);
        wkmColorEditor.setColor(tmpWkmColor);
        wkmColorButton = wkmColorEditor.getButton();
        GridData wkmColorButtonGD = new GridData(SWT.FILL, SWT.CENTER, true, false);
        wkmColorButton.setLayoutData(wkmColorButtonGD);

View Full Code Here

Examples of org.locationtech.udig.style.advanced.utils.StolenColorEditor

        try {
            tmpColor = Color.decode(symbolizersWrapper.getStrokeColor());
        } catch (Exception e) {
            tmpColor = Color.gray;
        }
        borderColorEditor = new StolenColorEditor(mainComposite, this);
        borderColorEditor.setColor(tmpColor);
        borderColorButton = borderColorEditor.getButton();
        GridData borderColorButtonSIMPLEGD = new GridData(SWT.FILL, SWT.CENTER, true, false);
        borderColorButtonSIMPLEGD.horizontalSpan = 2;
        borderColorButton.setLayoutData(borderColorButtonSIMPLEGD);
View Full Code Here

Examples of org.locationtech.udig.style.advanced.utils.StolenColorEditor

        try {
            tmpColor = Color.decode(pointSymbolizerWrapper.getFillColor());
        } catch (Exception e) {
            tmpColor = Color.gray;
        }
        fillColorEditor = new StolenColorEditor(mainComposite, this);
        fillColorEditor.setColor(tmpColor);
        fillColorButton = fillColorEditor.getButton();
        GridData fillColorButtonGD = new GridData(SWT.FILL, SWT.CENTER, true, false);
        fillColorButtonGD.horizontalSpan = 2;
        fillColorButton.setLayoutData(fillColorButtonGD);
View Full Code Here

Examples of org.locationtech.udig.style.sld.internal.StolenColorEditor

    public Composite createControl(Composite parent, KeyListener klisten) {
        Composite part = AbstractSimpleConfigurator.subpart(parent, Messages.SimpleStyleConfigurator_line_label );

        this.on = new Button(part, SWT.CHECK);

        this.chooser = new StolenColorEditor(part, this.sync);

        this.size = new Combo(part, SWT.DROP_DOWN);
        this.size.setItems(new String[]{"1", "2", "3", "5", "10"}); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
        this.size.setTextLimit(2);
        this.size.addKeyListener(klisten);
View Full Code Here

Examples of org.locationtech.udig.style.sld.internal.StolenColorEditor

        Composite part = AbstractSimpleConfigurator.subpart( parent, Messages.SimpleStyleConfigurator_fill_label );
       
        this.on = new Button( part, SWT.CHECK );
        this.on.addSelectionListener( this.sync );               
       
        this.chooser = new StolenColorEditor( part, this.sync );
       
        this.percent = new Combo( part, SWT.DROP_DOWN );
        this.percent.setItems( new String[]{ "0%","25%","50%","75%","100%"} )//$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
        this.percent.setTextLimit( 4 );
        this.percent.addKeyListener(kListener);
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.