Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.src 1.8.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openide.src.nodes
Class SourceChildren

    java.lang.Object
      org.openide.nodes.Children
          org.openide.nodes.Children.Array
              org.openide.nodes.Children.Keys
                  org.openide.src.nodes.SourceChildren

All Implemented Interfaces:
  Cloneable, FilterCookie, Node.Cookie

    public class SourceChildren

extends Children.Keys
implements FilterCookie

Normal implementation of children for source element nodes.

Ordering and filtering of the children can be customized using `SourceElementFilter`. `FilterCookie` is implemented to provide a means for user customization of the filter.

The child list listens to changes in the source element, as well as the filter, and automatically updates itself as appropriate.

A child factory can be used to cause the children list to create non-`default` child nodes, if desired, both at the time of the creation of the children list, and when new children are added.

The children list may be unattached to any source element temporarily, in which case it will have no children (except possibly an error indicator).

Nested Class Summary

Nested classes/interfaces inherited from class org.openide.nodes.Children
`Children.Array, Children.Keys, Children.Map, Children.SortedArray, Children.SortedMap`

Field Summary
`protected SourceElement` | `element` The element whose subelements are represented.
`protected ElementNodeFactory` | `factory` Factory for obtaining class nodes.
`protected SourceElementFilter` | `filter` Filter for elements.

Fields inherited from class org.openide.nodes.Children.Array
`nodes`

Fields inherited from class org.openide.nodes.Children
`LEAF, MUTEX`

Constructor Summary
`SourceChildren()` Create a children list with the default factory and no attached source element.
`SourceChildren(ElementNodeFactory factory)` Create a children list with no attached source element.
`SourceChildren(ElementNodeFactory factory, SourceElement element)` Create a children list.
`SourceChildren(SourceElement element)` Create a children list with the default factory.

Method Summary
`protected void` | `addNotify()`
`protected Node[]` | `createNodes(Object key)`
`Node` | `findChild(String name)`
`SourceElement` | `getElement()` Get the currently attached source element.
`Object` | `getFilter()`
`Class` | `getFilterClass()`
`Node[]` | `getNodes(boolean initialize)` If `initialize' is true, invokes the parser and waits for it to finish.
`protected void` | `removeNotify()`
`void` | `setElement(SourceElement element)` Set a new source element to get information about children from.
`void` | `setFilter(Object 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
`getNode, getNodes, getNodesCount, isInitialized, nodes`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### element

    protected SourceElement element

  The element whose subelements are represented.

### filter

    protected SourceElementFilter filter

  Filter for elements. Can be `null`, in which case modifier filtering is disabled, and ordering may be reset to the default order.

### factory

    protected ElementNodeFactory factory

  Factory for obtaining class nodes.

Constructor Detail

### SourceChildren

    public SourceChildren()

  Create a children list with the default factory and no attached source element.

### SourceChildren

    public SourceChildren(SourceElement element)

  Create a children list with the default factory.

  Parameters:
    `element` - source element to attach to, or `null`

### SourceChildren

    public SourceChildren(ElementNodeFactory factory)

  Create a children list with no attached source element.

  Parameters:
    `factory` - a factory for creating children

### SourceChildren

    public SourceChildren(ElementNodeFactory factory,
                          SourceElement element)

  Create a children list.

  Parameters:
    `factory` - a factory for creating children
    `element` - source element to attach to, or `null`

Method Detail

### getFilterClass

    public Class getFilterClass()

  Specified by:
    `getFilterClass` in interface `FilterCookie`

### getFilter

    public Object getFilter()

  Specified by:
    `getFilter` in interface `FilterCookie`

### setFilter

    public void setFilter(Object filter)

  Specified by:
    `setFilter` in interface `FilterCookie`

### addNotify

    protected void addNotify()

  Overrides:
    `addNotify` in class `Children`

### removeNotify

    protected void removeNotify()

  Overrides:
    `removeNotify` in class `Children`

### createNodes

    protected Node[] createNodes(Object key)

  Specified by:
    `createNodes` in class `Children.Keys`

### getNodes

    public Node[] getNodes(boolean initialize)

  If `initialize' is true, invokes the parser and waits for it to finish. If false, it just returns whatever nodes are available right now.

  Overrides:
    `getNodes` in class `Children`
  Returns:
    array of nodes after the Children are fully initialized

### findChild

    public Node findChild(String name)

  Overrides:
    `findChild` in class `Children`

### getElement

    public SourceElement getElement()

  Get the currently attached source element.

  Returns:
    the element, or `null` if unattached

### setElement

    public void setElement(SourceElement element)

  Set a new source element to get information about children from.

  Parameters:
    `element` - the new element, or `null` to detach

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.src 1.8.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Built on December 7 2006. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.