org.openide.src.nodes
Class ClassChildren

java.lang.Object
  |
  +--org.openide.nodes.Children
        |
        +--org.openide.nodes.Children.Array
              |
              +--org.openide.nodes.Children.Keys
                    |
                    +--org.openide.src.nodes.ClassChildren
All Implemented Interfaces:
Cloneable, FilterCookie, Node.Cookie

public class ClassChildren
extends Children.Keys
implements FilterCookie

Normal implementation of children list for a class element node. Semantics are similar to those of SourceChildren.


Inner classes inherited from class org.openide.nodes.Children
Children.Array, Children.Keys, Children.Map, Children.SortedArray, Children.SortedMap
 
Field Summary
protected  Collection[] cpl
          Central memory of mankind is used when some elements are changed
protected  ClassElement element
          The class element whose subelements are represented.
protected  ElementNodeFactory factory
          Factory for creating new child nodes.
protected  ClassElementFilter filter
          Filter for elements, or null to disable.
protected static HashMap propToFilter
          Converts property names to filter.
 
Fields inherited from class org.openide.nodes.Children.Array
nodes
 
Fields inherited from class org.openide.nodes.Children
LEAF, MUTEX
 
Constructor Summary
ClassChildren(ClassElement element)
          Create class children with the default factory.
ClassChildren(ElementNodeFactory factory, ClassElement element)
          Create class children.
 
Method Summary
protected  void addNotify()
          Called when children are first asked for nodes.
protected  Node[] createNodes(Object key)
          Create nodes for a given key.
 Object getFilter()
          Get the current filter.
 Class getFilterClass()
          Implementation of filter cookie
protected  Collection getKeysOfType(int elementType)
          Filters and returns the keys of specified type.
protected  int[] getOrder()
          Returns order form filter.
protected  void refreshAllKeys()
          Updates all the keys (elements) according to the current filter & ordering.
protected  void refreshKeys(int filter)
          Updates all the keys with given filter.
protected  void removeNotify()
          Called when the list of nodes for this children object is no longer needed by the IDE.
 void setFilter(Object filter)
          Set the current filter.
 
Methods inherited from class org.openide.nodes.Children.Keys
add, clone, destroyNodes, refreshKey, remove, setBefore, setKeys, setKeys
 
Methods inherited from class org.openide.nodes.Children.Array
initCollection, refresh
 
Methods inherited from class org.openide.nodes.Children
findChild, getNode, getNodes, getNodesCount, isInitialized, nodes
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propToFilter

protected static HashMap propToFilter
Converts property names to filter.

element

protected ClassElement element
The class element whose subelements are represented.

filter

protected ClassElementFilter filter
Filter for elements, or null to disable.

factory

protected ElementNodeFactory factory
Factory for creating new child nodes.

cpl

protected Collection[] cpl
Central memory of mankind is used when some elements are changed
Constructor Detail

ClassChildren

public ClassChildren(ClassElement element)
Create class children with the default factory. The children are initially unfiltered.
Parameters:
element - attached class element (non-null)

ClassChildren

public ClassChildren(ElementNodeFactory factory,
                     ClassElement element)
Create class children. The children are initially unfiltered.
Parameters:
factory - the factory to use to create new children
element - attached class element (non-null)
Method Detail

getFilterClass

public Class getFilterClass()
Implementation of filter cookie
Specified by:
getFilterClass in interface FilterCookie
Following copied from interface: org.openide.cookies.FilterCookie
Returns:
the class, or may be null if no filter is currently in use

getFilter

public Object getFilter()
Description copied from interface: FilterCookie
Get the current filter.
Specified by:
getFilter in interface FilterCookie
Following copied from interface: org.openide.cookies.FilterCookie
Returns:
the filter, or null if none is currently in use

setFilter

public void setFilter(Object filter)
Description copied from interface: FilterCookie
Set the current filter.
Specified by:
setFilter in interface FilterCookie
Following copied from interface: org.openide.cookies.FilterCookie
Parameters:
filter - the filter, or null if none should be used

addNotify

protected void addNotify()
Description copied from class: Children
Called when children are first asked for nodes. Typical implementations at this time calculate their node list (or keys for Children.Keys etc.).
Overrides:
addNotify in class Children
Following copied from class: org.openide.nodes.Children
See Also:
Children.isInitialized()

removeNotify

protected void removeNotify()
Description copied from class: Children
Called when the list of nodes for this children object is no longer needed by the IDE. Typical implementations at this time remove all children to save memory (or clear the keys for Children.Keys etc.).
Overrides:
removeNotify in class Children

createNodes

protected Node[] createNodes(Object key)
Description copied from class: Children.Keys
Create nodes for a given key.
Overrides:
createNodes in class Children.Keys
Following copied from class: org.openide.nodes.Children.Keys
Parameters:
key - the key
Returns:
child nodes for this key or null if there should be no nodes for this key

refreshAllKeys

protected void refreshAllKeys()
Updates all the keys (elements) according to the current filter & ordering.

refreshKeys

protected void refreshKeys(int filter)
Updates all the keys with given filter.

getKeysOfType

protected Collection getKeysOfType(int elementType)
Filters and returns the keys of specified type.

getOrder

protected int[] getOrder()
Returns order form filter.


Built on December 12 2001.  |  Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.