Package java.awt

Examples of java.awt.KeyEventDispatcher


    // create components and panels
    this.view = new JPanel(new BorderLayout());
    this.tabs = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.SCROLL_TAB_LAYOUT);
    this.view.add(this.tabs, BorderLayout.CENTER);
    // ctrl-tab and ctrl-shift-tab
    KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new KeyEventDispatcher() {       
      public boolean dispatchKeyEvent(KeyEvent e) {
        if (e.getID() == KeyEvent.KEY_PRESSED &&  e.getKeyCode() == KeyEvent.VK_TAB && e.isControlDown()) {
          int tabcount = Desktop.this.tabs.getTabCount();
          if (tabcount > 0) {
            int sel = Desktop.this.tabs.getSelectedIndex();
View Full Code Here


          parameter.userInterface.addEvent(event);         
        }
      }
    });
    // ctrl-tab and ctrl-shift-tab
    KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new KeyEventDispatcher() {         
      public boolean dispatchKeyEvent(KeyEvent e) {
        if (e.getID() == KeyEvent.KEY_PRESSED &&  e.getKeyCode() == KeyEvent.VK_TAB && e.isControlDown()) {
          int tabcount = tabs.getTabCount();
          if (tabcount > 0) {
            int sel = tabs.getSelectedIndex();
View Full Code Here

        this.manualCommandHistory = new ArrayList<String>();
        this.commandTextField.addKeyListener(this);
       
        // Add keyboard listener for manual controls.
        KeyboardFocusManager.getCurrentKeyboardFocusManager()
            .addKeyEventDispatcher(new KeyEventDispatcher() {
                @Override
                public boolean dispatchKeyEvent(KeyEvent e) {
                    // Check context.
                    if (((arrowMovementEnabled.isSelected()) &&
                            e.getID() == KeyEvent.KEY_PRESSED) &&
View Full Code Here

     */
    public static void activate ()
    {
        // capture low-level keyboard events via the keyboard focus manager
        if (_dispatcher == null) {
            _dispatcher = new KeyEventDispatcher() {
                public boolean dispatchKeyEvent (KeyEvent e) {
                    return DebugChords.dispatchKeyEvent(e);
                }
            };

View Full Code Here

TOP

Related Classes of java.awt.KeyEventDispatcher

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.