com.sysord.mad.widget
Interface WidgetBuilder


public interface WidgetBuilder

A WidgetBuilder references all the implementation classes of the widgets that it can build.

These classes can be referenced at the initialization for defining defaults specific widgets and at runtime when the MAD configuration proposes custom implementations of the specific widgets.

All SpecificWidget creation should be done by a WidgetBuilder.

Author:
Fabien Vignal
See Also:
SpecificWidget, SpecificContextHolder

Method Summary
 void addSpecificWidget(java.lang.String id, SpecificWidget specificWidget)
          Add a SpecificWidget to this WidgetBuilder.
 java.lang.Object createWidget(SpecificContextHolder specificContextHolder, Widget<?> madWidget)
          Creates a new specific widget with the given MAD Widget.
 void removeAll()
          Remove all registered SpecificWidgets.
 void removeCustomWidget(SpecificWidget customWidget)
          Remove the specified SpecificWidget from this WidgetBuilder.
 

Method Detail

createWidget

java.lang.Object createWidget(SpecificContextHolder specificContextHolder,
                              Widget<?> madWidget)
Creates a new specific widget with the given MAD Widget.

Parameters:
specificContextHolder -
madWidget -
Returns:
the new created specific widget.

addSpecificWidget

void addSpecificWidget(java.lang.String id,
                       SpecificWidget specificWidget)
Add a SpecificWidget to this WidgetBuilder.

Parameters:
id -
specificWidget -

removeCustomWidget

void removeCustomWidget(SpecificWidget customWidget)
Remove the specified SpecificWidget from this WidgetBuilder.

Parameters:
customWidget -

removeAll

void removeAll()
Remove all registered SpecificWidgets.