Package fr.soleil.comete.widget.util

Examples of fr.soleil.comete.widget.util.CometeColor


                prefs.setInteger(keyLineWidth, component.getDataViewLineWidth(device));

                String keyLineStyle = keyPrefix + ".lineStyle";
                prefs.setInteger(keyLineStyle, component.getDataViewLineStyle(device));

                CometeColor curveColor = component.getDataViewCurveProperties(device).getColor();

                String greenKeyLineColor = keyPrefix + ".green";
                String redKeyLineColor = keyPrefix + ".red";
                String blueKeyLineColor = keyPrefix + ".blue";
                String alphaKeyLineColor = keyPrefix + ".alpha";

                if (curveColor != null) {
                    prefs.setInteger(greenKeyLineColor, curveColor.getGreen());
                    prefs.setInteger(redKeyLineColor, curveColor.getRed());
                    prefs.setInteger(blueKeyLineColor, curveColor.getBlue());
                    prefs.setInteger(alphaKeyLineColor, curveColor.getAlpha());
                }

                String keyFillStyle = keyPrefix + ".fillStyle";
                prefs.setInteger(keyFillStyle, component.getDataViewFillStyle(device));

                // The method getDataViewViewType() for Curve properties tab is missing

                // The method getDataViewCometeFillColor() is not working

                CometeColor curveFillColor = component.getDataViewCometeFillColor(device);

                String greenFillColor = keyPrefix + ".fill.green";
                String redFillColor = keyPrefix + ".fill.red";
                String blueFillColor = keyPrefix + ".fill.blue";
                String alphaFillColor = keyPrefix + ".fill.alpha";

                if (curveFillColor != null) {
                    prefs.setInteger(greenFillColor, curveFillColor.getGreen());
                    prefs.setInteger(redFillColor, curveFillColor.getRed());
                    prefs.setInteger(blueFillColor, curveFillColor.getBlue());
                    prefs.setInteger(alphaFillColor, curveFillColor.getAlpha());
                }

                String keyBarWidth = keyPrefix + ".barWidth";
                prefs.setInteger(keyBarWidth, component.getDataViewBarWidth(device));

                String keyFillMethod = keyPrefix + ".barFillMethod";
                prefs.setInteger(keyFillMethod, component.getDataViewFillMethod(device));

                // The methods getDataViewTransformA0(), getDataViewTransformA1(),
                // getDataViewTransformA2() are not working

                String keyTransformA0 = keyPrefix + ".transformA0";
                prefs.setDouble(keyTransformA0, component.getDataViewTransformA0(device));

                String keyTransformA1 = keyPrefix + ".transformA1";
                prefs.setDouble(keyTransformA1, component.getDataViewTransformA1(device));

                String keyTransformA2 = keyPrefix + ".transformA2";
                prefs.setDouble(keyTransformA2, component.getDataViewTransformA2(device));

                String keyMarkerVisible = keyPrefix + ".markerVisible";

                if (component.getDataViewMarkerProperties(device).isLegendVisible()) {
                    prefs.setBoolean(keyMarkerVisible, "true");
                }
                else {
                    prefs.setBoolean(keyMarkerVisible, "false");
                }

                String keyMarkerSize = keyPrefix + ".markerSize";
                prefs.setInteger(keyMarkerSize, component.getDataViewMarkerSize(device));

                String keyMarkerStyle = keyPrefix + ".markerStyle";
                prefs.setInteger(keyMarkerStyle, component.getDataViewMarkerStyle(device));

                CometeColor markerColor = component.getDataViewMarkerProperties(device).getColor();

                if (markerColor != null) {
                    String redMarkerCometeColor = keyPrefix + ".marker.red";
                    String greenMarkerCometeColor = keyPrefix + ".marker.green";
                    String blueMarkerCometeColor = keyPrefix + ".marker.blue";
                    String alphaMarkerCometeColor = keyPrefix + ".marker.alpha";

                    prefs.setInteger(redMarkerCometeColor, markerColor.getRed());
                    prefs.setInteger(greenMarkerCometeColor, markerColor.getGreen());
                    prefs.setInteger(blueMarkerCometeColor, markerColor.getBlue());
                    prefs.setInteger(alphaMarkerCometeColor, markerColor.getAlpha());
                }

                String smoothingExtrapolation = keyPrefix + ".smoothingExtrapolation";
                prefs.setInteger(smoothingExtrapolation, component
                        .getDataViewSmoothingExtrapolation(device));
View Full Code Here


    /**
     *
     */
    public TangoStateBehavior() {
        super();
        registerColor("ON", new CometeColor(0,255,0));
        registerColor("OFF", new CometeColor(255,255,255));
        registerColor("CLOSE", new CometeColor(255,255,255));
        registerColor("OPEN", new CometeColor(0,255,0));
        registerColor("INSERT", new CometeColor(255,255,255));
        registerColor("EXTRACT", new CometeColor(0,255,0));
        registerColor("MOVING", new CometeColor(128,160,255));
        registerColor("STANDBY", new CometeColor(255,255,0));
        registerColor("FAULT", new CometeColor(255,0,0));
        registerColor("INIT", new CometeColor(204,204,122));
        registerColor("RUNNING", new CometeColor(128,160,255));
        registerColor("ALARM", new CometeColor(255,140,0));
        registerColor("DISABLE", new CometeColor(255,0,255));
        registerColor("UNKNOWN", new CometeColor(155,155,155));
       
        // Specific for Salsa : used when the dao cannot connect to the device.
        registerColor("CONNECT ERROR", new CometeColor(128, 0, 0));
    }
View Full Code Here

     */
    private ChartViewer getFittedData() {
        if (fittedData == null) {
            fittedData = new ChartViewer();
            fittedData.getComponent().setManagementPanelVisible(false);
            fittedData.setCometeBackground(new CometeColor(200, 200, 200));
        }
        return fittedData;
    }
View Full Code Here

    }

    private WheelSwitch getInitialBackgroundEditor() {
        if (this.initialBackgroundEditor == null) {
            this.initialBackgroundEditor = generateWheelSwitch();
            this.initialBackgroundEditor.setCometeBackground(new CometeColor(getBackground()
                    .getRed(), getBackground().getGreen(), getBackground().getBlue()));
            this.initialBackgroundEditor.setToolTipText(INITIAL_BACKG_INFO);
        }
        return this.initialBackgroundEditor;
    }
View Full Code Here

    }

    private WheelSwitch getInitialHeightEditor() {
        if (this.initialHeightEditor == null) {
            this.initialHeightEditor = generateWheelSwitch();
            this.initialHeightEditor.setCometeBackground(new CometeColor(getBackground().getRed(),
                    getBackground().getGreen(), getBackground().getBlue()));
            this.initialHeightEditor.setToolTipText(INITIAL_HEIGHT_INFO);
        }
        return this.initialHeightEditor;
    }
View Full Code Here

    }

    private BooleanComboBox getInitialsParametersModeEditor() {
        if (this.initialsParametersModeEditor == null) {
            this.initialsParametersModeEditor = generateBooleanComboBox();
            this.initialsParametersModeEditor.setCometeBackground(new CometeColor(getBackground()
                    .getRed(), getBackground().getGreen(), getBackground().getBlue()));
            this.initialsParametersModeEditor.setToolTipText(INITIAL_PARAM_MODE_INFO);
        }
        return this.initialsParametersModeEditor;
    }
View Full Code Here

    private WheelSwitch getInitialPositionEditor() {
        if (this.initialPositionEditor == null) {
            this.initialPositionEditor = generateWheelSwitch();
            this.initialPositionEditor
                    .setCometeBackground(new CometeColor(getBackground().getRed(), getBackground()
                            .getGreen(), getBackground().getBlue()));
            this.initialPositionEditor.setToolTipText(INITIAL_POSITION_INFO);
        }
        return this.initialPositionEditor;
    }
View Full Code Here

    }

    private WheelSwitch getInitialWidthEditor() {
        if (this.initialWidthEditor == null) {
            this.initialWidthEditor = generateWheelSwitch();
            this.initialWidthEditor.setCometeBackground(new CometeColor(getBackground().getRed(),
                    getBackground().getGreen(), getBackground().getBlue()));
            this.initialWidthEditor.setToolTipText(INITIAL_WIDTH_INFO);
        }
        return this.initialWidthEditor;
    }
View Full Code Here

     */
    private ChartViewer getFittedData() {
        if (this.fittedData == null) {
            this.fittedData = new ChartViewer();
            this.fittedData.getComponent().setPreferredSize(200, 200);
            this.fittedData.setCometeBackground(new CometeColor(200, 200, 200));
        }
        return this.fittedData;
    }
View Full Code Here

     * @return fr.esrf.tangoatk.widget.attribute.NumberScalarWheelEditor
     */
    private WheelSwitch getStartingXWheelEditor() {
        if (startingXWheelEditor == null) {
            startingXWheelEditor = generateWheelSwitch();
            startingXWheelEditor.setCometeBackground(new CometeColor(getBackground().getRed(),
                    getBackground().getGreen(), getBackground().getBlue()));
            startingXWheelEditor.setToolTipText(STARTINGX_INFO);
        }
        return startingXWheelEditor;
    }
View Full Code Here

TOP

Related Classes of fr.soleil.comete.widget.util.CometeColor

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.