{
HorizontalPanel horizontalPanel = new HorizontalPanel();
horizontalPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
// add image
MessageDialogImages images = MessageDialogImages.INSTANCE;
Image image = null;
switch(type_)
{
case INFO:
image = new Image(images.dialog_info());
break;
case WARNING:
image = new Image(images.dialog_warning());
break;
case ERROR:
image = new Image(images.dialog_error());
break;
case QUESTION:
image = new Image(images.dialog_question());
break;
case POPUP_BLOCKED:
image = new Image(images.dialog_popup_blocked());
break;
}
horizontalPanel.add(image);
// add message widget