public class ExportMapAsImageAction<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements EditorAction
EditorAction
that runs the map export on the current map.Constructor and Description |
---|
ExportMapAsImageAction(@NotNull MapManager<G,A,R> mapManager,
@NotNull RendererFactory<G,A,R> rendererFactory,
@NotNull javax.swing.JFrame parent)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
exportMap(@NotNull MapControl<G,A,R> mapControl,
boolean includeTiledMaps,
@NotNull java.io.File file,
@NotNull ExportMapProgress progress)
Exports a map as an image file.
|
void |
exportMapAsImage()
Exports the current map as an image file.
|
void |
setAction(@NotNull javax.swing.Action action,
@NotNull java.lang.String name)
Sets the
Action instance for this editor action. |
public ExportMapAsImageAction(@NotNull @NotNull MapManager<G,A,R> mapManager, @NotNull @NotNull RendererFactory<G,A,R> rendererFactory, @NotNull @NotNull javax.swing.JFrame parent)
mapManager
- the map manager instance for loading mapsrendererFactory
- the renderer factory for creating images from
mapsparent
- the parent window for export map dialogs@ActionMethod public void exportMapAsImage()
public void setAction(@NotNull @NotNull javax.swing.Action action, @NotNull @NotNull java.lang.String name)
EditorAction
Action
instance for this editor action.setAction
in interface EditorAction
action
- the action instancename
- the name of the actionpublic boolean exportMap(@NotNull @NotNull MapControl<G,A,R> mapControl, boolean includeTiledMaps, @NotNull @NotNull java.io.File file, @NotNull @NotNull ExportMapProgress progress)
mapControl
- the map to exportincludeTiledMaps
- whether to include tiled mapsfile
- the output image fileprogress
- the progress instance to notify