displayAtBottomRight(popupPanel, "closing");
addAutoCloseTimer(popupPanel, trayDuration);
}
private static void displayAtBottomRight(final PPopupPanel popupPanel, final String closingAnimation) {
popupPanel.setPopupPositionAndShow(new PPositionCallback() {
@Override
public void setPosition(final int offsetWidth, final int offsetHeight, final int windowWidth, final int windowHeight) {
popupPanel.setPopupPosition(windowWidth - offsetWidth - 5, windowHeight - offsetHeight - 5);
if (closingAnimation != null) popupPanel.addStyleName(closingAnimation);