Package fr.soleil.comete.box.scalarbox

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


        return new TextField();
    }

    @Override
    protected AbstractCometeBox<ITextTarget> initBox() {
        return new StringScalarBox();
    }
View Full Code Here


public class TargetListenerTest implements ITargetListener<String> {

    private JPanel initPanel() {
        final JPanel panel = new JPanel(new BorderLayout());

        StringScalarBox stringBox = new StringScalarBox();

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

        TextField textfield = new TextField();
        TextArea textArea = new TextArea();
        FileBrowser fileBrowser = new FileBrowser();

        stringBox.addTargetListener(this, textfield);

        stringBox.connectWidget(textfield, key);
        stringBox.connectWidget(textArea, key);
        stringBox.connectWidget(fileBrowser, key);

        fileBrowser.setUpdateAllowed(true);

        panel.add(textfield, BorderLayout.CENTER);
        panel.add(textArea, BorderLayout.EAST);
View Full Code Here

        //Get a key corresponding to a data source of string scalars
        IKey stringScalarKey = tangoKey.getStringScalarKey();

        if (simpleCase) {
            //CometeBox construction
            StringScalarBox stringBox = new StringScalarBox();

            stringBox.connectWidget(textField, stringScalarKey);
        } else {

            //Data source construction
            StringAttributeDataSource stringAttributeDataSource = null;
View Full Code Here

        return new Label();
    }

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

    return new TextField();
  }

  @Override
  protected AbstractCometeBox<ITextTarget> initBox() {
    return new StringScalarBox();
  }
View Full Code Here

        return label;
    }

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

    private final AutoScrolledTextField textField;
    private final JButton connectionButton;

    public StatusTest() {
        super(new BorderLayout(5, 5));
        stringScalarBox = new StringScalarBox();
        textField = new AutoScrolledTextField();
        textField.setEditable(false);
        connectionButton = new JButton("Connect...");
        connectionButton.addActionListener(new ActionListener() {
            @Override
View Full Code Here

        };
    }

    @Override
    protected StringScalarBox initBox() {
        StringScalarBox box = new StringScalarBox();
        box.setCommandWidget(widget, false);
        box.setOutputInPopup(widget, false);
        return box;
    }
View Full Code Here

public class StringFieldTest {

    private static JPanel initPanel() {
        final JPanel panel = new JPanel(new BorderLayout());
        StringScalarBox stringBox = new StringScalarBox();

        TangoKey key = new TangoKey();
        TangoKeyTool.registerAttribute(key, "tango/tangotest/titanZ", "string_scalar");

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

        TextField textfield = new TextField();
        TextArea textArea = new TextArea();
        FileBrowser fileBrowser = new FileBrowser();

        stringBox.setConfirmationMessage(textfield, "Execute Confirmation ");
        stringBox.setConfirmation(textfield, true);

        fileBrowser.setUpdateAllowed(true);

        stringBox.connectWidget(textfield, key);
        stringBox.connectWidget(textArea, key);
        stringBox.connectWidget(fileBrowser, key);

        stringBox.setErrorText(textfield, "ERROR");
        stringBox.setConfirmation(textfield, true);
        stringBox.putInError(textfield);

        panel.add(textfield, BorderLayout.CENTER);
        panel.add(textArea, BorderLayout.EAST);
        panel.add(fileBrowser, BorderLayout.NORTH);
View Full Code Here

        JPanel panel = new JPanel();
        panel.setLayout(new BorderLayout());

        final TextField bean = new TextField();

        final StringScalarBox scalarBox = new StringScalarBox();
        panel.add(bean, BorderLayout.CENTER);
        final JLabel focusLabel = new JLabel("grab Focus");
        focusLabel.addMouseListener(new MouseAdapter() {
            @Override
            public void mousePressed(MouseEvent e) {
                focusLabel.grabFocus();
            }
        });
        panel.add(focusLabel, BorderLayout.SOUTH);

        TangoKey attributeKey = new TangoKey();
        TangoKeyTool.registerAttribute(attributeKey, "tango/tangotest/titan", "double_scalar");
        scalarBox.connectWidget(bean, attributeKey);
        scalarBox.disconnectWidgetFromAll(bean);
        TangoKeyTool.registerAttribute(attributeKey, "katy/gs/publisher", "Double_Value");
        scalarBox.connectWidget(bean, attributeKey);
        scalarBox.disconnectWidgetFromAll(bean);

        JFrame frame = new JFrame();
        frame.setContentPane(panel);
        frame.pack();
        frame.setTitle("Test");
View Full Code Here

TOP

Related Classes of fr.soleil.comete.box.scalarbox.StringScalarBox

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.