case GOTOSTEP: ActionManager.getInstance().getAction(Constants.ACTION_NEXT).setEnabled(false); ActionManager.getInstance().getAction(Constants.ACTION_PREVIOUS).setEnabled(false); this.activityScheduler.setGoToStepInd(this.mfPagod.getButtonPanel().getCbDirectAccess().getSelectedIndex()); this.activityScheduler.manageRequest(request); break;
    public void manageRequest(Request request)    {        try        {            // cas de requete traiter quelque soit etat            if (request == Request.SHOW_ABOUT)            {                this.showAboutDialog();            }            else if (request == Request.QUIT_APPLICATION)            {                this.quit();            }            else if (request == Request.PREFERENCES)            {                this.showPreferencesDialog();            }            else            {                // cas de requete d?pendante d'un ?tat                switch (this.state)                {                    case LOADED:                        switch (request)                        {                            case RUN_APPLICATION:                                this.run();                                ActionManager.getInstance().getAction(                                        Constants.ACTION_RUN_ACTIVITY)                                        .setEnabled(false);                                ActionManager.getInstance().getAction(                                        Constants.ACTION_NEXT)                                        .setEnabled(false);                                ActionManager.getInstance().getAction(                                        Constants.ACTION_PREVIOUS).setEnabled(                                        false);                                ActionManager.getInstance().getAction(                                        Constants.ACTION_TERMINATE).setEnabled(                                        false);                                ActionManager.getInstance().getAction(                                        Constants.ACTION_DIRECTACCESS).setEnabled(                                        false);                                ActionManager.getInstance().getAction(                                        Constants.ACTION_TOOLSSETTINGS)                                        .setEnabled(false);                                break;                        }                        break;                    case INIT:                        switch (request)                        {                            case OPEN_PROCESS:                                if (this.openProcess())                                {                                    ActionManager.getInstance().getAction(                                            Constants.ACTION_TOOLSSETTINGS)                                            .setEnabled(true);                                }                                break;                        }                        break;                    case PROCESS_OPENED:                        switch (request)                        {                            case OPEN_PROCESS:                                if (this.openProcess())                                {                                    ActionManager.getInstance().getAction(                                            Constants.ACTION_RUN_ACTIVITY)                                            .setEnabled(false);                                }                                if (this.state == State.INIT)                                {                                    ActionManager.getInstance().getAction(                                            Constants.ACTION_RUN_ACTIVITY)                                            .setEnabled(false);                                    ActionManager.getInstance().getAction(                                            Constants.ACTION_NEXT).setEnabled(                                            false);                                    ActionManager.getInstance().getAction(                                            Constants.ACTION_PREVIOUS)                                            .setEnabled(false);                                    ActionManager.getInstance().getAction(                                            Constants.ACTION_DIRECTACCESS)                                            .setEnabled(false);                                    ActionManager.getInstance().getAction(                                            Constants.ACTION_TERMINATE)                                            .setEnabled(false);                                    ActionManager.getInstance().getAction(                                            Constants.ACTION_TOOLSSETTINGS)                                            .setEnabled(false);                                }                                break;                            case RUN_ACTIVITY:                                this.runActivity();                                                                // modif pour tester                                System.out.println("testActivityPresentation");                                this.activityScheduler.manageRequest(request);                                ActionManager.getInstance().getAction(                                        Constants.ACTION_RUN_ACTIVITY)                                        .setEnabled(false);                                                                /*ActionManager.getInstance().getAction(                                        Constants.ACTION_TERMINATE).setEnabled(                                        true); */                                break;                            case SET_TOOLS:                                this.showToolsSettingsDialog();                                break;                        }                        break;                    case ACTIVITY_LAUNCHED:                        switch (request)                        {                            case OPEN_PROCESS:                                if (this.openProcess())                                {                                    this.activityScheduler = null;                                    ActionManager.getInstance().getAction(                                            Constants.ACTION_RUN_ACTIVITY)                                            .setEnabled(false);                                    ActionManager.getInstance().getAction(                                            Constants.ACTION_TERMINATE)                                            .setEnabled(false);                                }                                if (this.state == State.INIT)                                {                                    ActionManager.getInstance().getAction(                                            Constants.ACTION_RUN_ACTIVITY)                                            .setEnabled(false);                                    ActionManager.getInstance().getAction(                                            Constants.ACTION_NEXT).setEnabled(                                            false);                                    ActionManager.getInstance().getAction(                                            Constants.ACTION_PREVIOUS)                                            .setEnabled(false);                                    ActionManager.getInstance().getAction(                                            Constants.ACTION_DIRECTACCESS)                                            .setEnabled(false);                                    ActionManager.getInstance().getAction(                                            Constants.ACTION_TERMINATE)                                            .setEnabled(false);                                    ActionManager.getInstance().getAction(                                            Constants.ACTION_TOOLSSETTINGS)                                            .setEnabled(false);                                }                                break;                            case TERMINATE_ACTIVITY:                                this.mfPagod.showProcess();                                this.activityScheduler = null;                                this.state = State.PROCESS_OPENED;                                ActionManager.getInstance().getAction(                                        Constants.ACTION_RUN_ACTIVITY)                                        .setEnabled(true);                                ActionManager.getInstance().getAction(                                        Constants.ACTION_NEXT)                                        .setEnabled(false);                                ActionManager.getInstance().getAction(                                        Constants.ACTION_PREVIOUS).setEnabled(                                        false);                                ActionManager.getInstance().getAction(                                        Constants.ACTION_DIRECTACCESS)                                        .setEnabled(false);                                ActionManager.getInstance().getAction(                                        Constants.ACTION_TERMINATE).setEnabled(                                        false);                                break;                            case SET_TOOLS:                                this.showToolsSettingsDialog();                                break;                            case NEXT:                            case PREVIOUS:                                this.activityScheduler.manageRequest(request);                                break;                        }                        break;                }            }        }        catch (Exception ex)        {            ExceptionManager.getInstance().manage(ex);            System.exit(0);        }    }