public void actionPerformed(@SuppressWarnings("unused") ActionEvent e) { IWizardStepDescriptor currentWizardStep = getCurrentWizardStep(context); if (currentWizardStep.getOnLeaveAction() == null || actionHandler.execute(currentWizardStep.getOnLeaveAction(), context)) { IWizardStepDescriptor nextWizardStep = currentWizardStep .getNextStepDescriptor(context); show(dialog, cardPanel, alreadyDisplayedSteps, nextWizardStep, backButton, nextButton, finishButton, modelConnector, actionHandler, context); if (nextWizardStep.getOnEnterAction() != null) { actionHandler.execute(nextWizardStep.getOnEnterAction(), context); } } } });
public void actionPerformed(@SuppressWarnings("unused") ActionEvent e) { IWizardStepDescriptor currentWizardStep = getCurrentWizardStep(context); IWizardStepDescriptor backWizardStep = currentWizardStep .getPreviousStepDescriptor(context); show(dialog, cardPanel, alreadyDisplayedSteps, backWizardStep, backButton, nextButton, finishButton, modelConnector, actionHandler, context); } });
IValueConnector modelConnector, IActionHandler actionHandler, Map<String, Object> context) { String cardName = wizardStep.getName(); if (!alreadyDisplayedSteps.contains(cardName)) { alreadyDisplayedSteps.add(cardName); IView<JComponent> view = getViewFactory(context).createView( wizardStep.getViewDescriptor(), actionHandler, getLocale(context)); cardPanel.add(view.getPeer(), cardName); getMvcBinder(context).bind(view.getConnector(), modelConnector); if (wizardStep.getPreviousStepDescriptor(context) != null) { backButton.setEnabled(true); } else { backButton.setEnabled(false); if (wizardStep.getPreviousLabelKey() != null) { backButton.setText(translationProvider.getTranslation(wizardStep .getPreviousLabelKey(), locale)); } else { backButton.setText(translationProvider.getTranslation( if (wizardStep.getNextStepDescriptor(context) != null) { nextButton.setEnabled(true); } else { nextButton.setEnabled(false); if (wizardStep.getNextLabelKey() != null) { nextButton.setText(translationProvider.getTranslation(wizardStep .getNextLabelKey(), locale));
private G createPreviousAction(IWizardStepDescriptor wizardStep, IActionHandler actionHandler, IView<E> view, ITranslationProvider translationProvider, Locale locale, IValueConnector modelConnector, Map<String, Object> context) { PreviousAction previousAction = new PreviousAction(wizardStep, modelConnector); previousAction.setIconImageURL(getIconFactory(context) .getBackwardIconImageURL()); G previousGAction = getActionFactory(context).createAction(previousAction, actionHandler, view, locale); if (wizardStep.getPreviousStepDescriptor(context) != null) { getActionFactory(context).setActionEnabled(previousGAction, true); } else { getActionFactory(context).setActionEnabled(previousGAction, false); } if (wizardStep.getPreviousLabelKey() != null) { getActionFactory(context).setActionName( previousGAction, translationProvider.getTranslation(wizardStep.getPreviousLabelKey(), locale)); } else { getActionFactory(context).setActionName( previousGAction, translationProvider.getTranslation( IWizardStepDescriptor.DEFAULT_PREVIOUS_KEY, locale)); } return previousGAction; }
private G createNextAction(IWizardStepDescriptor wizardStep, IActionHandler actionHandler, IView<E> view, ITranslationProvider translationProvider, Locale locale, IValueConnector modelConnector, Map<String, Object> context) { NextAction nextAction = new NextAction(wizardStep, modelConnector); nextAction .setIconImageURL(getIconFactory(context).getForwardIconImageURL()); G nextGAction = getActionFactory(context).createAction(nextAction, actionHandler, view, locale); if (wizardStep.getNextStepDescriptor(context) != null) { getActionFactory(context).setActionEnabled(nextGAction, true); } else { getActionFactory(context).setActionEnabled(nextGAction, false); } if (wizardStep.getNextLabelKey() != null) { getActionFactory(context).setActionName( nextGAction, translationProvider.getTranslation(wizardStep.getNextLabelKey(), locale)); } else { getActionFactory(context).setActionName( nextGAction, translationProvider.getTranslation( IWizardStepDescriptor.DEFAULT_NEXT_KEY, locale)); } return nextGAction; }
Locale locale = getLocale(context); IView<E> view = getViewFactory(context).createView( wizardStep.getViewDescriptor(), actionHandler, getLocale(context)); IModelDescriptor modelDescriptor = wizardStep.getViewDescriptor() .getModelDescriptor(); if (modelDescriptor instanceof IComponentDescriptor<?>) { + wizardStep.getI18nName(translationProvider, locale); Dimension dialogSize = getDialogSize(context); getController(context).displayModalDialog(
final IValueConnector modelConnector = modelConnectorFactory .createModelConnector(ACTION_MODEL_NAME, firstWizardStep .getViewDescriptor().getModelDescriptor());
private G createFinishAction(IWizardStepDescriptor wizardStep, IActionHandler actionHandler, IView<E> view, Locale locale, Map<String, Object> context) { IDisplayableAction finishActionAdapter = new FinishAction(wizardStep, finishAction); G finishGAction = getActionFactory(context).createAction( finishActionAdapter, actionHandler, view, locale); if (wizardStep.canFinish(context)) { getActionFactory(context).setActionEnabled(finishGAction, true); } else { getActionFactory(context).setActionEnabled(finishGAction, false); } return finishGAction; }
public void actionPerformed(@SuppressWarnings("unused") ActionEvent e) { IWizardStepDescriptor currentWizardStep = getCurrentWizardStep(context); if (currentWizardStep.getOnLeaveAction() == null || actionHandler.execute(currentWizardStep.getOnLeaveAction(), context)) { dialog.dispose(); actionHandler.execute(finishAction, context); } } });
ULCExtendedButton finishButton, IValueConnector modelConnector, IActionHandler actionHandler, Map<String, Object> context) { String cardName = wizardStep.getName(); if (!alreadyDisplayedSteps.contains(cardName)) { alreadyDisplayedSteps.add(cardName); IView<ULCComponent> view = getViewFactory(context).createView( wizardStep.getViewDescriptor(), actionHandler, getLocale(context)); cardPanel.addCard(cardName, view.getPeer()); getMvcBinder(context).bind(view.getConnector(), modelConnector); if (wizardStep.getPreviousStepDescriptor(context) != null) { backButton.setEnabled(true); } else { backButton.setEnabled(false); if (wizardStep.getPreviousLabelKey() != null) { backButton.setText(translationProvider.getTranslation(wizardStep .getPreviousLabelKey(), locale)); } else { backButton.setText(translationProvider.getTranslation( if (wizardStep.getNextStepDescriptor(context) != null) { nextButton.setEnabled(true); } else { nextButton.setEnabled(false); if (wizardStep.getNextLabelKey() != null) { nextButton.setText(translationProvider.getTranslation(wizardStep .getNextLabelKey(), locale));
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { IValueConnector modelConnector = getBackendController(context) .createModelConnector(ACTION_MODEL_NAME, firstWizardStep.getViewDescriptor().getModelDescriptor()); Map<String, Object> wizardModelInit = (Map<String, Object>) context .get(IWizardStepDescriptor.INITIAL_WIZARD_MODEL); Map<String, Object> wizardModel = new ObjectEqualityMap<>(); if (wizardModelInit != null) { wizardModel.putAll(wizardModelInit); } completeInitialWizardModel(wizardModel, context); modelConnector.setConnectorValue(wizardModel); displayWizardStep(firstWizardStep, modelConnector, actionHandler, context, false); return super.execute(actionHandler, context); }
public void actionPerformed(@SuppressWarnings("unused") ActionEvent e) { IWizardStepDescriptor currentWizardStep = getCurrentWizardStep(context); if (currentWizardStep.getOnLeaveAction() == null || actionHandler.execute(currentWizardStep.getOnLeaveAction(), context)) { dialog.dispose(); actionHandler.execute(finishAction, context); } } });
IValueConnector modelConnector, IActionHandler actionHandler, Map<String, Object> context) { String cardName = wizardStep.getName(); if (!alreadyDisplayedSteps.contains(cardName)) { alreadyDisplayedSteps.add(cardName); IView<SComponent> view = getViewFactory(context).createView( wizardStep.getViewDescriptor(), actionHandler, getLocale(context)); view.getPeer().setPreferredSize(WIZARD_DIMENSION); cardPanel.add(view.getPeer(), cardName); if (wizardStep.getPreviousStepDescriptor(context) != null) { backButton.setEnabled(true); } else { backButton.setEnabled(false); if (wizardStep.getPreviousLabelKey() != null) { backButton.setText(translationProvider.getTranslation(wizardStep .getPreviousLabelKey(), locale)); } else { backButton.setText(translationProvider.getTranslation( if (wizardStep.getNextStepDescriptor(context) != null) { nextButton.setEnabled(true); } else { nextButton.setEnabled(false); if (wizardStep.getNextLabelKey() != null) { nextButton.setText(translationProvider.getTranslation(wizardStep .getNextLabelKey(), locale));
public void actionPerformed(@SuppressWarnings("unused") ActionEvent e) { IWizardStepDescriptor currentWizardStep = getCurrentWizardStep(context); if (currentWizardStep.getOnLeaveAction() == null || actionHandler.execute(currentWizardStep.getOnLeaveAction(), context)) { IWizardStepDescriptor nextWizardStep = currentWizardStep .getNextStepDescriptor(context); show(dialog, cardPanel, alreadyDisplayedSteps, nextWizardStep, backButton, nextButton, finishButton, modelConnector, actionHandler, context); if (nextWizardStep.getOnEnterAction() != null) { actionHandler.execute(nextWizardStep.getOnEnterAction(), context); } } } });
final IValueConnector modelConnector = modelConnectorFactory .createModelConnector(ACTION_MODEL_NAME, firstWizardStep .getViewDescriptor().getModelDescriptor());
public void actionPerformed(@SuppressWarnings("unused") ActionEvent e) { IWizardStepDescriptor currentWizardStep = getCurrentWizardStep(context); IWizardStepDescriptor backWizardStep = currentWizardStep .getPreviousStepDescriptor(context); show(dialog, cardPanel, alreadyDisplayedSteps, backWizardStep, backButton, nextButton, finishButton, modelConnector, actionHandler, context); } });
public void actionPerformed(@SuppressWarnings("unused") ActionEvent e) { IWizardStepDescriptor currentWizardStep = getCurrentWizardStep(context); if (currentWizardStep.getOnLeaveAction() == null || actionHandler.execute(currentWizardStep.getOnLeaveAction(), context)) { dialog.setVisible(false); actionHandler.execute(finishAction, context); } } });
public void actionPerformed(@SuppressWarnings("unused") ActionEvent e) { IWizardStepDescriptor currentWizardStep = getCurrentWizardStep(context); if (currentWizardStep.getOnLeaveAction() == null || actionHandler.execute(currentWizardStep.getOnLeaveAction(), context)) { IWizardStepDescriptor nextWizardStep = currentWizardStep .getNextStepDescriptor(context); show(dialog, cardPanel, alreadyDisplayedSteps, nextWizardStep, backButton, nextButton, finishButton, modelConnector, actionHandler, context); if (nextWizardStep.getOnEnterAction() != null) { actionHandler.execute(nextWizardStep.getOnEnterAction(), context); } } } });
final IValueConnector modelConnector = modelConnectorFactory .createModelConnector(ACTION_MODEL_NAME, firstWizardStep .getViewDescriptor().getModelDescriptor());
public void actionPerformed(@SuppressWarnings("unused") ActionEvent e) { IWizardStepDescriptor currentWizardStep = getCurrentWizardStep(context); IWizardStepDescriptor backWizardStep = currentWizardStep .getPreviousStepDescriptor(context); show(dialog, cardPanel, alreadyDisplayedSteps, backWizardStep, backButton, nextButton, finishButton, modelConnector, actionHandler, context); } });