public class MapDesktop<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements EditorAction
JDesktopPane containing all map views.| Constructor and Description |
|---|
MapDesktop(@NotNull MapViewManager<G,A,R> mapViewManager,
@NotNull MapManager<G,A,R> mapManager,
@NotNull MapImageCache<G,A,R> mapImageCache,
@NotNull MapViewsManager<G,A,R> mapViewsManager)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addWindowAction(@NotNull javax.swing.JMenu menu,
@NotNull MapView<G,A,R> mapView,
int index)
Adds an action for selecting this window to a menu.
|
@NotNull java.awt.Component |
getComponent()
Returns the
Component that shows all map views. |
void |
nextWindow()
Gives focus to the previous window.
|
void |
prevWindow()
Gives focus to the next window.
|
void |
setAction(@NotNull javax.swing.Action action,
@NotNull java.lang.String name)
Sets the
Action instance for this editor action. |
void |
setCurrentMapView(@NotNull MapView<G,A,R> mapView)
Sets the given level view as the current one.
|
public MapDesktop(@NotNull
@NotNull MapViewManager<G,A,R> mapViewManager,
@NotNull
@NotNull MapManager<G,A,R> mapManager,
@NotNull
@NotNull MapImageCache<G,A,R> mapImageCache,
@NotNull
@NotNull MapViewsManager<G,A,R> mapViewsManager)
mapViewManager - all open map viewsmapManager - the map manager to usemapImageCache - the map image cache to usemapViewsManager - the map views@NotNull public @NotNull java.awt.Component getComponent()
Component that shows all map views.public void setCurrentMapView(@NotNull
@NotNull MapView<G,A,R> mapView)
mapView - the new current level viewpublic void addWindowAction(@NotNull
@NotNull javax.swing.JMenu menu,
@NotNull
@NotNull MapView<G,A,R> mapView,
int index)
menu - the menu to add the action tomapView - the map view to addindex - the index of the menu entry@ActionMethod public void prevWindow()
@ActionMethod public void nextWindow()
public void setAction(@NotNull
@NotNull javax.swing.Action action,
@NotNull
@NotNull java.lang.String name)
EditorActionAction instance for this editor action.setAction in interface EditorActionaction - the action instancename - the name of the action