Custom component provides simple implementation of Component interface for
creation of new UI components by composition of existing components.
The component is used by inheriting the CustomComponent class and setting
composite root inside the Custom component. The composite root itself
can contain more components, but their interfaces are hidden from the
users.
The component is implemented by wrapping the methods of the
composition root component given as parameter. The composition
root must be set before the component can be used.
The component is implemented by wrapping the methods of the
composition root component given as parameter. The composition
root must not be null and can not be changed after the composition.
Parameters: compositionRoot - The root of the composition component tree.
Method Detail
addListener
public void addListener(RepaintRequestListener listener)(Code)
Gets the component type.
The component type is textual type of the component. This is included
in the UIDL as component tag attribute. If the component type is null
(default), the component tag is not included in the UIDL at all.
Returns the componentType.
String
public void setComponentType(String componentType)(Code)
Sets the component type.
The component type is textual type of the component. This is included
in the UIDL as component tag attribute. If the component type is null
(default), the component tag is not included in the UIDL at all.
Parameters: componentType - The componentType to set
setCompositionRoot
final protected void setCompositionRoot(Component compositionRoot)(Code)
Sets the compositions root.
The composition root must be set to non-null value before the
component can be used. The composition root can only be set once.
Parameters: compositionRoot - The root of the composition component tree.