Package fr.soleil.comete.definition.widget.properties

Examples of fr.soleil.comete.definition.widget.properties.PlotProperties


                    chartViewer.setDataViewMarkerSize(newdataViewId, 5);

                    String plotKey = newdataViewId.replaceFirst(scanServerDeviceName + "/", "");
                    if (plotPropertiesMap != null && plotPropertiesMap.containsKey(plotKey)
                            && plotPropertiesMap.get(plotKey) != null) {
                        PlotProperties plotProperties = plotPropertiesMap.get(plotKey);
                        setDataViewConfiguration(newdataViewId, plotProperties);
                        // chartViewer.setDataViewPlotProperties(newdataViewId,
                        // plotProperties);
                    } else {
                        chartViewer.setDataViewCometeColor(newdataViewId, dataViewColor);
                        chartViewer.setDataViewMarkerStyle(newdataViewId, IChartViewer.MARKER_DOT);
                        chartViewer.setDataViewMarkerCometeColor(newdataViewId, dataViewColor);
                        chartViewer.setDataViewMarkerSize(newdataViewId, 5);
                    }
                    chartViewer.setDataViewAxis(newdataViewId, axis);
                    PlotProperties plotProperties = chartViewer.getDataViewPlotProperties(newdataViewId);
                    if (plotProperties != null) {
                        plotProperties.setAxisChoice(axis);
                    }

                    chartViewer.setDataViewDisplayName(newdataViewId, newDisplayName);
                    dataViewIdList.add(newdataViewId);
                }
