From: <aki...@us...> - 2008-08-15 18:10:31
|
Revision: 4840 http://gridarta.svn.sourceforge.net/gridarta/?rev=4840&view=rev Author: akirschbaum Date: 2008-08-15 18:10:38 +0000 (Fri, 15 Aug 2008) Log Message: ----------- Reorder initialization code. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2008-08-15 17:28:49 UTC (rev 4839) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2008-08-15 18:10:38 UTC (rev 4840) @@ -239,17 +239,17 @@ final ReplaceDialogManager<GameObject, MapArchObject, Archetype, CMapViewBasic> replaceDialogManager = new ReplaceDialogManager<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, archetypeSet, copyBuffer); final GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic> gameObjectAttributesDialogFactory = new GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeTypeSet, archetypeSet, mapManager); archetypeChooserControl.init(false, gameObjectAttributesDialogFactory); + mapViewManager = new MapViewManager<GameObject, MapArchObject, Archetype, CMapViewBasic>(); + SystemIcons.init(); + createMapImageCache(CResourceLoader.getHomeFile("thumbnails"), SystemIcons.getDefaultIcon(), SystemIcons.getDefaultPreview(), new StatusBar<GameObject, MapArchObject, Archetype, CMapViewBasic>(mapManager, mapViewManager, archetypeSet, faceObjects)); + mainView = new MainView<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, editTypes, mapManager, mapViewManager, ACTION_FACTORY, mapManagerActions.getCloseAllAction(), statusBar); objectChooser = new DefaultObjectChooser<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeChooserControl, pickmapChooserControl); - mapViewManager = new MapViewManager<GameObject, MapArchObject, Archetype, CMapViewBasic>(); final SelectedSquareControl<GameObject, MapArchObject, Archetype, CMapViewBasic> selectedSquareControl = new SelectedSquareControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(ACTION_FACTORY, gameObjectAttributesDialogFactory, objectChooser, mapManager, mapViewManager, editTypes, mapTileListBottom, null, archetypeSet); final SelectedSquareView<GameObject, MapArchObject, Archetype, CMapViewBasic> selectedSquareView = selectedSquareControl.getSelectedSquareView(); new MapCursorControl<GameObject, MapArchObject, Archetype, CMapViewBasic>("cfeditor", this, gameObjectAttributesDialogFactory, mapManager, mapViewManager, selectedSquareControl, selectedSquareView); replaceDialogManager.setObjectChooser(objectChooser); mainActions = new MainActions<GameObject, MapArchObject, Archetype, CMapViewBasic>(replaceDialogManager, this, editTypes, archetypeSet, copyBuffer, animationObjects, ACTION_FACTORY, faceObjects, objectChooser, mapManager, mapViewManager); - SystemIcons.init(); GameObject.setArchetypeSet(archetypeSet, SystemIcons.getNofaceTileIcon()); - createMapImageCache(CResourceLoader.getHomeFile("thumbnails"), SystemIcons.getDefaultIcon(), SystemIcons.getDefaultPreview(), new StatusBar<GameObject, MapArchObject, Archetype, CMapViewBasic>(mapManager, mapViewManager, archetypeSet, faceObjects)); - mainView = new MainView<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, editTypes, mapManager, mapViewManager, ACTION_FACTORY, mapManagerActions.getCloseAllAction(), statusBar); gameObjectAttributesDialogFactory.setParent(mainView); new About("cfeditor", mainView); new UndoControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(mapManager); Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2008-08-15 17:28:49 UTC (rev 4839) +++ trunk/daimonin/src/daieditor/CMainControl.java 2008-08-15 18:10:38 UTC (rev 4840) @@ -296,17 +296,17 @@ final ReplaceDialogManager<GameObject, MapArchObject, Archetype, CMapViewBasic> replaceDialogManager = new ReplaceDialogManager<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, archetypeSet, copyBuffer); final GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic> gameObjectAttributesDialogFactory = new GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeTypeSet, archetypeSet, mapManager); archetypeChooserControl.init(true, gameObjectAttributesDialogFactory); + final MapViewManager<GameObject, MapArchObject, Archetype, CMapViewBasic> mapViewManager = new MapViewManager<GameObject, MapArchObject, Archetype, CMapViewBasic>(); + SystemIcons.init(); + createMapImageCache(null, SystemIcons.getDefaultIcon(), SystemIcons.getDefaultPreview(), new StatusBar<GameObject, MapArchObject, Archetype, CMapViewBasic>(mapManager, mapViewManager, archetypeSet, faceObjects)); + mainView = new MainView<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, editTypes, mapManager, mapViewManager, ACTION_FACTORY, mapManagerActions.getCloseAllAction(), statusBar); objectChooser = new DefaultObjectChooser<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeChooserControl, pickmapChooserControl); - final MapViewManager<GameObject, MapArchObject, Archetype, CMapViewBasic> mapViewManager = new MapViewManager<GameObject, MapArchObject, Archetype, CMapViewBasic>(); final SelectedSquareControl<GameObject, MapArchObject, Archetype, CMapViewBasic> selectedSquareControl = new SelectedSquareControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(ACTION_FACTORY, gameObjectAttributesDialogFactory, objectChooser, mapManager, mapViewManager, 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, gameObjectAttributesDialogFactory, mapManager, mapViewManager, selectedSquareControl, selectedSquareView); replaceDialogManager.setObjectChooser(objectChooser); mainActions = new MainActions<GameObject, MapArchObject, Archetype, CMapViewBasic>(replaceDialogManager, this, editTypes, archetypeSet, copyBuffer, animationObjects, ACTION_FACTORY, faceObjects, objectChooser, mapManager, mapViewManager); - SystemIcons.init(); GameObject.setAnimationObjects(animationObjects, SystemIcons.getNofaceTileIcon()); - createMapImageCache(null, SystemIcons.getDefaultIcon(), SystemIcons.getDefaultPreview(), new StatusBar<GameObject, MapArchObject, Archetype, CMapViewBasic>(mapManager, mapViewManager, archetypeSet, faceObjects)); - mainView = new MainView<GameObject, MapArchObject, Archetype, CMapViewBasic>(this, editTypes, mapManager, mapViewManager, ACTION_FACTORY, mapManagerActions.getCloseAllAction(), statusBar); gameObjectAttributesDialogFactory.setParent(mainView); new About("daieditor", mainView); new UndoControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(mapManager); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |