Action (DialogWrapper dialogWrapper) { Action action = createAction(dialogWrapper); action.putValue(Action.NAME, myName); if (myMnemonicChar != null) action.putValue(Action.MNEMONIC_KEY, myMnemonicChar); if (myIsDefault) action.putValue(Action.DEFAULT, Boolean.TRUE); return action; }