Package fr.soleil.comete.tango.data.service

Examples of fr.soleil.comete.tango.data.service.TangoKey


        return key;
    }

    @Override
    public IKey getNumberMatrixKey() {
        TangoKey key = new TangoKey();
    TangoKeyTool.registerAttribute(key, "tango/tangotest/titan", "double_image_ro");
        return key;
    }
View Full Code Here


        return key;
    }

    @Override
    public IKey getNumberScalarKey() {
        TangoKey key = new TangoKey();
    TangoKeyTool.registerAttribute(key, "tango/tangotest/titan", "ampli");
        return key;
    }
View Full Code Here

        return key;
    }

    @Override
    public IKey getStringMatrixKey() {
        TangoKey key = new TangoKey();
    TangoKeyTool.registerAttribute(key, "tango/tangotest/titan", "string_image_ro");
        return key;
    }
View Full Code Here

        return key;
    }

    @Override
    public IKey getStringScalarKey() {
        TangoKey key = new TangoKey();
    TangoKeyTool.registerAttribute(key, "tango/tangotest/titan", "string_scalar");
        return key;
    }
View Full Code Here

    @Override
    protected void initKey() {
        super.initKey();

        // init attribute quality key
        qualityKey = new TangoKey();
        TangoKeyTool.registerAttributeQuality(qualityKey, getDeviceName(), getAttributeName());
    }
View Full Code Here

        QualityColorPlugin plugin = new QualityColorPlugin();

        numberBox.addPluginController(plugin);
        numberBox.addPluginController(new FormatPlugin());

        TangoKey key = new TangoKey();
        TangoKeyTool.registerAttribute(key, "tango/tangotest/titan", "ampli");

        Spinner spinner = numberBox.createAdvancedWidget(Spinner.class, key);
        WheelSwitch wheelswitch = numberBox.createAdvancedWidget(WheelSwitch.class, key);
