Package fr.soleil.comete.widget

Examples of fr.soleil.comete.widget.Label


          NodeDataType nodeDataType = getNodeDataType(di);
          switch (nodeDataType) {
            case SCALAR:
              icon = ICONS.getIcon("NodeScalar");

              Label textLabel = new Label();
              textLabel.switchDAOFactory(DummyDAOFactory.class.getName());
              try {
                IArray data = di.getData();
                // instead we could use getIndexIterator and get the first value
                // Index index = data.getIndex();
                // index.set(0);
                // String value = getNodeName(gtn) + " = " +
                // data.getObject(index);

                IArrayIterator iterator = data.getIterator();
                String value = getNodeName(gtn) + " = "
                + iterator.getObjectNext();

                textLabel.setData(value);
              }
              catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
              }
              viewer = (JComponent) textLabel.getComponent();
              break;

            case SPECTRUM:
              icon = ICONS.getIcon("NodeSpectrum");
View Full Code Here


        // label value
        JLabel lblValue = new JLabel();
        lblValue.setText("Value :");

        // champ value
        this.valueViewer = new Label();
        // this.valueViewer.setSizingBehavior(30);
        ((JComponent) this.valueViewer.getComponent()).setPreferredSize(new java.awt.Dimension(30,
                20));
        ((JComponent) this.valueViewer.getComponent())
                .setMinimumSize(new java.awt.Dimension(30, 20));
View Full Code Here

        }
    }

    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

    return averagePressureViewer;
  }
 
  private Label createCustomLabel( String text, Color background, boolean isOpaque, Color foreground, Border border, String command, Font font, boolean isAlarmEnabled) {
   
    Label label = this.machineStatus.generateLabel();
    label.setText(text);
    ((JComponent)label.getComponent()).setBackground(background);
    label.setOpaque(isOpaque);
    ((JComponent)label.getComponent()).setForeground(foreground);
    ((JComponent)label.getComponent()).setBorder(border);
    // TODO YLE : equivalent comete?
    //label.setActionCommand(command);
    ((JComponent)label.getComponent()).setFont(font);
    // TODO YLE : equivalent comete?
    //label.setAlarmEnabled(isAlarmEnabled);
    return label;
   
  }
View Full Code Here

        runnableSema = new Semaphore(1);
        stopped = true;
        error = false;
        model = "";
        deviceLabel = new JLabel(NO_DEVICE_STRING);
        statusLabel = new Label();

        synchronized (cometeBeanList) {
            cometeBeanList.add(new WeakReference<AbstractTangoBean>(this));
        }
View Full Code Here

     * 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

     */
    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, BorderLayout.CENTER);
    }

    @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

    // 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

        runnableSema = new Semaphore(1);
        stopped = true;
        error = false;
        model = "";
        deviceLabel = new JLabel(NO_DEVICE_STRING);
        statusLabel = new Label();

        synchronized (cometeBeanList) {
            cometeBeanList.add(new WeakReference<AbstractTangoBean>(this));
        }
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.