protected DelayedPopupManager createPopup(final DragContext context,
String message) {
Popup popup = popupFactory.createPopup();
DelayedPopupManager popupManager = new DefaultDelayedPopupManager(
POPUP_SHOW_DELAY, POPUP_HIDE_DELAY, popup) {
@Override
protected void updatePosition() {
getPopup().setLocation(
new Point(context.mouseX + POPUP_X_OFFSET,
context.mouseY + POPUP_Y_OFFSET));
}
};
HTML widget = new HTML(message);
CSS.setMaxWidth(widget, MAX_POPUP_WIDTH);
popupManager.getPopup().setContentWidget(widget);
return popupManager;
}