public static void showConfirmDialog(SComponent parent, Object message, String title, ActionListener al) { showConfirmDialog(parent, message, title, 0, al); }
public static void showConfirmDialog(SComponent parent, Object message, String title, int type) { showConfirmDialog(parent, message, title, type, null); }
public static void showConfirmDialog(SComponent parent, Object message, String title) { showConfirmDialog(parent, message, title, 0, null); }
public static void showConfirmDialog(SComponent parent, Object message, String title, int type, ActionListener al) { showConfirmDialog(parent, message, title, type, al, null); }
/** * {@inheritDoc} */ public void popupOkCancel(SComponent sourceComponent, String title, @SuppressWarnings("unused") String iconImageUrl, String message, final IAction okAction, final IAction cancelAction, final Map<String, Object> context) { SOptionPane.showConfirmDialog(sourceComponent, message, title, JOptionPane.WARNING_MESSAGE, new ActionListener() { public void actionPerformed(ActionEvent e) { IAction nextAction = null; if (SOptionPane.OK_ACTION.equals(e.getActionCommand())) { nextAction = okAction; } else if (SOptionPane.CANCEL_ACTION.equals(e.getActionCommand())) { nextAction = cancelAction; } if (nextAction != null) { execute(nextAction, context); } } }); }
/** * {@inheritDoc} */ public void popupYesNoCancel(SComponent sourceComponent, String title, @SuppressWarnings("unused") String iconImageUrl, String message, final IAction yesAction, final IAction noAction, final IAction cancelAction, final Map<String, Object> context) { SOptionPane.showConfirmDialog(sourceComponent, message, title, SOptionPane.YES_NO_CANCEL_OPTION, 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; } else if (SOptionPane.CANCEL_ACTION.equals(e.getActionCommand())) { nextAction = cancelAction; } if (nextAction != null) { execute(nextAction, context); } } }, null); }
/** * Displays the message using a <code>SOptionPane.OK_CANCEL_OPTION</code>. * <p> * {@inheritDoc} */ @Override public boolean execute(final IActionHandler actionHandler, final Map<String, Object> context) { SOptionPane.showConfirmDialog(getSourceComponent(context), getMessage(context), getI18nName(getTranslationProvider(context), getLocale(context)), JOptionPane.WARNING_MESSAGE, new ActionListener() { public void actionPerformed(ActionEvent e) { if (SOptionPane.OK_ACTION.equals(e.getActionCommand())) { context.put(ActionContextConstants.NEXT_ACTION, okAction); } else if (SOptionPane.CANCEL_ACTION.equals(e.getActionCommand())) { context.put(ActionContextConstants.NEXT_ACTION, cancelAction); } executeNextAction(actionHandler, context); } }); return true; }
/** * Displays the message using a <code>SOptionPane.YES_NO_CANCEL_OPTION</code>. * <p> * {@inheritDoc} */ @Override public boolean execute(final IActionHandler actionHandler, final Map<String, Object> context) { SOptionPane.showConfirmDialog(getSourceComponent(context), getMessage(context), getI18nName(getTranslationProvider(context), getLocale(context)), SOptionPane.YES_NO_CANCEL_OPTION, 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); } else if (SOptionPane.CANCEL_ACTION.equals(e.getActionCommand())) { context.put(ActionContextConstants.NEXT_ACTION, cancelAction); } executeNextAction(actionHandler, context); } }, null); return true; }