View Full Code Here

        scalarPanel.removeAll();
        spectrumViewPanel.removeAll();
        StringBuffer errorBuffer = new StringBuffer();

        ChartViewerBox chartBox = new ChartViewerBox();
        TangoKey attributeKey;

        if (allIn1CheckBox.isSelected()) {
            spectrumViewPanel.setLayout(new GridLayout());
            cleanWidget(allIn1Viewer);
            spectrumViewPanel.add(allIn1Viewer);
View Full Code Here

                scalarPanel.add(scalarViewPanels.get(i));
            }
            scalarPanel.setLayout(layout);

            StringScalarBox stringBox = new StringScalarBox();
            TangoKey attributeKey;
            for (int i = 0; i < ni6602Model.getCounters().size(); i++) {
                String counterName = ni6602Model.getCounters().get(i).getName();
                attributeKey = generateReadOnlyAttributeKey(counterName);
                setWidgetModel(scalarViewers.get(i), stringBox, attributeKey);
View Full Code Here

    private void connect() {
        stringBox = (StringScalarBox) CometeBoxProvider.getCometeBox(StringScalarBox.class);
        stringMatrixBox = (StringMatrixBox) CometeBoxProvider.getCometeBox(StringMatrixBox.class);

        TangoKey currentConfigKey = new TangoKey();
        TangoKeyTool.registerAttribute(currentConfigKey, m_strDsTechnicalPath, CURRENT_CONFIG_ATTR);
        TangoKey configNamesKey = new TangoKey();
        TangoKeyTool.registerAttribute(configNamesKey, m_strDsTechnicalPath, CONFIG_NAMES_ATTR);

        stringBox.connectWidget(currentConfigRedirector, currentConfigKey);
        stringMatrixBox.connectWidget(configurationComboBox, configNamesKey);
    }
View Full Code Here

    @Override
    protected void refreshGUI() {

        deviceLabel.setText(model);

        TangoKey attributeKey;

        NumberMatrixBox imageBox = new NumberMatrixBox();
        StringScalarBox stringBox = new StringScalarBox();
        NumberScalarBox numberBox = new NumberScalarBox();
        ChartViewerBox chartBox = new ChartViewerBox();

        TangoKey tangoKey = generateCommandKey("Start");
        setWidgetModel(startButton, stringBox, tangoKey);
        startButton.setText("Start");

        tangoKey = generateCommandKey("Stop");
        setWidgetModel(stopButton, stringBox, tangoKey);
        stopButton.setText("Stop");

        attributeKey = generateAttributeKey("data");
        setWidgetModel(dataImage, imageBox, attributeKey);
        dataImage.setAlwaysFitMaxSize(true);

        attributeKey = generateReadOnlyAttributeKey("energyStep");
        setWidgetModel(energyStepRead, stringBox, attributeKey);
        stringBox.setUnitEnabled(energyStepRead, true);

        attributeKey = generateWriteAttributeKey("energyStep");
        setWidgetModel(energyStepWrite, numberBox, attributeKey);

        attributeKey = generateAttributeKey("state");
        setWidgetModel(stateLabel, stringBox, attributeKey);

        attributeKey = generateReadOnlyAttributeKey("status");
        setWidgetModel(statusArea, stringBox, attributeKey);
        stringBox.setColorEnabled(statusArea, false);

        attributeKey = generateAttributeKey("mode");
        setWidgetModel(acquisitionModeCombo, stringBox, attributeKey);

        ITextTarget acquisitionModeTarget = new ITextTarget() {
            @Override
            public void setText(String text) {
                setEnergyLabelVisible(text);
            }

            @Override
            public void removeMediator(Mediator<?> mediator) {
            }

            @Override
            public void addMediator(Mediator<?> mediator) {
            }

            @Override
            public String getText() {
                return null;
            }
        };
        setWidgetModel(acquisitionModeTarget, stringBox, attributeKey);

        attributeKey = generateAttributeKey("energyScale");
        setWidgetModel(energyScaleCombo, stringBox, attributeKey);

        attributeKey = generateAttributeKey("passEnergy");
        setWidgetModel(passEnergyCombo, stringBox, attributeKey);

        attributeKey = generateReadOnlyAttributeKey("excitationEnergy");
        setWidgetModel(excitationEnergyRead, stringBox, attributeKey);
        stringBox.setUnitEnabled(excitationEnergyRead, true);

        attributeKey = generateWriteAttributeKey("excitationEnergy");
        setWidgetModel(excitationEnergyWrite, numberBox, attributeKey);

        attributeKey = generateReadOnlyAttributeKey("stepTime");
        setWidgetModel(stepTimeRead, stringBox, attributeKey);
        stringBox.setUnitEnabled(stepTimeRead, true);

        attributeKey = generateWriteAttributeKey("stepTime");
        setWidgetModel(stepTimeWrite, numberBox, attributeKey);

        attributeKey = generateReadOnlyAttributeKey("lowEnergy");
        setWidgetModel(lowEnergyRead, stringBox, attributeKey);
        stringBox.setUnitEnabled(lowEnergyRead, true);

        attributeKey = generateWriteAttributeKey("lowEnergy");
        setWidgetModel(lowEnergyWrite, numberBox, attributeKey);

        attributeKey = generateReadOnlyAttributeKey("highEnergy");
        setWidgetModel(highEnergyRead, stringBox, attributeKey);
        stringBox.setUnitEnabled(highEnergyRead, true);

        attributeKey = generateWriteAttributeKey("highEnergy");
        setWidgetModel(highEnergyWrite, numberBox, attributeKey);

        attributeKey = generateReadOnlyAttributeKey("fixEnergy");
        setWidgetModel(fixEnergyRead, stringBox, attributeKey);

        attributeKey = generateWriteAttributeKey("fixEnergy");
        setWidgetModel(fixEnergyWrite, numberBox, attributeKey);

        attributeKey = generateReadOnlyAttributeKey("detectorFirstXChannel");
        setWidgetModel(xminRead, stringBox, attributeKey);

        attributeKey = generateWriteAttributeKey("detectorFirstXChannel");
        setWidgetModel(xminWrite, numberBox, attributeKey);

        attributeKey = generateReadOnlyAttributeKey("detectorLastXChannel");
        setWidgetModel(xmaxRead, stringBox, attributeKey);

        attributeKey = generateWriteAttributeKey("detectorLastXChannel");
        setWidgetModel(xmaxWrite, numberBox, attributeKey);

        attributeKey = generateReadOnlyAttributeKey("detectorFirstYChannel");
        setWidgetModel(yminRead, stringBox, attributeKey);

        attributeKey = generateWriteAttributeKey("detectorFirstYChannel");
        setWidgetModel(yminWrite, numberBox, attributeKey);

        attributeKey = generateReadOnlyAttributeKey("detectorLastYChannel");
        setWidgetModel(ymaxRead, stringBox, attributeKey);

        attributeKey = generateWriteAttributeKey("detectorLastYChannel");
        setWidgetModel(ymaxWrite, numberBox, attributeKey);

        attributeKey = generateReadOnlyAttributeKey("detectorSlices");
        setWidgetModel(slicesRead, stringBox, attributeKey);

        attributeKey = generateWriteAttributeKey("detectorSlices");
        setWidgetModel(slicesWrite, numberBox, attributeKey);

        String[] lensModeList = { "lens1", "lens2", "lens3" };
        DeviceProxy tmpDeviceProxy = null;
        try {
            tmpDeviceProxy = new DeviceProxy(model);
            DeviceData dd = tmpDeviceProxy.command_inout("GetLensModeList");
            lensModeList = dd.extractStringArray();
        } catch (DevFailed e) {
            e.printStackTrace();
        }
        lensModeCombo.setValueList((Object[]) lensModeList);
        attributeKey = generateAttributeKey("lensMode");
        setWidgetModel(lensModeCombo, stringBox, attributeKey);

        String[] passModeList = { "pass1", "pass2", "pass3" };
        if (tmpDeviceProxy != null) {
            try {
                DeviceData dd = tmpDeviceProxy.command_inout("GetpassModeList");
                passModeList = dd.extractStringArray();
            } catch (DevFailed e) {
                e.printStackTrace();
            }
        }
        passModeCombo.setValueList((Object[]) passModeList);
        attributeKey = generateAttributeKey("passMode");
        setWidgetModel(passModeCombo, stringBox, attributeKey);

        attributeKey = generateAttributeKey("channelScale");
        TangoKey attributeKey2 = generateAttributeKey("sumData");
        chartBox.connectWidgetDual(sumDataSpectrum, attributeKey, attributeKey2);
        sumDataSpectrum.setAxisName("Energy (eV)", IChartViewer.X);
        sumDataSpectrum.setAxisName("Counts", IChartViewer.Y1);

        setEnergyLabelVisible((String) acquisitionModeCombo.getSelectedItem());
View Full Code Here

TOP

Related Classes of fr.soleil.comete.tango.data.service.TangoKey

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.