public class DefaultMapView<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends AbstractMapView<G,A,R>
MapView
implementation.Constructor and Description |
---|
DefaultMapView(MapControl<G,A,R> mapControl,
int number,
PathManager pathManager,
MapGrid mapGrid,
MapCursor<G,A,R> mapCursor,
AbstractMapRenderer<G,A,R> renderer,
java.awt.Point viewPosition,
int xScrollDistance,
int yScrollDistance)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activate this map view.
|
void |
closeNotify()
This function must be called when the view is closed.
|
java.awt.Component |
getComponent()
Returns the component associated with this MapView that can be used as
parent for dialogs.
|
javax.swing.JInternalFrame |
getInternalFrame()
Returns the
JInternalFrame instance for this map view. |
MapControl<G,A,R> |
getMapControl()
Return the controller of this view.
|
MapRenderer |
getRenderer()
Returns the
MapRenderer for this view. |
javax.swing.JScrollPane |
getScrollPane()
Returns the
JScrollPane of this map view. |
java.lang.String |
getWindowTitle()
Returns the title for the map window.
|
getMapCursor, getMapGrid, getSelectedGameObject, getSelectedGameObjects, getSelectedSquares, setCursorLocation
public DefaultMapView(@NotNull MapControl<G,A,R> mapControl, int number, @NotNull PathManager pathManager, @NotNull MapGrid mapGrid, @NotNull MapCursor<G,A,R> mapCursor, @NotNull AbstractMapRenderer<G,A,R> renderer, @Nullable java.awt.Point viewPosition, int xScrollDistance, int yScrollDistance)
mapControl
- the controller of this viewnumber
- each view of a map will get a numberpathManager
- the path manager for converting path namesmapGrid
- the map grid for this map viewmapCursor
- the map cursor for this map viewrenderer
- the map renderer for rendering the map modelviewPosition
- the initial view position to show; null=show top left
cornerxScrollDistance
- the x distance when scrollingyScrollDistance
- the y distance when scrollingpublic void closeNotify()
@NotNull public java.lang.String getWindowTitle()
@NotNull public java.awt.Component getComponent()
@NotNull public MapControl<G,A,R> getMapControl()
public void activate()
@NotNull public javax.swing.JInternalFrame getInternalFrame()
JInternalFrame
instance for this map view.@NotNull public MapRenderer getRenderer()
MapRenderer
for this view.@NotNull public javax.swing.JScrollPane getScrollPane()
JScrollPane
of this map view.