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 java.awt.Point;
023import java.awt.Rectangle;
024import java.awt.image.BufferedImage;
025import net.sf.gridarta.model.archetype.TestArchetype;
026import net.sf.gridarta.model.gameobject.TestGameObject;
027import net.sf.gridarta.model.maparchobject.TestMapArchObject;
028import net.sf.gridarta.model.mapmodel.MapModel;
029import org.jetbrains.annotations.NotNull;
030import org.jetbrains.annotations.Nullable;
031
032/**
033 * A {@link MapRenderer} implementation for testing purposes.
034 * @author Andreas Kirschbaum
035 */
036public class TestMapRenderer extends AbstractMapRenderer<TestGameObject, TestMapArchObject, TestArchetype> {
037
038    /**
039     * The serial version UID.
040     */
041    private static final long serialVersionUID = 1L;
042
043    /**
044     * Creates a new instance.
045     * @param mapModel the rendered map model
046     */
047    public TestMapRenderer(@NotNull final MapModel<TestGameObject, TestMapArchObject, TestArchetype> mapModel) {
048        super(mapModel, null);
049    }
050
051    /**
052     * {@inheritDoc}
053     */
054    @NotNull
055    @Override
056    public BufferedImage getFullImage() {
057        return new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB);
058    }
059
060    /**
061     * {@inheritDoc}
062     */
063    @Nullable
064    @Override
065    public Point getSquareLocationAt(@NotNull final Point point, @Nullable final Point retPoint) {
066        throw new AssertionError();
067    }
068
069    /**
070     * {@inheritDoc}
071     */
072    @Override
073    public void forceRepaint() {
074        throw new AssertionError();
075    }
076
077    /**
078     * {@inheritDoc}
079     */
080    @Override
081    public void closeNotify() {
082        throw new AssertionError();
083    }
084
085    /**
086     * {@inheritDoc}
087     */
088    @NotNull
089    @Override
090    public Rectangle getSquareBounds(@NotNull final Point p) {
091        return new Rectangle(1, 1);
092    }
093
094}