From: <aki...@us...> - 2008-07-08 20:52:45
|
Revision: 4256 http://gridarta.svn.sourceforge.net/gridarta/?rev=4256&view=rev Author: akirschbaum Date: 2008-07-08 13:50:51 -0700 (Tue, 08 Jul 2008) Log Message: ----------- Remove call to MainControl.getAnimationObjects(). 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-07-08 18:47:32 UTC (rev 4255) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2008-07-08 20:50:51 UTC (rev 4256) @@ -293,7 +293,7 @@ throw new MissingResourceException("GameObjectMatcher 'monster' does not exist", null, null); } 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); - final GameObjectAttributesPanel gameObjectAttributesPanel = new GameObjectAttributesPanel(this, getMapManager(), lockedItemsControl, monsterMatcher); + final GameObjectAttributesPanel gameObjectAttributesPanel = new GameObjectAttributesPanel(this, getMapManager(), animationObjects, lockedItemsControl, monsterMatcher); mainView.init(gameObjectAttributesPanel, selectedSquareControl.getSelectedSquareView(), typeList, mapTileListBottom, gameObjectMatchers); mapActions.updateMenuState(); scriptControl.getView().setMenu((JMenu) ACTION_FACTORY.find(mainView.getJMenuBar(), "plugins")); Modified: trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java 2008-07-08 18:47:32 UTC (rev 4255) +++ trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java 2008-07-08 20:50:51 UTC (rev 4256) @@ -25,6 +25,7 @@ import cfeditor.map.MapArchObject; import net.sf.gridarta.MainControl; import net.sf.gridarta.MapManager; +import net.sf.gridarta.gameobject.anim.AnimationObjects; import net.sf.gridarta.gameobject.match.GameObjectMatcher; import net.sf.gridarta.gui.connectionview.LockedItemsControl; import org.jetbrains.annotations.NotNull; @@ -42,8 +43,8 @@ private static final long serialVersionUID = 1L; /* Build Panel */ - public GameObjectAttributesPanel(final MainControl<GameObject, MapArchObject, Archetype, CMapViewBasic> mainControl, final MapManager<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManager, final LockedItemsControl<GameObject, MapArchObject, Archetype, CMapViewBasic> lockedItemsControl, @NotNull final GameObjectMatcher monsterMatcher) { - super(mainControl, mapManager, lockedItemsControl, monsterMatcher); + public GameObjectAttributesPanel(final MainControl<GameObject, MapArchObject, Archetype, CMapViewBasic> mainControl, final MapManager<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManager, @NotNull final AnimationObjects<?> animationObjects, final LockedItemsControl<GameObject, MapArchObject, Archetype, CMapViewBasic> lockedItemsControl, @NotNull final GameObjectMatcher monsterMatcher) { + super(mainControl, mapManager, animationObjects, lockedItemsControl, monsterMatcher); } /** {@inheritDoc} */ Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2008-07-08 18:47:32 UTC (rev 4255) +++ trunk/daimonin/src/daieditor/CMainControl.java 2008-07-08 20:50:51 UTC (rev 4256) @@ -49,7 +49,6 @@ import java.util.Map; import java.util.MissingResourceException; import java.util.prefs.Preferences; -import javax.swing.Action; import javax.swing.JFileChooser; import javax.swing.JMenu; import javax.swing.JOptionPane; @@ -349,7 +348,7 @@ throw new MissingResourceException("GameObjectMatcher 'monster' does not exist", null, null); } 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); - final GameObjectAttributesPanel gameObjectAttributesPanel = new GameObjectAttributesPanel(this, getMapManager(), lockedItemsControl, monsterMatcher); + final GameObjectAttributesPanel gameObjectAttributesPanel = new GameObjectAttributesPanel(this, getMapManager(), animationObjects, lockedItemsControl, monsterMatcher); mainView.init(gameObjectAttributesPanel, selectedSquareControl.getSelectedSquareView(), typeList, mapTileListBottom, gameObjectMatchers); mapActions.updateMenuState(); archetypeParser = new ArchetypeParser(this, objectChooser.getArchetypeChooserControl(), animationObjects); Modified: trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java =================================================================== --- trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java 2008-07-08 18:47:32 UTC (rev 4255) +++ trunk/daimonin/src/daieditor/gui/GameObjectAttributesPanel.java 2008-07-08 20:50:51 UTC (rev 4256) @@ -25,6 +25,7 @@ import daieditor.map.MapArchObject; import net.sf.gridarta.MainControl; import net.sf.gridarta.MapManager; +import net.sf.gridarta.gameobject.anim.AnimationObjects; import net.sf.gridarta.gameobject.match.GameObjectMatcher; import net.sf.gridarta.gui.connectionview.LockedItemsControl; import org.jetbrains.annotations.NotNull; @@ -42,8 +43,8 @@ private static final long serialVersionUID = 1L; /* Build Panel */ - public GameObjectAttributesPanel(final MainControl<GameObject, MapArchObject, Archetype, CMapViewBasic> mainControl, final MapManager<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManager, final LockedItemsControl<GameObject, MapArchObject, Archetype, CMapViewBasic> lockedItemsControl, @NotNull final GameObjectMatcher monsterMatcher) { - super(mainControl, mapManager, lockedItemsControl, monsterMatcher); + public GameObjectAttributesPanel(final MainControl<GameObject, MapArchObject, Archetype, CMapViewBasic> mainControl, final MapManager<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManager, @NotNull final AnimationObjects<?> animationObjects, final LockedItemsControl<GameObject, MapArchObject, Archetype, CMapViewBasic> lockedItemsControl, @NotNull final GameObjectMatcher monsterMatcher) { + super(mainControl, mapManager, animationObjects, lockedItemsControl, monsterMatcher); } /** {@inheritDoc} */ Modified: trunk/src/app/net/sf/gridarta/gui/GameObjectAttributesPanel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/GameObjectAttributesPanel.java 2008-07-08 18:47:32 UTC (rev 4255) +++ trunk/src/app/net/sf/gridarta/gui/GameObjectAttributesPanel.java 2008-07-08 20:50:51 UTC (rev 4256) @@ -50,6 +50,7 @@ import net.sf.gridarta.MapManagerListener; import net.sf.gridarta.gameobject.Archetype; import net.sf.gridarta.gameobject.GameObject; +import net.sf.gridarta.gameobject.anim.AnimationObjects; import net.sf.gridarta.gameobject.match.GameObjectMatcher; import net.sf.gridarta.gui.connectionview.ConnectionControl; import net.sf.gridarta.gui.connectionview.LockedItemsControl; @@ -109,6 +110,10 @@ /** The map manager. */ private final MapManager<G, A, R, V> mapManager; + /** The animtation objects instance to use. */ + @NotNull + private final AnimationObjects<?> animationObjects; + /** The tabs of this GameObjectAttributesPanel. */ protected final JTabbedPane panelDesktop = new JTabbedPane(SwingConstants.TOP); @@ -264,10 +269,11 @@ * @param monsterMatcher the <code>GameObjectMatcher</code> for matching * monster objects */ - protected GameObjectAttributesPanel(@NotNull final MainControl<G, A, R, V> mainControl, @NotNull final MapManager<G, A, R, V> mapManager, final LockedItemsControl<G, A, R, V> lockedItemsControl, @NotNull final GameObjectMatcher monsterMatcher) { + protected GameObjectAttributesPanel(@NotNull final MainControl<G, A, R, V> mainControl, @NotNull final MapManager<G, A, R, V> mapManager, @NotNull final AnimationObjects<?> animationObjects, final LockedItemsControl<G, A, R, V> lockedItemsControl, @NotNull final GameObjectMatcher monsterMatcher) { super(new BorderLayout()); this.mainControl = mainControl; this.mapManager = mapManager; + this.animationObjects = animationObjects; errorListView = new ErrorListView<G, A, R, V>(mapManager, mainControl.getSelectedSquareControl().getSelectedSquareView()); gameObjectTextEditor = new GameObjectTextEditor(); @@ -380,7 +386,7 @@ } if (animName != null) { final StringBuilder animText = new StringBuilder(animName); - if (!mainControl.getAnimationObjects().containsKey(animName)) { + if (!animationObjects.containsKey(animName)) { panelDesktop.setForegroundAt(3, Color.red); animText.append(" (** unknown animation **)"); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |