*/
public <T> T setComponent(final Class<T> type, final T value) {
final T removed = (T) components.put(type, value);
if (removed != null) {
fireEvent(new ComponentRemoved(type, value));
}
if (value != null) {
fireEvent(new ComponentAdded(type, value));
}