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(@NotNull MapModel<G,A,R> mapModel,
@NotNull MapGrid mapGrid,
@NotNull MapCursor<G,A,R> mapCursor)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
centerMapView(@NotNull java.awt.Point centerSquare)
Centers the map view on a map square.
|
void |
closeNotify()
This function must be called when the view is closed.
|
@NotNull MapCursor<G,A,R> |
getMapCursor()
Returns the
MapCursor of this view. |
@NotNull MapGrid |
getMapGrid()
Returns the
MapGrid of this view. |
G |
getSelectedGameObject()
Return one selected game object.
|
@NotNull java.util.List<G> |
getSelectedGameObjects()
Return all selected game objects.
|
@NotNull java.util.List<MapSquare<G,A,R>> |
getSelectedSquares()
Returns the selected squares.
|
void |
setCursorLocation(@NotNull java.awt.Point point)
Sets the cursor location.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitactivate, getComponent, getInternalFrame, getMapControl, getRenderer, getScrollPane, getWindowTitle, setViewPositionprotected AbstractMapView(@NotNull
@NotNull MapModel<G,A,R> mapModel,
@NotNull
@NotNull MapGrid mapGrid,
@NotNull
@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 viewpublic void closeNotify()
MapViewcloseNotify in interface MapView<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>@NotNull public @NotNull java.util.List<MapSquare<G,A,R>> getSelectedSquares()
MapViewgetSelectedSquares in interface MapView<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>@NotNull public @NotNull java.util.List<G> getSelectedGameObjects()
MapViewgetSelectedGameObjects in interface MapView<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>@Nullable public G getSelectedGameObject()
MapViewgetSelectedGameObject 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 @NotNull MapGrid getMapGrid()
MapViewMapGrid 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 @NotNull MapCursor<G,A,R> getMapCursor()
MapViewMapCursor 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
@NotNull java.awt.Point point)
MapViewsetCursorLocation 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
locationpublic void centerMapView(@NotNull
@NotNull java.awt.Point centerSquare)
MapViewcenterMapView in interface MapView<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>centerSquare - the map square