Package fr.soleil.comete.swing

Examples of fr.soleil.comete.swing.StringButton


    }

    @Override
    protected void initPanelComponents() {

        deleteConfigButton = new StringButton() {
            private static final long serialVersionUID = 3504983120123323412L;

            @Override
            public void actionPerformed(ActionEvent e) {
                String selectedValue = (String) configurationComboBox.getSelectedValue();
View Full Code Here


                currentValue = data;
                onValueChange(data);
            }
        };

        applyButton = new StringButton() {

            private static final long serialVersionUID = -5487851227027663615L;

            @Override
            public void actionPerformed(ActionEvent event) {
                super.actionPerformed(event);
                updateCombo(false);
            }
        };
        stringBox.setSettable(applyButton, false);
        applyButton.setText("Apply");
        applyButton.setButtonLook(true);

        memoryComboTitleLabel = new JLabel();

        memoryComboActionListener = generateMemoryComboActionListener();
        memoryCombo = generateMemoryCombo();
        if (memoryComboActionListener != null) {
            memoryCombo.addActionListener(memoryComboActionListener);
        }
        memoryComboTextChangeListener = generateMemoryComboTextListener();
        addTextListener();

        setDefaultValueButton = new StringButton() {

            private static final long serialVersionUID = 5825723558936352268L;

            @Override
            public void actionPerformed(ActionEvent event) {
View Full Code Here

        });
        stringBox.setColorEnabled(acquisitionNameEditor, false);

        // Experiment Index
        experimentIndexPanel = new JPanel(new GridBagLayout());
        resetExperimentIndexButton = new StringButton();
        resetExperimentIndexButton.setButtonLook(true);
        resetExperimentIndexButton.setText("Reset Experiment Index");
        resetExperimentIndexButton.setCometeFont(FontTool.getCometeFont(closeButton.getFont()));
        incrementExperimentIndexButton = new StringButton();
        incrementExperimentIndexButton.setButtonLook(true);
        incrementExperimentIndexButton.setText("Increment Experiment Index");
        incrementExperimentIndexButton.setCometeFont(FontTool.getCometeFont(closeButton.getFont()));
        stringBox.setSettable(resetExperimentIndexButton, false);
        stringBox.setSettable(incrementExperimentIndexButton, false);
View Full Code Here

                currentValue = data;
                onValueChange(data);
            }
        };

        applyButton = new StringButton() {

            private static final long serialVersionUID = -5487851227027663615L;

            @Override
            public void actionPerformed(ActionEvent event) {
                super.actionPerformed(event);
                updateCombo(false);
            }
        };
        stringBox.setSettable(applyButton, false);
        stringBox.setOutputInPopup(applyButton, false);
        applyButton.setText("Apply");
        applyButton.setButtonLook(true);

        memoryComboTitleLabel = new JLabel();

        memoryComboActionListener = generateMemoryComboActionListener();
        memoryCombo = generateMemoryCombo();
        if (memoryComboActionListener != null) {
            memoryCombo.addActionListener(memoryComboActionListener);
        }
        memoryComboTextChangeListener = generateMemoryComboTextListener();
        addTextListener();

        setDefaultValueButton = new StringButton() {

            private static final long serialVersionUID = 5825723558936352268L;

            @Override
            public void actionPerformed(ActionEvent event) {
View Full Code Here

                    dialogModel.updateParameters(selectedScript);
                }
            }
        });

        okButton = new StringButton() {
            private static final long serialVersionUID = 1574016093195895807L;

            @Override
            public void actionPerformed(ActionEvent event) {
                String valueToSave = dialogModel.computeValueToSave();
View Full Code Here

        libDataStorageVersionViewer.setHorizontalAlignment(IComponent.LEFT);

        initDeviceButton = generateStringButton();
        initDeviceButton.setText("Initialize DataRecorder device");
        // delete command initialization
        deleteNexusFilesButton = new StringButton() {
            private static final long serialVersionUID = 111544979689639790L;

            @Override
            public void actionPerformed(ActionEvent event) {
                // encryption hack
View Full Code Here

        editPanel.add(setDefaultValueButton, defaultButtonConstraints);

        // buttons
        buttonPanel = new JPanel(new GridBagLayout());
        closeButton.setText("Cancel");
        okButton = new StringButton() {

            private static final long serialVersionUID = 6216360703760072552L;

            @Override
            public void actionPerformed(ActionEvent event) {
View Full Code Here

        configDevicePanel.add(getStatusPanel(), statusPanelConstraints);

        scanInfoAndCommandsPanel = new JPanel(new GridBagLayout());

        buttonPanel = new JPanel(new GridBagLayout());
        startButton = new StringButton();
        startButton.setIcon(Utilities.ICONS.getIcon("flyscan.start"));
        startButton.setButtonLook(true);
        startButton.setEnabled(false);

        startButton.addButtonListener(new IButtonListener() {

            @Override
            public void actionPerformed(EventObject event) {
                int index = tabbedPane.getSelectedIndex();
                if (index > -1) {
                    String configName = tabbedPane.getTitleAt(index);
                    configName = configName.replace("*", "").trim();
                    if (!configName.isEmpty()) {
                        try {
                            // Write config
                            TangoAttribute attribute = new TangoAttribute(getModel() + "/configuration");
                            Configuration config = tabbedPane.getConfiguration(index);
                            String unparsedConfig = ConfigParser.getInstance().deParse(config, getPlugins());
                            attribute.write(unparsedConfig);
                            // Start scan
                            TangoCommand startCommand = new TangoCommand(getModel(), "Start");
                            startCommand.execute();
                        } catch (DevFailed e) {
                            String message = DevFailedUtils.toString(e);
                            LOGGER.log(Level.SEVERE, message);
//                            System.err.println(message);
                        }
                    }
                }

            }
        });

        GridBagConstraints startButtonGridBagConstraints = new GridBagConstraints();
        startButtonGridBagConstraints.gridx = 0;
        startButtonGridBagConstraints.gridy = 0;
        startButtonGridBagConstraints.weightx = 0.25;
        startButtonGridBagConstraints.weighty = 0;
        startButtonGridBagConstraints.ipadx = 0;
        startButtonGridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
        startButtonGridBagConstraints.anchor = GridBagConstraints.EAST;
        startButtonGridBagConstraints.insets = new Insets(5, 5, 5, 0);
        buttonPanel.add(startButton, startButtonGridBagConstraints);

        stopButton = new StringButton();
        stopButton.setIcon(Utilities.ICONS.getIcon("flyscan.stop"));
        stopButton.setButtonLook(true);

        GridBagConstraints stopButtonGridBagConstraints = new GridBagConstraints();
        stopButtonGridBagConstraints.gridx = 1;
        stopButtonGridBagConstraints.gridy = 0;
        stopButtonGridBagConstraints.weightx = 0.25;
        stopButtonGridBagConstraints.weighty = 0;
        stopButtonGridBagConstraints.ipadx = 0;
        stopButtonGridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
        stopButtonGridBagConstraints.anchor = GridBagConstraints.EAST;
        stopButtonGridBagConstraints.insets = new Insets(5, 5, 5, 0);
        buttonPanel.add(stopButton, stopButtonGridBagConstraints);

        pauseButton = new StringButton();
        pauseButton.setIcon(Utilities.ICONS.getIcon("flyscan.pause"));
        pauseButton.setButtonLook(true);

        GridBagConstraints pauseButtonGridBagConstraints = new GridBagConstraints();
        pauseButtonGridBagConstraints.gridx = 2;
        pauseButtonGridBagConstraints.gridy = 0;
        pauseButtonGridBagConstraints.weightx = 0.25;
        pauseButtonGridBagConstraints.weighty = 0;
        pauseButtonGridBagConstraints.ipadx = 0;
        pauseButtonGridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
        pauseButtonGridBagConstraints.anchor = GridBagConstraints.EAST;
        pauseButtonGridBagConstraints.insets = new Insets(5, 5, 5, 0);
        buttonPanel.add(pauseButton, pauseButtonGridBagConstraints);

        restartButton = new StringButton();
        restartButton.setIcon(Utilities.ICONS.getIcon("flyscan.resume"));
        restartButton.setButtonLook(true);

        GridBagConstraints restartButtonGridBagConstraints = new GridBagConstraints();
        restartButtonGridBagConstraints.gridx = 3;
View Full Code Here

            if (tabbedPane != null && isEnabled) {
                int cnt = tabbedPane.getTabCount();
                for (int index = 0; index < cnt; index++) {
                    Component component = tabbedPane.getTabComponentAt(index);
                    final CloseSaveButtonTab closeSaveButtonTab = (CloseSaveButtonTab) component;
                    final StringButton checkButton = closeSaveButtonTab.getCheckButton();
                    final ConfigurationGUI configurationGUI = closeSaveButtonTab.getConfigurationGUI();
                    final Configuration config = configurationGUI.getConfiguration();

                    // Instead of using a comete box for connecting the check button to the 'CheckConfig' command, a
                    // TangoCommand is created to avoid displaying the check result in a popup and display it within the
                    // config error area
                    checkButton.addButtonListener(new IButtonListener() {

                        @Override
                        public void actionPerformed(EventObject event) {
                            try {
                                configurationGUI.removeCheckConfigLabelError();
View Full Code Here

        editPanel.add(setDefaultValueButton, defaultButtonConstraints);

        // buttons
        buttonPanel = new JPanel(new GridBagLayout());
        closeButton.setText("Cancel");
        okButton = new StringButton() {

            private static final long serialVersionUID = 6216360703760072552L;

            @Override
            public void actionPerformed(ActionEvent event) {
View Full Code Here

TOP

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

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.