getElement().getStyle().setWidth(100, CSSStyleDeclaration.Unit.PCT);
getElement().getStyle().setMarginLeft(0, CSSStyleDeclaration.Unit.PX);
}
// Render the particular message type's style
DebugAttributeSetter debugSetter = new DebugAttributeSetter();
switch (message.getType()) {
case LOADING:
debugSetter.add("status", "loading");
getElement().setClassName(css.statusLoading());
break;
case CONFIRMATION:
debugSetter.add("status", "confirmation");
getElement().setClassName(css.statusConfirmation());
break;
case ERROR:
debugSetter.add("status", "error");
getElement().setClassName(css.statusError());
break;
case FATAL:
debugSetter.add("status", "fatal");
getElement().setClassName(css.fatal());
getDelegate().onStatusExpanded();
break;
default:
debugSetter.add("status", "unknown");
Log.error(getClass(), "Got a status message of unknown type " + message.getType());
}
debugSetter.on(getElement());
}