Codota Logo
JPasswordField.getDocument
Code IndexAdd Codota 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)

  • Common ways to obtain JPasswordField
private void myMethod () {
JPasswordField j =
  • Codota Iconnew JPasswordField()
  • Codota Iconnew JPasswordField(int1)
  • Codota IconString str;new JPasswordField(str)
  • Smart code suggestions by Codota
}
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

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • getExternalFilesDir (Context)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Socket (java.net)
    Provides a client-side TCP socket.
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now