Class AbstractPerMapDialogManager<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<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.Object
    Maintains (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 Detail

      • AbstractPerMapDialogManager

        protected AbstractPerMapDialogManager​(@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
                                      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