congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
JPasswordField.getDocument
Code IndexAdd Tabnine to your IDE (free)

How to use
getDocument
method
in
javax.swing.JPasswordField

Best Java code snippets using javax.swing.JPasswordField.getDocument (Showing top 20 results out of 315)

origin: net.anwiba.commons/anwiba-commons-swing-core

@Override
public PlainDocument getDocument() {
 return (PlainDocument) super.getDocument();
}
origin: org.netbeans.modules/org-netbeans-modules-javafx2-project

void registerListeners() {
  textFieldPath.getDocument().addDocumentListener(this);
  passwordField.getDocument().addDocumentListener(this);
  textFieldKeyAlias.getDocument().addDocumentListener(this);
  passwordFieldKey.getDocument().addDocumentListener(this);
}

origin: org.netbeans.modules/org-netbeans-modules-php-project

private void registerListeners() {
  DocumentListener documentListener = new DefaultDocumentListener();
  hostTextField.getDocument().addDocumentListener(documentListener);
  portTextField.getDocument().addDocumentListener(documentListener);
  userTextField.getDocument().addDocumentListener(documentListener);
  passwordTextField.getDocument().addDocumentListener(documentListener);
  knownHostsFileTextField.getDocument().addDocumentListener(documentListener);
  identityFileTextField.getDocument().addDocumentListener(documentListener);
  initialDirectoryTextField.getDocument().addDocumentListener(documentListener);
  timeoutTextField.getDocument().addDocumentListener(documentListener);
  keepAliveTextField.getDocument().addDocumentListener(documentListener);
}
origin: no.tornado.databinding/databinding

public DocumentListener addValueChangeListener(JPasswordField component, ChangeListener listener) {
  DocumentListener documentListener = new DocumentChangeListener(listener);
  component.getDocument().addDocumentListener(documentListener);
  return documentListener;
}
origin: org.codeartisans.swing-on-steroids/sos-ui-swing

@Override
public void removeHandler()
{
  passwordField.getDocument().removeDocumentListener( docListener );
}
origin: no.tornado.databinding/databinding

  public void removeValueChangelistener(JPasswordField component, DocumentListener listener) {
    component.getDocument().removeDocumentListener(listener);
  }
}
origin: org.netbeans.modules/org-netbeans-modules-j2ee-sun-appsrv81

/**
 * Creates new form AddInstanceVisualNamePasswordPanel
 */
public AddInstanceVisualNamePasswordPanel() {
  initComponents();
  DocumentListener l = new MyDocListener();
  adminName.getDocument().addDocumentListener(l);
  adminPassword.getDocument().addDocumentListener(l);
}
origin: org.netbeans.modules/org-netbeans-modules-javafx2-project

private void updateDialogButtonsAndMessage() {
  if(!radioButtonSpecKey.isSelected()) {
    warningSigning.setText(NbBundle.getMessage(JFXSigningPanel.class, "JFXSigningPanel.warningSigning.message")); //NOI18N
    warningSigning.setVisible(true);
    desc.setValid(true);
  } else {
    if(textFieldPath.getDocument().getLength()>0 && passwordField.getDocument().getLength()>5 && 
        textFieldKeyAlias.getDocument().getLength()>0 && passwordFieldKey.getDocument().getLength()>5 ) {
      desc.setValid(true);
      warningSigning.setText(null);
      warningSigning.setVisible(false);
    } else {
      desc.setValid(false);
      warningSigning.setText(NbBundle.getMessage(JFXSigningPanel.class, "JFXSigningPanel.WarnMissingInfo")); // NOI18N
      warningSigning.setVisible(true);
    }
  }
}
origin: org.netbeans.modules/org-netbeans-modules-javafx2-project

void unregisterListeners() {
  textFieldPath.getDocument().removeDocumentListener(this);
  passwordField.getDocument().removeDocumentListener(this);
  textFieldKeyAlias.getDocument().removeDocumentListener(this);
  passwordFieldKey.getDocument().removeDocumentListener(this);
}
origin: net.java.truevfs/truevfs-key-swing

/** Constructs a new write key panel. */
WriteKeyPanel() {
  initComponents();
  final DocumentListener dl = new DocumentListener() {
    @Override
    public void insertUpdate(DocumentEvent e) {
      setError(null);
    }
    @Override
    public void removeUpdate(DocumentEvent e) {
      setError(null);
    }
    @Override
    public void changedUpdate(DocumentEvent e) {
      setError(null);
    }
  };
  newPasswd1Field.getDocument().addDocumentListener(dl);
  newPasswd2Field.getDocument().addDocumentListener(dl);
  authenticationPanel.getKeyFileDocument().addDocumentListener(dl);
  defaultForeground = resource.getForeground();
}
origin: de.schlichtherle.truezip/truezip-driver-zip

/** Constructs a new write key panel. */
public WriteKeyPanel() {
  initComponents();
  final DocumentListener dl = new DocumentListener() {
    @Override
    public void insertUpdate(DocumentEvent e) {
      setError(null);
    }
    @Override
    public void removeUpdate(DocumentEvent e) {
      setError(null);
    }
    @Override
    public void changedUpdate(DocumentEvent e) {
      setError(null);
    }
  };
  newPasswd1Field.getDocument().addDocumentListener(dl);
  newPasswd2Field.getDocument().addDocumentListener(dl);
  authenticationPanel.getKeyFileDocument().addDocumentListener(dl);
  defaultForeground = resource.getForeground();
}
origin: org.fosstrak.epcis/epcis-commons

private BasicOptionsPanel() {
  super(new FlowLayout(FlowLayout.LEFT, 10, 0));
  userNameLabel = new JLabel("Username:");
  add(userNameLabel);
  userNameInput = new JTextField(10);
  userNameInput.getDocument().addDocumentListener(this);
  add(userNameInput);
  passwordLabel = new JLabel("Password:");
  add(passwordLabel);
  passwordInput = new JPasswordField(10);
  passwordInput.getDocument().addDocumentListener(this);
  add(passwordInput);
  setVisible(false);
}
origin: net.java.truecommons/truecommons-key-swing

/** Constructs a new write key panel. */
WriteKeyPanel(final SwingPromptingPbeParametersView<?, ?> view) {
  assert null != view;
  this.view = view;
  initComponents();
  final DocumentListener dl = new DocumentListener() {
    @Override
    public void insertUpdate(DocumentEvent e) {
      setError(null);
    }
    @Override
    public void removeUpdate(DocumentEvent e) {
      setError(null);
    }
    @Override
    public void changedUpdate(DocumentEvent e) {
      setError(null);
    }
  };
  newPasswd1Field.getDocument().addDocumentListener(dl);
  newPasswd2Field.getDocument().addDocumentListener(dl);
  authenticationPanel.getKeyFileDocument().addDocumentListener(dl);
  defaultForeground = resource.getForeground();
}
origin: org.zaproxy/zap

public boolean isEmptyField(String fieldLabel) {
  Component c = this.fieldMap.get(fieldLabel);
  if (c != null) {
    Object value = null;
    if (c instanceof ZapTextField) {
      value = ((ZapTextField)c).getText();
    } else if (c instanceof JPasswordField) {
      return ((JPasswordField) c).getDocument().getLength() == 0;
    } else if (c instanceof ZapTextArea) {
      value = ((ZapTextArea)c).getText();
    } else if (c instanceof JComboBox) {
      value = ((JComboBox<?>)c).getSelectedItem();
    } else if (c instanceof ZapNumberSpinner) {
      value = ((ZapNumberSpinner)c).getValue();
      if ((Integer)value < 0) {
        value = null;
      }
    } else {
      logger.error("Unrecognised field class " + fieldLabel + ": " + c.getClass().getCanonicalName());
    }
    return value == null || value.toString().length() == 0;
    
  }
  return true;
}
origin: org.netbeans.modules/org-netbeans-modules-mercurial

private void initPanel() {
  repositoryPanel = new RepositoryPanel();
  urlComboEditor = (JTextComponent) repositoryPanel.urlComboBox
                   .getEditor().getEditorComponent();
  urlDoc = urlComboEditor.getDocument();
  usernameDoc = repositoryPanel.userTextField.getDocument();
  passwordDoc = repositoryPanel.userPasswordField.getDocument();
  tunnelCmdDoc = repositoryPanel.tunnelCommandTextField.getDocument();
  DocumentListener documentListener = new DocumentChangeHandler();
  urlDoc.addDocumentListener(documentListener);
  passwordDoc.addDocumentListener(documentListener);
  usernameDoc.addDocumentListener(documentListener);
  tunnelCmdDoc.addDocumentListener(documentListener);
  repositoryPanel.savePasswordCheckBox.addItemListener(this);
  repositoryPanel.urlComboBox.addItemListener(this);
  repositoryPanel.proxySettingsButton.addActionListener(this);
  repositoryPanel.userPasswordField.addFocusListener(this);
  tweakComboBoxEditor();
}
origin: net.java.truecommons/truecommons-key-swing

/** Constructs a new read key panel. */
ReadKeyPanel(final SwingPromptingPbeParametersView<?, ?> view) {
  assert null != view;
  this.view = view;
  initComponents();
  final DocumentListener dl = new DocumentListener() {
    @Override
    public void insertUpdate(DocumentEvent e) {
      setError(null);
    }
    @Override
    public void removeUpdate(DocumentEvent e) {
      setError(null);
    }
    @Override
    public void changedUpdate(DocumentEvent e) {
      setError(null);
    }
  };
  passwdField.getDocument().addDocumentListener(dl);
  authenticationPanel.getKeyFileDocument().addDocumentListener(dl);
  defaultForeground = resource.getForeground();
}
origin: de.schlichtherle.truezip/truezip-driver-zip

/** Constructs a new read key panel. */
public ReadKeyPanel() {
  initComponents();
  final DocumentListener dl = new DocumentListener() {
    @Override
    public void insertUpdate(DocumentEvent e) {
      setError(null);
    }
    @Override
    public void removeUpdate(DocumentEvent e) {
      setError(null);
    }
    @Override
    public void changedUpdate(DocumentEvent e) {
      setError(null);
    }
  };
  passwdField.getDocument().addDocumentListener(dl);
  authenticationPanel.getKeyFileDocument().addDocumentListener(dl);
  defaultForeground = resource.getForeground();
}
origin: org.fosstrak.epcis/epcis-commons

CertificateOptionsPanel() {
  super(new FlowLayout(FlowLayout.LEFT, 10, 0));
  keyStoreLabel = new JLabel("Key Store:");
  add(keyStoreLabel);
  keyStoreInput = new JTextField(23);
  keyStoreInput.setEnabled(false);
  add(keyStoreInput);
  loadKeyStoreButton = new JButton("Open");
  loadKeyStoreButton.addActionListener(this);
  add(loadKeyStoreButton);
  passwordLabel = new JLabel("Password:");
  add(passwordLabel);
  passwordInput = new JPasswordField(10);
  passwordInput.getDocument().addDocumentListener(this);
  add(passwordInput);
  fileChooser = new JFileChooser();
  fileChooser.setFileFilter(new FileFilter() {
    public boolean accept(File pathname) {
      String s = pathname.getName();
      return pathname.isDirectory() || s.endsWith(".p12") || s.endsWith(".jks");
    }
    public String getDescription() {
      return "Key Store Files (*.jks; *.p12)";
    }
  });
  setVisible(false);
}
origin: net.java.truevfs/truevfs-key-swing

/** Constructs a new read key panel. */
ReadKeyPanel() {
  initComponents();
  final DocumentListener dl = new DocumentListener() {
    @Override
    public void insertUpdate(DocumentEvent e) {
      setError(null);
    }
    @Override
    public void removeUpdate(DocumentEvent e) {
      setError(null);
    }
    @Override
    public void changedUpdate(DocumentEvent e) {
      setError(null);
    }
  };
  passwdField.getDocument().addDocumentListener(dl);
  authenticationPanel.getKeyFileDocument().addDocumentListener(dl);
  defaultForeground = resource.getForeground();
}
origin: uwolfer/gerrit-intellij-plugin

public LoginPanel(final LoginDialog dialog) {
  hostTextField.getEmptyText().setText("https://review.example.org");
  hostTextField.addFocusListener(new FocusAdapter() {
    @Override
    public void focusLost(FocusEvent e) {
      SettingsPanel.fixUrl(hostTextField);
    }
  });
  DocumentListener listener = new DocumentAdapter() {
    @Override
    protected void textChanged(DocumentEvent e) {
      dialog.clearErrors();
    }
  };
  loginTextField.getDocument().addDocumentListener(listener);
  passwordField.getDocument().addDocumentListener(listener);
  gerritLoginInfoTestField.setText(LOGIN_CREDENTIALS_INFO);
  gerritLoginInfoTestField.setMargin(new Insets(5, 0, 0, 0));
  gerritLoginInfoTestField.setBackground(UIUtil.TRANSPARENT_COLOR);
}
javax.swingJPasswordFieldgetDocument

Popular methods of JPasswordField

  • <init>
  • getPassword
  • setText
  • setEnabled
  • addActionListener
  • addKeyListener
  • setColumns
  • setEchoChar
  • requestFocusInWindow
  • setEditable
  • setPreferredSize
  • addFocusListener
  • setPreferredSize,
  • addFocusListener,
  • setFont,
  • setToolTipText,
  • setName,
  • getEchoChar,
  • getText,
  • requestFocus,
  • setDocument

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • getExternalFilesDir (Context)
  • setScale (BigDecimal)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Table (org.hibernate.mapping)
    A relational table
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now