001/*
002 * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games.
003 * Copyright (C) 2000-2011 The Gridarta Developers.
004 *
005 * This program is free software; you can redistribute it and/or modify
006 * it under the terms of the GNU General Public License as published by
007 * the Free Software Foundation; either version 2 of the License, or
008 * (at your option) any later version.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
013 * GNU General Public License for more details.
014 *
015 * You should have received a copy of the GNU General Public License along
016 * with this program; if not, write to the Free Software Foundation, Inc.,
017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
018 */
019
020package net.sf.gridarta.gui.map.renderer;
021
022import net.sf.gridarta.model.archetype.TestArchetype;
023import net.sf.gridarta.model.gameobject.TestGameObject;
024import net.sf.gridarta.model.maparchobject.TestMapArchObject;
025import net.sf.gridarta.model.mapgrid.MapGrid;
026import net.sf.gridarta.model.mapmodel.MapModel;
027import org.jetbrains.annotations.NotNull;
028
029/**
030 * An {@link RendererFactory} implementation for testing purposes.
031 * @author Andreas Kirschbaum
032 */
033public class TestRendererFactory implements RendererFactory<TestGameObject, TestMapArchObject, TestArchetype> {
034
035    /**
036     * {@inheritDoc}
037     */
038    @NotNull
039    @Override
040    public MapRenderer newSimpleMapRenderer(@NotNull final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel) {
041        return new TestMapRenderer(mapModel);
042    }
043
044    /**
045     * {@inheritDoc}
046     */
047    @NotNull
048    @Override
049    public AbstractMapRenderer<TestGameObject, TestMapArchObject, TestArchetype> newMapRenderer(@NotNull final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel, @NotNull final MapGrid mapGrid) {
050        return new TestMapRenderer(mapModel);
051    }
052
053    /**
054     * {@inheritDoc}
055     */
056    @NotNull
057    @Override
058    public AbstractMapRenderer<TestGameObject, TestMapArchObject, TestArchetype> newPickmapRenderer(@NotNull final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel, @NotNull final MapGrid mapGrid) {
059        return new TestMapRenderer(mapModel);
060    }
061
062}