actionAdapters
.add(new ActionToDragAvatarPopupWidgetFactoryActionAdapter(
viewAccessor, avatar, action));
}
final PopupManager popupManager = popupManagerFactory
.createPopupManager(createWidget(resources, avatar,
actionAdapters));
for (ResourceSetAvatarPopupWidgetFactoryAction action : actionAdapters) {
((ActionToDragAvatarPopupWidgetFactoryActionAdapter) action)
.setPopupManager(popupManager);
}
final HandlerRegistration link = popupManager.linkToWidget(avatar);
popupManager.setEnabled(avatar.isEnabled());
final HandlerRegistration handlerRegistration = avatar
.addEnabledStatusHandler(new ResourceSetAvatarEnabledStatusEventHandler() {
@Override
public void onDragAvatarEnabledStatusChange(
ResourceSetAvatarEnabledStatusEvent event) {
popupManager.setEnabled(avatar.isEnabled());
}
});
avatar.addDisposable(new Disposable() {
@Override