/** * Updates the data contained in the data control with a new chapter. This * method is essential for some undo/redo tools * * @param chaper */ public void update(Chapter chapter) { this.chapter = chapter; // Create the subcontrollers playerDataControl = new PlayerDataControl(chapter.getPlayer()); scenesListDataControl = new ScenesListDataControl(chapter.getScenes(), this.getPlayer().getPreviewImage()); cutscenesListDataControl = new CutscenesListDataControl(chapter.getCutscenes()); booksListDataControl = new BooksListDataControl(chapter.getBooks()); itemsListDataControl = new ItemsListDataControl(chapter.getItems()); atrezzoListDataControl = new AtrezzoListDataControl(chapter.getAtrezzo()); npcsListDataControl = new NPCsListDataControl(chapter.getCharacters()); conversationsListDataControl = new ConversationsListDataControl(chapter.getConversations()); TimersListDataControl timersListDataControl = new TimersListDataControl(chapter.getTimers()); GlobalStateListDataControl globalStatesListDataControl = new GlobalStateListDataControl(chapter.getGlobalStates()); MacroListDataControl macrosListDataControl = new MacroListDataControl(chapter.getMacros()); advancedFeaturesDataControl = new AdvancedFeaturesDataControl(); advancedFeaturesDataControl.setTimerListDataControl(timersListDataControl); advancedFeaturesDataControl.setGlobalStatesListDataContorl(globalStatesListDataControl); advancedFeaturesDataControl.setMacrosListDataControl(macrosListDataControl); // assessmentProfilesDataControl = new AssessmentProfilesDataControl(chapter.getAssessmentProfiles()); //adaptationProfilesDataControl = new AdaptationProfilesDataControl(chapter.getAdaptationProfiles()); }
public void setGlobalStatesListDataContorl(GlobalStateListDataControl globalStatesListDataControl) { this.globalStatesListDataControl = globalStatesListDataControl; }