Package jmt.framework.data

Examples of jmt.framework.data.LabelValue


    final JComboBox delimiters = new JComboBox(DELIMITERS);
    delimiters.setSelectedItem(LabelValue.getElement(DELIMITERS, stationData.getLoggingGlbParameter("delim")));
    delimiters.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent e) {
        LabelValue element = (LabelValue) delimiters.getSelectedItem();
        if (!element.getValue().equals(stationData.getLoggingGlbParameter("decimalSeparator"))) {
          stationData.setLoggingGlbParameter("delim", element.getValue());
        } else {
          JOptionPane.showMessageDialog(MeasurePanel.this,
                "Delimiter and Decimal separator cannot be the same. Please make sure that they are different.",
                "Error", JOptionPane.ERROR_MESSAGE);
          delimiters.setSelectedItem(LabelValue.getElement(DELIMITERS, stationData.getLoggingGlbParameter("delim")));
        }
      }
    });
    label.setLabelFor(delimiters);
    logSettings.add(label);
    logSettings.add(delimiters);
    label = new JLabel("Decimal separator:");
    final JComboBox decimals = new JComboBox(DECIMAL);
    decimals.setSelectedItem(LabelValue.getElement(DECIMAL, stationData.getLoggingGlbParameter("decimalSeparator")));
    label.setLabelFor(decimals);
    decimals.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent e) {
        LabelValue element = (LabelValue) decimals.getSelectedItem();
        if (!element.getValue().equals(stationData.getLoggingGlbParameter("delim"))) {
          stationData.setLoggingGlbParameter("decimalSeparator", element.getValue());
        } else {
          JOptionPane.showMessageDialog(MeasurePanel.this,
                "Delimiter and Decimal separator cannot be the same. Please make sure that they are different.",
                "Error", JOptionPane.ERROR_MESSAGE);
          decimals.setSelectedItem(LabelValue.getElement(DECIMAL, stationData.getLoggingGlbParameter("decimalSeparator")));
View Full Code Here

TOP

Related Classes of jmt.framework.data.LabelValue

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.