Package org.openstreetmap.josm.tools.MultikeyShortcutAction

Examples of org.openstreetmap.josm.tools.MultikeyShortcutAction.MultikeyInfo


                    });
                    layers.add(item);
                }

                if (!repeatKeyUsed) {
                    MultikeyInfo lastLayer = action.action.getLastMultikeyAction();
                    if (lastLayer != null) {
                        JMenuItem repeateItem = new JMenuItem(formatMenuText(action.shortcut.getKeyStroke(),
                                KeyEvent.getKeyText(action.shortcut.getKeyStroke().getKeyCode()),
                                "Repeat " + lastLayer.getDescription()));
                        repeateItem.setMnemonic(action.shortcut.getKeyStroke().getKeyCode());
                        repeateItem.addActionListener(new ActionListener() {
                            @Override
                            public void actionPerformed(ActionEvent e) {
                                action.action.executeMultikeyAction(-1, true);
View Full Code Here


        List<Layer> layers = Main.map.mapView.getAllLayersAsList();

        int index = 0;
        for (Layer l: layers) {
            if (layerClass.isAssignableFrom(l.getClass())) {
                result.add(new MultikeyInfo(index, l.getName()));
            }
            index++;
        }

        return result;
View Full Code Here

        int index = Main.map.mapView.getAllLayersAsList().indexOf(l);
        if (index < 0)
            return null;

        return new MultikeyInfo(index, l.getName());
    }
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.tools.MultikeyShortcutAction.MultikeyInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.