org.openide.nodes
Class ChildFactory.Detachable<T>
java.lang.Object
org.openide.nodes.ChildFactory<T>
org.openide.nodes.ChildFactory.Detachable<T>
- Type Parameters:
T
- The key type for this child factory
- Enclosing class:
- ChildFactory<T>
public abstract static class ChildFactory.Detachable<T>
- extends ChildFactory<T>
Subclass of ChildFactory with lifecycle methods which will be called
on first use and last use.
- Since:
- org.openide.nodes 7.7
Method Summary |
protected void |
addNotify()
Called immediately before the first call to createKeys(). |
protected void |
removeNotify()
Called when this child factory is no longer in use, to dispose of
resources, detach listeners, etc. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChildFactory.Detachable
public ChildFactory.Detachable()
addNotify
protected void addNotify()
- Called immediately before the first call to createKeys(). Override
to set up listening for changes, allocating expensive-to-create
resources, etc.
removeNotify
protected void removeNotify()
- Called when this child factory is no longer in use, to dispose of
resources, detach listeners, etc. Does nothing by default; override
if you need notification when not in use anymore.