public class MapViews<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
extends java.lang.Object
MapViews for one MapControl instance.| Constructor and Description |
|---|
MapViews() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMapViewsListener(@NotNull MapViewsListener<G,A,R> listener)
Adds a
MapViewsListener to be notified of events. |
void |
closeAllViews()
Closes all views of a
MapControl. |
void |
closeView(@NotNull MapView<G,A,R> mapView)
Closes a view of a
MapControl. |
@Nullable MapView<G,A,R> |
getMapViewFrame()
Returns the last used view of a
MapControl. |
@NotNull java.util.Iterator<MapView<G,A,R>> |
getMapViewIterator()
Returns an
Iterator returning all MapViews. |
int |
getMapViews()
Returns the number of views of a
MapControl. |
@NotNull java.awt.Point[] |
getViewPositions()
Returns the current view positions of all views of a
MapControl. |
@NotNull MapView<G,A,R> |
newMapView(@NotNull MapControl<G,A,R> mapControl,
@Nullable java.awt.Point viewPosition,
@NotNull MapViewFactory<G,A,R> mapViewFactory)
Creates a new
MapView. |
void |
raise(@NotNull MapView<G,A,R> mapView)
Raises a
MapView. |
void |
removeMapViewsListener(@NotNull MapViewsListener<G,A,R> listener)
Removes a
MapViewsListener to be notified of events. |
void |
repaintAllViews()
Repaints all
MapViews. |
void |
setFocus(@NotNull MapView<G,A,R> mapView)
Sets a
MapView as the main view. |
public void addMapViewsListener(@NotNull
@NotNull MapViewsListener<G,A,R> listener)
MapViewsListener to be notified of events.listener - the listenerpublic void removeMapViewsListener(@NotNull
@NotNull MapViewsListener<G,A,R> listener)
MapViewsListener to be notified of events.listener - the listener@Nullable public @Nullable MapView<G,A,R> getMapViewFrame()
MapControl.public int getMapViews()
MapControl.@NotNull public @NotNull MapView<G,A,R> newMapView(@NotNull @NotNull MapControl<G,A,R> mapControl, @Nullable @Nullable java.awt.Point viewPosition, @NotNull @NotNull MapViewFactory<G,A,R> mapViewFactory)
MapView.mapControl - the map control new map view is part ofviewPosition - the view position to show initially; may be null to show the top left cornermapViewFactory - the map view factory to use@NotNull public @NotNull java.awt.Point[] getViewPositions()
MapControl.public void closeView(@NotNull
@NotNull MapView<G,A,R> mapView)
MapControl.mapView - the view to be closedpublic void closeAllViews()
MapControl.public void setFocus(@NotNull
@NotNull MapView<G,A,R> mapView)
MapView as the main view.mapView - the map view@NotNull public @NotNull java.util.Iterator<MapView<G,A,R>> getMapViewIterator()
Iterator returning all MapViews. The
map views are returns top to bottom.public void repaintAllViews()
MapViews.