Package net.sf.gridarta.gui.copybuffer
Enum CopyMode
- java.lang.Object
-
- java.lang.Enum<CopyMode>
-
- net.sf.gridarta.gui.copybuffer.CopyMode
-
-
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>>
voidprepare(@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>>
voidprocess(@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 aGameObject.static CopyModevalueOf(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.
-
-
-
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 namejava.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 modelmapSize- 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 aGameObject.- Parameters:
mapModel- the copy buffer's map modelgameObject- the game objectisEditType- whether the game object matches the active edit typegameObjectsToDelete- a collection for game objects to delete after the operation has finishedpos- the current map positiongameObjectFactory- the game object factory to useinsertionModeSet- the insertion mode set to use
-
-