Package mindnotes.client.presentation.KeyboardShortcuts

Examples of mindnotes.client.presentation.KeyboardShortcuts.KeyBinding


  @Test
  public void testKeyboardBindings() {
    KeyboardShortcuts ks = new KeyboardShortcuts();
    final Flag flag = new Flag();
    ks.addBinding(new KeyBinding('Z', true, false, false, new Command() {

      @Override
      public void execute() {
        flag.up();
      }
View Full Code Here


  @Test
  public void testDoubleKeyboardBindings() {
    KeyboardShortcuts ks = new KeyboardShortcuts();
    final Flag flag1 = new Flag();
    final Flag flag2 = new Flag();
    ks.addBinding(new KeyBinding('Z', true, false, false, new Command() {

      @Override
      public void execute() {
        flag1.up();
      }
    }));

    ks.addBinding(new KeyBinding('Z', true, true, false, new Command() {

      @Override
      public void execute() {
        flag2.up();
      }
View Full Code Here

    }

  }

  private void initializeKeyboardBindings() {
    _keyboardShortcuts.addBinding(new KeyBinding('Z', true, false, false,
        new Command() {

          @Override
          public void execute() {
            _mindMapEditor.undo();
          }
        }));
    _keyboardShortcuts.addBinding(new KeyBinding('X', true, false, false,
        new Command() {

          @Override
          public void execute() {
            _mindMapEditor.cut();
          }
        }));

    _keyboardShortcuts.addBinding(new KeyBinding('V', true, false, false,
        new Command() {

          @Override
          public void execute() {
            _mindMapEditor.paste();
          }
        }));
    _keyboardShortcuts.addBinding(new KeyBinding(KeyCodes.KEY_LEFT, false,
        false, false, new Command() {

          @Override
          public void execute() {
            _mindMapEditor.navigateLeft();

          }
        }));
    _keyboardShortcuts.addBinding(new KeyBinding(KeyCodes.KEY_RIGHT, false,
        false, false, new Command() {

          @Override
          public void execute() {
            _mindMapEditor.navigateRight();

          }
        }));
    _keyboardShortcuts.addBinding(new KeyBinding(KeyCodes.KEY_UP, false,
        false, false, new Command() {

          @Override
          public void execute() {

            _mindMapEditor.navigateUp();

          }
        }));
    _keyboardShortcuts.addBinding(new KeyBinding(KeyCodes.KEY_DOWN, false,
        false, false, new Command() {

          @Override
          public void execute() {

            _mindMapEditor.navigateDown();

          }
        }));
    _keyboardShortcuts.addBinding(new KeyBinding(KeyCodes.KEY_DELETE,
        false, false, false, new Command() {

          @Override
          public void execute() {
            _mindMapEditor.deleteSelection();

          }
        }));
    _keyboardShortcuts.addBinding(new KeyBinding(KeyCodes.KEY_ENTER, false,
        false, false, new Command() {

          @Override
          public void execute() {
            _mindMapEditor.enterTextMode(null);
View Full Code Here

TOP

Related Classes of mindnotes.client.presentation.KeyboardShortcuts.KeyBinding

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.