From: <aki...@us...> - 2008-08-02 08:38:42
|
Revision: 4709 http://gridarta.svn.sourceforge.net/gridarta/?rev=4709&view=rev Author: akirschbaum Date: 2008-08-02 08:38:48 +0000 (Sat, 02 Aug 2008) Log Message: ----------- Remove calls to MainControl.getObjectChooser(). Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java trunk/daimonin/src/daieditor/CMainControl.java trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java trunk/src/app/net/sf/gridarta/gui/GameObjectAttributesPanel.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2008-08-02 08:34:42 UTC (rev 4708) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2008-08-02 08:38:48 UTC (rev 4709) @@ -318,7 +318,7 @@ // Initialize the main view 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, mainView); + gameObjectAttributesPanel = new GameObjectAttributesPanel(this, objectChooser, archetypeTypeSet, mapManager, animationObjects, lockedItemsControl, monsterMatcher, selectedSquareControl, selectedSquareView, mainView); PluginParameterFactory.init(archetypeSet, gameObjectAttributesPanel, objectChooser, mapManager); final NamedFilterList defaultNamedFilterList = new NamedFilterList(gameObjectMatchers.getFilters()); final CFilterControl filterControl = new CFilterControl(null, mapManager, defaultNamedFilterList); Modified: trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java 2008-08-02 08:34:42 UTC (rev 4708) +++ trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java 2008-08-02 08:38:48 UTC (rev 4709) @@ -29,6 +29,7 @@ import net.sf.gridarta.archtype.ArchetypeTypeSet; import net.sf.gridarta.gameobject.anim.AnimationObjects; import net.sf.gridarta.gameobject.match.GameObjectMatcher; +import net.sf.gridarta.gui.ObjectChooser; import net.sf.gridarta.gui.connectionview.LockedItemsControl; import net.sf.gridarta.gui.selectedsquare.SelectedSquareControl; import net.sf.gridarta.gui.selectedsquare.SelectedSquareView; @@ -47,8 +48,8 @@ private static final long serialVersionUID = 1L; /* Build Panel */ - public GameObjectAttributesPanel(final MainControl<GameObject, MapArchObject, Archetype, CMapViewBasic> mainControl, @NotNull final ArchetypeTypeSet<GameObject, MapArchObject, Archetype> archetypeTypeSet, final MapManager<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManager, @NotNull final AnimationObjects<?> animationObjects, final LockedItemsControl<GameObject, MapArchObject, Archetype, CMapViewBasic> lockedItemsControl, @NotNull final GameObjectMatcher monsterMatcher, @NotNull final SelectedSquareControl<GameObject, MapArchObject, Archetype, CMapViewBasic> selectedSquareControl, @NotNull final SelectedSquareView<GameObject, MapArchObject, Archetype, CMapViewBasic> selectedSquareView, @NotNull final Frame parent) { - super(mainControl, archetypeTypeSet, mapManager, animationObjects, lockedItemsControl, monsterMatcher, selectedSquareControl, selectedSquareView, parent); + public GameObjectAttributesPanel(@NotNull final MainControl<GameObject, MapArchObject, Archetype, CMapViewBasic> mainControl, @NotNull final ObjectChooser<GameObject, MapArchObject, Archetype> objectChooser, @NotNull final ArchetypeTypeSet<GameObject, MapArchObject, Archetype> archetypeTypeSet, final MapManager<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManager, @NotNull final AnimationObjects<?> animationObjects, final LockedItemsControl<GameObject, MapArchObject, Archetype, CMapViewBasic> lockedItemsControl, @NotNull final GameObjectMatcher monsterMatcher, @NotNull final SelectedSquareControl<GameObject, MapArchObject, Archetype, CMapViewBasic> selectedSquareControl, @NotNull final SelectedSquareView<GameObject, MapArchObject, Archetype, CMapViewBasic> selectedSquareView, @NotNull final Frame parent) { + super(mainControl, objectChooser, archetypeTypeSet, mapManager, animationObjects, lockedItemsControl, monsterMatcher, selectedSquareControl, selectedSquareView, parent); } /** {@inheritDoc} */ Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2008-08-02 08:34:42 UTC (rev 4708) +++ trunk/daimonin/src/daieditor/CMainControl.java 2008-08-02 08:38:48 UTC (rev 4709) @@ -384,7 +384,7 @@ // Initialize the main view 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); + gameObjectAttributesPanel = new GameObjectAttributesPanel(this, objectChooser, archetypeTypeSet, mapManager, animationObjects, lockedItemsControl, monsterMatcher, selectedSquareControl, selectedSquareView, mainView); mainView.init(gameObjectAttributesPanel, selectedSquareView, archetypeTypeSet, mapTileListBottom, gameObjectMatchers, archetypeChooserControl, objectChooser); mapActions.updateMenuState(); final ArchetypeParser archetypeParser = new ArchetypeParser(archetypeChooserControl, animationObjects, archetypeSet); Modified: trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java =================================================================== --- trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java 2008-08-02 08:34:42 UTC (rev 4708) +++ trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java 2008-08-02 08:38:48 UTC (rev 4709) @@ -29,6 +29,7 @@ import net.sf.gridarta.archtype.ArchetypeTypeSet; import net.sf.gridarta.gameobject.anim.AnimationObjects; import net.sf.gridarta.gameobject.match.GameObjectMatcher; +import net.sf.gridarta.gui.ObjectChooser; import net.sf.gridarta.gui.connectionview.LockedItemsControl; import net.sf.gridarta.gui.selectedsquare.SelectedSquareControl; import net.sf.gridarta.gui.selectedsquare.SelectedSquareView; @@ -47,8 +48,8 @@ private static final long serialVersionUID = 1L; /* Build Panel */ - public GameObjectAttributesPanel(final MainControl<GameObject, MapArchObject, Archetype, CMapViewBasic> mainControl, @NotNull final ArchetypeTypeSet<GameObject, MapArchObject, Archetype> archetypeTypeSet, final MapManager<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManager, @NotNull final AnimationObjects<?> animationObjects, final LockedItemsControl<GameObject, MapArchObject, Archetype, CMapViewBasic> lockedItemsControl, @NotNull final GameObjectMatcher monsterMatcher, @NotNull final SelectedSquareControl<GameObject, MapArchObject, Archetype, CMapViewBasic> selectedSquareControl, @NotNull final SelectedSquareView<GameObject, MapArchObject, Archetype, CMapViewBasic> selectedSquareView, @NotNull final Frame parent) { - super(mainControl, archetypeTypeSet, mapManager, animationObjects, lockedItemsControl, monsterMatcher, selectedSquareControl, selectedSquareView, parent); + public GameObjectAttributesPanel(@NotNull final MainControl<GameObject, MapArchObject, Archetype, CMapViewBasic> mainControl, @NotNull final ObjectChooser<GameObject, MapArchObject, Archetype> objectChooser, @NotNull final ArchetypeTypeSet<GameObject, MapArchObject, Archetype> archetypeTypeSet, final MapManager<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManager, @NotNull final AnimationObjects<?> animationObjects, final LockedItemsControl<GameObject, MapArchObject, Archetype, CMapViewBasic> lockedItemsControl, @NotNull final GameObjectMatcher monsterMatcher, @NotNull final SelectedSquareControl<GameObject, MapArchObject, Archetype, CMapViewBasic> selectedSquareControl, @NotNull final SelectedSquareView<GameObject, MapArchObject, Archetype, CMapViewBasic> selectedSquareView, @NotNull final Frame parent) { + super(mainControl, objectChooser, archetypeTypeSet, mapManager, animationObjects, lockedItemsControl, monsterMatcher, selectedSquareControl, selectedSquareView, parent); } /** {@inheritDoc} */ Modified: trunk/src/app/net/sf/gridarta/gui/GameObjectAttributesPanel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/GameObjectAttributesPanel.java 2008-08-02 08:34:42 UTC (rev 4708) +++ trunk/src/app/net/sf/gridarta/gui/GameObjectAttributesPanel.java 2008-08-02 08:38:48 UTC (rev 4709) @@ -111,6 +111,12 @@ /** The MainControl to use, e.g. for accessing AnimationObjects. */ private final MainControl<G, A, R, V> mainControl; + /** + * The object chooser instance. + */ + @NotNull + private final ObjectChooser<G, A, R> objectChooser; + /** The archetype type set. */ @NotNull private final ArchetypeTypeSet<G, A, R> archetypeTypeSet; @@ -284,14 +290,16 @@ * Create the GameObjectAttributesPanel. * @param mainControl MainControl to use, e.g. for accessing * AnimationObjects. + * @param objectChooser the object chooser instance * @param archetypeTypeSet the archetype type set * @param monsterMatcher the <code>GameObjectMatcher</code> for matching * monster objects * @param parent the parent frame for dialog boxes */ - protected GameObjectAttributesPanel(@NotNull final MainControl<G, A, R, V> mainControl, @NotNull final ArchetypeTypeSet<G, A, R> archetypeTypeSet, @NotNull final MapManager<G, A, R, V> mapManager, @NotNull final AnimationObjects<?> animationObjects, final LockedItemsControl<G, A, R, V> lockedItemsControl, @NotNull final GameObjectMatcher monsterMatcher, @NotNull final SelectedSquareControl<G, A, R, V> selectedSquareControl, @NotNull final SelectedSquareView<G, A, R, V> selectedSquareView, @NotNull final Frame parent) { + protected GameObjectAttributesPanel(@NotNull final MainControl<G, A, R, V> mainControl, @NotNull final ObjectChooser<G, A, R> objectChooser, @NotNull final ArchetypeTypeSet<G, A, R> archetypeTypeSet, @NotNull final MapManager<G, A, R, V> mapManager, @NotNull final AnimationObjects<?> animationObjects, final LockedItemsControl<G, A, R, V> lockedItemsControl, @NotNull final GameObjectMatcher monsterMatcher, @NotNull final SelectedSquareControl<G, A, R, V> selectedSquareControl, @NotNull final SelectedSquareView<G, A, R, V> selectedSquareView, @NotNull final Frame parent) { super(new BorderLayout()); this.mainControl = mainControl; + this.objectChooser = objectChooser; this.archetypeTypeSet = archetypeTypeSet; this.mapManager = mapManager; this.animationObjects = animationObjects; @@ -674,7 +682,7 @@ */ @ActionMethod public void mapArchAddInv() { - final G arch = mainControl.getObjectChooser().getObjectChooserHighlight(); + final G arch = objectChooser.getObjectChooserHighlight(); if (arch == null) { // nothing selected? return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |