Package net.sf.gridarta.gui.map
Class AbstractPerMapDialogManager<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,D>
- java.lang.Object
-
- net.sf.gridarta.gui.map.AbstractPerMapDialogManager<G,A,R,D>
-
- Direct Known Subclasses:
GoLocationDialogManager
public abstract class AbstractPerMapDialogManager<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>,D> extends java.lang.ObjectMaintains (dialog) instance associated to map view instances. This class makes sure that for each map view no more than one go location dialog exists.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPerMapDialogManager(@NotNull MapViewManager<G,A,R> mapViewManager)Creates a new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidactivate(D dialog)Activates an existing instance.protected abstract Dallocate(@NotNull MapView<G,A,R> mapView)Creates a new instance.protected abstract voiddispose(D dialog)Destroys an instance.voiddisposeDialog(MapView<G,A,R> mapView)Dispose a dialog.voidshowDialog(MapView<G,A,R> mapView)Show a dialog for positioning the cursor of a map.
-
-
-
Constructor Detail
-
AbstractPerMapDialogManager
protected AbstractPerMapDialogManager(@NotNull @NotNull MapViewManager<G,A,R> mapViewManager)Creates a new instance.- Parameters:
mapViewManager- the view map manager
-
-
Method Detail
-
showDialog
public void showDialog(MapView<G,A,R> mapView)
Show a dialog for positioning the cursor of a map.- Parameters:
mapView- the view map for cursor positioning
-
disposeDialog
public void disposeDialog(MapView<G,A,R> mapView)
Dispose a dialog.- Parameters:
mapView- the map view to dispose the dialog of; do nothing if no dialog exists
-
allocate
@NotNull protected abstract D allocate(@NotNull @NotNull MapView<G,A,R> mapView)
Creates a new instance.- Parameters:
mapView- the map view for the new instance- Returns:
- the new instance
-
activate
protected abstract void activate(@NotNull D dialog)Activates an existing instance.- Parameters:
dialog- the instance
-
dispose
protected abstract void dispose(@NotNull D dialog)Destroys an instance.- Parameters:
dialog- the instance
-
-