Package javax.swing

Examples of javax.swing.JFormattedTextField$FocusLostHandler


    /** Creates new form CopyNodesUI */
    public CopyNodesUI() {
        initComponents();
        copiesSpinner.setModel(new SpinnerNumberModel(1, 1, 100, 1));//Min: 1, Max:500
        JFormattedTextField spinnerText = ((JSpinner.DefaultEditor) copiesSpinner.getEditor()).getTextField();
        spinnerText.setEditable(false);//Not editable with keyboard
    }
View Full Code Here


      cb.setToolTipText((String)featureDescriptions.elementAt(i));
     
            cb.setActionCommand("enableFeatExt"+i);
            cb.addActionListener(this);

            JFormattedTextField tf = new JFormattedTextField(NumberFormat.getNumberInstance());
            tf.setValue(new Double(1.0));
            tf.setColumns(2);
            tf.setBackground(c);
            tf.setEnabled(false);
            featureWeightFields.add(tf);

            JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
            panel.setBackground(c);
            panel.add(cb);
      panel.add(tf);

      if(!(f instanceof MetaFeatureExtractor))
      {
        fENum++;
                if (name.equals("AvgPitchSimple"))
                {
                    cb.setSelected(true);
                    tf.setEnabled(true);
                }

                selectFeaturesPanel.add(panel);
            }
      else
View Full Code Here

    String text = field.getText();
    return Integer.parseInt(text);
  }

  private JFormattedTextField addField(String name) {
    JFormattedTextField field = FieldFactory.createIntegerField(1, 2);
    JLabel label = new JLabel(messages.get(name), JLabel.TRAILING);
    label.setLabelFor(field);
   
    JPanel panel = new JPanel();
    panel.setLayout(new GridLayout(1, 3, 5, 5));
View Full Code Here

public class FieldFactory {
 
  public static JFormattedTextField createIntegerField(int minValue, int maxLength) {
    IntegerFormatter formatter = new IntegerFormatter(minValue);
    JFormattedTextField field = new JFormattedTextField(formatter);
    field.setHorizontalAlignment(JTextField.CENTER);
    field.addKeyListener(new FieldListener(maxLength));
    return field;
  }
View Full Code Here

      }
    };

    m_btnCombo = new BasicArrowButton(SwingConstants.SOUTH);
    m_btnCombo.setFocusable(false);
    m_txtInput = new JFormattedTextField(m_objDateFormat);
    m_chkSelectable = new JCheckBox("");
    m_chkSelectable.setSelected(true);
    m_menuPopup = new JPopupMenu() {
      /**
       * @author : aniruddha<br>
View Full Code Here

    {
      this.dateType = this.dateType.getComponentType();
    }

    setLayout(new BorderLayout());
    dateField = new JFormattedTextField();
    dateField.setColumns(20);
    dateField.setEditable(true);

    pickDateButton = new EllipsisButton(new PickDateListener());
View Full Code Here

    gbc_lblNewLabel_1.insets = new Insets(0, 0, 5, 5);
    gbc_lblNewLabel_1.gridx = 0;
    gbc_lblNewLabel_1.gridy = 0;
    pnlVariables.add(lblNewLabel_1, gbc_lblNewLabel_1);
   
    textFieldRumbo = new JFormattedTextField(new Integer(90));
    textFieldRumbo.setToolTipText("Rumbo deseado a seguir, introduce un rumbo valido entre 0 y 360 grados.");
    textFieldRumbo.setHorizontalAlignment(SwingConstants.RIGHT);
    GridBagConstraints gbc_textFieldRumbo = new GridBagConstraints();
    gbc_textFieldRumbo.anchor = GridBagConstraints.NORTHWEST;
    gbc_textFieldRumbo.insets = new Insets(0, 0, 5, 5);
    gbc_textFieldRumbo.gridx = 1;
    gbc_textFieldRumbo.gridy = 0;
    pnlVariables.add(textFieldRumbo, gbc_textFieldRumbo);
    textFieldRumbo.setColumns(15);
   
    JLabel lblDesvioRumbo = new JLabel("Desvio Rumbo");
    GridBagConstraints gbc_lblDesvioRumbo = new GridBagConstraints();
    gbc_lblDesvioRumbo.anchor = GridBagConstraints.SOUTHWEST;
    gbc_lblDesvioRumbo.insets = new Insets(0, 0, 5, 5);
    gbc_lblDesvioRumbo.gridx = 3;
    gbc_lblDesvioRumbo.gridy = 0;
    pnlVariables.add(lblDesvioRumbo, gbc_lblDesvioRumbo);
   
    JFormattedTextField textFieldDesvioRumbo = new JFormattedTextField(new Integer(6));
    textFieldDesvioRumbo.setHorizontalAlignment(SwingConstants.RIGHT);
    textFieldDesvioRumbo.setToolTipText("<html><p>Desvi&oacute; m&aacute;ximo permitido sobre el rumbo sin aplicar cambio de rumbo<br />si los m&aacute;rgenes est&aacute;n (+/-) el desvi&oacute; permitido se hacen peque&ntilde;as correcciones <br />sobre el tim&oacute;n a Babor y Estribor para tener una tendencia de acuerdo al rumbo <br />requerido.</p></html>");
    textFieldDesvioRumbo.setColumns(15);
    GridBagConstraints gbc_textFieldDesvioRumbo = new GridBagConstraints();
    gbc_textFieldDesvioRumbo.anchor = GridBagConstraints.NORTHWEST;
    gbc_textFieldDesvioRumbo.insets = new Insets(0, 0, 5, 0);
    gbc_textFieldDesvioRumbo.gridx = 4;
    gbc_textFieldDesvioRumbo.gridy = 0;
    pnlVariables.add(textFieldDesvioRumbo, gbc_textFieldDesvioRumbo);
   
    JLabel lblDeclinacinMagnetica = new JLabel("Declinaci\u00F3n magnetica");
    GridBagConstraints gbc_lblDeclinacinMagnetica = new GridBagConstraints();
    gbc_lblDeclinacinMagnetica.anchor = GridBagConstraints.SOUTHWEST;
    gbc_lblDeclinacinMagnetica.insets = new Insets(0, 0, 0, 5);
    gbc_lblDeclinacinMagnetica.gridx = 0;
    gbc_lblDeclinacinMagnetica.gridy = 1;
    pnlVariables.add(lblDeclinacinMagnetica, gbc_lblDeclinacinMagnetica);
   
    JFormattedTextField textFieldDeclinacionMagnetica = new JFormattedTextField(new BigDecimal(-0.333) );
    textFieldDeclinacionMagnetica.setHorizontalAlignment(SwingConstants.RIGHT);
    textFieldDeclinacionMagnetica.setColumns(15);
    textFieldDeclinacionMagnetica.setToolTipText("Declinaci\u00F3n magnetica en grados UN grado igual a 60 minutos, Emplo para Alicante:-0.333 ");
    GridBagConstraints gbc_textFieldDeclinacionMagnetica = new GridBagConstraints();
    gbc_textFieldDeclinacionMagnetica.anchor = GridBagConstraints.NORTHWEST;
    gbc_textFieldDeclinacionMagnetica.insets = new Insets(0, 0, 0, 5);
    gbc_textFieldDeclinacionMagnetica.gridx = 1;
    gbc_textFieldDeclinacionMagnetica.gridy = 1;
    pnlVariables.add(textFieldDeclinacionMagnetica, gbc_textFieldDeclinacionMagnetica);
   
    JLabel lblCorrecinCuadrantes = new JLabel("Correci\u00F3n Cuadrantes");
    GridBagConstraints gbc_lblCorrecinCuadrantes = new GridBagConstraints();
    gbc_lblCorrecinCuadrantes.anchor = GridBagConstraints.EAST;
    gbc_lblCorrecinCuadrantes.insets = new Insets(0, 0, 0, 5);
    gbc_lblCorrecinCuadrantes.gridx = 3;
    gbc_lblCorrecinCuadrantes.gridy = 1;
    pnlVariables.add(lblCorrecinCuadrantes, gbc_lblCorrecinCuadrantes);
   
    JFormattedTextField textFieldCorrecionCuadrantes = new JFormattedTextField(new Integer(45));
    textFieldCorrecionCuadrantes.setHorizontalAlignment(SwingConstants.RIGHT);
    textFieldCorrecionCuadrantes.setColumns(15);
    GridBagConstraints gbc_textFieldCorrecionCuadrantes = new GridBagConstraints();
    gbc_textFieldCorrecionCuadrantes.anchor = GridBagConstraints.WEST;
    gbc_textFieldCorrecionCuadrantes.gridx = 4;
    gbc_textFieldCorrecionCuadrantes.gridy = 1;
    pnlVariables.add(textFieldCorrecionCuadrantes, gbc_textFieldCorrecionCuadrantes);
View Full Code Here

                    "top, left, wrap" );

    }

    public void createSendCommandPanel(JPanel parent) {
        cmdTextField = new JFormattedTextField();
        cmdTextField.setText( "" );
        parent.add( cmdTextField,
                    "growx, spanx 3, wrap" );
        JToggleButton sendBtn = new JToggleButton( "send" );
        parent.add( sendBtn );
View Full Code Here

                    "top, left, wrap" );

    }

    public void createSendCommandPanel(JPanel parent) {
        cmdTextField = new JFormattedTextField();
        cmdTextField.setText( "" );
        parent.add( cmdTextField,
                    "growx, spanx 3, wrap" );
        JToggleButton sendBtn = new JToggleButton( "send" );
        parent.add( sendBtn );
View Full Code Here

        c.gridx = 0;
        c.gridy = 0;
        c.gridwidth = 2;
        inputPanel2.add(queryButton, c);

        maxHitsField = new JFormattedTextField(new NumberFormatter());
        maxHitsField.setValue(Integer.valueOf(100));
        maxHitsField.setColumns(5);

        JLabel maxHitsLabel = new JLabel("Max hits:");
        maxHitsLabel.setLabelFor(maxHitsField);
View Full Code Here

TOP

Related Classes of javax.swing.JFormattedTextField$FocusLostHandler

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.