Java Code Examples for org.openide.nodes.Node#removePropertyChangeListener()

The following examples show how to use org.openide.nodes.Node#removePropertyChangeListener() . These examples are extracted from open source projects. 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 want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: netbeans   File: PropertySheet.java    License: Apache License 2.0 6 votes vote down vote up
public Node detach() {
    Node n = currNode;

    if (n != null) {
        if (PropUtils.isLoggable(PropertySheet.class)) {
            PropUtils.log(PropertySheet.class, "Detaching listeners from " + n);
        }

        n.removePropertyChangeListener(inner);
        n.removeNodeListener(this);

        //clear the reference
        currNode = null;
    }

    return n;
}
 
Example 2
Source Project: netbeans   File: NbMainExplorer.java    License: Apache License 2.0 5 votes vote down vote up
/** Sets new root context to view. Name, icon, tooltip
* of this top component will be updated properly */
public void setRootContext (Node rc) {
    Node oldRC = getExplorerManager().getRootContext();
    // remove old listener, if possible
    if (weakRcL != null) {
        oldRC.removePropertyChangeListener(weakRcL);
    }
    if (weakNRcL != null) {
        oldRC.removeNodeListener(weakNRcL);
    }
    getExplorerManager().setRootContext(rc);
}
 
Example 3
Source Project: netbeans   File: Tab.java    License: Apache License 2.0 5 votes vote down vote up
/** Sets new root context to view. Name,  tooltip
* of this top component will be updated properly */
public void setRootContext (Node rc) {
    Node oldRC = getExplorerManager().getRootContext();
    // remove old listener, if possible
    if (weakRcL != null) {
        oldRC.removePropertyChangeListener(weakRcL);
    }
    if (weakNRcL != null) {
        oldRC.removeNodeListener(weakNRcL);
    }
    getExplorerManager().setRootContext(rc);
    initializeWithRootContext(rc);
}