 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.gui.copybuffer;
22 import java.awt.Point;
23 import java.awt.Rectangle;
38 import org.junit.Test;
67 final Point point =
new Point(1, 1);
80 copyBuffer.
cut(mapView,
new Rectangle(1, 1, 1, 1));
85 copyBuffer.
paste(mapView,
new Point(1, 1));
An Archetype implementation for testing purposes.
A MapModel reflects the data of a map.
MapGrid getMapGrid()
Returns the MapGrid of this view.
Base package of all Gridarta classes.
static final MapFile MAP_FILE1
The first map file.
Helper class for creating MapModel instances for regression tests.
A GameObject implementation for testing purposes.
void beginTransaction(@NotNull String name)
Starts a new transaction.
static final String MAP_NAME1
The first map name.
static CopyBuffer< TestGameObject, TestMapArchObject, TestArchetype > newCopyBuffer(@NotNull final TestMapControlCreator mapControlCreator)
Returns a new CopyBuffer instance.
static MapView< TestGameObject, TestMapArchObject, TestArchetype > newMapView(@NotNull final MapControl< TestGameObject, TestMapArchObject, TestArchetype > mapControl)
Creates a new MapView instance.
TestGameObject insertMob21(@NotNull final MapModel< TestGameObject, TestMapArchObject, TestArchetype > mapModel, @NotNull final Point point)
Inserts a mob21Archetype game object into a map model.
Graphical User Interface of Gridarta.
Helper class for creating MapControl instances for regression tests.
GameObjects are the objects based on Archetypes found on maps.
Regression tests for CopyBuffer.
TestMapModelHelper newMapModelCreator()
Creates a new TestMapModelHelper instance.
A map view consists of a map grid and a map cursor, and is attached to a map control.
Modes that describe how squares get selected.
TestGameObject insertFloor(@NotNull final MapModel< TestGameObject, TestMapArchObject, TestArchetype > mapModel, @NotNull final Point point)
Inserts a floorArchetype game object into a map model.
Common base implementation of CopyBuffer.
The location of a map file with a map directory.
void cut(@NotNull final MapView< G, A, R > mapView, @NotNull final Rectangle selectedRec)
Executes the Cut command.
Helper class for creating MapControl instances for regression tests.
ADD
All squares that are preselected get selected.
void paste(@NotNull final MapView< G, A, R > mapView, @NotNull final Point startLocation)
Executes the Paste command.
static void checkMapContents(@NotNull final MapModel< TestGameObject, TestMapArchObject, TestArchetype > mapModel, @NotNull final String... lines)
Checks for expected MapModel's contents.
void testCutPaste1()
Checks that CopyBuffer#cut(MapView, Rectangle) followed by {} does work.
Base classes for rendering maps.
MapControl< TestGameObject, TestMapArchObject, TestArchetype > newMapControl(@Nullable final MapFile mapFile, @NotNull final String mapName, @NotNull final Size2D mapSize)
Creates a new map control.
An Exception indicating that an Archetype name is not unique.
Currently nothing more than a marker interface for unification.
MapModel< G, A, R > getMapModel()
Returns the map model.
A MapArchObject implementation for testing purposes.
The class Size2D represents a 2d rectangular area.
static void checkContents(@NotNull final Iterable< TestGameObject > mapSquare, @NotNull final BaseObject<?, ?, ?, ?>... gameObjects)
Checks that a MapSquare contains the given game objects.