} else if (command.equals("Save as Image...")) {
} else if (command.equals(Resources.getString("menu.file.image"))) {
    private void handleEvent(ActionEvent event) {        String command = event.getActionCommand();        if (command.equals("Brush...")) {            BrushDialog bd = new BrushDialog(this, appFrame, currentBrush);            bd.setVisible(true);        } else if (command.equals("New Tileset...")) {            if (currentMap != null) {                NewTilesetDialog dialog =                    new NewTilesetDialog(appFrame, currentMap);                TileSet newSet = dialog.create();                if (newSet != null) {                    currentMap.addTileset(newSet);                }            }        } else if (command.equals("Import Tileset...")) {            if (currentMap != null) {                JFileChooser ch = new JFileChooser(currentMap.getFilename());                MapReader[] readers = pluginLoader.getReaders();                for (int i = 0; i < readers.length; i++) {                    try {                        ch.addChoosableFileFilter(new TiledFileFilter(                                    readers[i].getFilter(),                                    readers[i].getName()));                    } catch (Exception e) {                        e.printStackTrace();                    }                }                ch.addChoosableFileFilter(                        new TiledFileFilter(TiledFileFilter.FILTER_TSX));                int ret = ch.showOpenDialog(appFrame);                if (ret == JFileChooser.APPROVE_OPTION) {                    String filename = ch.getSelectedFile().getAbsolutePath();                    try {                        TileSet set = MapHelper.loadTileset(filename);                        currentMap.addTileset(set);                    } catch (Exception e) {                        e.printStackTrace();                    }                }            }        } else if (command.equals("Tileset Manager")) {            if (currentMap != null) {                TilesetManager manager = new TilesetManager(appFrame, currentMap);                manager.setVisible(true);            }        } else if (command.equals("Save as Image...")) {            if (currentMap != null) {                saveMapImage(null);            }        } else if (command.equals("Properties")) {            PropertiesDialog pd = new PropertiesDialog(appFrame,                    currentMap.getProperties());            pd.setTitle(Resources.getString("dialog.properties.map.title"));            pd.getProps();        } else if (command.equals("Layer Properties")) {            MapLayer layer = getCurrentLayer();            PropertiesDialog lpd =                new PropertiesDialog(appFrame, layer.getProperties());            lpd.setTitle(layer.getName() + " Properties");            lpd.getProps();        } else if (command.equals("Show Boundaries") ||                command.equals("Hide Boundaries")) {            mapView.toggleMode(MapView.PF_BOUNDARYMODE);        } else if (command.equals("Show Grid")) {            // Toggle grid            mapView.toggleMode(MapView.PF_GRIDMODE);        } else if (command.equals("Show Coordinates")) {            // Toggle coordinates            mapView.toggleMode(MapView.PF_COORDINATES);            mapView.repaint();        } else if (command.equals("Highlight Cursor")) {            prefs.putBoolean("cursorhighlight", cursorMenuItem.isSelected());            cursorHighlight.setVisible(cursorMenuItem.isSelected());        } else if (command.equals("Resize")) {            ResizeDialog rd = new ResizeDialog(appFrame, this);            rd.setVisible(true);        }  else if (command.equals("Search")) {            SearchDialog sd = new SearchDialog(appFrame, currentMap);            sd.setVisible(true);        } else if (command.equals("About Tiled")) {            if (aboutDialog == null) {                aboutDialog = new AboutDialog(appFrame);            }            aboutDialog.setVisible(true);        } else if (command.equals("About Plug-ins")) {            PluginDialog pluginDialog =                new PluginDialog(appFrame, pluginLoader);            pluginDialog.setVisible(true);        } else if (command.startsWith("_open")) {            Preferences recentFiles = prefs.node("recent");            String file = recentFiles.get("file" + command.substring(5), "");            if (file.length() > 0) {                loadMap(file);            }        } else if (command.equals("Preferences...")) {            ConfigurationDialog d = new ConfigurationDialog(appFrame);            d.configure();        } else {            System.out.println(event);        }    }