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

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


        return prop;
    }

    public static ChartProperties getChartPropertyScan(String scanServerName) {
        ScanProperties prop = getCurrentScanProperties(scanServerName, false);
        ChartProperties chartProperties = null;
        if (prop != null) {
            chartProperties = prop.getChartProperties();
        }
        return chartProperties;
    }
View Full Code Here


                    // System.out.println("listener=" + listener);
                    if (listener != null) {
                        String viewId = event.getViewId();
                        if (viewId == null || viewId.isEmpty()
                                || viewId.startsWith(IChartViewer.CHART_PROPERTY_ACTION_NAME)) {
                            ChartProperties newProperties = chartViewer.getChartProperties();
                            listener.chartPropertiesChange(newProperties);
                        }
                        else {

                            // Remove IChartViewer.DATAVIEW_PROPERTY_ACTION_NAME bug 22744
View Full Code Here

                // System.out.println("listener=" + listener);
                if (listener != null) {
                    String viewId = event.getViewId();
                    if (viewId == null || viewId.isEmpty()
                            || viewId.startsWith(IChartViewer.CHART_PROPERTY_ACTION_NAME)) {
                        ChartProperties newProperties = chartViewer.getChartProperties();
                        listener.chartPropertiesChange(newProperties);
                    } else {

                        // Remove IChartViewer.DATAVIEW_PROPERTY_ACTION_NAME bug
                        // 22744
View Full Code Here

    public static boolean updatePropertiesFromScanAddOn(ISpectrumConfig<?> config) {
        boolean done = false;
        boolean xAsDate = false;
        if ((config != null) && (config.getScanAddOn() != null)
                && (config.getScanAddOn().getDisplay() != null)) {
            ChartProperties chartProperties = config.getChartProperties();
            if (chartProperties == null) {
                chartProperties = new ChartProperties();
            }
            else {
                chartProperties = chartProperties.clone();
            }
            List<DisplayAxis> axisList = config.getScanAddOn().getDisplay().getAxisList();
            List<IDevice> deviceList = new ArrayList<IDevice>();
            if (config.getSensorsList() != null) {
                deviceList.addAll(config.getSensorsList());
            }
            if ((config.getDimensionX() != null)
                    && (config.getDimensionX().getActuatorsList() != null)) {
                deviceList.addAll(config.getDimensionX().getActuatorsList());
            }
            if (config instanceof IConfig2D) {
                IConfig2D config2D = (IConfig2D) config;
                if ((config2D.getDimensionY() != null)
                        && (config2D.getDimensionX().getActuatorsList() != null)) {
                    deviceList.addAll(config2D.getDimensionY().getActuatorsList());
                }
            }
            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(
                                IChartViewer.DATE_FORMAT);
                    }
                }
                config.setPlotProperties(viewId, properties);
            }
            if (xAsDate) {
                chartProperties.getXAxisProperties().setLabelFormat(IChartViewer.DATE_FORMAT);
            }
            else {
                chartProperties.getXAxisProperties().setLabelFormat(IChartViewer.AUTO_FORMAT);
            }
            config.setChartProperties(chartProperties);
            done = true;
        }
        return done;
View Full Code Here

     *
     * @param configId The configuration id
     * @return Some {@link ChartProperties}
     */
    private ChartProperties getChartPropertiesByIdAux(Integer configId) throws SQLException {
        ChartProperties result = null;
        if (configId != null) {
            String query = "SELECT data FROM chart_properties WHERE configid=" + configId;

            if (stmt != null) {
                ResultSet rs = stmt.executeQuery(query);
View Full Code Here

        return prop;
    }

    public static ChartProperties getChartPropertyScan(String scanServerName) {
        ScanProperties prop = getCurrentScanProperties(scanServerName, false);
        ChartProperties chartProperties = null;
        if (prop != null) {
            chartProperties = prop.getChartProperties();
        }
        return chartProperties;
    }
View Full Code Here

                            // System.out.println("selection" + event.getSelectedIndex());
                            actuatorInput.setIndex(event.getSelectedIndex());
                            break;
                        case CONFIGURATION:
                            if (listener != null) {
                                ChartProperties newProperties = chartViewer.getChartProperties();
                                listener.chartPropertiesChange(newProperties);
                            }
                        default:
                            break;
                    }
View Full Code Here

                            // System.out.println("selection" + event.getSelectedIndex());
                            actuatorInput.setIndex(event.getSelectedIndex());
                            break;
                        case CONFIGURATION:
                            if (listener != null) {
                                ChartProperties newProperties = chartViewer.getChartProperties();
                                listener.chartPropertiesChange(newProperties);
                            }
                        default:
                            break;
                    }
View Full Code Here

                            // System.out.println("selection" + event.getSelectedIndex());
                            actuatorInput.setIndex(event.getSelectedIndex());
                            break;
                        case CONFIGURATION:
                            if (listener != null) {
                                ChartProperties newProperties = chartViewer.getChartProperties();
                                listener.chartPropertiesChange(newProperties);
                            }
                        default:
                            break;
                    }
View Full Code Here

                            // System.out.println("selection" + event.getSelectedIndex());
                            actuatorInput.setIndex(event.getSelectedIndex());
                            break;
                        case CONFIGURATION:
                            if (listener != null) {
                                ChartProperties newProperties = chartViewer.getChartProperties();
                                listener.chartPropertiesChange(newProperties);
                            }
                        default:
                            break;
                    }
View Full Code Here

TOP

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

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.