Class MapActions<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>

    • Constructor Detail

      • MapActions

        public MapActions​(@NotNull
                          @NotNull java.awt.Frame helpParent,
                          @NotNull
                          @NotNull MapManager<G,​A,​R> mapManager,
                          @NotNull
                          @NotNull MapViewManager<G,​A,​R> mapViewManager,
                          @NotNull
                          @NotNull ExitMatcher<G,​A,​R> exitMatcher,
                          @NotNull
                          @NotNull javax.swing.filechooser.FileFilter mapFileFilter,
                          @NotNull
                          @NotNull SelectedSquareModel<G,​A,​R> selectedSquareModel,
                          boolean allowRandomMapParameters,
                          @NotNull
                          @NotNull MapPropertiesDialogFactory<G,​A,​R> mapPropertiesDialogFactory,
                          @NotNull
                          @NotNull MapViewSettings mapViewSettings,
                          @NotNull
                          @NotNull MapViewsManager<G,​A,​R> mapViewsManager,
                          @NotNull
                          @NotNull EnterMap<G,​A,​R> enterMap,
                          @NotNull
                          @NotNull ProjectSettings projectSettings)
        Creates a new instance.
        Parameters:
        helpParent - the parent frame for help windows
        mapManager - the map manager
        mapViewManager - the map view manager
        exitMatcher - the exit matcher for selecting exit game objects
        mapFileFilter - the Swing file filter to use
        selectedSquareModel - the selected square model to use
        allowRandomMapParameters - whether exit paths may point to random maps
        mapPropertiesDialogFactory - the map properties dialog factory to use
        mapViewSettings - the map view settings instance to use
        mapViewsManager - the map views
        enterMap - the enter map instance to use
    • Method Detail

      • isGridVisible

        @ActionMethod
        public boolean isGridVisible()
        Action method for "grid visible".
        Returns:
        true if the grid is visible, or false if the grid is invisible
      • setGridVisible

        @ActionMethod
        public void setGridVisible​(boolean gridVisible)
        Sets whether the grid of the current map should be visible.
        Parameters:
        gridVisible - new visibility of grid in current map, true if the grid should be visible, false if invisible
        See Also:
        isGridVisible()
      • isSmoothing

        @ActionMethod
        public boolean isSmoothing()
        Action method for "smoothing".
        Returns:
        true if smoothing is active, or false if smoothing is disabled
      • setSmoothing

        @ActionMethod
        public void setSmoothing​(boolean smoothing)
        Sets whether smoothing of the current map is active.
        Parameters:
        smoothing - new smoothing in current map, true if the smoothing should be active, false if deactivated
        See Also:
        ()
      • isDoubleFaces

        @ActionMethod
        public boolean isDoubleFaces()
        Action method for "double faces".
        Returns:
        true if double faces are shown, or false if not
      • setDoubleFaces

        @ActionMethod
        public void setDoubleFaces​(boolean doubleFaces)
        Sets whether double faces on the current map should be shown.
        Parameters:
        doubleFaces - new value
        See Also:
        isDoubleFaces()
      • isTileShow

        @ActionMethod
        public boolean isTileShow()
        Action method for "tile show".
        Returns:
        true if adjacent tiles are shown, or false if not
        No Inspection:
        MethodMayBeStatic, SameReturnValue
      • isTileStretching

        @ActionMethod
        public boolean isTileStretching()
        Action method for "tile-stretching".
        Returns:
        true if tile-stretching is active, or false if tile-stretching is disabled
      • setTileStretching

        @ActionMethod
        public void setTileStretching​(boolean tileStretching)
        Sets whether tile-stretching of the current map is active.
        Parameters:
        tileStretching - new tile-stretching in current map, true if the tile-stretching should be active, false if deactivated
        See Also:
        ()
      • setTileShow

        @ActionMethod
        public void setTileShow​(boolean tileShow)
        Action method for "tile show".
        Parameters:
        tileShow - if set, show adjacent tiles
      • mapCreateView

        @ActionMethod
        public void mapCreateView()
        Action method for "create view".
      • mapProperties

        @ActionMethod
        public void mapProperties()
        Action method for "map properties".
      • shrinkMapSize

        @ActionMethod
        public void shrinkMapSize()
        Action method for "shrink map size".
      • isAutoJoin

        @ActionMethod
        public boolean isAutoJoin()
        Action method for "autojoin".
        Returns:
        true if autojoining is enabled, or false if autojoining is disabled
      • setAutoJoin

        @ActionMethod
        public void setAutoJoin​(boolean autoJoin)
        Action method for "autoJoin".
        Parameters:
        autoJoin - if set, enable autojoining
      • enterExit

        @ActionMethod
        public void enterExit()
        Tries to load the map where the selected map-exit points to.
      • nextExit

        @ActionMethod
        public void nextExit()
        Selects the next exit.
      • prevExit

        @ActionMethod
        public void prevExit()
        Selects the previous exit.
      • enterNorthMap

        @ActionMethod
        public void enterNorthMap()
        Action method for entering the north map.
      • enterNorthEastMap

        @ActionMethod
        public void enterNorthEastMap()
        Action method for entering the north east map.
      • enterEastMap

        @ActionMethod
        public void enterEastMap()
        Action method for entering the east map.
      • enterSouthEastMap

        @ActionMethod
        public void enterSouthEastMap()
        Action method for entering the south east map.
      • enterSouthMap

        @ActionMethod
        public void enterSouthMap()
        Action method for entering the south map.
      • enterSouthWestMap

        @ActionMethod
        public void enterSouthWestMap()
        Action method for entering the south west map.
      • enterWestMap

        @ActionMethod
        public void enterWestMap()
        Action method for entering the west map.
      • enterNorthWestMap

        @ActionMethod
        public void enterNorthWestMap()
        Action method for entering the north west map.
      • enterUpMap

        @ActionMethod
        public void enterUpMap()
        Action method for entering the up map.
      • enterDownMap

        @ActionMethod
        public void enterDownMap()
        Action method for entering the down map.
      • createTileNorth

        @ActionMethod
        public void createTileNorth()
        Action method for creating north tiled map.
      • createTileEast

        @ActionMethod
        public void createTileEast()
        Action method for creating east tiled map.
      • createTileSouth

        @ActionMethod
        public void createTileSouth()
        Action method for creating south tiled map.
      • createTileWest

        @ActionMethod
        public void createTileWest()
        Action method for creating west tiled map.
      • createTileNorthEast

        @ActionMethod
        public void createTileNorthEast()
        Action method for creating northeast tiled map.
      • createTileSouthEast

        @ActionMethod
        public void createTileSouthEast()
        Action method for creating southeast tiled map.
      • createTileSouthWest

        @ActionMethod
        public void createTileSouthWest()
        Action method for creating southwest tiled map.
      • createTileNorthWest

        @ActionMethod
        public void createTileNorthWest()
        Action method for creating northwest tiled map.
      • createTileUp

        @ActionMethod
        public void createTileUp()
        Action method for creating up tiled map.
      • createTileDown

        @ActionMethod
        public void createTileDown()
        Action method for creating down tiled map.
      • deleteUnknownObjects

        @ActionMethod
        public void deleteUnknownObjects()
        Deletes all game objects referencing unknown archetypes.
      • enterMap

        public void enterMap​(@NotNull
                             @NotNull MapFile mapFile,
                             @Nullable
                             @Nullable java.awt.Point destinationPoint)
        Enters a map.
        Parameters:
        mapFile - the map file to enter
        destinationPoint - the desired destination point on the map or null for default
      • doEnterMap

        public boolean doEnterMap​(boolean performAction,
                                  @NotNull
                                  @NotNull Direction direction)
        Executes the "enter map" action.
        Parameters:
        performAction - whether the action should be performed
        direction - the direction to enter
        Returns:
        whether the action was or can be performed
      • setAction

        public void setAction​(@NotNull
                              @NotNull javax.swing.Action action,
                              @NotNull
                              @NotNull java.lang.String name)
        Description copied from interface: EditorAction
        Sets the Action instance for this editor action.
        Specified by:
        setAction in interface EditorAction
        Parameters:
        action - the action instance
        name - the name of the action