org.openide.nodes 7.12.1

org.openide.nodes
Class ChildFactory.Detachable<T>

java.lang.Object
  extended by org.openide.nodes.ChildFactory<T>
      extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from class org.openide.nodes.ChildFactory
ChildFactory.Detachable<T>
 
Constructor Summary
ChildFactory.Detachable()
           
 
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 org.openide.nodes.ChildFactory
createKeys, createNodeForKey, createNodesForKey, createWaitNode, refresh
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChildFactory.Detachable

public ChildFactory.Detachable()
Method Detail

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.


org.openide.nodes 7.12.1

Built on September 10 2010.  |  Portions Copyright 1997-2010 Sun Microsystems, Inc. All rights reserved.