View Full Code Here


        }
    }

    private void setChartWidgetModel(IKey attributeKey) {
        setWidgetModel(chartViewer, chartBox, attributeKey);
        PlotProperties properties = plotPropertiesMap.get(attributeKey.getInformationKey().toLowerCase());
        if (properties != null) {
            chartViewer.setDataViewPlotProperties(attributeKey.getInformationKey(), properties);
        } else {
            chartViewer.setDataViewCometeColor(attributeKey.getInformationKey(), CometeColor.RED);
        }
View Full Code Here

        }
    }

    private void setChartWidgetModel(IKey attributeKey) {
        setWidgetModel(chartViewer, chartBox, attributeKey);
        PlotProperties properties = plotPropertiesMap.get(attributeKey.getInformationKey().toLowerCase());
        if (properties != null) {
            chartViewer.setDataViewPlotProperties(attributeKey.getInformationKey(), properties);
        } else {
            chartViewer.setDataViewCometeColor(attributeKey.getInformationKey(), CometeColor.RED);
        }
View Full Code Here

        }
    }

    private void setChartWidgetModel(IKey attributeKey) {
        setWidgetModel(chartViewer, chartBox, attributeKey);
        PlotProperties properties = plotPropertiesMap.get(attributeKey.getInformationKey().toLowerCase());
        if (properties != null) {
            chartViewer.setDataViewPlotProperties(attributeKey.getInformationKey(), properties);
        } else {
            chartViewer.setDataViewCometeColor(attributeKey.getInformationKey(), CometeColor.RED);
        }
View Full Code Here

        }
    }

    private void setChartWidgetModel(IKey attributeKey) {
        setWidgetModel(chartViewer, chartBox, attributeKey);
        PlotProperties properties = plotPropertiesMap.get(attributeKey.getInformationKey().toLowerCase());
        if (properties != null) {
            chartViewer.setDataViewPlotProperties(attributeKey.getInformationKey(), properties);
        } else {
            chartViewer.setDataViewCometeColor(attributeKey.getInformationKey(), CometeColor.RED);
        }
View Full Code Here

    }

    private void setChartWidgetModel(IKey attributeKey) {
        if (attributeKey != null) {
            chartBox.connectWidget(chartViewer, attributeKey);
            PlotProperties properties = plotPropertiesMap.get(attributeKey.getInformationKey().toLowerCase());
            if (properties != null) {
                if (properties.getAxisChoice() == -1) {
                    properties.setAxisChoice(IChartViewer.Y1);
                }
                chartViewer.setDataViewPlotProperties(attributeKey.getInformationKey(), properties);
            } else {
                chartViewer.setDataViewCometeColor(attributeKey.getInformationKey(), CometeColor.RED);
            }

            boolean isSettable = !TangoAttributeHelper.isAttributeReadOnly(model, attributeName);
            if (isSettable) {
                IKey writeAttributeKey = generateWriteAttributeKey(attributeName);
                // System.out.println("Id read =" +
                // writeAttributeKey.getInformationKey());
                chartBox.connectWidget(chartViewer, writeAttributeKey);
                // setWidgetModel(chartViewer, chartBox, writeAttributeKey);
                properties = plotPropertiesMap.get(writeAttributeKey.getInformationKey().toLowerCase());
                if (properties != null) {
                    if (properties.getAxisChoice() == -1) {
                        properties.setAxisChoice(IChartViewer.Y1);
                    }
                    chartViewer.setDataViewPlotProperties(writeAttributeKey.getInformationKey(), properties);
                } else {
                    chartViewer.setDataViewCometeColor(writeAttributeKey.getInformationKey(), CometeColor.BLUE);
                }
View Full Code Here

            List<String> displayableList = extractAvailableDeviceNames(true, deviceList);
            deviceList.clear();
            int size = Math.min(axisList.size(), displayableList.size());
            for (int i = 0; i < size; i++) {
                String viewId = displayableList.get(i);
                PlotProperties properties = config.getPlotProperties(viewId);
                if (properties == null) {
                    properties = new PlotProperties(CometeColorUtil.getNewColor());
                    properties.getCurve().setName(viewId);
                }
                else {
                    properties = properties.clone();
                }
                int axis = convertDisplayAxisToAxis(axisList.get(i));
                if (axis != -1) {
                    properties.setAxisChoice(axis);
                }
                if (axis == IChartViewer.X) {
                    if (TIME_STAMP_NAME.equals(viewId)) {
                        xAsDate = true;
                        chartProperties.getXAxisProperties().setLabelFormat(
View Full Code Here

                if (TangoAttributeHelper.isAttributeRunning(scanServerName, "data_01")) {

                    Map<String, PlotProperties> propertiesMap = uiPreferences.getPlotPropertiesMap();
                    // Parse plot properties to set the axis
                    Set<String> plotKeySet = propertiesMap.keySet();
                    PlotProperties plotProp = null;
                    Vector<String> y2SensorDataVector = new Vector<String>();
                    Vector<String> y1SensorDataVector = new Vector<String>();
                    Vector<String> y2DataVector = new Vector<String>();
                    Vector<String> y1DataVector = new Vector<String>();
                    Vector<String> zDataVector = new Vector<String>();
                    Vector<String> noneDataVector = new Vector<String>();
                    String simpleActuatorName = null;
                    String y1dataFitterAttribute = null;
                    String y2dataFitterAttribute = null;
                    String attributeName = null;
                    String deviceName = null;
                    for (String dataViewId : plotKeySet) {
                        if (dataViewId.indexOf("/") > -1) {
                            attributeName = TangoDeviceHelper.getEntityName(dataViewId);
                            deviceName = TangoDeviceHelper.getDeviceName(dataViewId);
                        } else {
                            attributeName = dataViewId;
                            deviceName = scanServerName;
                        }

                        plotProp = propertiesMap.get(dataViewId);
                        int axis = plotProp.getAxisChoice();
                        switch (axis) {
                        case IChartViewer.Y1:
                            CurrentScanDataModel.addAttributeAxisMap(attributeName, Axis.Y1);
                            break;
                        case IChartViewer.Y2:
View Full Code Here

    }

    private void addPlotProperties(String dataViewId, int axis) {
        if (uiPreferences != null && dataViewId != null && !dataViewId.isEmpty()) {
            Map<String, PlotProperties> propertiesMap = uiPreferences.getPlotPropertiesMap();
            PlotProperties properties = propertiesMap.get(dataViewId.toLowerCase());
            if (properties == null) {
                properties = new PlotProperties();
                CometeColor newColor = CometeColorUtil.getNewColor();
                properties.getMarker().setStyle(IChartViewer.MARKER_BOX);
                properties.getMarker().setColor(newColor);
                properties.getCurve().setColor(newColor);
            }
            properties.getMarker().setLegendVisible(true);
            // Axis = 3 for Z
            properties.setAxisChoice(axis);
            uiPreferences.addPlotPropertiesMap(dataViewId.toLowerCase(), properties);
        }
    }
View Full Code Here

        // System.out.println(" setY1DataList Old = " + Arrays.toString(y1DataList));
        if (!Arrays.equals(this.y1DataList, newSensorList)) {
            this.y1DataList = newSensorList;
            initAttributeList();
            if (listener != null && userEvent) {
                PlotProperties plotProperties = null;
                for (String datawId : y1DataList) {
                    plotProperties = chartViewer.getDataViewPlotProperties(datawId);
                    plotProperties.setAxisChoice(IChartViewer.Y1);
                    listener.plotPropertiesChange(datawId, plotProperties);
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of fr.soleil.comete.definition.widget.properties.PlotProperties

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.