chrriis.uihierarchy.creator
Class StringComponentCreator

java.lang.Object
  extended bychrriis.uihierarchy.creator.StringComponentCreator
All Implemented Interfaces:
ComponentCreator

public class StringComponentCreator
extends Object
implements ComponentCreator

A component creator that handles Strings.

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

Field Summary
 
Fields inherited from interface chrriis.uihierarchy.creator.ComponentCreator
LEAF, NODE
 
Constructor Summary
StringComponentCreator()
           
 
Method Summary
 Component createComponent(UIHConfig uihConfig, Container parentContainer, Object component, int level)
          Create a component from a String.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringComponentCreator

public StringComponentCreator()
Method Detail

createComponent

public Component createComponent(UIHConfig uihConfig,
                                 Container parentContainer,
                                 Object component,
                                 int level)
Create a component from a String. The resulting component is a label.

Specified by:
createComponent in interface ComponentCreator
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:
A label with the specified text.
See Also:
ComponentCreator.createComponent(chrriis.uihierarchy.UIHConfig, java.awt.Container, java.lang.Object, int)