Examples of KeyBinding


Examples of com.totsp.gwittir.client.keyboard.KeyBinding

 
  public KeyBindingExample(){
    super( new BoundWidgetTypeFactory(), null);
    Button keyButton = new Button();
        keyButton.setHTML("<u>S</u>ave");
        keyButton.setKeyBinding(new KeyBinding('S', false, true, false));
        keyButton.setAction(new Action() {
                public void execute(BoundWidget model) {
                    Window.alert("SAVE!");
                }
            });
View Full Code Here

Examples of com.totsp.gwittir.client.keyboard.KeyBinding

                            handleBinding(newActive, entry);
                        }
                    }

                    private void handleBinding(boolean newActive, Entry entry) {
                        KeyBinding kb = (KeyBinding) entry.getKey();
                        Object execute = entry.getValue();

                        if (newActive) {
                            BoundTable.LOG.log(Level.SPAM, "Registering " + kb, null);
View Full Code Here

Examples of com.totsp.gwittir.client.keyboard.KeyBinding

                        handleBinding(newActive, entry);
                    }
                }

                private void handleBinding(boolean newActive, Entry entry) {
                    KeyBinding kb = (KeyBinding) entry.getKey();
                    Object execute = entry.getValue();

                    if (newActive) {
                        BoundTable.LOG.log(Level.SPAM, "Registering " + kb, null);
View Full Code Here

Examples of com.totsp.gwittir.client.keyboard.KeyBinding

                            handleBinding(newActive, entry);
                        }
                    }

                    private void handleBinding(boolean newActive, Entry entry) {
                        KeyBinding kb = (KeyBinding) entry.getKey();
                        Object execute = entry.getValue();

                        if (newActive) {
                            BoundTable.LOG.log(Level.SPAM, "Registering " + kb, null);
View Full Code Here

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

Examples of mindnotes.client.presentation.KeyboardShortcuts.KeyBinding

  @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

Examples of mindnotes.client.presentation.KeyboardShortcuts.KeyBinding

    }

  }

  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

Examples of net.minecraft.client.settings.KeyBinding

 
  private KeyBinding yetaWrenchMode; 
 
 
  public KeyTracker() {
    glideKey = new KeyBinding("Glider Toggle", Keyboard.KEY_G, "Dark Steel Armor");
    ClientRegistry.registerKeyBinding(glideKey);
    soundDetectorKey = new KeyBinding("Sound Locator", Keyboard.KEY_L, "Dark Steel Armor");
    ClientRegistry.registerKeyBinding(soundDetectorKey);       
    nightVisionKey = new KeyBinding("Night Vision", Keyboard.KEY_P, "Dark Steel Armor");
    ClientRegistry.registerKeyBinding(nightVisionKey);
    gogglesKey = new KeyBinding("Goggles of Revealing", Keyboard.KEY_R, "Dark Steel Armor");
    ClientRegistry.registerKeyBinding(gogglesKey);
   
    stepAssistKey = new KeyBinding("Step Assist", Keyboard.KEY_NONE, "Dark Steel Armor");
    ClientRegistry.registerKeyBinding(stepAssistKey);
   
    speedKey = new KeyBinding("Speed", Keyboard.KEY_NONE, "Dark Steel Armor");
    ClientRegistry.registerKeyBinding(speedKey);
   
    yetaWrenchMode = new KeyBinding("Yeta Wrench Mode", Keyboard.KEY_Y, "Tools");
    ClientRegistry.registerKeyBinding(yetaWrenchMode);
  }
View Full Code Here

Examples of net.minecraft.client.settings.KeyBinding

    return EnumSet.of( TickType.CLIENT );
  }

  private static KeyBinding[] keyBindings() {
    return new KeyBinding[] {
        new KeyBinding( "xact.clear", Keyboard.KEY_DOWN ),
        new KeyBinding( "xact.load", Keyboard.KEY_UP ),
        new KeyBinding( "xact.prev", Keyboard.KEY_LEFT ),
        new KeyBinding( "xact.next", Keyboard.KEY_RIGHT ),
        new KeyBinding( "xact.delete", Keyboard.KEY_DELETE ),
        new KeyBinding( "xact.openGrid", Keyboard.KEY_C )
    };
  }
View Full Code Here

Examples of net.minecraft.client.settings.KeyBinding

  public void keyTick(Type type, boolean tickEnd)
  {
    for(int i = 0; i < keyBindings.length; i++)
    {
      KeyBinding keyBinding = keyBindings[i];
      int keyCode = keyBinding.getKeyCode();
      boolean state = (keyCode < 0 ? Mouse.isButtonDown(keyCode + 100) : Keyboard.isKeyDown(keyCode));
     
      if(state != keyDown[i] || (state && repeatings[i]))
      {
        if(state)
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.