private void toggleWindow(final ClickEvent event) { if (notificationsWindow.isAttached()) { getUI().removeWindow(notificationsWindow); return; } createUnreadMessagesLayout(); notificationsWindow.setPositionY(event.getClientY() - event.getRelativeY() + 40); getUI().addWindow(notificationsWindow); currentView.refreshView(unreadNotifications.keySet()); clear(); notificationsWindow.focus(); }
private void toggleWindow(final ClickEvent event) { if (notificationsWindow.isAttached()) { getUI().removeWindow(notificationsWindow); return; } createUnreadMessagesLayout(); notificationsWindow.setPositionY(event.getClientY() - event.getRelativeY() + 40); getUI().addWindow(notificationsWindow); currentView.refreshView(unreadNotifications.keySet()); clear(); notificationsWindow.focus(); }
notificationsWindow.setPositionY(event.getClientY() - event.getRelativeY() + 40); notificationsWindow.setPositionX(event.getClientX() - event.getRelativeX() - 300); getUI().addWindow(notificationsWindow);