Enum CopyMode

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<CopyMode>

    public enum CopyMode
    extends java.lang.Enum<CopyMode>
    Mode for operations.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DO_CLEAR
      Clear the selection.
      DO_COPY
      Copy the selection.
      DO_CUT
      Cut the selection.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract <G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>
      void
      prepare​(@NotNull MapModel<G,​A,​R> mapModel, @NotNull Size2D mapSize)
      Prepares the operation.
      abstract <G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>
      void
      process​(@NotNull MapModel<G,​A,​R> mapModel, G gameObject, boolean isEditType, @NotNull java.util.Collection<G> gameObjectsToDelete, @NotNull java.awt.Point pos, @NotNull GameObjectFactory<G,​A,​R> gameObjectFactory, @NotNull InsertionModeSet<G,​A,​R> insertionModeSet)
      Processes a GameObject.
      static CopyMode valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static CopyMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • DO_CLEAR

        public static final CopyMode DO_CLEAR
        Clear the selection.
      • DO_CUT

        public static final CopyMode DO_CUT
        Cut the selection.
      • DO_COPY

        public static final CopyMode DO_COPY
        Copy the selection.
    • Method Detail

      • values

        public static CopyMode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (CopyMode c : CopyMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CopyMode valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • prepare

        public abstract <G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>> void prepare​(@NotNull
                                                                                                                                                             @NotNull MapModel<G,​A,​R> mapModel,
                                                                                                                                                             @NotNull
                                                                                                                                                             @NotNull Size2D mapSize)
        Prepares the operation. Will be called once before when the operation starts.
        Parameters:
        mapModel - the copy buffer's map model
        mapSize - the new size of the copy buffer's map model
      • process

        public abstract <G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>> void process​(@NotNull
                                                                                                                                                             @NotNull MapModel<G,​A,​R> mapModel,
                                                                                                                                                             @NotNull
                                                                                                                                                             G gameObject,
                                                                                                                                                             boolean isEditType,
                                                                                                                                                             @NotNull
                                                                                                                                                             @NotNull java.util.Collection<G> gameObjectsToDelete,
                                                                                                                                                             @NotNull
                                                                                                                                                             @NotNull java.awt.Point pos,
                                                                                                                                                             @NotNull
                                                                                                                                                             @NotNull GameObjectFactory<G,​A,​R> gameObjectFactory,
                                                                                                                                                             @NotNull
                                                                                                                                                             @NotNull InsertionModeSet<G,​A,​R> insertionModeSet)
        Processes a GameObject.
        Parameters:
        mapModel - the copy buffer's map model
        gameObject - the game object
        isEditType - whether the game object matches the active edit type
        gameObjectsToDelete - a collection for game objects to delete after the operation has finished
        pos - the current map position
        gameObjectFactory - the game object factory to use
        insertionModeSet - the insertion mode set to use