"Toggle highlighting on-map cursor position");
Resources.getString("menu.view.cursor.tooltip"));
    private void createMenuBar() {        JMenuItem save = new TMenuItem(saveAction);        JMenuItem saveAs = new TMenuItem(saveAsAction);        JMenuItem saveAsImage = createMenuItem("Save as Image...", null,                "Save current map as an image", "control shift I");        JMenuItem close = new TMenuItem(new CloseMapAction(this, saveAction));        recentMenu = new JMenu("Open Recent");        mapEventAdapter.addListener(save);        mapEventAdapter.addListener(saveAs);        mapEventAdapter.addListener(saveAsImage);        mapEventAdapter.addListener(close);        JMenu fileMenu = new JMenu("File");        fileMenu.add(new TMenuItem(new NewMapAction(this, saveAction)));        fileMenu.add(new TMenuItem(new OpenMapAction(this, saveAction)));        fileMenu.add(recentMenu);        fileMenu.add(save);        fileMenu.add(saveAs);        fileMenu.add(saveAsImage);        fileMenu.addSeparator();        fileMenu.add(close);        fileMenu.add(new TMenuItem(exitAction));        undoMenuItem = new TMenuItem(undoAction);        redoMenuItem = new TMenuItem(redoAction);        undoMenuItem.setEnabled(false);        redoMenuItem.setEnabled(false);        JMenuItem copyMenuItem = new TMenuItem(new CopyAction());        JMenuItem cutMenuItem = new TMenuItem(new CutAction());        JMenuItem pasteMenuItem = new TMenuItem(new PasteAction());        copyMenuItem.setEnabled(false);        cutMenuItem.setEnabled(false);        pasteMenuItem.setEnabled(false);        JMenu transformSub = new JMenu("Transform");        transformSub.add(new TMenuItem(rot90Action, true));        transformSub.add(new TMenuItem(rot180Action, true));        transformSub.add(new TMenuItem(rot270Action, true));        transformSub.addSeparator();        transformSub.add(new TMenuItem(flipHorAction, true));        transformSub.add(new TMenuItem(flipVerAction, true));        mapEventAdapter.addListener(transformSub);        JMenu editMenu = new JMenu("Edit");        editMenu.add(undoMenuItem);        editMenu.add(redoMenuItem);        editMenu.addSeparator();        editMenu.add(copyMenuItem);        editMenu.add(cutMenuItem);        editMenu.add(pasteMenuItem);        editMenu.addSeparator();        editMenu.add(transformSub);        editMenu.addSeparator();        editMenu.add(createMenuItem("Preferences...",                    null, "Configure options of the editor", null));        editMenu.add(createMenuItem("Brush...", null, "Configure the brush",                    "control B"));        mapEventAdapter.addListener(undoMenuItem);        mapEventAdapter.addListener(redoMenuItem);        mapEventAdapter.addListener(copyMenuItem);        mapEventAdapter.addListener(cutMenuItem);        mapEventAdapter.addListener(pasteMenuItem);        JMenu mapMenu = new JMenu("Map");        mapMenu.add(createMenuItem("Resize", null, "Modify map dimensions"));        mapMenu.add(createMenuItem("Search", null,                    "Search for/Replace tiles"));        mapMenu.addSeparator();        mapMenu.add(createMenuItem("Properties", null, "Map properties"));        mapEventAdapter.addListener(mapMenu);        JMenuItem layerAdd = new TMenuItem(addLayerAction);        mapEventAdapter.addListener(layerAdd);        JMenu layerMenu = new JMenu("Layer");        layerMenu.add(layerAdd);        layerMenu.add(new TMenuItem(cloneLayerAction));        layerMenu.add(new TMenuItem(deleteLayerAction));        layerMenu.addSeparator();        layerMenu.add(new TMenuItem(moveLayerUpAction));        layerMenu.add(new TMenuItem(moveLayerDownAction));        layerMenu.addSeparator();        layerMenu.add(new TMenuItem(mergeLayerDownAction));        layerMenu.add(new TMenuItem(mergeAllLayersAction));        layerMenu.addSeparator();        layerMenu.add(createMenuItem("Layer Properties", null,                                     "Current layer properties"));        JMenu tilesetMenu = new JMenu("Tilesets");        tilesetMenu.add(createMenuItem("New Tileset...", null,                    "Add a new internal tileset"));        tilesetMenu.add(createMenuItem("Import Tileset...", null,                    "Import an external tileset"));        tilesetMenu.addSeparator();        tilesetMenu.add(createMenuItem("Tileset Manager", null,                    "Open the tileset manager"));        /*        objectMenu = new JMenu("Objects");        objectMenu.add(createMenuItem("Add Object", null, "Add an object"));        mapEventAdapter.addListener(objectMenu);        JMenu modifySub = new JMenu("Modify");        modifySub.add(createMenuItem("Expand Selection", null, ""));        modifySub.add(createMenuItem("Contract Selection", null, ""));        */        JMenu selectMenu = new JMenu("Select");        selectMenu.add(new TMenuItem(selectAllAction, true));        selectMenu.add(new TMenuItem(cancelSelectionAction, true));        selectMenu.add(new TMenuItem(inverseAction, true));        //selectMenu.addSeparator();        //selectMenu.add(modifySub);        gridMenuItem = new JCheckBoxMenuItem("Show Grid");        gridMenuItem.addActionListener(this);        gridMenuItem.setToolTipText("Toggle grid");        gridMenuItem.setAccelerator(KeyStroke.getKeyStroke("control G"));        cursorMenuItem = new JCheckBoxMenuItem("Highlight Cursor");        cursorMenuItem.setSelected(prefs.getBoolean("cursorhighlight", true));        cursorMenuItem.addActionListener(this);        cursorMenuItem.setToolTipText(                "Toggle highlighting on-map cursor position");        boundaryMenuItem = new JCheckBoxMenuItem("Show Boundaries");        boundaryMenuItem.addActionListener(this);        boundaryMenuItem.setToolTipText("Toggle layer boundaries");        boundaryMenuItem.setAccelerator(KeyStroke.getKeyStroke("control E"));        coordinatesMenuItem = new JCheckBoxMenuItem("Show Coordinates");        coordinatesMenuItem.addActionListener(this);        coordinatesMenuItem.setToolTipText("Toggle tile coordinates");        JMenu viewMenu = new JMenu("View");        viewMenu.add(new TMenuItem(zoomInAction));        viewMenu.add(new TMenuItem(zoomOutAction));        viewMenu.add(new TMenuItem(zoomNormalAction));        viewMenu.addSeparator();        viewMenu.add(gridMenuItem);        viewMenu.add(cursorMenuItem);        // TODO: Enable when boudary drawing code finished.        //viewMenu.add(boundaryMenuItem);        viewMenu.add(coordinatesMenuItem);        mapEventAdapter.addListener(layerMenu);        mapEventAdapter.addListener(tilesetMenu);        mapEventAdapter.addListener(selectMenu);        mapEventAdapter.addListener(viewMenu);        JMenu helpMenu = new JMenu("Help");        helpMenu.add(createMenuItem("About Plug-ins", null,                    "Show plugin window"));        helpMenu.add(createMenuItem("About Tiled", null, "Show about window"));        menuBar = new JMenuBar();        menuBar.add(fileMenu);        menuBar.add(editMenu);        menuBar.add(selectMenu);        menuBar.add(viewMenu);        menuBar.add(mapMenu);        menuBar.add(layerMenu);        menuBar.add(tilesetMenu);        //menuBar.add(objectMenu);        menuBar.add(helpMenu);    }