public abstract class AbstractMapView<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements MapView<G,A,R>
MapView
implementations.Modifier | Constructor and Description |
---|---|
protected |
AbstractMapView(MapModel<G,A,R> mapModel,
MapGrid mapGrid,
MapCursor<G,A,R> mapCursor)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
MapCursor<G,A,R> |
getMapCursor()
Returns the
MapCursor of this view. |
MapGrid |
getMapGrid()
Returns the
MapGrid of this view. |
G |
getSelectedGameObject()
Return one selected game object.
|
java.util.List<G> |
getSelectedGameObjects()
Return all selected game objects.
|
java.util.List<MapSquare<G,A,R>> |
getSelectedSquares()
Returns the selected squares.
|
void |
setCursorLocation(java.awt.Point point)
Sets the cursor location.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activate, closeNotify, getComponent, getInternalFrame, getMapControl, getRenderer, getScrollPane, getWindowTitle
protected AbstractMapView(@NotNull MapModel<G,A,R> mapModel, @NotNull MapGrid mapGrid, @NotNull MapCursor<G,A,R> mapCursor)
mapModel
- the map model of this map viewmapGrid
- the map grid of this map viewmapCursor
- the map cursor of this map view@NotNull public java.util.List<MapSquare<G,A,R>> getSelectedSquares()
getSelectedSquares
in interface MapView<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
@NotNull public java.util.List<G> getSelectedGameObjects()
getSelectedGameObjects
in interface MapView<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
@Nullable public G getSelectedGameObject()
getSelectedGameObject
in interface MapView<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
null
if no game
object is selected@NotNull public MapGrid getMapGrid()
MapGrid
of this view.getMapGrid
in interface MapView<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
@NotNull public MapCursor<G,A,R> getMapCursor()
MapCursor
of this view.getMapCursor
in interface MapView<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
public void setCursorLocation(@NotNull java.awt.Point point)
setCursorLocation
in interface MapView<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
point
- the new location will be modified to the actually set cursor
location