/** * {@inheritDoc} */ @Override public void windowClosing(WindowEvent e) { execute(getExitAction(), new HashMap<String, Object>()); } });
@Override public void run() { int selectedOption = JOptionPane.showConfirmDialog( SwingUtil.getWindowOrInternalFrame(sourceComponent), message, title, JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, getIconFactory().getIcon(iconImageUrl, getIconFactory().getLargeIconSize())); IAction nextAction; if (selectedOption == JOptionPane.YES_OPTION) { nextAction = yesAction; } else if (selectedOption == JOptionPane.NO_OPTION) { nextAction = noAction; } else { nextAction = cancelAction; } if (nextAction != null) { execute(nextAction, context); } } });
@Override public void run() { int selectedOption = JOptionPane.showConfirmDialog( SwingUtil.getWindowOrInternalFrame(sourceComponent), message, title, JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, getIconFactory().getIcon(iconImageUrl, getIconFactory().getLargeIconSize())); IAction nextAction; if (selectedOption == JOptionPane.OK_OPTION) { nextAction = okAction; } else { nextAction = cancelAction; } if (nextAction != null) { execute(nextAction, context); } } });
@Override public void run() { int selectedOption = JOptionPane.showConfirmDialog( SwingUtil.getWindowOrInternalFrame(sourceComponent), message, title, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, getIconFactory().getIcon(iconImageUrl, getIconFactory().getLargeIconSize())); IAction nextAction; if (selectedOption == JOptionPane.YES_OPTION) { nextAction = yesAction; } else { nextAction = noAction; } if (nextAction != null) { execute(nextAction, context); } } });
/** * Login to the application. */ @Override public void login() { if (performLogin()) { loginDialog.dispose(); updateControllerFrame(); execute(getStartupAction(), getStartupActionContext()); } else { loginFailed(loginDialog); } }
performLogin(); updateControllerFrame(); execute(getStartupAction(), getInitialActionContext());
/** * Creates the initial view from the root view descriptor, then a JFrame * containing this view and presents it to the user. * <p> * {@inheritDoc} */ @Override public boolean start(IBackendController backendController, Locale locale) { if (super.start(backendController, locale)) { Toolkit.getDefaultToolkit().getSystemEventQueue().push( new WaitCursorEventQueue(500)); CallbackHandler callbackHandler = getLoginCallbackHandler(); if (callbackHandler instanceof DialogCallbackHandler) { ((DialogCallbackHandler) callbackHandler) .setParentComponent(controllerFrame); } if (performLogin()) { displayControllerFrame(); execute(getStartupAction(), getInitialActionContext()); return true; } stop(); } return false; }