Package fr.soleil.comete.widget

Examples of fr.soleil.comete.widget.Label


     * Creates a new {@link Label} and sets some default parameters in it
     *
     * @return a new {@link Label}
     */
    protected Label generateLabel() {
        Label label = new Label();
        label.setCometeFont(CometeFont.DefaultFont);
        label.setHorizontalAlignment(IComponent.CENTER);
        label.setOpaque(true);
        return label;
    }
View Full Code Here


    // return result;
    // }

    public Label getUnitLabel() {
        if (this.unitLabel == null) {
            this.unitLabel = new Label();
            this.unitLabel.setText("Unit");
            this.unitLabel.setCometeBackground(this.backgdColor);
        }
        return this.unitLabel;
    }
View Full Code Here

     */
    protected void initHiddenComponents() {
        authentificationLightBean = new AuthentificationLightBean();
        authentificationLightBean.setDisplayMessageOnConnectionError(false);

        hiddenErrorLabel = new Label();
        hiddenStateLabel = new Label();
        hiddenTechnicalDataLabel = new Label();
        hiddenPostRecordingCommandButton = new StringButton();
        hiddenPostRecordingCommandButton.setDisplayDataInButton(true);
        hiddenDataModelsViewer = new StringMatrixComboBoxViewer();
        hiddenDataModelsViewer.setExecuteDaoOnInitialization(true);

View Full Code Here

        add(mainTabbedPane, tabbedPaneConstraints);
    }

    @Override
    protected Label generateLabel() {
        Label label = new Label() {
            @Override
            public void initState(CometeColor color) {
                Color temp = AwtColorTool.getColor(color);
                if (temp != null) {
                    temp = temp.darker();
                }
                super.initState(AwtColorTool.getCometeColor(temp));
            }
        };
        label.setCometeFont(CometeFont.DefaultFont);
        label.setOpaque(false);
        label.setStateEnabled(true);
        label.setStateAsForeground(true);
        ((JComponent) label.getComponent()).setBorder(new LineBorder(FIELD_COLOR));
        return label;
    }
View Full Code Here

    @Override
    protected void initAndAddOtherComponentsInMainPanel() {
        super.initAndAddOtherComponentsInMainPanel();
        mainPanel.setLayout(new GridBagLayout());

        hiddenWriteValueLabel = new Label();
        writeValueListener = generateWriteValueListener();

        valueTitleLabel = new JLabel("Effective value:");
        displayedValueLabel = new JLabel();
View Full Code Here

    @Override
    protected void initAndAddOtherComponentsInMainPanel() {
        super.initAndAddOtherComponentsInMainPanel();
        memoryComboTitleLabel.setText("Sub directory:");
        parentDirectoryLabel = new Label();
        parentDirectoryListener = new IWidgetListener() {
            @Override
            public void stringValueChanged(String value) {
                // nothing to do
            }
View Full Code Here

    }

    @Override
    protected void initAndAddOtherComponentsInMainPanel() {
        // hidden components
        hiddenNxEntryNameViewer = new Label();
        hiddenDefaultValueViewer = new StringButton();
        hiddenDefaultValueViewer.setDisplayDataInButton(true);

        // view part
        viewPanel = new JPanel(new BorderLayout());
View Full Code Here

    @Override
    protected void initAndAddOtherComponentsInMainPanel() {
        nameModelEditDialog = new NxEntryNameModelEditDialog(this, "Edit nxEntryName Model", true);

        // Experiment Name
        hiddenExperimentNameViewer = new Label();
        experimentNameTitle = new JLabel("Experiment Name:");
        experimentNameEditor = new TextFieldButton();
        experimentNameEditor.setStateEnabled(false);
        experimentNameEditor.setTextButton("Apply");
        experimentNameEditor.setTextFieldColumns(30);
        experimentNameRevertButton = new JButton("Revert");
        experimentNameRevertButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                String text = hiddenExperimentNameViewer.getText();
                if ((!hiddenExperimentNameViewer.getErrorText().equals(text))
                        && (!text.trim().isEmpty())) {
                    experimentNameEditor.setText(text);
                }
            }
        });

        // Acquisition Name
        hiddenAcquisitionNameViewer = new Label();
        acquisitionNameTitle = new JLabel("Acquisition Name:");
        acquisitionNameEditor = new TextFieldButton();
        acquisitionNameEditor.setStateEnabled(false);
        acquisitionNameEditor.setTextButton("Apply");
        acquisitionNameEditor.setTextFieldColumns(30);
        acquisitionNameRevertButton = new JButton("Revert");
        acquisitionNameRevertButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                String text = hiddenAcquisitionNameViewer.getText();
                if ((!hiddenAcquisitionNameViewer.getErrorText().equals(text))
                        && (!text.trim().isEmpty())) {
                    acquisitionNameEditor.setText(text);
                }
            }
        });

        // Experiment Index
        experimentIndexPanel = new JPanel(new GridBagLayout());
        resetExperimentIndexButton = new StringButton();
        resetExperimentIndexButton.getComponent().setButtonLook(true);
        resetExperimentIndexButton.setDisplayDataInButton(false);
        resetExperimentIndexButton.setAllowOutputPopup(false);
        resetExperimentIndexButton.setText("Reset Experiment Index");
        resetExperimentIndexButton.setCometeFont(AwtFontTool.getCometeFont(closeButton.getFont()));
        incrementExperimentIndexButton = new StringButton();
        incrementExperimentIndexButton.getComponent().setButtonLook(true);
        incrementExperimentIndexButton.setDisplayDataInButton(false);
        incrementExperimentIndexButton.setAllowOutputPopup(false);
        incrementExperimentIndexButton.setText("Increment Experiment Index");
        incrementExperimentIndexButton.setCometeFont(AwtFontTool.getCometeFont(closeButton
                .getFont()));
        GridBagConstraints resetConstraints = new GridBagConstraints();
        resetConstraints.fill = GridBagConstraints.VERTICAL;
        resetConstraints.gridx = 0;
        resetConstraints.gridy = 0;
        resetConstraints.weightx = 0;
        resetConstraints.weighty = 1;
        resetConstraints.insets = new Insets(0, 0, 0, 5);
        experimentIndexPanel.add((JComponent) resetExperimentIndexButton.getComponent(),
                resetConstraints);
        GridBagConstraints incrementConstraints = new GridBagConstraints();
        incrementConstraints.fill = GridBagConstraints.VERTICAL;
        incrementConstraints.gridx = 1;
        incrementConstraints.gridy = 0;
        incrementConstraints.weightx = 0;
        incrementConstraints.weighty = 1;
        incrementConstraints.insets = new Insets(0, 0, 0, 5);
        experimentIndexPanel.add((JComponent) incrementExperimentIndexButton.getComponent(),
                incrementConstraints);
        GridBagConstraints glueConstraints = new GridBagConstraints();
        glueConstraints.fill = GridBagConstraints.BOTH;
        glueConstraints.gridx = 2;
        glueConstraints.gridy = 0;
        glueConstraints.weightx = 1;
        glueConstraints.weighty = 1;
        experimentIndexPanel.add(Box.createGlue(), glueConstraints);

        // NxEntry Name
        nxEntryNameEditButtonPanel = new JPanel(new BorderLayout());
        nxEntryNameTitle = new JLabel("NxEntry Name:");
        nxEntryNameViewer = new Label();
        nxEntryNameViewer.setStateEnabled(false);
        nxEntryNameViewer.setCometeFont(CometeFont.DefaultFont);
        nxEntryNameEditButton = new JButton("Edit NxEntryName Model");
        nxEntryNameEditButton.addActionListener(new ActionListener() {
            @Override
View Full Code Here

    }

    @Override
    protected void initAndAddOtherComponentsInMainPanel() {

        hiddenValueLabel = new Label();
        valueListener = generateValueListener();

        applyButton = new StringButton() {
            @Override
            public void actionPerformed(EventObject event) {
View Full Code Here

            public void actionPerformed(ActionEvent e) {
                openEditDialog();
            }
        });

        hiddenConfigListLabel = new Label();

        configListener = new IWidgetListener() {
            @Override
            public void stringValueChanged(String value) {
                SwingUtilities.invokeLater(new Runnable() {
View Full Code Here

TOP

Related Classes of fr.soleil.comete.widget.Label

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.