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

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


        refreshModified();
    }

    @Override
    public void removePlotProperties(String viewId) {
        PlotProperties oldValue = getPlotProperties(viewId);
        baseBean.removePlotProperties(viewId);
        firePropertyChange(IConfigListener.PLOT_PROP, oldValue, null);
        refreshModified();
    }
View Full Code Here


                    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

                if (!list2.containsKey(key1)) {
                    listEquals = false;
                    break;
                }
                else {
                    PlotProperties obj1 = list1.get(key1);
                    PlotProperties obj2 = list2.get(key1);
                    if (!plotPropertiesEquals(obj1, obj2)) {
                        listEquals = false;
                        break;
                    }
                }
View Full Code Here

        }
    }

    @Override
    public PlotProperties getPlotProperties(String viewId) {
        PlotProperties result = null;
        if (viewId != null) {
            viewId = viewId.toLowerCase().trim();
            result = plotPropertiesMap.get(viewId);
        }
        return result;
View Full Code Here

                } else if (elementIndex > 0) {
                    newdataViewId = getDataViewExtendedName(dataViewId, elementIndex);
                    newDisplayName = getDataViewExtendedName(displayName, elementIndex);
                }

                PlotProperties properties = plotPropertiesMap.get(displayName);
                setDataViewConfiguration(newdataViewId, properties);
                chartViewer.setDataViewAxis(newdataViewId, axis);
                // PlotProperties plotProperties =
                // chartViewer.getDataViewPlotProperties(newdataViewId);
                // if (plotProperties != null) {
View Full Code Here

        if (chartViewer != null && scanServerDeviceName != null) {
            // System.out.println("setPlotPropertiesMap=" + aplotPropertiesMap);
            String dataViewName = null;
            String dataViewId = null;
            PlotProperties property = null;
            for (Map.Entry<String, PlotProperties> entry : plotPropertiesMap.entrySet()) {
                dataViewName = entry.getKey();
                dataViewId = getDataViewIdForDisplayName(dataViewName);
                // System.out.println("dataViewName=" + dataViewName);
                // System.out.println("dataViewId=" + dataViewId);
View Full Code Here

                List<DataView> dataViewList = dataViews.getListCopy();
                String dataViewId = null;
                String displayName = null;
                String deviceName = null;
                String attributeName = null;
                PlotProperties property = null;
                for (DataView dataView : dataViewList) {
                    dataViewId = dataView.getId();
                    displayName = dataView.getDisplayName();
                    // get deviceName and attributename
                    deviceName = TangoDeviceHelper.getDeviceName(dataViewId);
View Full Code Here

                            // Only notified for spectrum and not for Image
                            if (TangoAttributeHelper.isAttributeRunning(scanServerDeviceName,
                                    viewIdWithoutDevice)) {
                                // System.out.println("dataViewId=" + viewIdWithoutDevice);
                                if (viewId != null && !viewId.isEmpty()) {
                                    PlotProperties prop = chartViewer
                                            .getDataViewPlotProperties(viewId);
                                    // System.out.println("prop=" + viewId + prop);
                                    if (prop != null) {
                                        listener.plotPropertiesChange(viewIdWithoutDevice, prop);
                                    }
View Full Code Here

        if (!Arrays.equals(this.y1SensorsDataList, newSensorList)) {
            this.y1SensorsDataList = newSensorList;
            initAttributeList();
            // notify listener that the axis changes
            if (listener != null && userEvent) {
                PlotProperties plotProperties = null;
                String dataViewId = null;
                for (String datawId : y1SensorsDataList) {
                    dataViewId = scanServerDeviceName + "/" + datawId;
                    plotProperties = chartViewer.getDataViewPlotProperties(dataViewId);
                    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.