Examples of removeDocumentListener()


Examples of com.atolsystems.atolutilities.LoggingWindow.removeDocumentListener()

        Component c = scroll.getViewport().getComponents()[0];
        if (c instanceof LoggingWindow) {
            LoggingWindow log = (LoggingWindow) c;
            for (TabHighlighter th : tabHighlighters) {
                if (th.component == this.getComponentAt(index)) {
                    log.removeDocumentListener(th);
                    tabHighlighters.remove(th);
                    this.removeChangeListener(th);
                    break;
                }
            }
View Full Code Here

Examples of javax.swing.text.AbstractDocument.removeDocumentListener()

  static void disable(final JTextComponent text) {
    final AbstractDocument doc = (AbstractDocument) text.getDocument();
    for (final DocumentListener listener : doc.getDocumentListeners()) {
      if (listener instanceof AutoSpellChecker) {
        final AutoSpellChecker autoSpell = (AutoSpellChecker) listener;
        doc.removeDocumentListener(autoSpell);
        AutoSpellChecker.removeHighlights(text);
      }
    }
  }
View Full Code Here

Examples of javax.swing.text.AbstractDocument.removeDocumentListener()

    @Override
    public void cleanup() {
        getWidgetListeners().clear();
        final AbstractDocument dtfp = (AbstractDocument) textFieldPart.getDocument();
        for (final DocumentListener dl : dtfp.getDocumentListeners()) {
            dtfp.removeDocumentListener(dl);
        }
        for (final ItemListener il : unitComboBox.getItemListeners()) {
            unitComboBox.removeItemListener(il);
        }
    }
View Full Code Here

Examples of javax.swing.text.Document.removeDocumentListener()

    public void propertyChange(final PropertyChangeEvent evt)
    {
      if (FormValidator.DOCUMENT_PROPERTY_NAME.equals(evt.getPropertyName()))
      {
        final Document olddoc = (Document) evt.getOldValue();
        olddoc.removeDocumentListener(this);
        final Document newdoc = (Document) evt.getOldValue();
        newdoc.addDocumentListener(this);
      }
    }
View Full Code Here

Examples of javax.swing.text.Document.removeDocumentListener()

    @Override
    public void setDocument(Document doc) {
        Document document = getDocument();
        if (document != null && _listener != null) {
            document.removeDocumentListener(_listener);
        }
        super.setDocument(doc);
        if (doc != null) {
            if (_listener == null) {
                _listener = new ResizingDocumentListener();
View Full Code Here

Examples of javax.swing.text.Document.removeDocumentListener()

    public void propertyChange(final PropertyChangeEvent evt)
    {
      if (FormValidator.DOCUMENT_PROPERTY_NAME.equals(evt.getPropertyName()))
      {
        final Document olddoc = (Document) evt.getOldValue();
        olddoc.removeDocumentListener(this);
        final Document newdoc = (Document) evt.getOldValue();
        newdoc.addDocumentListener(this);
      }
    }
View Full Code Here

Examples of javax.swing.text.Document.removeDocumentListener()

                    layoutButtons();
                    updateButtons();
                } else if ("document".equals(prop)) {
                    Document doc = (Document) evt.getOldValue();
                    if (doc != null) {
                        doc.removeDocumentListener(this);
                    }
                    doc = (Document) evt.getNewValue();
                    if (doc != null) {
                        doc.addDocumentListener(this);
                    }
View Full Code Here

Examples of javax.swing.text.Document.removeDocumentListener()

    }

    public void setDocument(final Document doc) {
        Document oldValue = getDocument();
        if (oldValue != null) {
            oldValue.removeDocumentListener(docListener);
        }
        if (doc != null) {
            initDocumentListener();
            doc.addDocumentListener(docListener);
        }
View Full Code Here

Examples of javax.swing.text.Document.removeDocumentListener()

        @Override
        public void setDocument(Document doc) {
            Document oldDoc = getDocument();
            if (oldDoc != null)
                oldDoc.removeDocumentListener(docListener);

            super.setDocument(doc);

            if (doc != null) {
                doc.addDocumentListener(docListener);
View Full Code Here

Examples of javax.swing.text.Document.removeDocumentListener()

    UnicodeReader ur = new UnicodeReader(loc.getInputStream(), defaultEnc);
    charSet = ur.getEncoding();

    // Remove listener so dirty flag doesn't get set when loading a file.
    Document doc = getDocument();
    doc.removeDocumentListener(this);
    BufferedReader r = new BufferedReader(ur);
    try {
      read(r, null);
    } finally {
      doc.addDocumentListener(this);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.