Examples of PlotProperties


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

            @Override
            public void actionPerformed(ActionEvent arg0) {
                String textProp = textArea1.getText();
                try {
                    Node node = XMLUtils.getRootNodeFromFileContent(textProp);
                    PlotProperties newPlotXML = PlotPropertiesXmlManager.loadPlotProperties(node);
                    String newstringProp = PlotPropertiesXmlManager.toXmlString(newPlotXML);
                    System.out.println("XML PlotProperties=" + newstringProp);
                    chartViewer1.setDataViewPlotProperties("Data", newPlotXML);
                } catch (XMLWarning e) {
View Full Code Here

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

    @Override
    public void chartViewerChanged(ChartViewerEvent event) {
        String viewId = event.getViewId();
        if ((viewId != null) && !viewId.isEmpty()) {
            PlotProperties prop1 = chartViewer1.getDataViewPlotProperties(viewId);
            String stringProp = PlotPropertiesXmlManager.toXmlString(prop1);
            textArea1.setText(stringProp);
        }
    }
View Full Code Here

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

    @Override
    public void setPlotProperties(String viewId, PlotProperties plotProperties) {
        // System.out.println("setPlotProperties=" + viewId + " => "
        // + plotProperties.getCurve().getWidth());
        PlotProperties oldValue = getPlotProperties(viewId);

        if (!ComparatorUtil.plotPropertiesEquals(oldValue, plotProperties)) {
            // String oldProp = PlotPropertiesXmlManager.toXmlString(oldValue);
            // System.out.println("Old PlotProperties=" + oldProp);
            //
View Full Code Here

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

    }

    @Override
    public void removePlotProperties(String viewId) {
        PlotProperties oldValue = getPlotProperties(viewId);
        baseBean.removePlotProperties(viewId);
        firePropertyChange("plotProperties:" + viewId, oldValue, null);
        setModified(true);
    }
View Full Code Here

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

            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

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

        return baseBean.getPlotProperties(viewId);
    }

    @Override
    public void setPlotProperties(String viewId, PlotProperties plotProperties) {
        PlotProperties oldValue = getPlotProperties(viewId);
        baseBean.setPlotProperties(viewId, plotProperties);
        firePropertyChange("plotProperties:" + viewId, oldValue, plotProperties);
    }
View Full Code Here

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

        firePropertyChange("plotProperties:" + viewId, oldValue, plotProperties);
    }

    @Override
    public void removePlotProperties(String viewId) {
        PlotProperties oldValue = getPlotProperties(viewId);
        baseBean.removePlotProperties(viewId);
        firePropertyChange("plotProperties:" + viewId, oldValue, null);
    }
View Full Code Here

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

                    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

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

    }

    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

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

     * @param dataViewId
     * @param plotProperties
     */
    public void addPlotPropertiesMap(String dataViewId, PlotProperties plotProperties) {
        if ((dataViewId != null) && !dataViewId.isEmpty()) {
            PlotProperties oldProp = getPlotProperties(dataViewId);
            if (plotProperties == null) {
                plotProperties = oldProp;
            } else {
                // Do not change the axis information
                if (oldProp != null) {
                    int oldAxis = oldProp.getAxisChoice();
                    plotProperties.setAxisChoice(oldAxis);
                }
            }
            plotProperties.getMarker().setLegendVisible(true);
            plotPropertiesMap.put(dataViewId.toLowerCase(), plotProperties);
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.