From: <aki...@us...> - 2008-07-31 21:58:15
|
Revision: 4633 http://gridarta.svn.sourceforge.net/gridarta/?rev=4633&view=rev Author: akirschbaum Date: 2008-07-31 21:58:21 +0000 (Thu, 31 Jul 2008) Log Message: ----------- Remove calls to MainControl.getMapManager(). Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/daimonin/src/daieditor/CMainControl.java trunk/src/app/net/sf/gridarta/AbstractMainControl.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2008-07-31 21:51:05 UTC (rev 4632) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2008-07-31 21:58:21 UTC (rev 4633) @@ -233,23 +233,23 @@ final boolean mapTileListBottom = prefs.getBoolean(MainView.MAP_TILE_LIST_BOTTOM_KEY, MainView.MAP_TILE_LIST_BOTTOM_DEFAULT); final SelectedSquareControl<GameObject, MapArchObject, Archetype, CMapViewBasic> selectedSquareControl = new SelectedSquareControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(ACTION_FACTORY, this, editTypes, mapTileListBottom, null, archetypeSet); final SelectedSquareView<GameObject, MapArchObject, Archetype, CMapViewBasic> selectedSquareView = selectedSquareControl.getSelectedSquareView(); - new MapCursorControl<GameObject, MapArchObject, Archetype, CMapViewBasic>("cfeditor", this, getMapManager(), selectedSquareControl, selectedSquareView); + new MapCursorControl<GameObject, MapArchObject, Archetype, CMapViewBasic>("cfeditor", this, mapManager, selectedSquareControl, selectedSquareView); ACTION_FACTORY.createActions(true, this, "createNew", "open", "options", "exit", "newScript", "editScript", "zoom", "gc", "onlineHelp", "tod", "about"); - final MapManagerActions<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManagerActions = new MapManagerActions<GameObject, MapArchObject, Archetype, CMapViewBasic>(getMapManager()); + final MapManagerActions<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManagerActions = new MapManagerActions<GameObject, MapArchObject, Archetype, CMapViewBasic>(mapManager); PathManager.setGlobalSettings(globalSettings); final ArchetypeChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic> archetypeChooserControl = new ArchetypeChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, archetypeSet, false); newMapDialogFactory = new NewMapDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, IGUIConstants.DEF_MAPSIZE, IGUIConstants.DEF_MAPSIZE, 0, false, false, IGUIConstants.DEF_PICKMAP_WIDTH, IGUIConstants.DEF_PICKMAP_HEIGHT); - pickmapChooserControl = new PickmapChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(newMapDialogFactory, this, new File(globalSettings.getMapDir(), IGUIConstants.PICKMAP_DIR), getMapManager()); + pickmapChooserControl = new PickmapChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(newMapDialogFactory, this, new File(globalSettings.getMapDir(), IGUIConstants.PICKMAP_DIR), mapManager); newMapDialogFactory.setPickmapChooserControl(pickmapChooserControl); archetypeTypeSet = new ArchetypeTypeSet<GameObject, MapArchObject, Archetype>(); objectChooser = new DefaultObjectChooser<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, archetypeSet, archetypeTypeSet, editTypes, selectedSquareView, archetypeChooserControl, pickmapChooserControl, getCopyBuffer()); - mainActions = new MainActions<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, editTypes, archetypeSet, getCopyBuffer(), pickmapChooserControl, animationObjects, ACTION_FACTORY, faceObjects, objectChooser, getMapManager()); + mainActions = new MainActions<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, editTypes, archetypeSet, getCopyBuffer(), pickmapChooserControl, animationObjects, ACTION_FACTORY, faceObjects, objectChooser, mapManager); SystemIcons.init(); - final StatusBar<GameObject, MapArchObject, Archetype, CMapViewBasic> statusBar = new StatusBar<GameObject, MapArchObject, Archetype, CMapViewBasic>(getMapManager(), archetypeSet, faceObjects); + final StatusBar<GameObject, MapArchObject, Archetype, CMapViewBasic> statusBar = new StatusBar<GameObject, MapArchObject, Archetype, CMapViewBasic>(mapManager, archetypeSet, faceObjects); createMapImageCache(CResourceLoader.getHomeFile("thumbnails"), SystemIcons.getDefaultIcon(), SystemIcons.getDefaultPreview(), statusBar); - mainView = new MainView<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, editTypes, getMapManager(), ACTION_FACTORY, mapManagerActions.getCloseAllAction(), statusBar); + mainView = new MainView<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, editTypes, mapManager, ACTION_FACTORY, mapManagerActions.getCloseAllAction(), statusBar); new About("cfeditor", mainView); - new UndoControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(getMapManager()); + new UndoControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(mapManager); updaterManager = new UpdaterManager("cfeditor", this, mainView, "CrossfireEditor.jar"); updaterManager.startup(); @@ -293,7 +293,7 @@ log.fatal("GameObjectMatcher 'exit' does not exist"); throw new MissingResourceException("GameObjectMatcher 'exit' does not exist", null, null); } - final MapActions mapActions = new MapActions(mainView, this, getMapManager(), exitMatcher, mapFileFilter, selectedSquareView); + final MapActions mapActions = new MapActions(mainView, this, mapManager, exitMatcher, mapFileFilter, selectedSquareView); archetypeTypeSet.getListTable().put("event", ScriptArchUtils.getEventTypes()); Map<String, TreasureTreeNode> specialTreasureLists; try { @@ -322,8 +322,8 @@ AbstractScriptArchEditor.initEventTypeBoxes(".py", "Python", ScriptArchUtils.createEventTypeBox(), pythonFileFilter); // Initialize the main view - final LockedItemsControl<GameObject, MapArchObject, Archetype, CMapViewBasic> lockedItemsControl = new LockedItemsControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(getMapManager(), Archetype.TYPE_LOCKED_DOOR, Archetype.TYPE_SPECIAL_KEY, Archetype.TYPE_TRIGGER_ALTAR, Archetype.TYPE_DETECTOR, Archetype.TYPE_TRIGGER_MARKER, Archetype.TYPE_MARKER, Archetype.TYPE_INVENTORY_CHECKER, Archetype.TYPE_CONTAINER); - gameObjectAttributesPanel = new GameObjectAttributesPanel(this, archetypeTypeSet, getMapManager(), animationObjects, lockedItemsControl, monsterMatcher, selectedSquareControl, selectedSquareView); + final LockedItemsControl<GameObject, MapArchObject, Archetype, CMapViewBasic> lockedItemsControl = new LockedItemsControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(mapManager, Archetype.TYPE_LOCKED_DOOR, Archetype.TYPE_SPECIAL_KEY, Archetype.TYPE_TRIGGER_ALTAR, Archetype.TYPE_DETECTOR, Archetype.TYPE_TRIGGER_MARKER, Archetype.TYPE_MARKER, Archetype.TYPE_INVENTORY_CHECKER, Archetype.TYPE_CONTAINER); + gameObjectAttributesPanel = new GameObjectAttributesPanel(this, archetypeTypeSet, mapManager, animationObjects, lockedItemsControl, monsterMatcher, selectedSquareControl, selectedSquareView); PluginParameterFactory.init(archetypeSet, gameObjectAttributesPanel); scriptControl = new ScriptController(this, archetypeSet, mainView); mainView.init(gameObjectAttributesPanel, selectedSquareView, archetypeTypeSet, mapTileListBottom, gameObjectMatchers, archetypeChooserControl, objectChooser); @@ -345,8 +345,8 @@ getCopyBuffer().init(getGridartaObjectsFactory().newMapArchObject(false)); mainActions.init(); - final RecentManager recentManager = new RecentManager(getMapManager(), (JMenu) ACTION_FACTORY.find(mainView.getJMenuBar(), "recent"), globalSettings, getMapPreviewAccessory()); - getMapManager().setRecentManager(recentManager); + final RecentManager recentManager = new RecentManager(mapManager, (JMenu) ACTION_FACTORY.find(mainView.getJMenuBar(), "recent"), globalSettings, getMapPreviewAccessory()); + mapManager.setRecentManager(recentManager); // browse arch archive // load object from a arch file you found @@ -375,7 +375,7 @@ recentManager.initRecent(); validators = createMapValidators(); new AutoValidator<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, PREFS_VALIDATOR_AUTO_DEFAULT); - gameObjectAttributesDialogFactory = new GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeTypeSet, this, archetypeSet, getMapManager()); + gameObjectAttributesDialogFactory = new GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeTypeSet, this, archetypeSet, mapManager); } /** @@ -560,7 +560,7 @@ ScriptEditControlInstance.getInstance().openScriptFile(file.getAbsolutePath()); } else { globalSettings.setCurrentDir(dir); - getMapManager().openMapFileWithView(file, null); + mapManager.openMapFileWithView(file, null); } } else if (!file.exists()) { if (isScriptFile) { @@ -585,7 +585,7 @@ if (isScriptFile) { ScriptEditControlInstance.getInstance().openScriptFile(file.getAbsolutePath()); } else { - getMapManager().openMapFileWithView(file, null); + mapManager.openMapFileWithView(file, null); } } else if (!file.exists()) { if (isScriptFile) { @@ -677,7 +677,7 @@ /** Invoked when user wants to exit from the program. */ public void exit() { - if (ScriptEditControlInstance.getInstance().closeAllTabs() && getMapManager().closeAll() && pickmapChooserControl.canExit() && scriptControl.canExit()) { + if (ScriptEditControlInstance.getInstance().closeAllTabs() && mapManager.closeAll() && pickmapChooserControl.canExit() && scriptControl.canExit()) { doExit(); } } @@ -725,13 +725,13 @@ if (ACTION_FACTORY.showQuestionDialog(mainView, "confirmRevertMap", mapControl.getMapFileName())) { final File mfile = mapControl.getMapFile(); final Point[] viewPositions = mapControl.getViewPositions(); - getMapManager().closeLevel(mapControl, true); + mapManager.closeLevel(mapControl, true); - final MapView<GameObject, MapArchObject, Archetype, CMapViewBasic> newMapView = getMapManager().openMapFileWithView(mfile, viewPositions[0]); + final MapView<GameObject, MapArchObject, Archetype, CMapViewBasic> newMapView = mapManager.openMapFileWithView(mfile, viewPositions[0]); if (newMapView != null) { final MapControl<GameObject, MapArchObject, Archetype, CMapViewBasic> newMapControl = newMapView.getMapControl(); for (int i = 1; i < viewPositions.length; i++) { - getMapManager().mapCreateView(newMapControl, viewPositions[i]); + mapManager.mapCreateView(newMapControl, viewPositions[i]); } } } @@ -758,7 +758,7 @@ /** Calls for zooming preview tool. */ public void zoom() { - final MapControl<GameObject, MapArchObject, Archetype, CMapViewBasic> currentMap = getMapManager().getCurrentMap(); + final MapControl<GameObject, MapArchObject, Archetype, CMapViewBasic> currentMap = mapManager.getCurrentMap(); if (currentMap == null) { JOptionPane.showMessageDialog(mainView, "No map loaded! Please load a map!!", "Error", JOptionPane.ERROR_MESSAGE); return; Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2008-07-31 21:51:05 UTC (rev 4632) +++ trunk/daimonin/src/daieditor/CMainControl.java 2008-07-31 21:58:21 UTC (rev 4633) @@ -289,25 +289,25 @@ final boolean mapTileListBottom = prefs.getBoolean(MainView.MAP_TILE_LIST_BOTTOM_KEY, MainView.MAP_TILE_LIST_BOTTOM_DEFAULT); final SelectedSquareControl<GameObject, MapArchObject, Archetype, CMapViewBasic> selectedSquareControl = new SelectedSquareControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(ACTION_FACTORY, this, editTypes, mapTileListBottom, GUIUtils.getSysIcon(IGUIConstants.TILE_NORTH), archetypeSet); final SelectedSquareView<GameObject, MapArchObject, Archetype, CMapViewBasic> selectedSquareView = selectedSquareControl.getSelectedSquareView(); - new MapCursorControl<GameObject, MapArchObject, Archetype, CMapViewBasic>("daieditor", this, getMapManager(), selectedSquareControl, selectedSquareView); + new MapCursorControl<GameObject, MapArchObject, Archetype, CMapViewBasic>("daieditor", this, mapManager, selectedSquareControl, selectedSquareView); ACTION_FACTORY.createActions(true, this, "createNew", "open", "options", "exit", "newScript", "editScript", "controlServer", "controlClient", "cleanCompletelyBlockedSquares", "zoom", "gc", "onlineHelp", "tod", "about"); ACTION_FACTORY.createToggles(true, this, "drawDouble"); ACTION_FACTORY.createAction(true, "collectSpells", this); - final MapManagerActions<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManagerActions = new MapManagerActions<GameObject, MapArchObject, Archetype, CMapViewBasic>(getMapManager()); + final MapManagerActions<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManagerActions = new MapManagerActions<GameObject, MapArchObject, Archetype, CMapViewBasic>(mapManager); PathManager.setGlobalSettings(globalSettings); final ArchetypeChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic> archetypeChooserControl = new ArchetypeChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, archetypeSet, true); newMapDialogFactory = new NewMapDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, IGUIConstants.DEF_MAPSIZE, IGUIConstants.DEF_MAPSIZE, IGUIConstants.DEF_MAPDIFFICULTY, true, true, IGUIConstants.DEF_PICKMAP_WIDTH, IGUIConstants.DEF_PICKMAP_HEIGHT); - pickmapChooserControl = new PickmapChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(newMapDialogFactory, this, new File(globalSettings.getArchDefaultFolder(), IGUIConstants.PICKMAP_DIR), getMapManager()); + pickmapChooserControl = new PickmapChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(newMapDialogFactory, this, new File(globalSettings.getArchDefaultFolder(), IGUIConstants.PICKMAP_DIR), mapManager); newMapDialogFactory.setPickmapChooserControl(pickmapChooserControl); archetypeTypeSet = new ArchetypeTypeSet<GameObject, MapArchObject, Archetype>(); objectChooser = new DefaultObjectChooser<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, archetypeSet, archetypeTypeSet, editTypes, selectedSquareView, archetypeChooserControl, pickmapChooserControl, getCopyBuffer()); - mainActions = new MainActions<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, editTypes, archetypeSet, getCopyBuffer(), pickmapChooserControl, animationObjects, ACTION_FACTORY, faceObjects, objectChooser, getMapManager()); + mainActions = new MainActions<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, editTypes, archetypeSet, getCopyBuffer(), pickmapChooserControl, animationObjects, ACTION_FACTORY, faceObjects, objectChooser, mapManager); SystemIcons.init(); - final StatusBar<GameObject, MapArchObject, Archetype, CMapViewBasic> statusBar = new StatusBar<GameObject, MapArchObject, Archetype, CMapViewBasic>(getMapManager(), archetypeSet, faceObjects); + final StatusBar<GameObject, MapArchObject, Archetype, CMapViewBasic> statusBar = new StatusBar<GameObject, MapArchObject, Archetype, CMapViewBasic>(mapManager, archetypeSet, faceObjects); createMapImageCache(null, SystemIcons.getDefaultIcon(), SystemIcons.getDefaultPreview(), statusBar); - mainView = new MainView<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, editTypes, getMapManager(), ACTION_FACTORY, mapManagerActions.getCloseAllAction(), statusBar); + mainView = new MainView<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, editTypes, mapManager, ACTION_FACTORY, mapManagerActions.getCloseAllAction(), statusBar); new About("daieditor", mainView); - new UndoControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(getMapManager()); + new UndoControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(mapManager); updaterManager = new UpdaterManager("daieditor", this, mainView, "DaimoninEditor.jar"); updaterManager.startup(); @@ -354,7 +354,7 @@ log.fatal("GameObjectMatcher 'exit' does not exist"); throw new MissingResourceException("GameObjectMatcher 'exit' does not exist", null, null); } - final MapActions mapActions = new MapActions(mainView, this, getMapManager(), exitMatcher, mapFileFilter, selectedSquareView); + final MapActions mapActions = new MapActions(mainView, this, mapManager, exitMatcher, mapFileFilter, selectedSquareView); Map<String, TreasureTreeNode> specialTreasureLists; try { final Document specialTreasureListsDocument = xmlHelper.getDocumentBuilder().parse(IOUtils.getResourceURLAsString(getConfigurationDirectory(), "TreasureLists.xml")); @@ -383,8 +383,8 @@ AbstractScriptArchEditor.initEventTypeBoxes(".lua", "Lua", ScriptArchUtils.createEventTypeBox(), luaFileFilter); // Initialize the main view - final LockedItemsControl<GameObject, MapArchObject, Archetype, CMapViewBasic> lockedItemsControl = new LockedItemsControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(getMapManager(), Archetype.TYPE_LOCKED_DOOR, Archetype.TYPE_SPECIAL_KEY, Archetype.TYPE_ALTAR_TRIGGER, Archetype.TYPE_MARKER, Archetype.TYPE_INVENTORY_CHECKER, Archetype.TYPE_SPAWN_POINT, Archetype.TYPE_CONTAINER); - gameObjectAttributesPanel = new GameObjectAttributesPanel(this, archetypeTypeSet, getMapManager(), animationObjects, lockedItemsControl, monsterMatcher, selectedSquareControl, selectedSquareView); + final LockedItemsControl<GameObject, MapArchObject, Archetype, CMapViewBasic> lockedItemsControl = new LockedItemsControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(mapManager, Archetype.TYPE_LOCKED_DOOR, Archetype.TYPE_SPECIAL_KEY, Archetype.TYPE_ALTAR_TRIGGER, Archetype.TYPE_MARKER, Archetype.TYPE_INVENTORY_CHECKER, Archetype.TYPE_SPAWN_POINT, Archetype.TYPE_CONTAINER); + gameObjectAttributesPanel = new GameObjectAttributesPanel(this, archetypeTypeSet, mapManager, animationObjects, lockedItemsControl, monsterMatcher, selectedSquareControl, selectedSquareView); mainView.init(gameObjectAttributesPanel, selectedSquareView, archetypeTypeSet, mapTileListBottom, gameObjectMatchers, archetypeChooserControl, objectChooser); mapActions.updateMenuState(); archetypeParser = new ArchetypeParser(this, archetypeChooserControl, animationObjects, archetypeSet); @@ -427,8 +427,8 @@ } } - final RecentManager recentManager = new RecentManager(getMapManager(), (JMenu) ACTION_FACTORY.find(mainView.getJMenuBar(), "recent"), globalSettings, getMapPreviewAccessory()); - getMapManager().setRecentManager(recentManager); + final RecentManager recentManager = new RecentManager(mapManager, (JMenu) ACTION_FACTORY.find(mainView.getJMenuBar(), "recent"), globalSettings, getMapPreviewAccessory()); + mapManager.setRecentManager(recentManager); // browse arch archive // load object from a arch file you found @@ -449,7 +449,7 @@ recentManager.initRecent(); validators = createMapValidators(); new AutoValidator<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, PREFS_VALIDATOR_AUTO_DEFAULT); - gameObjectAttributesDialogFactory = new GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeTypeSet, this, archetypeSet, getMapManager()); + gameObjectAttributesDialogFactory = new GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeTypeSet, this, archetypeSet, mapManager); } /** @@ -523,7 +523,7 @@ */ @ActionMethod public void cleanCompletelyBlockedSquares() { - final MapControl<GameObject, MapArchObject, Archetype, CMapViewBasic> currentMap = getMapManager().getCurrentMap(); + final MapControl<GameObject, MapArchObject, Archetype, CMapViewBasic> currentMap = mapManager.getCurrentMap(); if (currentMap == null) { return; } @@ -552,7 +552,7 @@ */ public void setDrawDouble(final boolean drawDouble) { this.drawDouble = drawDouble; - getMapManager().refreshCurrentMap(); + mapManager.refreshCurrentMap(); } /** Control the server. */ @@ -623,17 +623,17 @@ if (state) { alphaType |= v; // XXX THIS IS A BAD HACK - getMapManager().addEditType(v); + mapManager.addEditType(v); } else { alphaType &= ~v; } - getMapManager().refreshCurrentMap(); + mapManager.refreshCurrentMap(); } /** Clear the transparency. */ public void clearAlpha() { alphaType = 0; - getMapManager().refreshCurrentMap(); + mapManager.refreshCurrentMap(); } public void onlineHelp() { @@ -741,7 +741,7 @@ ScriptEditControlInstance.getInstance().openScriptFile(file.getAbsolutePath()); } else { globalSettings.setCurrentDir(dir); - getMapManager().openMapFileWithView(file, null); + mapManager.openMapFileWithView(file, null); } } else if (!file.exists()) { if (isScriptFile) { @@ -766,7 +766,7 @@ if (isScriptFile) { ScriptEditControlInstance.getInstance().openScriptFile(file.getAbsolutePath()); } else { - getMapManager().openMapFileWithView(file, null); + mapManager.openMapFileWithView(file, null); } } else if (!file.exists()) { if (isScriptFile) { @@ -865,7 +865,7 @@ /** Invoked when user wants to exit from the program. */ public void exit() { - if (ScriptEditControlInstance.getInstance().closeAllTabs() && getMapManager().closeAll() && pickmapChooserControl.canExit()) { + if (ScriptEditControlInstance.getInstance().closeAllTabs() && mapManager.closeAll() && pickmapChooserControl.canExit()) { doExit(); } } @@ -913,13 +913,13 @@ if (ACTION_FACTORY.showQuestionDialog(mainView, "confirmRevertMap", mapControl.getMapFileName())) { final File mfile = mapControl.getMapFile(); final Point[] viewPositions = mapControl.getViewPositions(); - getMapManager().closeLevel(mapControl, true); + mapManager.closeLevel(mapControl, true); - final MapView<GameObject, MapArchObject, Archetype, CMapViewBasic> newMapView = getMapManager().openMapFileWithView(mfile, viewPositions[0]); + final MapView<GameObject, MapArchObject, Archetype, CMapViewBasic> newMapView = mapManager.openMapFileWithView(mfile, viewPositions[0]); if (newMapView != null) { final MapControl<GameObject, MapArchObject, Archetype, CMapViewBasic> newMapControl = newMapView.getMapControl(); for (int i = 1; i < viewPositions.length; i++) { - getMapManager().mapCreateView(newMapControl, viewPositions[i]); + mapManager.mapCreateView(newMapControl, viewPositions[i]); } } } @@ -938,7 +938,7 @@ /** Calls for zooming preview tool. */ public void zoom() { - final MapControl<GameObject, MapArchObject, Archetype, CMapViewBasic> currentMap = getMapManager().getCurrentMap(); + final MapControl<GameObject, MapArchObject, Archetype, CMapViewBasic> currentMap = mapManager.getCurrentMap(); if (currentMap == null) { JOptionPane.showMessageDialog(mainView, "No map loaded! Please load a map!!", "Error", JOptionPane.ERROR_MESSAGE); return; Modified: trunk/src/app/net/sf/gridarta/AbstractMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/AbstractMainControl.java 2008-07-31 21:51:05 UTC (rev 4632) +++ trunk/src/app/net/sf/gridarta/AbstractMainControl.java 2008-07-31 21:58:21 UTC (rev 4633) @@ -89,7 +89,7 @@ private final AutojoinLists<G, A, R> autojoinLists = new AutojoinLists<G, A, R>(); /** The map manager. */ - private final MapManager<G, A, R, V> mapManager; + protected final MapManager<G, A, R, V> mapManager; /** The updater instance. */ protected UpdaterManager updaterManager = null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |