Package fr.soleil.comete.widget

Examples of fr.soleil.comete.widget.Label


        }
    }

    @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(new Color(0xB8CFE5)));
        return label;
    }
View Full Code Here


        Collection<Label> labelCollection = labelMap.values();
        Iterator<Label> labelIterator = labelCollection.iterator();

        while (labelIterator.hasNext()) {
            Label label = labelIterator.next();
            label.removeKey(TangoDAOFactory.class.getName());
        }

        scanDeadTime.removeKey(TangoDAOFactory.class.getName());

        if (scanServerName == null || scanServerName.isEmpty()) {
            return;
        }

        scanServerLabel.setText(scanServerName);
        labelMap.get(SCAN_STATE).setToolTipText(scanServerName);
        Set<String> keySet = labelMap.keySet();
        Iterator<String> keyIterator = keySet.iterator();
        while (keyIterator.hasNext()) {

            String key = keyIterator.next();
            Label label = labelMap.get(key);

            TangoKey tangoKey = new TangoKey();
            tangoKey.registerAttribute(scanServerName, key);
            label.addKey(TangoDAOFactory.class.getName(), tangoKey);
        }

        // Progress bar
        TangoKey deadTimeKey = new TangoKey();
        deadTimeKey.registerAttribute(scanServerName, DEAD_TIME_PERCENT);
View Full Code Here

    private void switchFactory() {
        Collection<Label> labelCollection = labelMap.values();
        Iterator<Label> labelIterator = labelCollection.iterator();

        while (labelIterator.hasNext()) {
            Label label = labelIterator.next();
            label.switchDAOFactory(TangoDAOFactory.class.getName());
        }

        scanDeadTime.switchDAOFactory(TangoDAOFactory.class.getName());
        scanCompletion.switchDAOFactory(TangoDAOFactory.class.getName());
    }
View Full Code Here

        GridBagConstraints cell10 = new GridBagConstraints();
        cell10.gridx = 1;
        cell10.gridy = 0;
        cell10.insets = defaultInset;
        cell10.fill = GridBagConstraints.BOTH;
        Label stateLabel = new Label();
        stateLabel.setHorizontalAlignment(ILabel.CENTER);
        stateLabel.setText("UNKNOWN");
        stateLabel.setCometeBackground(CometeColor.GRAY);
        stateLabel.setOpaque(true);
        add((JComponent) stateLabel.getComponent(), cell10);
        labelMap.put(SCAN_STATE, stateLabel);

        // Scan status Cell 01
        GridBagConstraints cell01 = new GridBagConstraints();
        cell01.gridx = 0;
View Full Code Here

        // addLabel(DEAD_TIME,cell20);

    }

    private void addLabel(final String label, GridBagConstraints constraints) {
        Label target = new Label();
        target.setToolTipText("SCANSERVER/" + label);
        target.setText("-");
        applySmallStyle(target);
        add((JComponent) target.getComponent(), constraints);
        labelMap.put(label, target);
    }
View Full Code Here

                }
                item = null;
            }
        };
        tabParametersViewer.setExecuteDaoOnInitialization(true);
        targetDirectoryLabel = new Label();

        setParametersButton = new JButton("Set parameters...");
        setParametersButton.setEnabled(false);
        setParametersButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
View Full Code Here

        Collection<Label> labelCollection = labelMap.values();
        Iterator<Label> labelIterator = labelCollection.iterator();

        while (labelIterator.hasNext()) {
            Label label = labelIterator.next();
            label.removeKey(TangoDAOFactory.class.getName());
        }

        scanProgress.removeKey(TangoDAOFactory.class.getName());

        if (scanServerName == null || scanServerName.isEmpty()) {
            return;
        }

        scanServerLabel.setText(scanServerName);
        labelMap.get(SCAN_STATE).setToolTipText(scanServerName);
        Set<String> keySet = labelMap.keySet();
        Iterator<String> keyIterator = keySet.iterator();
        while (keyIterator.hasNext()) {

            String key = keyIterator.next();
            Label label = labelMap.get(key);

            TangoKey tangoKey = new TangoKey();
            tangoKey.registerAttribute(scanServerName, key);
            label.addKey(TangoDAOFactory.class.getName(), tangoKey);
        }

        // Progress bar
        TangoKey progressKey = new TangoKey();
        progressKey.registerAttribute(scanServerName, DEAD_TIME_PERCENT);
View Full Code Here

    private void switchFactory() {
        Collection<Label> labelCollection = labelMap.values();
        Iterator<Label> labelIterator = labelCollection.iterator();

        while (labelIterator.hasNext()) {
            Label label = labelIterator.next();
            label.switchDAOFactory(TangoDAOFactory.class.getName());
        }

        scanProgress.switchDAOFactory(TangoDAOFactory.class.getName());
    }
View Full Code Here

    private void initializeLayout() {
        this.setLayout(new FlowLayout(FlowLayout.LEFT, 20, 0));

        // Scan server
        add(scanServerLabel);
        Label target = new Label();
        target.setText("UNKNOWN");
        target.setCometeBackground(CometeColor.GRAY);
        target.setOpaque(true);
        add((JComponent) target.getComponent());
        labelMap.put(SCAN_STATE, target);

        // Status
        addLabel(SCAN_STATUS);
        // labelMap.get(SCAN_STATUS).setPreferredSize(200, 20);
View Full Code Here

        scanProgress.setValue(0);
        add((JComponent) scanProgress.getComponent());
    }

    private void addLabel(final String label) {
        Label target = new Label();
        target.setToolTipText("SCANSERVER/" + label);
        target.setText("-");
        applySmallStyle(target);
        add((JComponent) target.getComponent());
        labelMap.put(label, target);
    }
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.