Package javax.swing.event

Examples of javax.swing.event.DocumentListener


            @Override
            public void mousePressed(MouseEvent e) {
                commentBoxClicked();
            }
        });
        commentBox.getDocument().addDocumentListener(new DocumentListener() {
            @Override
            public void insertUpdate(DocumentEvent e) {
                changed();
            }
View Full Code Here


       
        for (int i = 0; i < data.length; i++) {
            final JTextField field = data[i];
            final String prop = keys[i];
            final JLabel label = dataLabels[i];
            field.getDocument().addDocumentListener(new DocumentListener() {
                Font basefont = label.getFont();
                Font boldfont = basefont.deriveFont(Font.BOLD);
                {
                    updateFont();
                }
View Full Code Here

        this.editors.add(pane);
        this.scrolls.put(buffer,scroll);
        pane.requestFocus();
       
        //TODO: this could probably be made shared
        pane.getDocument().addDocumentListener(new DocumentListener() {
            @Override
            public void insertUpdate(DocumentEvent e) {
                buffer.markDirty();
                buffer.setText(pane.getText());
            }
View Full Code Here

            this.browseButton.addActionListener(this);

            /*
             * add DocumentListener to manage nextButton if user enters input
             */
            ((JTextField) this.pathComboBox.getEditor().getEditorComponent()).getDocument().addDocumentListener(new DocumentListener()
            {
                public void changedUpdate(DocumentEvent e)
                {
                    checkNextButtonState();
                }
View Full Code Here

        panel.add(fixedHeight(new JLabel("Birthdate")));
        panel.add(Box.createHorizontalStrut(10));

        final JTextField birthdateField = new JTextField(iBirthdateStr + ' ');
        Document doc = birthdateField.getDocument();
        doc.addDocumentListener(new DocumentListener() {
            public void insertUpdate(DocumentEvent e) {
                update(e);
            }
            public void removeUpdate(DocumentEvent e) {
                update(e);
View Full Code Here

  c1.anchor = GridBagConstraints.NORTHEAST;
  gridbag.setConstraints(storeLabel, c1);
  osPanel.add(storeLabel);
 
  osText = new JTextField(25);
  DocumentListener docListener = new ObjStoreDocumentListener();
  osText.getDocument().addDocumentListener(docListener);
  c1.gridx = 1;
  c1.gridy = 0;
  c1.anchor = GridBagConstraints.WEST;
  c1.insets = new Insets(0, 5, 0, 0);
View Full Code Here

  /**
   * Creates a listener which is receiving ranges to be worked with.
   */
  private void init() {

    this.addDocumentListener(new DocumentListener() {

      @Override
      public void removeUpdate(final DocumentEvent arg0) {
        if(!LuposDocument.this.ignoreColoring){
          final int offset = arg0.getOffset();
View Full Code Here

        textArea = new JTextArea();

        textArea.setSize(400, 400);
        textArea.setDocument(((DocumentModel)model).getDocument());
        if (scrollToEnd) {
            textArea.getDocument().addDocumentListener(new DocumentListener() {
                public void insertUpdate(DocumentEvent e) {
                    textArea.setCaretPosition(textArea.getDocument().getLength());
                }

                public void removeUpdate(DocumentEvent e) {
View Full Code Here

        c.gridwidth = GridBagConstraints.REMAINDER;
        fileNameField = new JTextField();
       
        fileNameLabel.setLabelFor(fileNameField);
       
        fileNameField.getDocument().addDocumentListener(new DocumentListener() {
            public void insertUpdate(final DocumentEvent e) {
                onChange();
            }

            public void removeUpdate(final DocumentEvent e) {
View Full Code Here

   */
  public ConverterDialog(java.awt.Frame parent, boolean modal) {
    super(parent, modal);
    initComponents();
   
    DocumentListener dl = new DocumentListener() {
      public void insertUpdate(DocumentEvent arg0) {
        updateUIStateLater();
      }
      public void removeUpdate(DocumentEvent arg0) {
        updateUIStateLater();
View Full Code Here

TOP

Related Classes of javax.swing.event.DocumentListener

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.