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

The following examples show how to use org.openide.nodes.Node#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: PropertySheet.java    From netbeans with 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 File: NbMainExplorer.java    From netbeans with 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 File: Tab.java    From netbeans with 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);
}