Package org.freeplane.core.resources.components

Examples of org.freeplane.core.resources.components.IKeystrokeValidator


   public void newAccelerator(final AFreeplaneAction action, final KeyStroke newAccelerator) {
    final String shortcutKey = getPropertyKey(action.getKey());
    final String oldShortcut = getProperty(shortcutKey);
    if (newAccelerator == null || !new KeystrokeValidator(action).isValid(newAccelerator, newAccelerator.getKeyChar())) {
      final GrabKeyDialog grabKeyDialog = new GrabKeyDialog(oldShortcut);
      final IKeystrokeValidator validator = new KeystrokeValidator(action);
      grabKeyDialog.setValidator(validator);
      grabKeyDialog.setVisible(true);
      if (grabKeyDialog.isOK()) {
        final String shortcut = grabKeyDialog.getShortcut();
        final KeyStroke accelerator = UITools.getKeyStroke(shortcut);
View Full Code Here

TOP

Related Classes of org.freeplane.core.resources.components.IKeystrokeValidator

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.