Package javax.swing

Examples of javax.swing.JFormattedTextField.addPropertyChangeListener()


      channelMenu.setSelectedIndex(0);
    } else {
      channelMenu.setSelectedIndex(getChannel());
    }
    final JFormattedTextField outputPower = new JFormattedTextField(new Double(getCurrentOutputPower()));
    outputPower.addPropertyChangeListener("value", new PropertyChangeListener() {
      public void propertyChange(PropertyChangeEvent evt) {
        setOutputPower(((Number)outputPower.getValue()).doubleValue());
      }
    });
View Full Code Here


    panel.add(Box.createHorizontalGlue());
    panel.add(textField = new JFormattedTextField(doubleFormat));
    textField.setValue(new Double(initialValue));
    textField.setColumns(4);
    textField.putClientProperty("id", id);
    textField.addPropertyChangeListener("value", new PropertyChangeListener() {
      public void propertyChange(PropertyChangeEvent e) {
        JFormattedTextField textField = (JFormattedTextField) e.getSource();
        Parameter id = (Parameter) textField.getClientProperty("id");
        Double val = ((Number) e.getNewValue()).doubleValue();
        channelModel.setParameterValue(id, val);
View Full Code Here

    panel.add(Box.createHorizontalGlue());
    panel.add(textField = new JFormattedTextField(integerFormat));
    textField.setValue(new Double(initialValue));
    textField.setColumns(4);
    textField.putClientProperty("id", id);
    textField.addPropertyChangeListener("value", new PropertyChangeListener() {
      public void propertyChange(PropertyChangeEvent e) {
        JFormattedTextField textField = (JFormattedTextField) e.getSource();
        Parameter id = (Parameter) textField.getClientProperty("id");
        Integer val = ((Number) e.getNewValue()).intValue();
        channelModel.setParameterValue(id, val);
View Full Code Here

      configPanel.add(slider);

      final JFormattedTextField etxField = new JFormattedTextField(new Double(etxFactor));
      etxField.setBorder(BorderFactory.createTitledBorder("ETX factor"));
      etxField.setColumns(5);
      etxField.addPropertyChangeListener("value", new PropertyChangeListener() {
        public void propertyChange(PropertyChangeEvent evt) {
          etxFactor = ((Number)etxField.getValue()).doubleValue();
          repaint();
        }
      });
View Full Code Here

    numberField = new JFormattedTextField(integerFormat);
    numberField.setFocusLostBehavior(JFormattedTextField.PERSIST);
    numberField.setValue(new Integer(1));
    numberField.setColumns(10);
    numberField.addFocusListener(myEventHandler);
    numberField.addPropertyChangeListener("value", myEventHandler);
    numberOfMotesField = numberField;

    smallPane.add(label);
    smallPane.add(Box.createHorizontalStrut(10));
    smallPane.add(numberField);
View Full Code Here

    numberField = new JFormattedTextField(doubleFormat);
    numberField.setFocusLostBehavior(JFormattedTextField.PERSIST);
    numberField.setValue(new Double(0.0));
    numberField.setColumns(4);
    numberField.addFocusListener(myEventHandler);
    numberField.addPropertyChangeListener("value", myEventHandler);
    startX = numberField;
    smallPane.add(numberField);
    smallPane.add(Box.createHorizontalStrut(10));

    label = new JLabel("<->");
View Full Code Here

    numberField = new JFormattedTextField(doubleFormat);
    numberField.setFocusLostBehavior(JFormattedTextField.PERSIST);
    numberField.setValue(new Double(100.0));
    numberField.setColumns(4);
    numberField.addFocusListener(myEventHandler);
    numberField.addPropertyChangeListener("value", myEventHandler);
    endX = numberField;
    smallPane.add(numberField);
    smallPane.add(Box.createHorizontalStrut(10));

    mainPane.add(smallPane);
View Full Code Here

    numberField = new JFormattedTextField(doubleFormat);
    numberField.setFocusLostBehavior(JFormattedTextField.PERSIST);
    numberField.setValue(new Double(0.0));
    numberField.setColumns(4);
    numberField.addFocusListener(myEventHandler);
    numberField.addPropertyChangeListener("value", myEventHandler);
    startY = numberField;
    smallPane.add(numberField);
    smallPane.add(Box.createHorizontalStrut(10));

    label = new JLabel("<->");
View Full Code Here

    numberField = new JFormattedTextField(doubleFormat);
    numberField.setFocusLostBehavior(JFormattedTextField.PERSIST);
    numberField.setValue(new Double(100.0));
    numberField.setColumns(4);
    numberField.addFocusListener(myEventHandler);
    numberField.addPropertyChangeListener("value", myEventHandler);
    endY = numberField;
    smallPane.add(numberField);
    smallPane.add(Box.createHorizontalStrut(10));

    mainPane.add(smallPane);
View Full Code Here

    numberField = new JFormattedTextField(doubleFormat);
    numberField.setFocusLostBehavior(JFormattedTextField.PERSIST);
    numberField.setValue(new Double(0.0));
    numberField.setColumns(4);
    numberField.addFocusListener(myEventHandler);
    numberField.addPropertyChangeListener("value", myEventHandler);
    startZ = numberField;
    smallPane.add(numberField);
    smallPane.add(Box.createHorizontalStrut(10));

    label = new JLabel("<->");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.