From: <aki...@us...> - 2008-08-06 17:55:07
|
Revision: 4770 http://gridarta.svn.sourceforge.net/gridarta/?rev=4770&view=rev Author: akirschbaum Date: 2008-08-06 17:55:09 +0000 (Wed, 06 Aug 2008) Log Message: ----------- Remove raw types. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/src/app/net/sf/gridarta/AbstractMainControl.java trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttributeBitmask.java trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttributeParser.java trunk/src/app/net/sf/gridarta/gui/MainView.java trunk/src/app/net/sf/gridarta/gui/findarchetypes/FindArchetypesDialog.java trunk/src/app/net/sf/gridarta/gui/findarchetypes/TableModel.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/HelpActionListener.java trunk/src/app/net/sf/gridarta/gui/map/MapViewBasic.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2008-08-06 10:33:08 UTC (rev 4769) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2008-08-06 17:55:09 UTC (rev 4770) @@ -314,7 +314,7 @@ ); final ArchetypeAttributeParser<GameObject, MapArchObject, Archetype> archetypeAttributeParser = new ArchetypeAttributeParser<GameObject, MapArchObject, Archetype>(Archetype.TYPE_EVENT_CONNECTOR, false, globalSettings, mapFileFilter, pythonFileFilter, faceObjects, animationObjects, numberSpells, gameObjectSpells, 0, archetypeTypeSet, treasureListTree); final ArchetypeTypeParser<GameObject, MapArchObject, Archetype> archetypeTypeParser = new ArchetypeTypeParser<GameObject, MapArchObject, Archetype>(archetypeAttributeParser); - final ArchetypeTypeSetParser<GameObject, MapArchObject, Archetype> archetypeTypeSetParser = new ArchetypeTypeSetParser(xmlHelper.getDocumentBuilder(), xmlHelper.getXPath(), archetypeTypeSet, archetypeTypeParser); + final ArchetypeTypeSetParser<GameObject, MapArchObject, Archetype> archetypeTypeSetParser = new ArchetypeTypeSetParser<GameObject, MapArchObject, Archetype>(xmlHelper.getDocumentBuilder(), xmlHelper.getXPath(), archetypeTypeSet, archetypeTypeParser); try { final String filename = IOUtils.getResourceURLAsString(getConfigurationDirectory(), CommonConstants.TYPEDEF_FILE); archetypeTypeSetParser.loadTypesFromXML(filename); Modified: trunk/src/app/net/sf/gridarta/AbstractMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/AbstractMainControl.java 2008-08-06 10:33:08 UTC (rev 4769) +++ trunk/src/app/net/sf/gridarta/AbstractMainControl.java 2008-08-06 17:55:09 UTC (rev 4770) @@ -109,7 +109,7 @@ protected AbstractMainControl(@NotNull final GridartaObjectsFactory<G, A, R, V> gridartaObjectsFactory, @NotNull final String key, @NotNull final GlobalSettings globalSettings) { this.globalSettings = globalSettings; final DefaultMapManager<G, A, R, V> tmpMapManager = new DefaultMapManager<G, A, R, V>(this, key, gridartaObjectsFactory); - editTypes = new EditTypes(tmpMapManager); + editTypes = new EditTypes<G, A, R, V>(tmpMapManager); tmpMapManager.setEditTypes(editTypes); mapManager = tmpMapManager; copyBuffer = new CopyBuffer<G, A, R, V>(this, editTypes, gridartaObjectsFactory); Modified: trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttributeBitmask.java =================================================================== --- trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttributeBitmask.java 2008-08-06 10:33:08 UTC (rev 4769) +++ trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttributeBitmask.java 2008-08-06 17:55:09 UTC (rev 4770) @@ -58,7 +58,7 @@ // fetch the bitmask data, then build the attribute panel final CAttribBitmask bitmask = archetypeTypeSet.getBitmaskTable().get(getMisc()[0]); tmpAttr.setBitmask(bitmask); - cLabel = new JButton(new MaskChangeAL(getNameNew() + ":", tmpAttr)); + cLabel = new JButton(new MaskChangeAL<G, A, R>(getNameNew() + ":", tmpAttr)); input.setBackground(background); input.setEditable(false); input.setBorder(BorderFactory.createLineBorder(Color.gray)); Modified: trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttributeParser.java =================================================================== --- trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttributeParser.java 2008-08-06 10:33:08 UTC (rev 4769) +++ trunk/src/app/net/sf/gridarta/archtype/ArchetypeAttributeParser.java 2008-08-06 17:55:09 UTC (rev 4770) @@ -27,6 +27,7 @@ import net.sf.gridarta.gameobject.anim.AnimationObjects; import net.sf.gridarta.gameobject.face.FaceObjects; import net.sf.gridarta.map.MapArchObject; +import net.sf.gridarta.spells.GameObjectSpell; import net.sf.gridarta.spells.NumberSpell; import net.sf.gridarta.spells.Spells; import net.sf.gridarta.treasurelist.CFTreasureListTree; @@ -112,7 +113,7 @@ * The game object spells. */ @NotNull - private final Spells<?> gameObjectSpells; + private final Spells<GameObjectSpell<G, A, R>> gameObjectSpells; /** * The index for no spell. @@ -146,7 +147,7 @@ * @param archetypeTypeSet the archetype types * @param treasureListTree the treasure lists */ - public ArchetypeAttributeParser(final int typeNoEventConnector, final boolean includeFaceText, @NotNull final GlobalSettings globalSettings, @NotNull final FileFilter mapFileFilter, @NotNull final FileFilter scriptFileFilter, @NotNull final FaceObjects faceObjects, @NotNull final AnimationObjects<?> animationObjects, @NotNull final Spells<NumberSpell> numberSpells, @NotNull final Spells<?> gameObjectSpells, final int undefinedSpellIndex, @NotNull final ArchetypeTypeSet<G, A, R> archetypeTypeSet, @NotNull final CFTreasureListTree<G, A, R> treasureListTree) { + public ArchetypeAttributeParser(final int typeNoEventConnector, final boolean includeFaceText, @NotNull final GlobalSettings globalSettings, @NotNull final FileFilter mapFileFilter, @NotNull final FileFilter scriptFileFilter, @NotNull final FaceObjects faceObjects, @NotNull final AnimationObjects<?> animationObjects, @NotNull final Spells<NumberSpell> numberSpells, @NotNull final Spells<GameObjectSpell<G, A, R>> gameObjectSpells, final int undefinedSpellIndex, @NotNull final ArchetypeTypeSet<G, A, R> archetypeTypeSet, @NotNull final CFTreasureListTree<G, A, R> treasureListTree) { this.typeNoEventConnector = typeNoEventConnector; this.includeFaceText = includeFaceText; this.globalSettings = globalSettings; @@ -233,7 +234,7 @@ } else if (atype.equalsIgnoreCase("facename")) { return new ArchetypeAttributeFaceName(nameOld, null, nameNew, text, inputLength, null, typeNoEventConnector, faceObjects, includeFaceText); } else if (atype.equalsIgnoreCase("animname")) { - return new ArchetypeAttributeAnimName(nameOld, null, nameNew, text, inputLength, null, typeNoEventConnector, animationObjects, includeFaceText); + return new ArchetypeAttributeAnimName<G, A, R>(nameOld, null, nameNew, text, inputLength, null, typeNoEventConnector, animationObjects, includeFaceText); } else if (atype.equalsIgnoreCase("text")) { // for text data, the terminating string has to be read too final Attr archBeginAttr = root.getAttributeNode(XML_KEY_ARCH_BEGIN); @@ -265,15 +266,15 @@ return null; } nameNew = valueAttr.getValue().trim(); - return new ArchetypeAttributeFixed(nameOld, null, nameNew, text, inputLength, null); + return new ArchetypeAttributeFixed<G, A, R>(nameOld, null, nameNew, text, inputLength, null); } else if (atype.equalsIgnoreCase("spell")) { - return new ArchetypeAttributeSpell(nameOld, null, nameNew, text, inputLength, null, numberSpells, undefinedSpellIndex); + return new ArchetypeAttributeSpell<G, A, R>(nameOld, null, nameNew, text, inputLength, null, numberSpells, undefinedSpellIndex); } else if (atype.equalsIgnoreCase("nz_spell")) { - return new ArchetypeAttributeZSpell(nameOld, null, nameNew, text, inputLength, null, numberSpells, undefinedSpellIndex); + return new ArchetypeAttributeZSpell<G, A, R>(nameOld, null, nameNew, text, inputLength, null, numberSpells, undefinedSpellIndex); } else if (atype.equalsIgnoreCase("inv_spell")) { - return new ArchetypeAttributeInvSpell(nameOld, null, nameNew, text, inputLength, null, gameObjectSpells); + return new ArchetypeAttributeInvSpell<G, A, R>(nameOld, null, nameNew, text, inputLength, null, gameObjectSpells); } else if (atype.equalsIgnoreCase("inv_spell_optional")) { - return new ArchetypeAttributeInvSpellOptional(nameOld, null, nameNew, text, inputLength, null, gameObjectSpells); + return new ArchetypeAttributeInvSpellOptional<G, A, R>(nameOld, null, nameNew, text, inputLength, null, gameObjectSpells); } else if (atype.startsWith("bitmask")) { // got a bitmask attribute final String bitmaskName = atype.substring(8).trim(); @@ -283,7 +284,7 @@ } final String[] misc = new String[1]; misc[0] = bitmaskName; // store bitmask name in misc[0] - return new ArchetypeAttributeBitmask(nameOld, null, nameNew, text, inputLength, misc, archetypeTypeSet); + return new ArchetypeAttributeBitmask<G, A, R>(nameOld, null, nameNew, text, inputLength, misc, archetypeTypeSet); } else if (atype.startsWith("list_")) { // got a bitmask attribute final String listName = atype.substring(5).trim(); @@ -293,7 +294,7 @@ } final String[] misc = new String[1]; misc[0] = listName; // store list name in misc[0] - return new ArchetypeAttributeList(nameOld, null, nameNew, text, inputLength, misc, archetypeTypeSet); + return new ArchetypeAttributeList<G, A, R>(nameOld, null, nameNew, text, inputLength, misc, archetypeTypeSet); } else if (atype.startsWith("doublelist")) { // got a doublelist attribute final String listNames = atype.substring(11).trim(); @@ -313,9 +314,9 @@ final String[] misc = new String[2]; misc[0] = listName1; // store list name in misc[0] misc[1] = listName2; // store list name in misc[1] - return new ArchetypeAttributeDoubleList(nameOld, null, nameNew, text, inputLength, misc, archetypeTypeSet); + return new ArchetypeAttributeDoubleList<G, A, R>(nameOld, null, nameNew, text, inputLength, misc, archetypeTypeSet); } else if (atype.equalsIgnoreCase("treasurelist")) { - return new ArchetypeAttributeTreasure(nameOld, null, nameNew, text, inputLength, null, treasureListTree); + return new ArchetypeAttributeTreasure<G, A, R>(nameOld, null, nameNew, text, inputLength, null, treasureListTree); } else { // unknown type log.warn("In '" + CommonConstants.TYPEDEF_FILE + "': Type " + typeName + " has an attribute with unknown type: '" + atype + "'."); Modified: trunk/src/app/net/sf/gridarta/gui/MainView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/MainView.java 2008-08-06 10:33:08 UTC (rev 4769) +++ trunk/src/app/net/sf/gridarta/gui/MainView.java 2008-08-06 17:55:09 UTC (rev 4770) @@ -391,7 +391,7 @@ * @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 leftPanel) { + public void init(@NotNull final GameObjectAttributesPanel<G, A, R, V> gameObjectAttributesPanel, @NotNull final SelectedSquareView<G, A, R, V> selectedSquareView, final ArchetypeTypeSet<G, A, R> 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()); Modified: trunk/src/app/net/sf/gridarta/gui/findarchetypes/FindArchetypesDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/findarchetypes/FindArchetypesDialog.java 2008-08-06 10:33:08 UTC (rev 4769) +++ trunk/src/app/net/sf/gridarta/gui/findarchetypes/FindArchetypesDialog.java 2008-08-06 17:55:09 UTC (rev 4770) @@ -128,7 +128,7 @@ * search results.# * @param archetypeTypeSet the instance for looking up archetype types */ - public FindArchetypesDialog(final Component parent, final ArchetypeChooserControl<G, A, R, ?> archetypeChooserControl, final ObjectChooser<G, A, R> objectChooser, final ArchetypeTypeSet archetypeTypeSet) { + public FindArchetypesDialog(final Component parent, final ArchetypeChooserControl<G, A, R, ?> archetypeChooserControl, final ObjectChooser<G, A, R> objectChooser, final ArchetypeTypeSet<G, A, R> archetypeTypeSet) { this.archetypeChooserControl = archetypeChooserControl; this.objectChooser = objectChooser; Modified: trunk/src/app/net/sf/gridarta/gui/findarchetypes/TableModel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/findarchetypes/TableModel.java 2008-08-06 10:33:08 UTC (rev 4769) +++ trunk/src/app/net/sf/gridarta/gui/findarchetypes/TableModel.java 2008-08-06 17:55:09 UTC (rev 4770) @@ -57,7 +57,7 @@ }; /** The instance for looking up archetype types. */ - private final ArchetypeTypeSet archetypeTypeSet; + private final ArchetypeTypeSet<G, A, R> archetypeTypeSet; /** The model's contents. */ private final List<R> archetypes = new ArrayList<R>(); @@ -97,7 +97,7 @@ * Creates a new instance. * @param archetypeTypeSet the instance for looking up archetype types */ - public TableModel(final ArchetypeTypeSet archetypeTypeSet) { + public TableModel(final ArchetypeTypeSet<G, A, R> archetypeTypeSet) { this.archetypeTypeSet = archetypeTypeSet; } Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java 2008-08-06 10:33:08 UTC (rev 4769) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java 2008-08-06 17:55:09 UTC (rev 4770) @@ -92,7 +92,7 @@ if (dialogs.containsKey(gameObject)) { dialogs.get(gameObject).toFront(); } else { - final GameObjectAttributesDialog<G, A, R> pane = new GameObjectAttributesDialog(this, archetypeTypeSet, gameObject, parent, archetypeSet, mapManager); + final GameObjectAttributesDialog<G, A, R> pane = new GameObjectAttributesDialog<G, A, R>(this, archetypeTypeSet, gameObject, parent, archetypeSet, mapManager); final JDialog dialog = pane.createDialog(parent, ACTION_FACTORY.getString("attribTitle")); dialog.getRootPane().setDefaultButton(pane.okButton); dialog.setResizable(true); Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/HelpActionListener.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/HelpActionListener.java 2008-08-06 10:33:08 UTC (rev 4769) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/HelpActionListener.java 2008-08-06 17:55:09 UTC (rev 4770) @@ -17,7 +17,7 @@ private static final Logger log = Logger.getLogger(HelpActionListener.class); /** CFArchAttrib which contains help information. */ - private final ArchetypeAttribute attrib; // attribute structure + private final ArchetypeAttribute<?, ?, ?> attrib; // attribute structure /** The component for help dialogs. */ private final Component parent; @@ -27,7 +27,7 @@ * @param a the gameObject attribute where this help button belongs to * @param parent the parent component for help dialogs */ - public HelpActionListener(final ArchetypeAttribute a, final Component parent) { + public HelpActionListener(final ArchetypeAttribute<?, ?, ?> a, final Component parent) { if (a == null) { throw new NullPointerException("HelpActionListener without context"); } Modified: trunk/src/app/net/sf/gridarta/gui/map/MapViewBasic.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/MapViewBasic.java 2008-08-06 10:33:08 UTC (rev 4769) +++ trunk/src/app/net/sf/gridarta/gui/map/MapViewBasic.java 2008-08-06 17:55:09 UTC (rev 4770) @@ -289,7 +289,7 @@ } if (archObject != null) { erroneousArchObjects.put(archObject, validationError); - final GameObject topContainer = archObject.getTopContainer(); + final G topContainer = archObject.getTopContainer(); mapGrid.setError(topContainer.getMapX(), topContainer.getMapY()); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |