Package javax.swing

Examples of javax.swing.InputVerifier


          }
        }
      }
    });

    inputText.setInputVerifier(new InputVerifier() {
      public boolean verify(JComponent comp) {
        boolean returnValue = true;
        JTextField textField = (JTextField) comp;
        String content = textField.getText();
        if (content.length() != 0) {
View Full Code Here


      add(p7);

      add(Box.createVerticalGlue());
     
      configurationURL.setToolTipText("A complete and valid URL identifying the location of a valid log4 xml configuration file to auto-configure Receivers and other Plugins");
      configurationURL.setInputVerifier(new InputVerifier() {

        public boolean verify(JComponent input)
        {
            try {
                new URL(configurationURL.getText());
View Full Code Here

      add(p7);

      add(Box.createVerticalGlue());
     
      configurationURL.setToolTipText("A complete and valid URL identifying the location of a valid log4 xml configuration file to auto-configure Receivers and other Plugins");
      configurationURL.setInputVerifier(new InputVerifier() {

        public boolean verify(JComponent input)
        {
            try {
                new URL(configurationURL.getText());
View Full Code Here

      return false;
    else {
      Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
      if (focusOwner != null && focusOwner instanceof DataField) {
        DataField df = (DataField)focusOwner;
        InputVerifier verifier = df.getInputVerifier();
        if (verifier != null) {
          return verifier.shouldYieldFocus(df);
        }
      }
    }
    return true;
  }
View Full Code Here

      return false;
    else {
      Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
      if (focusOwner != null && focusOwner instanceof DataField) {
        DataField df = (DataField)focusOwner;
        InputVerifier verifier = df.getInputVerifier();
        if (verifier != null) {
          return verifier.shouldYieldFocus(df);
        }
      }
    }
    return true;
  }
View Full Code Here

      return false;
    else {
      Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
      if (focusOwner != null && focusOwner instanceof DataField) {
        DataField df = (DataField)focusOwner;
        InputVerifier verifier = df.getInputVerifier();
        if (verifier != null) {
          return verifier.shouldYieldFocus(df);
        }
      }
    }
    return true;
  }
View Full Code Here

      l = new JLabel("Адрес линка");
      l.setBounds(insets.left+10, insets.top+40, 180, 20);
      add(l);
      linkAddress = new JTextField(10);
      linkAddress.setBounds(insets.left+190, insets.top+40, 190, 20);
      linkAddress.setInputVerifier(new InputVerifier() {

        @Override
        public boolean verify(JComponent input) {
          if (input instanceof JTextField) {
            String text = ((JTextField) input).getText();
View Full Code Here

            public void actionPerformed(ActionEvent e) {
                updateModel();
            }
        });

        textComponent.setInputVerifier(new InputVerifier() {

            public boolean verify(JComponent c) {
                updateModel();
                // release focus after coloring the field...
                return true;
View Full Code Here

        this.defaultBGColor = textComponent.getBackground();
        this.defaultToolTip = textComponent.getToolTipText();
        this.textComponent = textComponent;

        if (checkOnFocusLost) {
            textComponent.setInputVerifier(new InputVerifier() {

                public boolean verify(JComponent c) {
                    updateModel();
                    // release focus after coloring the field...
                    return true;
View Full Code Here

//        }
        /*
         * Set an input verifier to prevent the cell losing focus when the value
         * is invalid
         */
        textField.setInputVerifier(new InputVerifier() {
            @Override
            public boolean verify(JComponent input) {
                JFormattedTextField ftf = (JFormattedTextField) input;
                return ftf.isEditValid();
            }
View Full Code Here

TOP

Related Classes of javax.swing.InputVerifier

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.