org.openide.src.nodes
Class DefaultFactory

java.lang.Object
  |
  +--org.openide.src.nodes.DefaultFactory
All Implemented Interfaces:
ElementNodeFactory, org.openide.src.nodes.IconStrings

public class DefaultFactory
extends Object
implements ElementNodeFactory, org.openide.src.nodes.IconStrings

The default implementation of the hierarchy nodes factory. Uses the standard node implementations in this package.


Field Summary
static String CLASS
           
static String CONSTRUCTOR_PACKAGE
           
static String CONSTRUCTOR_PRIVATE
           
static String CONSTRUCTOR_PROTECTED
           
static String CONSTRUCTOR_PUBLIC
           
static String CONSTRUCTORS_CATEGORY
           
static String ERROR
           
static String FIELD_PACKAGE
           
static String FIELD_PRIVATE
           
static String FIELD_PROTECTED
           
static String FIELD_PUBLIC
           
static String FIELD_ST_PACKAGE
           
static String FIELD_ST_PRIVATE
           
static String FIELD_ST_PROTECTED
           
static String FIELD_ST_PUBLIC
           
static String FIELDS_CATEGORY
           
static String INITIALIZER
           
static String INITIALIZER_ST
           
static String INTERFACE
           
static String METHOD_PACKAGE
           
static String METHOD_PRIVATE
           
static String METHOD_PROTECTED
           
static String METHOD_PUBLIC
           
static String METHOD_ST_PACKAGE
           
static String METHOD_ST_PRIVATE
           
static String METHOD_ST_PROTECTED
           
static String METHOD_ST_PUBLIC
           
static String METHODS_CATEGORY
           
static DefaultFactory READ_ONLY
          Default instance of the factory with read-only properties.
static DefaultFactory READ_WRITE
          Default instance of the factory with read-write properties.
static String WAIT
           
 
Constructor Summary
DefaultFactory(boolean writeable)
          Create a new factory.
 
Method Summary
protected  Children createClassChildren(ClassElement element)
          Create children for a class node.
protected  Children createClassChildren(ClassElement element, ElementNodeFactory factory)
          Create children for a class node, with specified factory.
 Node createClassNode(ClassElement element)
          Make a node representing a class.
 Node createConstructorNode(ConstructorElement element)
          Make a node representing a constructor.
 Node createErrorNode()
          Make a node indicating that there was an error creating the element children.
 Node createFieldNode(FieldElement element)
          Make a node representing a field.
 Node createInitializerNode(InitializerElement element)
          Make a node representing an initializer.
 Node createMethodNode(MethodElement element)
          Make a node representing a method.
 Node createWaitNode()
          Make a node indicating that the creation of children is still under way.
 boolean isWriteable()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

READ_WRITE

public static final DefaultFactory READ_WRITE
Default instance of the factory with read-write properties.

READ_ONLY

public static final DefaultFactory READ_ONLY
Default instance of the factory with read-only properties.

FIELD_PUBLIC

public static final String FIELD_PUBLIC

FIELD_PROTECTED

public static final String FIELD_PROTECTED

FIELD_PRIVATE

public static final String FIELD_PRIVATE

FIELD_PACKAGE

public static final String FIELD_PACKAGE

FIELD_ST_PUBLIC

public static final String FIELD_ST_PUBLIC

FIELD_ST_PROTECTED

public static final String FIELD_ST_PROTECTED

FIELD_ST_PRIVATE

public static final String FIELD_ST_PRIVATE

FIELD_ST_PACKAGE

public static final String FIELD_ST_PACKAGE

CONSTRUCTOR_PUBLIC

public static final String CONSTRUCTOR_PUBLIC

CONSTRUCTOR_PROTECTED

public static final String CONSTRUCTOR_PROTECTED

CONSTRUCTOR_PRIVATE

public static final String CONSTRUCTOR_PRIVATE

CONSTRUCTOR_PACKAGE

public static final String CONSTRUCTOR_PACKAGE

METHOD_PUBLIC

public static final String METHOD_PUBLIC

METHOD_PROTECTED

public static final String METHOD_PROTECTED

METHOD_PRIVATE

public static final String METHOD_PRIVATE

METHOD_PACKAGE

public static final String METHOD_PACKAGE

METHOD_ST_PUBLIC

public static final String METHOD_ST_PUBLIC

METHOD_ST_PROTECTED

public static final String METHOD_ST_PROTECTED

METHOD_ST_PRIVATE

public static final String METHOD_ST_PRIVATE

METHOD_ST_PACKAGE

public static final String METHOD_ST_PACKAGE

INITIALIZER

public static final String INITIALIZER

INITIALIZER_ST

public static final String INITIALIZER_ST

CLASS

public static final String CLASS

INTERFACE

public static final String INTERFACE

WAIT

public static final String WAIT

ERROR

public static final String ERROR

FIELDS_CATEGORY

public static final String FIELDS_CATEGORY

CONSTRUCTORS_CATEGORY

public static final String CONSTRUCTORS_CATEGORY

METHODS_CATEGORY

public static final String METHODS_CATEGORY
Constructor Detail

DefaultFactory

public DefaultFactory(boolean writeable)
Create a new factory.
Parameters:
writeable - true if the produced nodes should have writable properties
See Also:
ElementNode.writeable
Method Detail

isWriteable

public boolean isWriteable()

createMethodNode

public Node createMethodNode(MethodElement element)
Description copied from interface: ElementNodeFactory
Make a node representing a method.
Specified by:
createMethodNode in interface ElementNodeFactory
Following copied from interface: org.openide.src.nodes.ElementNodeFactory
Parameters:
element - the method
Returns:
a method node instance

createConstructorNode

public Node createConstructorNode(ConstructorElement element)
Description copied from interface: ElementNodeFactory
Make a node representing a constructor.
Specified by:
createConstructorNode in interface ElementNodeFactory
Following copied from interface: org.openide.src.nodes.ElementNodeFactory
Parameters:
element - the constructor
Returns:
a constructor node instance

createFieldNode

public Node createFieldNode(FieldElement element)
Description copied from interface: ElementNodeFactory
Make a node representing a field.
Specified by:
createFieldNode in interface ElementNodeFactory
Following copied from interface: org.openide.src.nodes.ElementNodeFactory
Parameters:
element - the field
Returns:
a field node instance

createInitializerNode

public Node createInitializerNode(InitializerElement element)
Description copied from interface: ElementNodeFactory
Make a node representing an initializer.
Specified by:
createInitializerNode in interface ElementNodeFactory
Following copied from interface: org.openide.src.nodes.ElementNodeFactory
Parameters:
element - the initializer
Returns:
an initializer node instance

createClassNode

public Node createClassNode(ClassElement element)
Description copied from interface: ElementNodeFactory
Make a node representing a class.
Specified by:
createClassNode in interface ElementNodeFactory
Following copied from interface: org.openide.src.nodes.ElementNodeFactory
Parameters:
element - the class
Returns:
a class node instance

createClassChildren

protected Children createClassChildren(ClassElement element)
Create children for a class node. Could be subclassed to customize, e.g., the ordering of children. The default implementation used ClassChildren.
Parameters:
element - a class element
Returns:
children for the class element

createClassChildren

protected final Children createClassChildren(ClassElement element,
                                             ElementNodeFactory factory)
Create children for a class node, with specified factory. The default implementation used ClassChildren.
Parameters:
element - a class element
factory - the factory which will be used to create children
Returns:
children for the class element

createWaitNode

public Node createWaitNode()
Description copied from interface: ElementNodeFactory
Make a node indicating that the creation of children is still under way. It should be used when the process is slow.
Specified by:
createWaitNode in interface ElementNodeFactory
Following copied from interface: org.openide.src.nodes.ElementNodeFactory
Returns:
a wait node

createErrorNode

public Node createErrorNode()
Description copied from interface: ElementNodeFactory
Make a node indicating that there was an error creating the element children.
Specified by:
createErrorNode in interface ElementNodeFactory
Following copied from interface: org.openide.src.nodes.ElementNodeFactory
Returns:
the error node


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