From: <aki...@us...> - 2008-08-03 23:24:39
|
Revision: 4751 http://gridarta.svn.sourceforge.net/gridarta/?rev=4751&view=rev Author: akirschbaum Date: 2008-08-03 23:24:47 +0000 (Sun, 03 Aug 2008) Log Message: ----------- Use weaker types. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/daimonin/src/daieditor/CMainControl.java trunk/src/app/net/sf/gridarta/gui/LeftPanel.java trunk/src/app/net/sf/gridarta/gui/MainView.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2008-08-03 23:19:03 UTC (rev 4750) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2008-08-03 23:24:47 UTC (rev 4751) @@ -331,7 +331,7 @@ scriptControl = new ScriptController(this, filterControl, archetypeSet, mainView); final ObjectChoiceDisplay<GameObject, MapArchObject, Archetype, CMapViewBasic> objectChoiceDisplay = new ObjectChoiceDisplay<GameObject, MapArchObject, Archetype, CMapViewBasic>(replaceDialogManager, archetypeTypeSet, objectChooser, archetypeChooserControl.getArchetypeChooserModel(), pickmapChooserControl); final ToolPalette<GameObject, MapArchObject, Archetype, CMapViewBasic> toolPalette = new ToolPalette<GameObject, MapArchObject, Archetype, CMapViewBasic>(editTypes, selectedSquareView, objectChooser, pickmapChooserControl, copyBuffer); - final LeftPanel<GameObject, MapArchObject, Archetype, CMapViewBasic> leftPanel = new LeftPanel<GameObject, MapArchObject, Archetype, CMapViewBasic>(objectChooser, toolPalette, objectChoiceDisplay); + final LeftPanel leftPanel = new LeftPanel(objectChooser, toolPalette, objectChoiceDisplay); mainView.init(gameObjectAttributesPanel, selectedSquareView, archetypeTypeSet, mapTileListBottom, gameObjectMatchers, archetypeChooserControl, objectChooser, leftPanel); mapActions.updateMenuState(); scriptControl.getView().setMenu((JMenu) ACTION_FACTORY.find(mainView.getJMenuBar(), "plugins")); Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2008-08-03 23:19:03 UTC (rev 4750) +++ trunk/daimonin/src/daieditor/CMainControl.java 2008-08-03 23:24:47 UTC (rev 4751) @@ -392,7 +392,7 @@ gameObjectAttributesPanel = new GameObjectAttributesPanel(this, objectChooser, archetypeTypeSet, mapManager, animationObjects, lockedItemsControl, monsterMatcher, selectedSquareControl, selectedSquareView, mainView); final ObjectChoiceDisplay<GameObject, MapArchObject, Archetype, CMapViewBasic> objectChoiceDisplay = new ObjectChoiceDisplay<GameObject, MapArchObject, Archetype, CMapViewBasic>(replaceDialogManager, archetypeTypeSet, objectChooser, archetypeChooserControl.getArchetypeChooserModel(), pickmapChooserControl); final ToolPalette<GameObject, MapArchObject, Archetype, CMapViewBasic> toolPalette = new ToolPalette<GameObject, MapArchObject, Archetype, CMapViewBasic>(editTypes, selectedSquareView, objectChooser, pickmapChooserControl, copyBuffer); - final LeftPanel<GameObject, MapArchObject, Archetype, CMapViewBasic> leftPanel = new LeftPanel<GameObject, MapArchObject, Archetype, CMapViewBasic>(objectChooser, toolPalette, objectChoiceDisplay); + final LeftPanel leftPanel = new LeftPanel(objectChooser, toolPalette, objectChoiceDisplay); mainView.init(gameObjectAttributesPanel, selectedSquareView, archetypeTypeSet, mapTileListBottom, gameObjectMatchers, archetypeChooserControl, objectChooser, leftPanel); mapActions.updateMenuState(); final ArchetypeParser archetypeParser = new ArchetypeParser(archetypeChooserControl, animationObjects, archetypeSet); Modified: trunk/src/app/net/sf/gridarta/gui/LeftPanel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/LeftPanel.java 2008-08-03 23:19:03 UTC (rev 4750) +++ trunk/src/app/net/sf/gridarta/gui/LeftPanel.java 2008-08-03 23:24:47 UTC (rev 4751) @@ -20,15 +20,9 @@ package net.sf.gridarta.gui; import java.awt.BorderLayout; +import java.awt.Component; import javax.swing.JPanel; import javax.swing.JSplitPane; -import net.sf.gridarta.gameobject.Archetype; -import net.sf.gridarta.gameobject.GameObject; -import net.sf.gridarta.gui.map.MapViewBasic; -import net.sf.gridarta.gui.map.tools.ToolPalette; -import net.sf.gridarta.gui.objectchoicedisplay.ObjectChoiceDisplay; -import net.sf.gridarta.gui.objectchooser.DefaultObjectChooser; -import net.sf.gridarta.map.MapArchObject; import org.jetbrains.annotations.NotNull; /** @@ -36,7 +30,7 @@ * chooser, and the object choice display. * @author Andreas Kirschbaum */ -public class LeftPanel<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>, V extends MapViewBasic<G, A, R, V>> extends JPanel { +public class LeftPanel extends JPanel { /** * The serial version UID. @@ -49,7 +43,7 @@ * @param toolPalette the tool palette * @param objectChoiceDisplay the object choice display */ - public LeftPanel(@NotNull final DefaultObjectChooser<G, A, R, V> objectChooser, @NotNull final ToolPalette<G, A, R, V> toolPalette, @NotNull final ObjectChoiceDisplay<G, A, R, V> objectChoiceDisplay) { + public LeftPanel(@NotNull final Component objectChooser, @NotNull final Component toolPalette, @NotNull final Component objectChoiceDisplay) { super(new BorderLayout()); // TODO: introduce a tool registry Modified: trunk/src/app/net/sf/gridarta/gui/MainView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/MainView.java 2008-08-03 23:19:03 UTC (rev 4750) +++ trunk/src/app/net/sf/gridarta/gui/MainView.java 2008-08-03 23:24:47 UTC (rev 4751) @@ -20,6 +20,7 @@ package net.sf.gridarta.gui; import java.awt.BorderLayout; +import java.awt.Component; import java.awt.Rectangle; import java.awt.Toolkit; import java.awt.event.WindowAdapter; @@ -387,8 +388,9 @@ * @param gameObjectMatchers the game object matchers * @param archetypeChooserControl the archetype chooser control * @param objectChooser the object chooser + * @param leftPanel the left panel instance */ - public void init(@NotNull final GameObjectAttributesPanel<G, A, R, V> gameObjectAttributesPanel, @NotNull final SelectedSquareView<G, A, R, V> selectedSquareView, final ArchetypeTypeSet archetypeTypeSet, final boolean mapTileListBottom, @NotNull final GameObjectMatchers gameObjectMatchers, @NotNull final ArchetypeChooserControl<G, A, R, V> archetypeChooserControl, @NotNull final DefaultObjectChooser<G, A, R, V> objectChooser, @NotNull final LeftPanel<G, A, R, V> leftPanel) { + public void init(@NotNull final GameObjectAttributesPanel<G, A, R, V> gameObjectAttributesPanel, @NotNull final SelectedSquareView<G, A, R, V> selectedSquareView, final ArchetypeTypeSet archetypeTypeSet, final boolean mapTileListBottom, @NotNull final GameObjectMatchers gameObjectMatchers, @NotNull final ArchetypeChooserControl<G, A, R, V> archetypeChooserControl, @NotNull final DefaultObjectChooser<G, A, R, V> objectChooser, @NotNull final LeftPanel leftPanel) { // calculate some default values in case there is no settings file final Rectangle screen = getGraphicsConfiguration().getBounds(); final int defwidth = (int) (0.9 * screen.getWidth()); @@ -436,9 +438,10 @@ * @param selectedSquareView the selected square view * @param mapTileListBottom whether the map tile should be at the bottom * @return center panel + * @param gameObjectAttributesPanel the game object attributes panel * @param leftPanel the left panel */ - private JPanel createCenterPanel(final int defwidth, final int defheight, @NotNull final SelectedSquareView<G, A, R, V> selectedSquareView, final boolean mapTileListBottom, @NotNull final GameObjectAttributesPanel<G, A, R, V> gameObjectAttributesPanel, @NotNull final LeftPanel<G, A, R, V> leftPanel) { + private JPanel createCenterPanel(final int defwidth, final int defheight, @NotNull final SelectedSquareView<G, A, R, V> selectedSquareView, final boolean mapTileListBottom, @NotNull final GameObjectAttributesPanel<G, A, R, V> gameObjectAttributesPanel, @NotNull final Component leftPanel) { final JPanel centerPanel = new JPanel(new BorderLayout()); final int divLocationRight = prefs.getInt(DIVIDER_LOCATION_KEY3, (int) (defwidth * 0.62)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |