chrriis.uihierarchy.creator
Interface ComponentCreator

All Known Implementing Classes:
NullComponentCreator, StringComponentCreator

public interface ComponentCreator

The interface that all creators of components must implement.

Version:
1.0 2003.10.24
Author:
Christopher Deckers (chrriis@brainlex.com)

Field Summary
static int LEAF
          Indicator of a leaf.
static int NODE
          Indicator of a node.
 
Method Summary
 Component createComponent(UIHConfig uihConfig, Container parentContainer, Object component, int level)
          Create a component from an object representation.
 

Field Detail

NODE

public static final int NODE
Indicator of a node.

See Also:
Constant Field Values

LEAF

public static final int LEAF
Indicator of a leaf.

See Also:
Constant Field Values
Method Detail

createComponent

public Component createComponent(UIHConfig uihConfig,
                                 Container parentContainer,
                                 Object component,
                                 int level)
Create a component from an object representation.

Parameters:
uihConfig - The configuration in use.
parentContainer - The container that will be the parent of the component to create. The addition of the component to the parent will be automatic so this method should not affect this behaviour. The parent can be null when the node is a sub node.
component - The component's representation from which to create the component.
level - The indication of the level of the component. It is either NODE or LEAF. Root nodes are differentiated from nodes by the fact that the parent container is null.
Returns:
The component that matches the given representation, or null otherwise.