/** * {@inheritDoc} */ public void popupYesNo(SComponent sourceComponent, String title, @SuppressWarnings("unused") String iconImageUrl, String message, final IAction yesAction, final IAction noAction, final Map<String, Object> context) { SOptionPane.showYesNoDialog(sourceComponent, message, title, new ActionListener() { public void actionPerformed(ActionEvent e) { IAction nextAction = null; if (SOptionPane.YES_ACTION.equals(e.getActionCommand())) { nextAction = yesAction; } else if (SOptionPane.NO_ACTION.equals(e.getActionCommand())) { nextAction = noAction; } if (nextAction != null) { execute(nextAction, context); } } }); }
/** * Displays the message using a <code>SOptionPane.YES_NO_OPTION</code>. * <p> * {@inheritDoc} */ @Override public boolean execute(final IActionHandler actionHandler, final Map<String, Object> context) { SOptionPane.showYesNoDialog(getSourceComponent(context), getMessage(context), getI18nName(getTranslationProvider(context), getLocale(context)), new ActionListener() { public void actionPerformed(ActionEvent e) { if (SOptionPane.YES_ACTION.equals(e.getActionCommand())) { context.put(ActionContextConstants.NEXT_ACTION, yesAction); } else if (SOptionPane.NO_ACTION.equals(e.getActionCommand())) { context.put(ActionContextConstants.NEXT_ACTION, noAction); } executeNextAction(actionHandler, context); } }); return true; }