Package org.waveprotocol.wave.client.editor

Examples of org.waveprotocol.wave.client.editor.EditorAction


   * event is fired at the editor.
   */
  public void testKeyBinding() {
    KeyBindingRegistry bindings = new KeyBindingRegistry();
    callTracker = 0;
    EditorAction testAction = new EditorAction() {
      public void execute(EditorContext context) {
        callTracker++;
      }
    };
    bindings.registerAction(KeyCombo.ORDER_G, testAction);
View Full Code Here


  /** Ensure that when other keys are pressed, they are not passed to the action. */
  public void testAlternativeKeyPress() {
    KeyBindingRegistry bindings = new KeyBindingRegistry();
    callTracker = 0;
    EditorAction testAction = new EditorAction() {
      public void execute(EditorContext context) {
        callTracker++;
      }
    };
    bindings.registerAction(KeyCombo.ORDER_G, testAction);
View Full Code Here

   * Ensure that new keybindings are used after changing them in the editor.
   */
  public void testReregistrationKeyBinding() {
    KeyBindingRegistry bindings = new KeyBindingRegistry();
    callTracker = 0;
    EditorAction testAction = new EditorAction() {
      public void execute(EditorContext context) {
        callTracker++;
      }
    };
    bindings.registerAction(KeyCombo.ORDER_G, testAction);
View Full Code Here

    // Create or re-use and editor for it.
    editor = Editors.attachTo(document);
    container.doAdopt(editor.getWidget());
    editor.init(null, KEY_BINDINGS, EDITOR_SETTINGS);
    editor.addKeySignalListener(this);
    KEY_BINDINGS.registerAction(KeyCombo.ORDER_K, new EditorAction() {
      @Override
      public void execute(EditorContext context) {
        LinkerHelper.onCreateLink(context);
      }
    });
    KEY_BINDINGS.registerAction(KeyCombo.ORDER_SHIFT_K, new EditorAction() {
      @Override
      public void execute(EditorContext context) {
        LinkerHelper.onClearLink(context);
      }
    });
View Full Code Here

    // Create or re-use and editor for it.
    editor = Editors.attachTo(document);
    container.doAdopt(editor.getWidget());
    editor.init(null, KEY_BINDINGS, EDITOR_SETTINGS);
    editor.addKeySignalListener(this);
    KEY_BINDINGS.registerAction(KeyCombo.ORDER_K, new EditorAction() {
      @Override
      public void execute(EditorContext context) {
        LinkerHelper.onCreateLink(context);
      }
    });
    KEY_BINDINGS.registerAction(KeyCombo.ORDER_SHIFT_K, new EditorAction() {
      @Override
      public void execute(EditorContext context) {
        LinkerHelper.onClearLink(context);
      }
    });
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.client.editor.EditorAction

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.