Examples of IKeystrokeValidator


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
Copyright © 2018 www.massapi.com. 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.