Examples of NumberScalarBox


Examples of fr.soleil.comete.box.scalarbox.NumberScalarBox

        JPanel stringPanel = new JPanel(new BorderLayout());
        JPanel numberPanel = new JPanel(new BorderLayout());

        StringScalarBox stringBox = new StringScalarBox();
        NumberScalarBox numberBox = new NumberScalarBox();

        TangoKey stringKey = new TangoKey();
        TangoKeyTool.registerAttribute(stringKey, "tango/tangotest/titan", "string_scalar");

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



        // text component
        TextField textfield = stringBox.createAdvancedWidget(TextField.class, stringKey);
        TextArea textArea = new TextArea();
        stringBox.connectWidget(textArea, numberKey);
        FileBrowser fileBrowser = stringBox.createAdvancedWidget(FileBrowser.class, stringKey);
        fileBrowser.setUpdateAllowed(true);

        // added to stringPanel component
        stringPanel.add(textfield, BorderLayout.CENTER);
        stringPanel.add(textArea, BorderLayout.EAST);
        stringPanel.add(fileBrowser, BorderLayout.NORTH);

        // number component
        Spinner spinner = new Spinner();
        numberBox.connectWidget(spinner, stringKey);
        WheelSwitch wheelswitch = numberBox.createAdvancedWidget(WheelSwitch.class, numberKey);
        Slider slider = numberBox.createAdvancedWidget(Slider.class, numberKey);

        // added to numberPanel component
        numberPanel.add(spinner, BorderLayout.CENTER);
        numberPanel.add(wheelswitch, BorderLayout.EAST);
        numberPanel.add(slider, BorderLayout.NORTH);
View Full Code Here

Examples of fr.soleil.comete.box.scalarbox.NumberScalarBox

        return new TextField();
    }

    @Override
    protected StringScalarBox initBox() {
        qualityBox = new NumberScalarBox();
        return new StringScalarBox();
    }
View Full Code Here

Examples of fr.soleil.comete.box.scalarbox.NumberScalarBox

        final JPanel panel = new JPanel();

        StringMatrixBox stringMatrixBox = new StringMatrixBox();
        StringScalarBox stringBox = new StringScalarBox();
        BooleanScalarBox booleanScalarBox = new BooleanScalarBox();
        NumberScalarBox numberScalarBox = new NumberScalarBox();

        TangoKey stringMatrixKey = new TangoKey();
        TangoKeyTool.registerAttribute(stringMatrixKey, "tango/tangotest/1", "string_spectrum_ro");
        TangoKey stringScalarKey = new TangoKey();
        TangoKeyTool.registerAttribute(stringScalarKey, "tango/tangotest/1", "string_scalar");
        TangoKey stringScalarWriteKey = new TangoKey();
        TangoKeyTool.registerWriteAttribute(stringScalarWriteKey, "tango/tangotest/1", "string_scalar");
        TangoKey booleanScalarWriteKey = new TangoKey();
        TangoKeyTool.registerWriteAttribute(booleanScalarWriteKey, "tango/tangotest/1", "boolean_scalar");

        TangoKey numberScalarKey = new TangoKey();
        TangoKeyTool.registerAttribute(numberScalarKey, "tango/tangotest/1", "ampli");
        TangoKey numberScalarWriteKey = new TangoKey();
        TangoKeyTool.registerWriteAttribute(numberScalarWriteKey, "tango/tangotest/1", "ampli");

        Label stringLabel = new Label();
        Label numberLabel = new Label();
        Label booleanLabel = new Label();

        ComboBox stringCombo = new ComboBox();
        NumberComboBox numberCombo = new NumberComboBox();
        BooleanComboBox booleanCombo = new BooleanComboBox();
        StringMatrixComboBoxViewer matrixCombo = new StringMatrixComboBoxViewer();
        matrixCombo.setLinkPopupVisibilityWithEditable(false);

        stringCombo.setObjectArray(new Object[] { "value1", "value2", "value3" });
        stringCombo.setDisplayedList(new String[] { "Label 1", "Label 2", "Label 3" });
        // stringCombo.setEditable(false);

        numberCombo.setObjectArray(new Object[] { Double.valueOf(1), Double.valueOf(2), Double.valueOf(3) });
        numberCombo.setDisplayedList(new String[] { "Label 1", "Label 2", "Label 3" });
        // numberCombo.setEditable(false);

        stringBox.connectWidget(stringLabel, stringScalarKey);
        stringBox.connectWidget(stringCombo, stringScalarWriteKey);
        stringBox.connectWidget(numberLabel, numberScalarKey);
        numberScalarBox.connectWidget(numberCombo, numberScalarWriteKey);
        booleanScalarBox.connectWidget(booleanCombo, booleanScalarWriteKey);
        stringBox.connectWidget(booleanLabel, booleanScalarWriteKey);
        stringMatrixBox.connectWidget(matrixCombo, stringMatrixKey);
        TangoDataSourceFactory factory = (TangoDataSourceFactory) DataSourceProducerProvider
                .getProducerByClassName(TangoDataSourceFactory.class.getName());
