Go to the documentation of this file.
20 package net.sf.gridarta.gui.map.renderer;
23 import java.io.IOException;
30 import net.
sf.japi.swing.action.ActionBuilder;
31 import net.
sf.japi.swing.action.ActionBuilderFactory;
32 import org.apache.log4j.Category;
33 import org.apache.log4j.Logger;
34 import org.jetbrains.annotations.NotNull;
47 private static final ActionBuilder
ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder(
"net.sf.gridarta");
78 final File tmpFile =
new File(file.getPath() +
".tmp");
80 if (!tmpFile.renameTo(file)) {
81 if (!file.exists() || !file.delete() || !tmpFile.renameTo(file)) {
82 throw new IOException(
"cannot rename " + tmpFile +
" to " + file);
85 if (
LOG.isInfoEnabled()) {
86 LOG.info(
ACTION_BUILDER.format(
"logImageCreated", file, mapModel.getMapArchObject().getMapName()));
90 public void makeImage(@NotNull
final File in, @NotNull
final File out)
throws IOException {
91 if (
LOG.isInfoEnabled()) {
92 LOG.info(
"converting " + in +
" to " + out);
void release(@NotNull MapControl< G, A, R > mapControl)
MapControl< G, A, R > openMapFile(@NotNull MapFile mapFile, boolean interactive)
void makeImage(@NotNull final File in, @NotNull final File out)
void createImage(@NotNull final MapModel< G, A, R > mapModel, @NotNull final File file)
static final ActionBuilder ACTION_BUILDER
ImageCreator(@NotNull final MapManager< G, A, R > mapManager, @NotNull final RendererFactory< G, A, R > rendererFactory)
static final Category LOG
void printFullImage(@NotNull File file)
final RendererFactory< G, A, R > rendererFactory
MapModel< G, A, R > getMapModel()
final MapManager< G, A, R > mapManager
MapRenderer newSimpleMapRenderer(@NotNull MapModel< G, A, R > mapModel)