From: <aki...@us...> - 2008-07-31 21:34:25
|
Revision: 4628 http://gridarta.svn.sourceforge.net/gridarta/?rev=4628&view=rev Author: akirschbaum Date: 2008-07-31 21:34:30 +0000 (Thu, 31 Jul 2008) Log Message: ----------- Remove calls to MainControl.getEditTypes(). 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:32:22 UTC (rev 4627) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2008-07-31 21:34:30 UTC (rev 4628) @@ -227,11 +227,11 @@ CMainControlInstance.instance = this; globalSettings.readGlobalSettings(); animationObjects = new cfeditor.gameobject.anim.AnimationObjects(); - archetypeSet = new ArchetypeSet(this, getEditTypes(), animationObjects, faceObjects, globalSettings.getImageSet()); + archetypeSet = new ArchetypeSet(this, editTypes, animationObjects, faceObjects, globalSettings.getImageSet()); GameObject.setArchetypeSet(archetypeSet); ScriptedEvent.setArchetypeSet(archetypeSet); 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, getEditTypes(), mapTileListBottom, null, archetypeSet); + 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); ACTION_FACTORY.createActions(true, this, "createNew", "open", "options", "exit", "newScript", "editScript", "zoom", "gc", "onlineHelp", "tod", "about"); @@ -241,12 +241,12 @@ 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()); newMapDialogFactory.setPickmapChooserControl(pickmapChooserControl); - objectChooser = new DefaultObjectChooser<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, archetypeSet, getEditTypes(), selectedSquareView, archetypeChooserControl, pickmapChooserControl, getCopyBuffer()); - mainActions = new MainActions<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, getEditTypes(), archetypeSet, getCopyBuffer(), pickmapChooserControl, animationObjects, ACTION_FACTORY, faceObjects, objectChooser, getMapManager()); + objectChooser = new DefaultObjectChooser<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, archetypeSet, editTypes, selectedSquareView, archetypeChooserControl, pickmapChooserControl, getCopyBuffer()); + mainActions = new MainActions<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, editTypes, archetypeSet, getCopyBuffer(), pickmapChooserControl, animationObjects, ACTION_FACTORY, faceObjects, objectChooser, getMapManager()); SystemIcons.init(); final StatusBar<GameObject, MapArchObject, Archetype, CMapViewBasic> statusBar = new StatusBar<GameObject, MapArchObject, Archetype, CMapViewBasic>(getMapManager(), archetypeSet, faceObjects); createMapImageCache(CResourceLoader.getHomeFile("thumbnails"), SystemIcons.getDefaultIcon(), SystemIcons.getDefaultPreview(), statusBar); - mainView = new MainView<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, getEditTypes(), getMapManager(), ACTION_FACTORY, mapManagerActions.getCloseAllAction(), statusBar); + mainView = new MainView<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, editTypes, getMapManager(), ACTION_FACTORY, mapManagerActions.getCloseAllAction(), statusBar); new About("cfeditor", mainView); new UndoControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(getMapManager()); updaterManager = new UpdaterManager("cfeditor", this, mainView, "CrossfireEditor.jar"); @@ -330,7 +330,7 @@ mapActions.updateMenuState(); scriptControl.getView().setMenu((JMenu) ACTION_FACTORY.find(mainView.getJMenuBar(), "plugins")); archetypeParser = new ArchetypeParser(this, archetypeChooserControl, animationObjects, archetypeSet); - getGridartaObjectsFactory().init(faceObjects, objectChooser, archetypeChooserControl, selectedSquareView, this, getEditTypes(), getMapImageCache(), mapActions, archetypeParser, archetypeSet); + getGridartaObjectsFactory().init(faceObjects, objectChooser, archetypeChooserControl, selectedSquareView, this, editTypes, getMapImageCache(), mapActions, archetypeParser, archetypeSet); archetypeSet.loadArchetypes(archetypeParser); if (globalSettings.isAutoPopupDocu()) { Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2008-07-31 21:32:22 UTC (rev 4627) +++ trunk/daimonin/src/daieditor/CMainControl.java 2008-07-31 21:34:30 UTC (rev 4628) @@ -283,11 +283,11 @@ globalSettings.readGlobalSettings(); animationObjects = new daieditor.gameobject.anim.AnimationObjects(); GameObject.setAnimationObjects(animationObjects); - archetypeSet = new ArchetypeSet(this, getEditTypes(), animationObjects, faceObjects); + archetypeSet = new ArchetypeSet(this, editTypes, animationObjects, faceObjects); GameObject.setArchetypeSet(archetypeSet); ScriptedEvent.setArchetypeSet(archetypeSet); 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, getEditTypes(), mapTileListBottom, GUIUtils.getSysIcon(IGUIConstants.TILE_NORTH), archetypeSet); + 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); ACTION_FACTORY.createActions(true, this, "createNew", "open", "options", "exit", "newScript", "editScript", "controlServer", "controlClient", "cleanCompletelyBlockedSquares", "zoom", "gc", "onlineHelp", "tod", "about"); @@ -299,12 +299,12 @@ 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()); newMapDialogFactory.setPickmapChooserControl(pickmapChooserControl); - objectChooser = new DefaultObjectChooser<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, archetypeSet, getEditTypes(), selectedSquareView, archetypeChooserControl, pickmapChooserControl, getCopyBuffer()); - mainActions = new MainActions<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, getEditTypes(), archetypeSet, getCopyBuffer(), pickmapChooserControl, animationObjects, ACTION_FACTORY, faceObjects, objectChooser, getMapManager()); + objectChooser = new DefaultObjectChooser<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, archetypeSet, editTypes, selectedSquareView, archetypeChooserControl, pickmapChooserControl, getCopyBuffer()); + mainActions = new MainActions<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, editTypes, archetypeSet, getCopyBuffer(), pickmapChooserControl, animationObjects, ACTION_FACTORY, faceObjects, objectChooser, getMapManager()); SystemIcons.init(); final StatusBar<GameObject, MapArchObject, Archetype, CMapViewBasic> statusBar = new StatusBar<GameObject, MapArchObject, Archetype, CMapViewBasic>(getMapManager(), archetypeSet, faceObjects); createMapImageCache(null, SystemIcons.getDefaultIcon(), SystemIcons.getDefaultPreview(), statusBar); - mainView = new MainView<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, getEditTypes(), getMapManager(), ACTION_FACTORY, mapManagerActions.getCloseAllAction(), statusBar); + mainView = new MainView<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, editTypes, getMapManager(), ACTION_FACTORY, mapManagerActions.getCloseAllAction(), statusBar); new About("daieditor", mainView); new UndoControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(getMapManager()); updaterManager = new UpdaterManager("daieditor", this, mainView, "DaimoninEditor.jar"); @@ -388,7 +388,7 @@ mainView.init(gameObjectAttributesPanel, selectedSquareView, archetypeTypeSet, mapTileListBottom, gameObjectMatchers, archetypeChooserControl, objectChooser); mapActions.updateMenuState(); archetypeParser = new ArchetypeParser(this, archetypeChooserControl, animationObjects, archetypeSet); - getGridartaObjectsFactory().init(faceObjects, objectChooser, archetypeChooserControl, selectedSquareView, this, getEditTypes(), getMapImageCache(), mapActions, archetypeParser, archetypeSet); + getGridartaObjectsFactory().init(faceObjects, objectChooser, archetypeChooserControl, selectedSquareView, this, editTypes, getMapImageCache(), mapActions, archetypeParser, archetypeSet); archetypeSet.loadArchetypes(archetypeParser); if (globalSettings.isAutoPopupDocu()) { Modified: trunk/src/app/net/sf/gridarta/AbstractMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/AbstractMainControl.java 2008-07-31 21:32:22 UTC (rev 4627) +++ trunk/src/app/net/sf/gridarta/AbstractMainControl.java 2008-07-31 21:34:30 UTC (rev 4628) @@ -74,7 +74,7 @@ private final GridartaObjectsFactory<G, A, R, V> gridartaObjectsFactory; /** The edit types instance. */ - private final EditTypes<G, A, R, V> editTypes; + protected final EditTypes<G, A, R, V> editTypes; /** Buffer managing copy data. */ private final CopyBuffer<G, A, R, V> copyBuffer; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |