From: <aki...@us...> - 2008-08-20 00:53:16
|
Revision: 4911 http://gridarta.svn.sourceforge.net/gridarta/?rev=4911&view=rev Author: akirschbaum Date: 2008-08-20 00:53:22 +0000 (Wed, 20 Aug 2008) Log Message: ----------- Remove unused code. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CrossfireObjectsFactory.java trunk/daimonin/src/daieditor/CMainControl.java trunk/daimonin/src/daieditor/DaimoninObjectsFactory.java trunk/daimonin/src/daieditor/map/DefaultMapControlFactory.java trunk/src/app/net/sf/gridarta/AbstractMainControl.java trunk/src/app/net/sf/gridarta/CopyBuffer.java trunk/src/app/net/sf/gridarta/DefaultMapManager.java trunk/src/app/net/sf/gridarta/GridartaObjectsFactory.java trunk/src/app/net/sf/gridarta/gui/pickmapchooser/Folder.java trunk/src/app/net/sf/gridarta/gui/pickmapchooser/Loader.java trunk/src/app/net/sf/gridarta/gui/pickmapchooser/Pickmap.java trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java trunk/src/test/net/sf/gridarta/map/DefaultMapModelTest.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2008-08-20 00:29:26 UTC (rev 4910) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2008-08-20 00:53:22 UTC (rev 4911) @@ -215,7 +215,7 @@ final MapManagerActions<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManagerActions = new MapManagerActions<GameObject, MapArchObject, Archetype, CMapViewBasic>(mapManager); final ArchetypeChooserModel<GameObject, MapArchObject, Archetype, CMapViewBasic> archetypeChooserModel = new ArchetypeChooserModel<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeSet); final ArchetypeChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic> archetypeChooserControl = new ArchetypeChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeChooserModel); - pickmapChooserControl = new PickmapChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(newMapDialogFactory, this, gridartaObjectsFactory, new File(globalSettings.getMapDir(), IGUIConstants.PICKMAP_DIR), mapManager, autojoinLists); + pickmapChooserControl = new PickmapChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(newMapDialogFactory, this, gridartaObjectsFactory, new File(globalSettings.getMapDir(), IGUIConstants.PICKMAP_DIR), mapManager); newMapDialogFactory.setPickmapChooserControl(pickmapChooserControl); final ArchetypeTypeSet<GameObject, MapArchObject, Archetype> archetypeTypeSet = new ArchetypeTypeSet<GameObject, MapArchObject, Archetype>(); final GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic> gameObjectAttributesDialogFactory = new GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeTypeSet, archetypeSet, mapManager); Modified: trunk/crossfire/src/cfeditor/CrossfireObjectsFactory.java =================================================================== --- trunk/crossfire/src/cfeditor/CrossfireObjectsFactory.java 2008-08-20 00:29:26 UTC (rev 4910) +++ trunk/crossfire/src/cfeditor/CrossfireObjectsFactory.java 2008-08-20 00:53:22 UTC (rev 4911) @@ -147,13 +147,13 @@ /** {@inheritDoc} */ @NotNull - public MapControl<GameObject, MapArchObject, Archetype, CMapViewBasic> newMapControl(@Nullable final List<GameObject> objects, @NotNull final MapArchObject mapArchObject, @NotNull final Component parent, @NotNull final AutojoinLists<GameObject, MapArchObject, Archetype> autojoinLists, @NotNull final String mapName, @Nullable final File file) { + public MapControl<GameObject, MapArchObject, Archetype, CMapViewBasic> newMapControl(@Nullable final List<GameObject> objects, @NotNull final MapArchObject mapArchObject, @NotNull final Component parent, @NotNull final String mapName, @Nullable final File file) { return mapControlFactory.newMapControl(this, parent, objects, mapArchObject, mapName, file); } /** {@inheritDoc} */ @NotNull - public MapControl<GameObject, MapArchObject, Archetype, CMapViewBasic> newPickmapControl(@Nullable final List<GameObject> objects, @NotNull final MapArchObject mapArchObject, @NotNull final Component parent, @NotNull final AutojoinLists<GameObject, MapArchObject, Archetype> autojoinLists, @NotNull final File file) { + public MapControl<GameObject, MapArchObject, Archetype, CMapViewBasic> newPickmapControl(@Nullable final List<GameObject> objects, @NotNull final MapArchObject mapArchObject, @NotNull final Component parent, @NotNull final File file) { return mapControlFactory.newPickmapControl(this, parent, objects, mapArchObject, file); } Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2008-08-20 00:29:26 UTC (rev 4910) +++ trunk/daimonin/src/daieditor/CMainControl.java 2008-08-20 00:53:22 UTC (rev 4911) @@ -269,7 +269,7 @@ final MapManagerActions<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManagerActions = new MapManagerActions<GameObject, MapArchObject, Archetype, CMapViewBasic>(mapManager); final ArchetypeChooserModel<GameObject, MapArchObject, Archetype, CMapViewBasic> archetypeChooserModel = new ArchetypeChooserModel<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeSet); final ArchetypeChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic> archetypeChooserControl = new ArchetypeChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeChooserModel); - pickmapChooserControl = new PickmapChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(newMapDialogFactory, this, gridartaObjectsFactory, new File(globalSettings.getArchDefaultFolder(), IGUIConstants.PICKMAP_DIR), mapManager, autojoinLists); + pickmapChooserControl = new PickmapChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(newMapDialogFactory, this, gridartaObjectsFactory, new File(globalSettings.getArchDefaultFolder(), IGUIConstants.PICKMAP_DIR), mapManager); newMapDialogFactory.setPickmapChooserControl(pickmapChooserControl); final ArchetypeTypeSet<GameObject, MapArchObject, Archetype> archetypeTypeSet = new ArchetypeTypeSet<GameObject, MapArchObject, Archetype>(); final GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic> gameObjectAttributesDialogFactory = new GameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic>(archetypeTypeSet, archetypeSet, mapManager); Modified: trunk/daimonin/src/daieditor/DaimoninObjectsFactory.java =================================================================== --- trunk/daimonin/src/daieditor/DaimoninObjectsFactory.java 2008-08-20 00:29:26 UTC (rev 4910) +++ trunk/daimonin/src/daieditor/DaimoninObjectsFactory.java 2008-08-20 00:53:22 UTC (rev 4911) @@ -151,13 +151,13 @@ /** {@inheritDoc} */ @NotNull - public MapControl<GameObject, MapArchObject, Archetype, CMapViewBasic> newMapControl(@Nullable final List<GameObject> objects, @NotNull final MapArchObject mapArchObject, @NotNull final Component parent, @NotNull final AutojoinLists<GameObject, MapArchObject, Archetype> autojoinLists, @NotNull final String mapName, @Nullable final File file) { + public MapControl<GameObject, MapArchObject, Archetype, CMapViewBasic> newMapControl(@Nullable final List<GameObject> objects, @NotNull final MapArchObject mapArchObject, @NotNull final Component parent, @NotNull final String mapName, @Nullable final File file) { return mapControlFactory.newMapControl(this, parent, objects, mapArchObject, mapName, file); } /** {@inheritDoc} */ @NotNull - public MapControl<GameObject, MapArchObject, Archetype, CMapViewBasic> newPickmapControl(@Nullable final List<GameObject> objects, @NotNull final MapArchObject mapArchObject, @NotNull final Component parent, @NotNull final AutojoinLists<GameObject, MapArchObject, Archetype> autojoinLists, @NotNull final File file) { + public MapControl<GameObject, MapArchObject, Archetype, CMapViewBasic> newPickmapControl(@Nullable final List<GameObject> objects, @NotNull final MapArchObject mapArchObject, @NotNull final Component parent, @NotNull final File file) { return mapControlFactory.newPickmapControl(this, parent, objects, mapArchObject, file); } Modified: trunk/daimonin/src/daieditor/map/DefaultMapControlFactory.java =================================================================== --- trunk/daimonin/src/daieditor/map/DefaultMapControlFactory.java 2008-08-20 00:29:26 UTC (rev 4910) +++ trunk/daimonin/src/daieditor/map/DefaultMapControlFactory.java 2008-08-20 00:53:22 UTC (rev 4911) @@ -93,7 +93,7 @@ /** {@inheritDoc} */ @NotNull public MapControl<GameObject, MapArchObject, Archetype, CMapViewBasic> newMapControl(@NotNull final GridartaObjectsFactory<GameObject, MapArchObject, Archetype, CMapViewBasic> gridartaObjectsFactory, @NotNull final Component parent, @Nullable final List<GameObject> objects, @NotNull final MapArchObject mapArchObject, @NotNull final String mapName, @Nullable final File file) { - final MapControl<GameObject, MapArchObject, Archetype, CMapViewBasic> mapControl = DefaultMapControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(gridartaObjectsFactory, parent, autojoinLists, mapImageCache, objects, mapArchObject, false, exitTypeGameObjectMatcher, archetypeChooserModel, mapActions); + final MapControl<GameObject, MapArchObject, Archetype, CMapViewBasic> mapControl = new DefaultMapControl<GameObject, MapArchObject, Archetype, CMapViewBasic>(gridartaObjectsFactory, parent, autojoinLists, mapImageCache, objects, mapArchObject, false, exitTypeGameObjectMatcher, archetypeChooserModel, mapActions); mapControl.setMapFile(file); mapControl.setMapFileName(mapName); return mapControl; Modified: trunk/src/app/net/sf/gridarta/AbstractMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/AbstractMainControl.java 2008-08-20 00:29:26 UTC (rev 4910) +++ trunk/src/app/net/sf/gridarta/AbstractMainControl.java 2008-08-20 00:53:22 UTC (rev 4911) @@ -143,13 +143,13 @@ */ protected AbstractMainControl(@NotNull final GridartaObjectsFactory<G, A, R, V> gridartaObjectsFactory, @NotNull final String key, @NotNull final GlobalSettings globalSettings, @NotNull final AnimationObjects<? extends AnimationObject> animationObjects, @NotNull final FaceObjects faceObjects) { this.globalSettings = globalSettings; - final DefaultMapManager<G, A, R, V> tmpMapManager = new DefaultMapManager<G, A, R, V>(this, key, gridartaObjectsFactory, globalSettings, autojoinLists); + final DefaultMapManager<G, A, R, V> tmpMapManager = new DefaultMapManager<G, A, R, V>(this, key, gridartaObjectsFactory, globalSettings); editTypes = new EditTypes<G, A, R, V>(tmpMapManager); tmpMapManager.setEditTypes(editTypes); mapManager = tmpMapManager; this.animationObjects = animationObjects; this.faceObjects = faceObjects; - copyBuffer = new CopyBuffer<G, A, R, V>(this, editTypes, gridartaObjectsFactory, autojoinLists); + copyBuffer = new CopyBuffer<G, A, R, V>(this, editTypes, gridartaObjectsFactory); this.gridartaObjectsFactory = gridartaObjectsFactory; globalSettings.readGlobalSettings(); ScriptedEventEditor.setGlobalSettings(globalSettings); Modified: trunk/src/app/net/sf/gridarta/CopyBuffer.java =================================================================== --- trunk/src/app/net/sf/gridarta/CopyBuffer.java 2008-08-20 00:29:26 UTC (rev 4910) +++ trunk/src/app/net/sf/gridarta/CopyBuffer.java 2008-08-20 00:53:22 UTC (rev 4911) @@ -73,12 +73,6 @@ @NotNull private final GridartaObjectsFactory<G, A, R, V> gridartaObjectsFactory; - /** - * The autojoin lists. - */ - @NotNull - private final AutojoinLists<G, A, R> autojoinLists; - /** Internal map control to store the cut / copied arches. */ private MapControl<G, A, R, V> copyMapCtrl = null; @@ -87,13 +81,11 @@ * @param mainControl main control * @param editTypes the edit types instance * @param gridartaObjectsFactory the gridarta objects factory instance - * @param autojoinLists the autojoin lists */ - public CopyBuffer(final MainControl<G, A, R, V> mainControl, @NotNull final EditTypes<G, A, R, V> editTypes, @NotNull final GridartaObjectsFactory<G, A, R, V> gridartaObjectsFactory, @NotNull final AutojoinLists<G, A, R> autojoinLists) { + public CopyBuffer(final MainControl<G, A, R, V> mainControl, @NotNull final EditTypes<G, A, R, V> editTypes, @NotNull final GridartaObjectsFactory<G, A, R, V> gridartaObjectsFactory) { this.mainControl = mainControl; // link main control in this.editTypes = editTypes; this.gridartaObjectsFactory = gridartaObjectsFactory; - this.autojoinLists = autojoinLists; } /** @@ -103,7 +95,7 @@ public void init(final A mapArch) { assert copyMapCtrl == null; mapArch.setMapName("cb"); - copyMapCtrl = gridartaObjectsFactory.newMapControl(null, mapArch, mainControl.getMainView(), autojoinLists, "cb", null); + copyMapCtrl = gridartaObjectsFactory.newMapControl(null, mapArch, mainControl.getMainView(), "cb", null); } /** Modified: trunk/src/app/net/sf/gridarta/DefaultMapManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/DefaultMapManager.java 2008-08-20 00:29:26 UTC (rev 4910) +++ trunk/src/app/net/sf/gridarta/DefaultMapManager.java 2008-08-20 00:53:22 UTC (rev 4911) @@ -69,12 +69,6 @@ @NotNull private final GridartaObjectsFactory<G, A, R, V> gridartaObjectsFactory; - /** - * The autojoin lists. - */ - @NotNull - private final AutojoinLists<G, A, R> autojoinLists; - /** The edit types. */ @NotNull private EditTypes<G, A, R, V> editTypes = null; @@ -97,11 +91,9 @@ * @param key The action factory key. * @param gridartaObjectsFactory the gridarta objects factory instance * @param globalSettings the global settings instance - * @param autojoinLists the autojoin lists */ - public DefaultMapManager(@NotNull final MainControl<G, A, R, V> mainControl, @NotNull final String key, @NotNull final GridartaObjectsFactory<G, A, R, V> gridartaObjectsFactory, @NotNull final GlobalSettings globalSettings, @NotNull final AutojoinLists<G, A, R> autojoinLists) { + public DefaultMapManager(@NotNull final MainControl<G, A, R, V> mainControl, @NotNull final String key, @NotNull final GridartaObjectsFactory<G, A, R, V> gridartaObjectsFactory, @NotNull final GlobalSettings globalSettings) { this.globalSettings = globalSettings; - this.autojoinLists = autojoinLists; actionFactory = ActionFactory.getFactory(key); this.mainControl = mainControl; this.gridartaObjectsFactory = gridartaObjectsFactory; @@ -136,7 +128,7 @@ @NotNull private MapControl<G, A, R, V> newMap(final List<G> objects, final A mapArchObject, @Nullable final File file, @NotNull final String mapFileName) { - return gridartaObjectsFactory.newMapControl(objects, mapArchObject, mainControl.getMainView(), autojoinLists, mapFileName, file); + return gridartaObjectsFactory.newMapControl(objects, mapArchObject, mainControl.getMainView(), mapFileName, file); } /** {@inheritDoc} */ Modified: trunk/src/app/net/sf/gridarta/GridartaObjectsFactory.java =================================================================== --- trunk/src/app/net/sf/gridarta/GridartaObjectsFactory.java 2008-08-20 00:29:26 UTC (rev 4910) +++ trunk/src/app/net/sf/gridarta/GridartaObjectsFactory.java 2008-08-20 00:53:22 UTC (rev 4911) @@ -102,25 +102,23 @@ * @param objects The objects to insert into the new map. * @param mapArchObject The map arch object to use for the new map. * @param parent the parent component for error messages - * @param autojoinLists the autojoin lists instance * @param mapName the map name * @param file the associated file * @return The new map control instance. */ @NotNull - MapControl<G, A, R, V> newMapControl(@Nullable List<G> objects, @NotNull A mapArchObject, @NotNull Component parent, @NotNull AutojoinLists<G, A, R> autojoinLists, @NotNull String mapName, @Nullable File file); + MapControl<G, A, R, V> newMapControl(@Nullable List<G> objects, @NotNull A mapArchObject, @NotNull Component parent, @NotNull String mapName, @Nullable File file); /** * Create a new pickmap map control instance. * @param objects The objects to insert into the new pickmap. * @param mapArchObject The map arch object to use for the new pickmap. * @param parent the parent component for error messages - * @param autojoinLists the autojoin lists * @param file the associated file * @return The new pickmap map control instance. */ @NotNull - MapControl<G, A, R, V> newPickmapControl(@Nullable List<G> objects, @NotNull A mapArchObject, @NotNull Component parent, @NotNull AutojoinLists<G, A, R> autojoinLists, @NotNull File file); + MapControl<G, A, R, V> newPickmapControl(@Nullable List<G> objects, @NotNull A mapArchObject, @NotNull Component parent, @NotNull File file); /** * Create a new level renderer instance. Modified: trunk/src/app/net/sf/gridarta/gui/pickmapchooser/Folder.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/pickmapchooser/Folder.java 2008-08-20 00:29:26 UTC (rev 4910) +++ trunk/src/app/net/sf/gridarta/gui/pickmapchooser/Folder.java 2008-08-20 00:53:22 UTC (rev 4911) @@ -133,12 +133,11 @@ * @param gridartaObjectsFactory the <code>GridartaObjectsFactory</code> * instance for loading the pickmap map file * @param parent the parent component for error messages - * @param autojoinLists the autojoin lists * @return the newly created pickmap * @throws InvalidNameException if the pickmap name is invalid */ - public synchronized Pickmap<G, A, R, V> addPickmap(@NotNull final String name, @NotNull final GridartaObjectsFactory<G, A, R, V> gridartaObjectsFactory, @NotNull final Component parent, @NotNull final AutojoinLists<G, A, R> autojoinLists) throws InvalidNameException { - final Pickmap<G, A, R, V> pickmap = new Pickmap<G, A, R, V>(this, name, gridartaObjectsFactory, parent, autojoinLists); + public synchronized Pickmap<G, A, R, V> addPickmap(@NotNull final String name, @NotNull final GridartaObjectsFactory<G, A, R, V> gridartaObjectsFactory, @NotNull final Component parent) throws InvalidNameException { + final Pickmap<G, A, R, V> pickmap = new Pickmap<G, A, R, V>(this, name, gridartaObjectsFactory, parent); pickmaps.add(pickmap); for (final FolderListener<G, A, R, V> listener : listeners.getListeners(FolderListener.class)) { listener.pickmapAdded(pickmap); Modified: trunk/src/app/net/sf/gridarta/gui/pickmapchooser/Loader.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/pickmapchooser/Loader.java 2008-08-20 00:29:26 UTC (rev 4910) +++ trunk/src/app/net/sf/gridarta/gui/pickmapchooser/Loader.java 2008-08-20 00:53:22 UTC (rev 4911) @@ -22,7 +22,6 @@ import java.awt.Component; import java.io.File; import java.util.Arrays; -import net.sf.gridarta.AutojoinLists; import net.sf.gridarta.GridartaObjectsFactory; import net.sf.gridarta.gameobject.Archetype; import net.sf.gridarta.gameobject.GameObject; @@ -59,24 +58,16 @@ private final Component parent; /** - * The autojoin lists. - */ - @NotNull - private final AutojoinLists<G, A, R> autojoinLists; - - /** * Creates a new instance. * @param pickmapChooserModel the model to add the loaded pickmaps to * @param gridartaObjectsFactory the <code>GridartaObjectsFactory</code> * @param parent the parent component for error messages * instance to use for loading pickmap files - * @param autojoinLists the autojoin lists */ - public Loader(@NotNull final PickmapChooserModel<G, A, R, V> pickmapChooserModel, @NotNull final GridartaObjectsFactory<G, A, R, V> gridartaObjectsFactory, @NotNull final Component parent, @NotNull final AutojoinLists<G, A, R> autojoinLists) { + public Loader(@NotNull final PickmapChooserModel<G, A, R, V> pickmapChooserModel, @NotNull final GridartaObjectsFactory<G, A, R, V> gridartaObjectsFactory, @NotNull final Component parent) { this.pickmapChooserModel = pickmapChooserModel; this.gridartaObjectsFactory = gridartaObjectsFactory; this.parent = parent; - this.autojoinLists = autojoinLists; } /** Loads all pickmap files from a directory and its subdirectories. */ @@ -122,7 +113,7 @@ for (final File file : files) { if (file.isFile()) { try { - folder.addPickmap(file.getName(), gridartaObjectsFactory, this.parent, autojoinLists); + folder.addPickmap(file.getName(), gridartaObjectsFactory, this.parent); } catch (final InvalidNameException ex) { log.warn("ignoring pickmap with invalid name: " + file); } Modified: trunk/src/app/net/sf/gridarta/gui/pickmapchooser/Pickmap.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/pickmapchooser/Pickmap.java 2008-08-20 00:29:26 UTC (rev 4910) +++ trunk/src/app/net/sf/gridarta/gui/pickmapchooser/Pickmap.java 2008-08-20 00:53:22 UTC (rev 4911) @@ -23,7 +23,6 @@ import java.io.File; import java.io.IOException; import java.util.Collection; -import net.sf.gridarta.AutojoinLists; import net.sf.gridarta.GridartaObjectsFactory; import net.sf.gridarta.gameobject.Archetype; import net.sf.gridarta.gameobject.GameObject; @@ -62,12 +61,6 @@ private final Component parent; /** - * The autojoin lists. - */ - @NotNull - private final AutojoinLists<G, A, R> autojoinLists; - - /** * The {@link MapControl} instance representing the map file, or * <code>null</code> if the map file is not loaded. */ @@ -88,11 +81,9 @@ * @param gridartaObjectsFactory the <code>GridartaObjectsFactory</code> * instance for loading the map file * @param parent the parent component for error messages - * @param autojoinLists the autojoin lists * @throws InvalidNameException if <code>name</code> is not valid */ - public Pickmap(@NotNull final Folder<G, A, R, V> folder, @NotNull final String name, @NotNull final GridartaObjectsFactory<G, A, R, V> gridartaObjectsFactory, @NotNull final Component parent, @NotNull final AutojoinLists<G, A, R> autojoinLists) throws InvalidNameException { - this.autojoinLists = autojoinLists; + public Pickmap(@NotNull final Folder<G, A, R, V> folder, @NotNull final String name, @NotNull final GridartaObjectsFactory<G, A, R, V> gridartaObjectsFactory, @NotNull final Component parent) throws InvalidNameException { if (!isValidPickmapName(name)) { throw new InvalidNameException(name); } @@ -160,7 +151,7 @@ decoder.close(); } - pickmap = gridartaObjectsFactory.newPickmapControl(decoder.getGameObjects(), decoder.getMapArchObject(), parent, autojoinLists, file); + pickmap = gridartaObjectsFactory.newPickmapControl(decoder.getGameObjects(), decoder.getMapArchObject(), parent, file); pickmapView = pickmap.createView(null); } Modified: trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java 2008-08-20 00:29:26 UTC (rev 4910) +++ trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java 2008-08-20 00:53:22 UTC (rev 4911) @@ -31,7 +31,6 @@ import javax.swing.JOptionPane; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import net.sf.gridarta.AutojoinLists; import net.sf.gridarta.GridartaObjectsFactory; import net.sf.gridarta.MainControl; import net.sf.gridarta.MapManager; @@ -78,12 +77,6 @@ private final MapManager<G, A, R, V> mapManager; /** - * The autojoin lists. - */ - @NotNull - private final AutojoinLists<G, A, R> autojoinLists; - - /** * The gridarta objects factory instance. */ @NotNull @@ -187,12 +180,10 @@ * @param gridartaObjectsFactory the gridarta objects factory instance * @param pickmapDir the pickmaps directory * @param mapManager the map manager instance - * @param autojoinLists the autojoin lists */ - public PickmapChooserControl(@NotNull final NewMapDialogFactory<G, A, R, V> newMapDialogFactory, @NotNull final MainControl<G, A, R, V> mainControl, @NotNull final GridartaObjectsFactory<G, A, R, V> gridartaObjectsFactory, @NotNull final File pickmapDir, @NotNull final MapManager<G, A, R, V> mapManager, @NotNull final AutojoinLists<G, A, R> autojoinLists) { + public PickmapChooserControl(@NotNull final NewMapDialogFactory<G, A, R, V> newMapDialogFactory, @NotNull final MainControl<G, A, R, V> mainControl, @NotNull final GridartaObjectsFactory<G, A, R, V> gridartaObjectsFactory, @NotNull final File pickmapDir, @NotNull final MapManager<G, A, R, V> mapManager) { this.mainControl = mainControl; this.mapManager = mapManager; - this.autojoinLists = autojoinLists; this.gridartaObjectsFactory = gridartaObjectsFactory; pickmapChooserModel = new PickmapChooserModel<G, A, R, V>(pickmapDir); folderListActions = new FolderListActions<G, A, R, V>(pickmapChooserModel, newMapDialogFactory); @@ -228,7 +219,7 @@ * Load all pickmaps and build the pickmap-panel. */ public void loadPickmaps() { - new Loader<G, A, R, V>(pickmapChooserModel, gridartaObjectsFactory, mainControl.getMainView(), autojoinLists).load(); + new Loader<G, A, R, V>(pickmapChooserModel, gridartaObjectsFactory, mainControl.getMainView()).load(); } /** @@ -269,12 +260,12 @@ } } - final MapControl<G, A, R, V> mapControl = gridartaObjectsFactory.newPickmapControl(null, mapArchObject, mainControl.getMainView(), autojoinLists, mapFile); + final MapControl<G, A, R, V> mapControl = gridartaObjectsFactory.newPickmapControl(null, mapArchObject, mainControl.getMainView(), mapFile); mapControl.save(); final Pickmap<G, A, R, V> pickmap; try { - pickmap = activeFolder.addPickmap(pickmapName, gridartaObjectsFactory, mainControl.getMainView(), autojoinLists); + pickmap = activeFolder.addPickmap(pickmapName, gridartaObjectsFactory, mainControl.getMainView()); } catch (final InvalidNameException ex) { throw new AssertionError(); // the name has been checked before } Modified: trunk/src/test/net/sf/gridarta/map/DefaultMapModelTest.java =================================================================== --- trunk/src/test/net/sf/gridarta/map/DefaultMapModelTest.java 2008-08-20 00:29:26 UTC (rev 4910) +++ trunk/src/test/net/sf/gridarta/map/DefaultMapModelTest.java 2008-08-20 00:53:22 UTC (rev 4911) @@ -400,7 +400,7 @@ final TestArchetypeSet archetypeSet = new TestArchetypeSet(gridartaObjectsFactory); final ArchetypeChooserModel<TestGameObject, TestMapArchObject, TestArchetype, TestMapViewBasic> archetypeChooserModel = new ArchetypeChooserModel<TestGameObject, TestMapArchObject, TestArchetype, TestMapViewBasic>(archetypeSet); final AutojoinLists<TestGameObject, TestMapArchObject, TestArchetype> autojoinLists = new AutojoinLists<TestGameObject, TestMapArchObject, TestArchetype>(); - final MapManager<TestGameObject, TestMapArchObject, TestArchetype, TestMapViewBasic> mapManager = new DefaultMapManager<TestGameObject, TestMapArchObject, TestArchetype, TestMapViewBasic>(mainControl, "test", gridartaObjectsFactory, globalSettings, autojoinLists); + final MapManager<TestGameObject, TestMapArchObject, TestArchetype, TestMapViewBasic> mapManager = new DefaultMapManager<TestGameObject, TestMapArchObject, TestArchetype, TestMapViewBasic>(mainControl, "test", gridartaObjectsFactory, globalSettings); final MapImageCache<TestGameObject, TestMapArchObject, TestArchetype, TestMapViewBasic> mapImageCache = new MapImageCache<TestGameObject, TestMapArchObject, TestArchetype, TestMapViewBasic>(null, mapManager, null, new ImageIcon(), new ImageIcon()); final MapActions mapActions = new TestMapActions(); final TestMapControl mapControl = new TestMapControl(gridartaObjectsFactory, autojoinLists, mapImageCache, null, mapArchObject, false, null, archetypeChooserModel, mapActions); @@ -875,13 +875,13 @@ /** {@inheritDoc} */ @NotNull - public MapControl<TestGameObject, TestMapArchObject, TestArchetype, TestMapViewBasic> newMapControl(@Nullable final List<TestGameObject> objects, @NotNull final TestMapArchObject mapArchObject, @NotNull final Component parent, @NotNull final AutojoinLists<TestGameObject, TestMapArchObject, TestArchetype> autojoinLists, @NotNull final String mapName, @Nullable final File file) { + public MapControl<TestGameObject, TestMapArchObject, TestArchetype, TestMapViewBasic> newMapControl(@Nullable final List<TestGameObject> objects, @NotNull final TestMapArchObject mapArchObject, @NotNull final Component parent, @NotNull final String mapName, @Nullable final File file) { throw new AssertionError(); } /** {@inheritDoc} */ @NotNull - public MapControl<TestGameObject, TestMapArchObject, TestArchetype, TestMapViewBasic> newPickmapControl(@Nullable final List<TestGameObject> objects, @NotNull final TestMapArchObject mapArchObject, @NotNull final Component parent, @NotNull final AutojoinLists<TestGameObject, TestMapArchObject, TestArchetype> autojoinLists, @NotNull final File file) { + public MapControl<TestGameObject, TestMapArchObject, TestArchetype, TestMapViewBasic> newPickmapControl(@Nullable final List<TestGameObject> objects, @NotNull final TestMapArchObject mapArchObject, @NotNull final Component parent, @NotNull final File file) { throw new AssertionError(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |