Java Code Examples for javax.swing.JEditorPane#removePropertyChangeListener()

The following examples show how to use javax.swing.JEditorPane#removePropertyChangeListener() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StyledEditorKit.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called when the kit is being removed from the
 * JEditorPane.  This is used to unregister any
 * listeners that were attached.
 *
 * @param c the JEditorPane
 */
public void deinstall(JEditorPane c) {
    c.removeCaretListener(inputAttributeUpdater);
    c.removePropertyChangeListener(inputAttributeUpdater);

    // remove references to current document so it can be collected.
    currentRun = null;
    currentParagraph = null;
}
 
Example 2
Source File: LineNumbersRuler.java    From jpexs-decompiler with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void deinstall(JEditorPane editor) {
    removeMouseListener(mouseListener);
    status = Status.DEINSTALLING;
    editor.getDocument().removeDocumentListener(this);
    editor.removeCaretListener(this);
    editor.removePropertyChangeListener(this);
    JScrollPane sp = getScrollPane(editor);
    if (sp != null) {
        sp.setRowHeaderView(null);
    }
}
 
Example 3
Source File: StyledEditorKit.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called when the kit is being removed from the
 * JEditorPane.  This is used to unregister any
 * listeners that were attached.
 *
 * @param c the JEditorPane
 */
public void deinstall(JEditorPane c) {
    c.removeCaretListener(inputAttributeUpdater);
    c.removePropertyChangeListener(inputAttributeUpdater);

    // remove references to current document so it can be collected.
    currentRun = null;
    currentParagraph = null;
}
 
Example 4
Source File: StyledEditorKit.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called when the kit is being removed from the
 * JEditorPane.  This is used to unregister any
 * listeners that were attached.
 *
 * @param c the JEditorPane
 */
public void deinstall(JEditorPane c) {
    c.removeCaretListener(inputAttributeUpdater);
    c.removePropertyChangeListener(inputAttributeUpdater);

    // remove references to current document so it can be collected.
    currentRun = null;
    currentParagraph = null;
}
 
Example 5
Source File: StyledEditorKit.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called when the kit is being removed from the
 * JEditorPane.  This is used to unregister any
 * listeners that were attached.
 *
 * @param c the JEditorPane
 */
public void deinstall(JEditorPane c) {
    c.removeCaretListener(inputAttributeUpdater);
    c.removePropertyChangeListener(inputAttributeUpdater);

    // remove references to current document so it can be collected.
    currentRun = null;
    currentParagraph = null;
}
 
Example 6
Source File: StyledEditorKit.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called when the kit is being removed from the
 * JEditorPane.  This is used to unregister any
 * listeners that were attached.
 *
 * @param c the JEditorPane
 */
public void deinstall(JEditorPane c) {
    c.removeCaretListener(inputAttributeUpdater);
    c.removePropertyChangeListener(inputAttributeUpdater);

    // remove references to current document so it can be collected.
    currentRun = null;
    currentParagraph = null;
}
 
Example 7
Source File: StyledEditorKit.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called when the kit is being removed from the
 * JEditorPane.  This is used to unregister any
 * listeners that were attached.
 *
 * @param c the JEditorPane
 */
public void deinstall(JEditorPane c) {
    c.removeCaretListener(inputAttributeUpdater);
    c.removePropertyChangeListener(inputAttributeUpdater);

    // remove references to current document so it can be collected.
    currentRun = null;
    currentParagraph = null;
}
 
Example 8
Source File: StyledEditorKit.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called when the kit is being removed from the
 * JEditorPane.  This is used to unregister any
 * listeners that were attached.
 *
 * @param c the JEditorPane
 */
public void deinstall(JEditorPane c) {
    c.removeCaretListener(inputAttributeUpdater);
    c.removePropertyChangeListener(inputAttributeUpdater);

    // remove references to current document so it can be collected.
    currentRun = null;
    currentParagraph = null;
}
 
Example 9
Source File: StyledEditorKit.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
/**
 * Called when the kit is being removed from the
 * JEditorPane.  This is used to unregister any
 * listeners that were attached.
 *
 * @param c the JEditorPane
 */
public void deinstall(JEditorPane c) {
    c.removeCaretListener(inputAttributeUpdater);
    c.removePropertyChangeListener(inputAttributeUpdater);

    // remove references to current document so it can be collected.
    currentRun = null;
    currentParagraph = null;
}
 
Example 10
Source File: StyledEditorKit.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called when the kit is being removed from the
 * JEditorPane.  This is used to unregister any
 * listeners that were attached.
 *
 * @param c the JEditorPane
 */
