Package fr.soleil.comete.swing

Examples of fr.soleil.comete.swing.ComboBox


                } else {
                    ((CheckBox) lEditorComponent).setSelected(false);
                }
                break;
            case DEV:
                lEditorComponent = new ComboBox();
                List<String> authorizedValues = getAuthorizedValues(param);
                boolean hasFoundExpectedDevices = false;
                final String[] devicesClass = param.getDevicesClass();
                if (devicesClass != null && devicesClass.length != 0) {
                    try {
                        List<String> devicesForClass = getDevicesForClasses(devicesClass);
                        for (String s : devicesForClass) {
                            if (authorizedValues.isEmpty() || authorizedValues.contains(s)) {
                                hasFoundExpectedDevices = true;
                                ((ComboBox) lEditorComponent).addItem(s);
                                if (s.equalsIgnoreCase(entry.getValue())) {
                                    ((ComboBox) lEditorComponent).setSelectedItem(s);
                                }
                            }

                        }
                    } catch (DevFailed e) {
                        LOGGER.log(Level.SEVERE, e.getMessage());
                    }

                    if (!hasFoundExpectedDevices) {
                        String err = "No expected device matches given constraints: "
                                + ArrayUtils.toString(devicesClass) + " " + ArrayUtils.toString(param.getConstraints());
                        String location = getErrorLocation(entryContainer, null, entry);
                        JTextArea labelError = getTextAreaError(err, location, lEditorComponent, labelName, tabTitle);

                        panelError.add(labelError);
                        panelError.revalidate();

                        errorsMap.put(lEditorComponent, labelError);
                    }

                }
                break;
            case DEV_ATTR:
                /*  lEditorComponent = new ComboBox();
                  List<String> authorizedValuesAttr = getAuthorizedValues(param);
                  boolean hasFoundExpectedDevices2 = false;
                  if (param.getDevicesClass() != null && param.getDevicesClass().length != 0) {
                      for (String myClass : param.getDevicesClass()) {
                          try {
                              String[] exportedDevices = TangoDeviceHelper.getDatabase().get_device_exported_for_class(
                                      myClass);
                              for (String s : exportedDevices) {
                                  if (authorizedValuesAttr.isEmpty() || authorizedValuesAttr.contains(s)) {
                                      hasFoundExpectedDevices2 = true;
                                      ((ComboBox) lEditorComponent).addItem(s);
                                      if (s.equalsIgnoreCase(entry.getValue())) {
                                          ((ComboBox) lEditorComponent).setSelectedItem(s);
                                      }
                                  }

                              }
                          } catch (DevFailed e) {
                              LOGGER.log(Level.SEVERE, e.getMessage());
                          }
                      }
                      if (!hasFoundExpectedDevices2) {
                          throw new FSParsingException("No expected device matches given constraints: "
                                  + ArrayUtils.toString(param.getDevicesClass()) + " "
                                  + ArrayUtils.toString(param.getConstraints()), lEditorComponent, labelName);
                      }

                  } else {
                      if (param.getAttributeList() != null && param.getAttributeList().length != 0) {
                          for (String s : param.getAttributeList()) {
                              if (authorizedValuesAttr.isEmpty() || authorizedValuesAttr.contains(s)) {
                                  ((ComboBox) lEditorComponent).addItem(s);
                                  if (s.equalsIgnoreCase(entry.getValue())) {
                                      ((ComboBox) lEditorComponent).setSelectedItem(s);
                                  }
                              }

                          }
                      }
                  }*/
                lEditorComponent = new TextField();
                ((TextField) lEditorComponent).setText(entry.getValue());
                ((TextField) lEditorComponent).setColumns(50);

                break;
            case ENUM:
                lEditorComponent = new ComboBox();
                if (param.getValues() == null || param.getValues().length == 0) {
                    throw new FSParsingException("Plugin parameter " + param.getName()
                            + " must have a values property.", lEditorComponent, labelName);
                }
                for (String s : param.getValues()) {
View Full Code Here


     *
     * @return fr.esrf.tangoatk.widget.attribute.StringScalarEditor
     */
    private ComboBox getXWriteCombo() {
        if (xProxiesCombo == null) {
            xProxiesCombo = new ComboBox();
            xProxiesCombo.setVisible(false);
            xProxiesCombo.setToolTipText(X_INFO);
        }
        return xProxiesCombo;
    }
View Full Code Here

     *
     * @return fr.esrf.tangoatk.widget.attribute.StringScalarEditor
     */
    private ComboBox getYWriteCombo() {
        if (yProxiesCombo == null) {
            yProxiesCombo = new ComboBox();
            yProxiesCombo.setVisible(false);
            yProxiesCombo.setToolTipText(Y_INFO);
        }
        return yProxiesCombo;
    }
View Full Code Here

     *
     * @return fr.esrf.tangoatk.widget.attribute.StringScalarEditor
     */
    private ComboBox getXWriteCombo() {
        if (xProxiesCombo == null) {
            xProxiesCombo = new ComboBox();
            xProxiesCombo.setVisible(false);
            xProxiesCombo.setToolTipText(X_INFO);
        }
        return xProxiesCombo;
    }
View Full Code Here

     *
     * @return fr.esrf.tangoatk.widget.attribute.StringScalarEditor
     */
    private ComboBox getYWriteCombo() {
        if (yProxiesCombo == null) {
            yProxiesCombo = new ComboBox();
            yProxiesCombo.setVisible(false);
            yProxiesCombo.setToolTipText(Y_INFO);
        }
        return yProxiesCombo;
    }
View Full Code Here

        model.updateDataModelEditDialog(this);
    }

    @Override
    protected void initPanelComponents() {
        dataModelSelectionComboBox = new ComboBox();
        dataModelSelectionTitle = new JLabel("Current datamodel:");
        dataModelDocumentListener = new DocumentListener() {
            @Override
            public void removeUpdate(DocumentEvent e) {
                updateCombo(true);
View Full Code Here

        return epsilonViewer;
    }

    private ComboBox getFittingFunctionTypeEditor() {
        if (functionTypeEditor == null) {
            functionTypeEditor = new ComboBox();
            functionTypeEditor.setToolTipText(FUNCTION_TYPE_INFO);
            functionTypeEditor.setValueList(Parameters.GAUSSIAN, Parameters.GAUSSIANB,
                    Parameters.LORENTZIAN, Parameters.LORENTZIANB, Parameters.SIGMOID,
                    Parameters.SIGMOIDB, Parameters.MEANWITHTHESHOLD);
        }
View Full Code Here

        return epsilonViewer;
    }

    private ComboBox getFittingFunctionTypeEditor() {
        if (functionTypeEditor == null) {
            functionTypeEditor = new ComboBox();
            functionTypeEditor.setToolTipText(FUNCTION_TYPE_INFO);
            functionTypeEditor.setValueList(new String[] { Parameters.GAUSSIAN,
                    Parameters.GAUSSIANB, Parameters.LORENTZIAN, Parameters.LORENTZIANB,
                    Parameters.SIGMOID, Parameters.SIGMOIDB, Parameters.MEANWITHTHESHOLD });
        }
View Full Code Here

     *
     * @return fr.esrf.tangoatk.widget.attribute.StringScalarEditor
     */
    private ComboBox getXWriteCombo() {
        if (xProxiesCombo == null) {
            xProxiesCombo = new ComboBox();
            xProxiesCombo.setVisible(false);
            xProxiesCombo.setToolTipText(X_INFO);
        }
        return xProxiesCombo;
    }
View Full Code Here

     *
     * @return fr.esrf.tangoatk.widget.attribute.StringScalarEditor
     */
    private ComboBox getYWriteCombo() {
        if (yProxiesCombo == null) {
            yProxiesCombo = new ComboBox();
            yProxiesCombo.setVisible(false);
            yProxiesCombo.setToolTipText(Y_INFO);
        }
        return yProxiesCombo;
    }
View Full Code Here

TOP

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

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.