Interface MapControl<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>

    • Method Detail

      • isPickmap

        boolean isPickmap()
        Return flag that indicates whether this is a pickmap or not.
        Returns:
        flag that indicates whether this is a pickmap or not
      • getMapModel

        @NotNull
        @NotNull MapModel<G,​A,​R> getMapModel()
        Returns the map model.
        Returns:
        the map model
      • addMapControlListener

        void addMapControlListener​(@NotNull
                                   @NotNull MapControlListener<G,​A,​R> listener)
        Registers a MapControlListener.
        Parameters:
        listener - the listener to register
      • removeMapControlListener

        void removeMapControlListener​(@NotNull
                                      @NotNull MapControlListener<G,​A,​R> listener)
        Unregisters a MapControlListener.
        Parameters:
        listener - the listener to unregister
      • save

        void save()
           throws java.io.IOException
        Saves the map to a file.
        Throws:
        java.io.IOException - if saving fails
      • saveAs

        void saveAs​(@NotNull
                    @NotNull MapFile mapFile)
             throws java.io.IOException
        Saves the file with the given map file. This implicitly sets the map file and resets the modified state.
        Parameters:
        mapFile - the map file to be saved to
        Throws:
        java.io.IOException - if saving fails; in this case the modified flag is not reset
      • acquire

        void acquire()
        Increases the use counter.
      • release

        void release()
        Decreases the use counter and possibly frees the map control.
      • getUseCounter

        int getUseCounter()
        Returns the use counter.
        Returns:
        the use counter