Package net.sf.gridarta.action.exportmap
Class ExportMapAsImageAction<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.action.exportmap.ExportMapAsImageAction<G,A,R>
-
- All Implemented Interfaces:
EditorAction
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
AnEditorActionthat runs the map export on the current map.
-
-
Constructor Summary
Constructors Constructor Description ExportMapAsImageAction(@NotNull MapManager<G,A,R> mapManager, @NotNull RendererFactory<G,A,R> rendererFactory, @NotNull javax.swing.JFrame parent)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexportMap(@NotNull MapControl<G,A,R> mapControl, boolean includeTiledMaps, @NotNull java.io.File file, @NotNull ExportMapProgress progress)Exports a map as an image file.voidexportMapAsImage()Exports the current map as an image file.voidsetAction(@NotNull javax.swing.Action action, @NotNull java.lang.String name)Sets theActioninstance for this editor action.
-
-
-
Constructor Detail
-
ExportMapAsImageAction
public ExportMapAsImageAction(@NotNull @NotNull MapManager<G,A,R> mapManager, @NotNull @NotNull RendererFactory<G,A,R> rendererFactory, @NotNull @NotNull javax.swing.JFrame parent)Creates a new instance.- Parameters:
mapManager- the map manager instance for loading mapsrendererFactory- the renderer factory for creating images from mapsparent- the parent window for export map dialogs
-
-
Method Detail
-
exportMapAsImage
@ActionMethod public void exportMapAsImage()
Exports the current map as an image file.
-
setAction
public void setAction(@NotNull @NotNull javax.swing.Action action, @NotNull @NotNull java.lang.String name)Description copied from interface:EditorActionSets theActioninstance for this editor action.- Specified by:
setActionin interfaceEditorAction- Parameters:
action- the action instancename- the name of the action
-
exportMap
public boolean exportMap(@NotNull @NotNull MapControl<G,A,R> mapControl, boolean includeTiledMaps, @NotNull @NotNull java.io.File file, @NotNull @NotNull ExportMapProgress progress)Exports a map as an image file.- Parameters:
mapControl- the map to exportincludeTiledMaps- whether to include tiled mapsfile- the output image fileprogress- the progress instance to notify- Returns:
- whether exporting was successful
-
-