Package fr.soleil.comete.swing

Examples of fr.soleil.comete.swing.ChartViewer


                }
            }
        }
        else if (e.getSource() == zoomButton) {
            if (widget != null) {
                ChartViewer chartViewer = (ChartViewer) widget;
                if (!chartViewer.getChart().isZoomed()) {
                    chartViewer.getChart().enterZoom();
                }
                else {
                    chartViewer.getChart().exitZoom();
                }
            }
        }
        else if (e.getSource() == optionsButton) {
            if (widget != null) {
                ChartViewer chartViewer = (ChartViewer) widget;
                chartViewer.getChart().showOptionDialog();
            }
        }
        else if (e.getSource() == timeButton) {
            setRefreshInterval();
        }
View Full Code Here


     * returns the configuration as string.
     */
    protected String getSettings() {
        StringBuilder to_write = new StringBuilder();
        if (widget != null) {
            ChartViewer chartViewer = (ChartViewer) widget;

            // General settings
            to_write.append(chartViewer.getChart().getConfiguration());

            to_write.append("refresh_time:" + refreshingPeriod + "\n");

            // model
            if (isWidgetConnected()) {
                to_write.append("model:\'" + getCompleteAttributeName() + "\'\n");
            }

            // Axes
            to_write.append(chartViewer.getChart().getXAxis().getConfiguration("x"));
            to_write.append(chartViewer.getChart().getY1Axis().getConfiguration("y1"));
            to_write.append(chartViewer.getChart().getY2Axis().getConfiguration("y2"));
        }

        return to_write.toString();
    }
View Full Code Here

    protected String applySettings(CfFileReader f) {
        String errBuff = "";

        if (widget != null) {
            ChartViewer chartViewer = (ChartViewer) widget;

            List<String> p;

            // Get model
            p = f.getParam("model");
            if (p == null) {
                clearDAO();
            }
            else {
                setCompleteAttributeName(p.get(0));
                // canInitDAO may fail if p is invalid, and a clear would be needed
                // XXX this is to start or stop regardless the init state
                if (canInitDAO()) {
                    initDAO();
                }
                else {
                    clearDAO();
                }
            }

            // Get Refresh Interval
            p = f.getParam("refresh_time");
            if (p != null) {
                setRefreshingPeriod(OFormat.getInt(p.get(0)));
            }
            else {
                setRefreshingPeriod(TangoDataSourceFactory.DEFAULT_SLEEPING_PERIOD);
            }

            chartViewer.getChart().setMaxDisplayDuration(Double.POSITIVE_INFINITY);
            chartViewer.getChart().setDisplayDuration(Double.POSITIVE_INFINITY);
            chartViewer.getChart().applyConfiguration(f);
            chartViewer.getChart().getXAxis().applyConfiguration("x", f);
            chartViewer.getChart().getY1Axis().applyConfiguration("y1", f);
            chartViewer.getChart().getY2Axis().applyConfiguration("y2", f);
        }

        return errBuff;
    }
View Full Code Here

    public NI6602() {
        super();

        setLayout(new GridLayout());

        allIn1Viewer = new ChartViewer();
        spectrumViewers = new ArrayList<ChartViewer>();
        scalarViewers = new ArrayList<Label>();
        scalarViewPanels = new ArrayList<JPanel>();
        scalarPanel = new JPanel();
        spectrumViewPanel = new JPanel();
View Full Code Here

                spectrumViewers.clear();
            }
            else {
                if (spectrumViewers.size() < ni6602Model.getCounters().size()) {
                    while (spectrumViewers.size() < ni6602Model.getCounters().size()) {
                        ChartViewer viewer = new ChartViewer();
                        spectrumViewers.add(viewer);
                        viewer = null;
                    }
                }
                else {
View Full Code Here

        super();
    }

    @Override
    protected IDataArrayTarget initWidget() {
        ChartViewer chartViewer = new ChartViewer();
        chartViewer.setOpaque(false);

        return chartViewer;
    }
View Full Code Here

                readWidget = (T) new TextField();
                writeWidget = (T) new WheelSwitch();
            }
        }
        else if (tangoType == TangoConstHelper.ARRAY_TYPE) {
            readWidget = (T) new ChartViewer();
        }
        else if (tangoType == TangoConstHelper.IMAGE_TYPE) {
            readWidget = (T) new ImageViewerBox();
        }
        else {
View Full Code Here

        super();
    }

    @Override
    protected IDataArrayTarget initWidget() {
        ChartViewer chartViewer = new ChartViewer();
        chartViewer.setOpaque(false);

        return chartViewer;
    }
View Full Code Here

        return new ChartViewerBox();
    }

    @Override
    protected IChartViewer initWidget() {
        return new ChartViewer();
    }
View Full Code Here

    protected double defaultYMinAlarm = -100;
    protected double defaultYMaxAlarm = 100;

    @Override
    protected ChartViewer initWidget() {
        ChartViewer chartViewer = new ChartViewer();

        chartViewer.setFreezePanelVisible(false);
        chartViewer.setManagementPanelVisible(false);
        chartViewer.setOpaque(false);
        // chartViewer.setChartBackground(new Color(255, 255, 255, 0));
        // chartViewer.setChartMainBackground(new Color(255, 255, 255, 0));

        chartViewer.setHeaderVisible(true);

        xProp = new AxisProperties();
        xProp.setPosition(IChartViewer.HORIZONTAL_ORGY1);
        xProp.setDrawOpposite(true);
        xProp.setAutoScale(false);
        xProp.setScaleMin(DEFAULT_X_MIN_VALUE);
        xProp.setScaleMax(DEFAULT_X_MAX_VALUE);

        y1Prop = new AxisProperties();
        y1Prop.setDrawOpposite(true);
        y1Prop.setAutoScale(false);
        y1Prop.setScaleMin(DEFAULT_Y_MIN_VALUE);
        y1Prop.setScaleMax(DEFAULT_Y_MAX_VALUE);
        y1Prop.setGridVisible(true);
        y1Prop.setSubGridVisible(true);
        y1Prop.setGridStyle(IChartViewer.STYLE_DOT);

        ChartProperties chartProp = new ChartProperties();
        chartProp.setXAxisProperties(xProp);
        chartProp.setY1AxisProperties(y1Prop);
        chartViewer.setChartProperties(chartProp);

        chartViewer.getChart().setPaintAxisFirst(false);

        return chartViewer;
    }
View Full Code Here

TOP

Related Classes of fr.soleil.comete.swing.ChartViewer

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.