From: <aki...@us...> - 2008-07-26 06:53:48
|
Revision: 4462 http://gridarta.svn.sourceforge.net/gridarta/?rev=4462&view=rev Author: akirschbaum Date: 2008-07-26 06:53:55 +0000 (Sat, 26 Jul 2008) Log Message: ----------- Preparations for unification. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java trunk/crossfire/src/cfeditor/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java trunk/daimonin/src/daieditor/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java trunk/daimonin/src/daieditor/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/AbstractGameObjectAttributesDialog.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/AbstractGameObjectAttributesDialogFactory.java Modified: trunk/crossfire/src/cfeditor/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java 2008-07-26 06:34:11 UTC (rev 4461) +++ trunk/crossfire/src/cfeditor/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java 2008-07-26 06:53:55 UTC (rev 4462) @@ -79,7 +79,7 @@ * @param faceObjects the FaceObjects instance to use * @param mapFileFilter the Swing file filter to use */ - public GameObjectAttributesDialog(@NotNull final AbstractGameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype> gameObjectAttributesDialogFactory, final CFArchTypeList archTypeList, @NotNull final GameObject gameObject, final MainControl<GameObject, MapArchObject, Archetype, CMapViewBasic> mainControl, @NotNull final AnimationObjects<?> animationObjects, final MapManager<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManager, @NotNull final CFTreasureListTree<GameObject, MapArchObject, Archetype> treasureListTree, @NotNull final FaceObjects faceObjects, final FileFilter mapFileFilter) { + public GameObjectAttributesDialog(@NotNull final AbstractGameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic> gameObjectAttributesDialogFactory, final CFArchTypeList archTypeList, @NotNull final GameObject gameObject, final MainControl<GameObject, MapArchObject, Archetype, CMapViewBasic> mainControl, @NotNull final AnimationObjects<?> animationObjects, final MapManager<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManager, @NotNull final CFTreasureListTree<GameObject, MapArchObject, Archetype> treasureListTree, @NotNull final FaceObjects faceObjects, final FileFilter mapFileFilter) { super(gameObjectAttributesDialogFactory, archTypeList, gameObject, mainControl, animationObjects, treasureListTree, faceObjects, mapFileFilter); this.mapManager = mapManager; } Modified: trunk/crossfire/src/cfeditor/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java 2008-07-26 06:34:11 UTC (rev 4461) +++ trunk/crossfire/src/cfeditor/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java 2008-07-26 06:53:55 UTC (rev 4462) @@ -16,7 +16,7 @@ import net.sf.japi.swing.ActionFactory; import org.jetbrains.annotations.NotNull; -public class GameObjectAttributesDialogFactory extends AbstractGameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype> { +public class GameObjectAttributesDialogFactory extends AbstractGameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic> { /** Action Factory. */ private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("cfeditor"); @@ -89,7 +89,7 @@ if (dialogs.containsKey(gameObject)) { dialogs.get(gameObject).toFront(); } else { - final GameObjectAttributesDialog pane = new GameObjectAttributesDialog(this, archTypeList, gameObject, mainControl, animationObjects, mapManager, treasureListTree, faceObjects, mapFileFilter); + final GameObjectAttributesDialog pane = newGameObjectAttributesDialog(archTypeList, gameObject, mainControl, animationObjects, mapManager, treasureListTree, faceObjects, mapFileFilter); final JDialog dialog = pane.createDialog(mainControl.getMainView(), ACTION_FACTORY.getString("attribTitle")); dialog.getRootPane().setDefaultButton(pane.okButton); dialog.setResizable(true); @@ -99,4 +99,11 @@ } } } + + /** {@inheritDoc} */ + @Override + protected GameObjectAttributesDialog newGameObjectAttributesDialog(@NotNull final CFArchTypeList archTypeList, @NotNull final GameObject gameObject, @NotNull final MainControl<GameObject, MapArchObject, Archetype, CMapViewBasic> mainControl, @NotNull final AnimationObjects<?> animationObjects, @NotNull final MapManager<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManager, @NotNull final CFTreasureListTree<GameObject, MapArchObject, Archetype> treasureListTree, @NotNull final FaceObjects faceObjects, @NotNull final FileFilter mapFileFilter) { + return new GameObjectAttributesDialog(this, archTypeList, gameObject, mainControl, animationObjects, mapManager, treasureListTree, faceObjects, mapFileFilter); + } + } Modified: trunk/daimonin/src/daieditor/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java =================================================================== --- trunk/daimonin/src/daieditor/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java 2008-07-26 06:34:11 UTC (rev 4461) +++ trunk/daimonin/src/daieditor/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java 2008-07-26 06:53:55 UTC (rev 4462) @@ -78,7 +78,7 @@ * @param faceObjects the FaceObjects instance to use * @param mapFileFilter the Swing file filter to use */ - public GameObjectAttributesDialog(@NotNull final AbstractGameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype> gameObjectAttributesDialogFactory, final CFArchTypeList archTypeList, @NotNull final GameObject gameObject, final MainControl<GameObject, MapArchObject, Archetype, CMapViewBasic> mainControl, @NotNull final AnimationObjects<?> animationObjects, final MapManager<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManager, @NotNull final CFTreasureListTree<GameObject, MapArchObject, Archetype> treasureListTree, @NotNull final FaceObjects faceObjects, final FileFilter mapFileFilter) { + public GameObjectAttributesDialog(@NotNull final AbstractGameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic> gameObjectAttributesDialogFactory, final CFArchTypeList archTypeList, @NotNull final GameObject gameObject, final MainControl<GameObject, MapArchObject, Archetype, CMapViewBasic> mainControl, @NotNull final AnimationObjects<?> animationObjects, final MapManager<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManager, @NotNull final CFTreasureListTree<GameObject, MapArchObject, Archetype> treasureListTree, @NotNull final FaceObjects faceObjects, final FileFilter mapFileFilter) { super(gameObjectAttributesDialogFactory, archTypeList, gameObject, mainControl, animationObjects, treasureListTree, faceObjects, mapFileFilter); this.mapManager = mapManager; } Modified: trunk/daimonin/src/daieditor/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java =================================================================== --- trunk/daimonin/src/daieditor/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java 2008-07-26 06:34:11 UTC (rev 4461) +++ trunk/daimonin/src/daieditor/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java 2008-07-26 06:53:55 UTC (rev 4462) @@ -18,7 +18,7 @@ import net.sf.japi.swing.ActionFactory; import org.jetbrains.annotations.NotNull; -public class GameObjectAttributesDialogFactory extends AbstractGameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype> { +public class GameObjectAttributesDialogFactory extends AbstractGameObjectAttributesDialogFactory<GameObject, MapArchObject, Archetype, CMapViewBasic> { /** Action Factory. */ private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("daieditor"); @@ -91,7 +91,7 @@ if (dialogs.containsKey(gameObject)) { dialogs.get(gameObject).toFront(); } else { - final GameObjectAttributesDialog pane = new GameObjectAttributesDialog(this, archTypeList, gameObject, mainControl, animationObjects, mapManager, treasureListTree, faceObjects, mapFileFilter); + final GameObjectAttributesDialog pane = newGameObjectAttributesDialog(archTypeList, gameObject, mainControl, animationObjects, mapManager, treasureListTree, faceObjects, mapFileFilter); final JDialog dialog = pane.createDialog(mainControl.getMainView(), ACTION_FACTORY.getString("attribTitle")); dialog.getRootPane().setDefaultButton(pane.okButton); dialog.setResizable(true); @@ -101,4 +101,10 @@ } } } + + /** {@inheritDoc} */ + @Override + protected GameObjectAttributesDialog newGameObjectAttributesDialog(@NotNull final CFArchTypeList archTypeList, @NotNull final GameObject gameObject, @NotNull final MainControl<GameObject, MapArchObject, Archetype, CMapViewBasic> mainControl, @NotNull final AnimationObjects<?> animationObjects, @NotNull final MapManager<GameObject, MapArchObject, Archetype, CMapViewBasic> mapManager, @NotNull final CFTreasureListTree<GameObject, MapArchObject, Archetype> treasureListTree, @NotNull final FaceObjects faceObjects, @NotNull final FileFilter mapFileFilter) { + return new GameObjectAttributesDialog(this, archTypeList, gameObject, mainControl, animationObjects, mapManager, treasureListTree, faceObjects, mapFileFilter); + } } Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/AbstractGameObjectAttributesDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/AbstractGameObjectAttributesDialog.java 2008-07-26 06:34:11 UTC (rev 4461) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/AbstractGameObjectAttributesDialog.java 2008-07-26 06:53:55 UTC (rev 4462) @@ -117,7 +117,7 @@ * The associated factory. */ @NotNull - private final AbstractGameObjectAttributesDialogFactory<G, A, R> gameObjectAttributesDialogFactory; + private final AbstractGameObjectAttributesDialogFactory<G, A, R, ?> gameObjectAttributesDialogFactory; /** Reference to the list of CFArchTypes. */ protected final CFArchTypeList archTypeList; @@ -196,7 +196,7 @@ * @param faceObjects the face objects instance to use * @param mapFileFilter the Swing FileFilter for map files */ - protected AbstractGameObjectAttributesDialog(@NotNull final AbstractGameObjectAttributesDialogFactory<G, A, R> gameObjectAttributesDialogFactory, final CFArchTypeList archTypeList, @NotNull final G gameObject, @NotNull final MainControl<G, A, R, ?> mainControl, @NotNull final AnimationObjects<?> animationObjects, @NotNull final CFTreasureListTree<G, A, R> treasureListTree, @NotNull final FaceObjects faceObjects, @NotNull final FileFilter mapFileFilter) { + protected AbstractGameObjectAttributesDialog(@NotNull final AbstractGameObjectAttributesDialogFactory<G, A, R, ?> gameObjectAttributesDialogFactory, final CFArchTypeList archTypeList, @NotNull final G gameObject, @NotNull final MainControl<G, A, R, ?> mainControl, @NotNull final AnimationObjects<?> animationObjects, @NotNull final CFTreasureListTree<G, A, R> treasureListTree, @NotNull final FaceObjects faceObjects, @NotNull final FileFilter mapFileFilter) { this.gameObjectAttributesDialogFactory = gameObjectAttributesDialogFactory; this.archTypeList = archTypeList; this.gameObject = gameObject.getHead(); Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/AbstractGameObjectAttributesDialogFactory.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/AbstractGameObjectAttributesDialogFactory.java 2008-07-26 06:34:11 UTC (rev 4461) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/AbstractGameObjectAttributesDialogFactory.java 2008-07-26 06:53:55 UTC (rev 4462) @@ -3,12 +3,20 @@ import java.util.HashMap; import java.util.Map; import javax.swing.JDialog; +import javax.swing.filechooser.FileFilter; +import net.sf.gridarta.CFArchTypeList; +import net.sf.gridarta.MainControl; +import net.sf.gridarta.MapManager; import net.sf.gridarta.gameobject.Archetype; import net.sf.gridarta.gameobject.GameObject; +import net.sf.gridarta.gameobject.anim.AnimationObjects; +import net.sf.gridarta.gameobject.face.FaceObjects; +import net.sf.gridarta.gui.map.MapViewBasic; import net.sf.gridarta.map.MapArchObject; +import net.sf.gridarta.treasurelist.CFTreasureListTree; import org.jetbrains.annotations.NotNull; -public abstract class AbstractGameObjectAttributesDialogFactory<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> { +public abstract class AbstractGameObjectAttributesDialogFactory<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>, V extends MapViewBasic<G, A, R, V>> { /** * The gameObject objects that already are shown, to avoid opening a dialog @@ -35,4 +43,17 @@ } } + /** + * Creates a new game object attributes dialog instance. + * @param archTypeList the list of CF type-data + * @param gameObject the GameObject to be displayed by this dialog + * @param mainControl main control + * @param animationObjects the animation objects instance to use + * @param mapManager the map manager + * @param treasureListTree the treasure list tree + * @param faceObjects the FaceObjects instance to use + * @param mapFileFilter the Swing file filter to use + */ + protected abstract AbstractGameObjectAttributesDialog<G, A, R> newGameObjectAttributesDialog(@NotNull final CFArchTypeList archTypeList, @NotNull final G gameObject, @NotNull final MainControl<G, A, R, V> mainControl, @NotNull final AnimationObjects<?> animationObjects, @NotNull final MapManager<G, A, R, V> mapManager, @NotNull final CFTreasureListTree<G, A, R> treasureListTree, @NotNull final FaceObjects faceObjects, @NotNull final FileFilter mapFileFilter); + } // class AbstractGameObjectAttributesDialogFactory This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |