20 package net.sf.gridarta.gui.mapmenu;
22 import java.awt.Image;
23 import java.awt.event.ActionEvent;
24 import java.io.IOException;
25 import javax.swing.AbstractAction;
26 import javax.swing.ImageIcon;
31 import net.
sf.japi.swing.action.ActionBuilder;
32 import net.
sf.japi.swing.action.ActionBuilderFactory;
33 import org.jetbrains.annotations.NotNull;
50 private static final ActionBuilder
ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder(
"net.sf.gridarta");
87 }
catch (
final IOException ex) {
98 final String title = mapMenuEntryMap.
getTitle();
99 final String shortDescription = ACTION_BUILDER.format(
"mapItem.shortdescriptionformat", title, mapFile);
100 putValue(SHORT_DESCRIPTION, shortDescription);
101 putValue(MNEMONIC_KEY, null);
102 putValue(NAME, title);
103 final Image icon = mapImageCache.getOrCreateIcon(mapFile.
getFile());
105 putValue(SMALL_ICON,
new ImageIcon(icon));
107 putValue(SMALL_ICON, null);
113 public Object
clone() throws CloneNotSupportedException {
114 return super.clone();
Graphical User Interface of Gridarta.
Stores all existing MapViews.
Base package of all Gridarta classes.
void reportLoadError(@Nullable File file, @NotNull String message)
MapView< G, A, R > openMapFileWithView(@NotNull final MapFile mapFile, @Nullable final Point viewPosition, @Nullable final Point centerSquare)
Load a map file and create a map view.
Caches icon and preview images for map files.
Base classes for rendering maps.
File getFile()
Returns a File for this map file.
The location of a map file with a map directory.