public class DefaultMapViewFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements MapViewFactory<G,A,R>
MapViewFactory
implementation.Constructor and Description |
---|
DefaultMapViewFactory(RendererFactory<G,A,R> rendererFactory,
int xScrollDistance,
int yScrollDistance,
PathManager pathManager)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
MapView<G,A,R> |
newMapView(MapControl<G,A,R> mapControl,
java.awt.Point viewPosition,
int viewCounter)
Creates a new map view instance for a map control.
|
public DefaultMapViewFactory(@NotNull RendererFactory<G,A,R> rendererFactory, int xScrollDistance, int yScrollDistance, @NotNull PathManager pathManager)
rendererFactory
- the renderer factory to usexScrollDistance
- the x distance when scrollingyScrollDistance
- the y distance when scrollingpathManager
- the path manager for converting path names@NotNull public MapView<G,A,R> newMapView(@NotNull MapControl<G,A,R> mapControl, @Nullable java.awt.Point viewPosition, int viewCounter)
newMapView
in interface MapViewFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
mapControl
- the map controlviewPosition
- the initial view position; may be null
for
defaultviewCounter
- the view counter