From: <aki...@us...> - 2008-08-21 23:04:13
|
Revision: 4978 http://gridarta.svn.sourceforge.net/gridarta/?rev=4978&view=rev Author: akirschbaum Date: 2008-08-21 23:04:21 +0000 (Thu, 21 Aug 2008) Log Message: ----------- Unify code. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java trunk/crossfire/src/cfeditor/gui/prefs/ResPrefs.java trunk/daimonin/src/daieditor/MapActions.java trunk/daimonin/src/daieditor/gui/map/DefaultLevelRenderer.java trunk/daimonin/src/daieditor/gui/map/SimpleLevelRenderer.java Modified: trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java 2008-08-21 22:43:26 UTC (rev 4977) +++ trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java 2008-08-21 23:04:21 UTC (rev 4978) @@ -60,7 +60,7 @@ /** The archetype set. */ @NotNull - private final ArchetypeSet<?, ?, Archetype> archetypeSet; + private final ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet; /** The archetype chooser to add parsed archetypes to. */ private final ArchetypeChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic> archetypeChooserControl; @@ -74,7 +74,7 @@ * @param animationObjects the animation objects instance to use * @param archetypeSet the archetype set */ - public ArchetypeParser(final GridartaObjectsFactory<GameObject, MapArchObject, Archetype, CMapViewBasic> gridartaObjectsFactory, final ArchetypeChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic> archetypeChooserControl, final AnimationObjects<?> animationObjects, @NotNull final ArchetypeSet<?, ?, Archetype> archetypeSet) { + public ArchetypeParser(final GridartaObjectsFactory<GameObject, MapArchObject, Archetype, CMapViewBasic> gridartaObjectsFactory, final ArchetypeChooserControl<GameObject, MapArchObject, Archetype, CMapViewBasic> archetypeChooserControl, final AnimationObjects<?> animationObjects, @NotNull final ArchetypeSet<GameObject, MapArchObject, Archetype> archetypeSet) { this.gridartaObjectsFactory = gridartaObjectsFactory; this.archetypeChooserControl = archetypeChooserControl; this.animationObjects = animationObjects; @@ -254,7 +254,7 @@ archetype.addObjectText(thisLine); final String animName = thisLine.substring(10).trim(); archetype.setAnimName(animName); - //arch.setAnimNr(mainControl.animationObjects.findAnimObject(animName)); // probably not needed, but better not delete it yet + //arch.setAnimNr(animationObjects.findAnimObject(animName)); // probably not needed, but better not delete it yet } else if (thisLine.equals("anim")) { animflag = true; animText = new StringBuilder(); Modified: trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java 2008-08-21 22:43:26 UTC (rev 4977) +++ trunk/crossfire/src/cfeditor/gameobject/ArchetypeSet.java 2008-08-21 23:04:21 UTC (rev 4978) @@ -78,6 +78,8 @@ @NotNull private final GlobalSettings globalSettings; + /** The edit types instance. */ + @NotNull private final EditTypes<GameObject, MapArchObject, Archetype, CMapViewBasic> editTypes; @NotNull @@ -96,7 +98,7 @@ /** * Create the ArchetypeSet. * @param mainControl reference to CMainControl - * @param globalSettings the global settigns instance + * @param globalSettings the global settings instance * @param editTypes the edit types instance * @param animationObjects the animations to use * @param faceObjects the FaceObjects instance to use Modified: trunk/crossfire/src/cfeditor/gui/prefs/ResPrefs.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/prefs/ResPrefs.java 2008-08-21 22:43:26 UTC (rev 4977) +++ trunk/crossfire/src/cfeditor/gui/prefs/ResPrefs.java 2008-08-21 23:04:21 UTC (rev 4978) @@ -58,7 +58,7 @@ /** Preferences. */ private static final Preferences prefs = Preferences.userNodeForPackage(MainControl.class); - /** The global settings instance to use. */ + /** The global settings instance. */ private final GlobalSettingsImpl globalSettings; /** TextField for arch directory path. */ @@ -81,7 +81,7 @@ /** * Create a ResPrefs pane. - * @param globalSettings the global settings instance to use + * @param globalSettings the global settings instance */ public ResPrefs(final GlobalSettingsImpl globalSettings) { setListLabelText(ACTION_FACTORY.getString("prefsRes.title")); Modified: trunk/daimonin/src/daieditor/MapActions.java =================================================================== --- trunk/daimonin/src/daieditor/MapActions.java 2008-08-21 22:43:26 UTC (rev 4977) +++ trunk/daimonin/src/daieditor/MapActions.java 2008-08-21 23:04:21 UTC (rev 4978) @@ -264,6 +264,7 @@ } } + /** {@inheritDoc} */ public boolean isAutoJoin() { return autoJoin; } Modified: trunk/daimonin/src/daieditor/gui/map/DefaultLevelRenderer.java =================================================================== --- trunk/daimonin/src/daieditor/gui/map/DefaultLevelRenderer.java 2008-08-21 22:43:26 UTC (rev 4977) +++ trunk/daimonin/src/daieditor/gui/map/DefaultLevelRenderer.java 2008-08-21 23:04:21 UTC (rev 4978) @@ -153,7 +153,7 @@ mapGrid.addMapGridListener(mapGridListener); } - /** @inheritDoc} */ + /** {@inheritDoc} */ @Override public void closeNotify() { mapGrid.removeMapGridListener(mapGridListener); @@ -249,6 +249,7 @@ return image; } + /** {@inheritDoc} */ @Override public void paintComponent(final Graphics g) { paintComponent2((Graphics2D) g); @@ -502,11 +503,13 @@ } /** {@inheritDoc} */ + @Override public void setErroneousArchObjects(final Map<GameObject, ValidationError<GameObject, MapArchObject, Archetype>> erroneousArchObjects) { //XXX: save erroneousArchObjects } /** {@inheritDoc} */ + @Override public void setErroneousMapSquares(final Map<MapSquare<GameObject, MapArchObject, Archetype>, ValidationError<GameObject, MapArchObject, Archetype>> erroneousMapSquares) { this.erroneousMapSquares = erroneousMapSquares; } Modified: trunk/daimonin/src/daieditor/gui/map/SimpleLevelRenderer.java =================================================================== --- trunk/daimonin/src/daieditor/gui/map/SimpleLevelRenderer.java 2008-08-21 22:43:26 UTC (rev 4977) +++ trunk/daimonin/src/daieditor/gui/map/SimpleLevelRenderer.java 2008-08-21 23:04:21 UTC (rev 4978) @@ -221,9 +221,10 @@ public void closeNotify() { } - /** @inheritDoc} */ + /** {@inheritDoc} */ @Override public Rectangle getTileBounds(final Point p) { throw new IllegalStateException(); } + } // class SimpleLevelRenderer This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |