Examples of GrabKeyDialog


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

   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);
        setAccelerator(action, accelerator);
        keysetProps.setProperty(shortcutKey, shortcut);
        LogUtils.info("created shortcut '" + shortcut + "' for action '" + action.getKey() + "', shortcutKey '"
        + shortcutKey + "' (" + ActionUtils.getActionTitle(action) + ")");
View Full Code Here

Examples of org.gjt.sp.jedit.gui.GrabKeyDialog

    {
      int row = keyTable.getSelectedRow();
      int col = keyTable.getSelectedColumn();
      if(col != 0 && row != -1)
      {
         GrabKeyDialog gkd = new GrabKeyDialog(
          GUIUtilities.getParentDialog(
          ShortcutsOptionPane.this),
          currentModel.getBindingAt(row,col-1),
          allBindings,null);
        if(gkd.isOK())
          currentModel.setValueAt(
            gkd.getShortcut(),row,col);
      }
    }
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.