public void deinstall(JEditorPane c) {
    c.removeCaretListener(inputAttributeUpdater);
    c.removePropertyChangeListener(inputAttributeUpdater);

    // remove references to current document so it can be collected.
    currentRun = null;
    currentParagraph = null;
}
 
Example 11
Source File: StyledEditorKit.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Called when the kit is being removed from the
 * JEditorPane.  This is used to unregister any
 * listeners that were attached.
 *
 * @param c the JEditorPane
 */
public void deinstall(JEditorPane c) {
    c.removeCaretListener(inputAttributeUpdater);
    c.removePropertyChangeListener(inputAttributeUpdater);

    // remove references to current document so it can be collected.
    currentRun = null;
    currentParagraph = null;
}
 
Example 12
Source File: StyledEditorKit.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Called when the kit is being removed from the
 * JEditorPane.  This is used to unregister any
 * listeners that were attached.
 *
 * @param c the JEditorPane
 */
public void deinstall(JEditorPane c) {
    c.removeCaretListener(inputAttributeUpdater);
    c.removePropertyChangeListener(inputAttributeUpdater);

    // remove references to current document so it can be collected.
    currentRun = null;
    currentParagraph = null;
}
 
Example 13
Source File: StyledEditorKit.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called when the kit is being removed from the
 * JEditorPane.  This is used to unregister any
 * listeners that were attached.
 *
 * @param c the JEditorPane
 */
public void deinstall(JEditorPane c) {
    c.removeCaretListener(inputAttributeUpdater);
    c.removePropertyChangeListener(inputAttributeUpdater);

    // remove references to current document so it can be collected.
    currentRun = null;
    currentParagraph = null;
}
 
Example 14
Source File: ActionFactory.java    From netbeans with Apache License 2.0 5 votes vote down vote up
void setPane(JEditorPane pane) {
    JEditorPane origPane = getPane();
    if (origPane != null) {
        origPane.removePropertyChangeListener(this);
        origPane.getDocument().removeDocumentListener(this);
    }
    assert (pane != null);
    this.paneRef = new WeakReference<>(pane);
    pane.addPropertyChangeListener(this);
    pane.getDocument().addDocumentListener(this);
    updateState();
}
 
Example 15
Source File: StyledEditorKit.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called when the kit is being removed from the
 * JEditorPane.  This is used to unregister any
 * listeners that were attached.
 *
 * @param c the JEditorPane
 */
public void deinstall(JEditorPane c) {
    c.removeCaretListener(inputAttributeUpdater);
    c.removePropertyChangeListener(inputAttributeUpdater);

    // remove references to current document so it can be collected.
    currentRun = null;
    currentParagraph = null;
}
 
Example 16
Source File: StyledEditorKit.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Called when the kit is being removed from the
 * JEditorPane.  This is used to unregister any
 * listeners that were attached.
 *
 * @param c the JEditorPane
 */
public void deinstall(JEditorPane c) {
    c.removeCaretListener(inputAttributeUpdater);
    c.removePropertyChangeListener(inputAttributeUpdater);

    // remove references to current document so it can be collected.
    currentRun = null;
    currentParagraph = null;
}
 
Example 17
Source File: StyledEditorKit.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called when the kit is being removed from the
 * JEditorPane.  This is used to unregister any
 * listeners that were attached.
 *
 * @param c the JEditorPane
 */
public void deinstall(JEditorPane c) {
    c.removeCaretListener(inputAttributeUpdater);
    c.removePropertyChangeListener(inputAttributeUpdater);

    // remove references to current document so it can be collected.
    currentRun = null;
    currentParagraph = null;
}
 
Example 18
Source File: StyledEditorKit.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called when the kit is being removed from the
 * JEditorPane.  This is used to unregister any
 * listeners that were attached.
 *
 * @param c the JEditorPane
 */
public void deinstall(JEditorPane c) {
    c.removeCaretListener(inputAttributeUpdater);
    c.removePropertyChangeListener(inputAttributeUpdater);

    // remove references to current document so it can be collected.
    currentRun = null;
    currentParagraph = null;
}
 
Example 19
Source File: StyledEditorKit.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called when the kit is being removed from the
 * JEditorPane.  This is used to unregister any
 * listeners that were attached.
 *
 * @param c the JEditorPane
 */
public void deinstall(JEditorPane c) {
    c.removeCaretListener(inputAttributeUpdater);
    c.removePropertyChangeListener(inputAttributeUpdater);

    // remove references to current document so it can be collected.
    currentRun = null;
    currentParagraph = null;
}