void (final MouseEvent e) { if (e.getButton() == MouseEvent.BUTTON3) { myPopup.cancel(); } else if (UIUtil.isActionClick(e)) { if (myActionListener != null) { myActionListener.actionPerformed(new ActionEvent(FramelessNotificationPopup.this, ActionEvent.ACTION_PERFORMED, null)); } } }