View Full Code Here

Examples of fr.soleil.comete.box.scalarbox.NumberScalarBox

        // String competeAttributeName = "tango/tangotest/1/double_spectrum_ro";
        // String competeAttributeName = "katy/test/motor/position";
        // String competeAttributeName = "i16-m-c06/op/mono1-mtp_fpitch.2/velocity";
        // String competeAttributeName = "FLO/TEST/PARSER.1/energy_w";
        // String competeAttributeName = "tango/tangotest/1";
        final NumberScalarBox numberBox = new NumberScalarBox();

        final WheelSwitch wheelswitch = new WheelSwitch();
        JPanel panel = new JPanel();
        panel.setLayout(new BorderLayout());

        panel.add(wheelswitch, BorderLayout.CENTER);

        final JComboBox combo = new JComboBox();
        panel.add(combo, BorderLayout.SOUTH);
        combo.addItem("Double_Value");
        combo.addItem("energy");

        combo.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent arg0) {
                TangoKey key = new TangoKey();
                TangoKeyTool.registerWriteAttribute(key, "katy/gs/publisher", combo.getSelectedItem().toString());
                numberBox.connectWidget(wheelswitch, key);
            }
        });

        // bean.start();
View Full Code Here

Examples of fr.soleil.comete.box.scalarbox.NumberScalarBox

        super();
    }

    @Override
    protected NumberScalarBox initBox() {
        return new NumberScalarBox();
    }
View Full Code Here

Examples of fr.soleil.comete.box.scalarbox.NumberScalarBox

        return button;
    }

    @Override
    protected BooleanScalarBox initBox() {
        qualityBox = new NumberScalarBox();

        return super.initBox();
    }
View Full Code Here

Examples of fr.soleil.comete.box.scalarbox.NumberScalarBox

        stopCommandViewer = null;
        positionScalarViewer = null;
        positionScalarWheelEditor = null;
        unitLabel = null;
        definePositionViewer = null;
        numberBox = new NumberScalarBox();
        confirmation = false;
        attributeName = null;
        attributeKey = null;
        forwardCmd = null;
        backwardCmd = null;
View Full Code Here

Examples of fr.soleil.comete.box.scalarbox.NumberScalarBox

        stopCommandViewer = null;
        positionScalarViewer = null;
        positionScalarWheelEditor = null;
        unitLabel = null;
        definePositionViewer = null;
        numberBox = new NumberScalarBox();
        confirmation = false;
        attributeName = null;
        attributeKey = null;
        forwardCmd = null;
        backwardCmd = null;
View Full Code Here

Examples of fr.soleil.comete.box.scalarbox.NumberScalarBox

        TangoKey attributeKey;

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

        TangoKey tangoKey = generateCommandKey("Start");
        setWidgetModel(startButton, stringBox, tangoKey);
        startButton.setText("Start");
View Full Code Here

Examples of fr.soleil.comete.box.scalarbox.NumberScalarBox

        TangoKey attributeKey;

        ImageViewerBox imageBox = new ImageViewerBox();
        StringScalarBox stringBox = new StringScalarBox();
        NumberScalarBox numberBox = new NumberScalarBox();
        ChartViewerBox chartBox = new ChartViewerBox();
        BooleanScalarBox booleanBox = new BooleanScalarBox();

        TangoKey tangoKey = generateCommandKey("Start");
        setWidgetModel(startButton, booleanBox, tangoKey);
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.