public interface MapControl<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
Modifier and Type | Method and Description |
---|---|
void |
acquire()
Increases the use counter.
|
void |
addMapControlListener(@NotNull MapControlListener<G,A,R> listener)
Registers a
MapControlListener . |
@NotNull MapModel<G,A,R> |
getMapModel()
Returns the map model.
|
int |
getUseCounter()
Returns the use counter.
|
boolean |
isPickmap()
Return flag that indicates whether this is a pickmap or not.
|
void |
release()
Decreases the use counter and possibly frees the map control.
|
void |
removeMapControlListener(@NotNull MapControlListener<G,A,R> listener)
Unregisters a
MapControlListener . |
void |
save()
Saves the map to a file.
|
void |
saveAs(@NotNull MapFile mapFile)
Saves the file with the given map file.
|
boolean isPickmap()
@NotNull @NotNull MapModel<G,A,R> getMapModel()
void addMapControlListener(@NotNull @NotNull MapControlListener<G,A,R> listener)
MapControlListener
.listener
- the listener to registervoid removeMapControlListener(@NotNull @NotNull MapControlListener<G,A,R> listener)
MapControlListener
.listener
- the listener to unregistervoid save() throws java.io.IOException
java.io.IOException
- if saving failsvoid saveAs(@NotNull @NotNull MapFile mapFile) throws java.io.IOException
mapFile
- the map file to be saved tojava.io.IOException
- if saving fails; in this case the modified flag is
not resetvoid acquire()
void release()
int getUseCounter()