Package java.awt.event

Examples of java.awt.event.KeyEvent.consume()


            if (evt.getKeyCode() == KeyEvent.VK_F) {//Call Search replace with 'F' without general actions key mappings support:
                GeneralActionsManipulator gam = dlh.getGeneralActionsManipulatorByName("SearchReplace");
                if (gam != null) {
                    dlh.executeManipulator(gam);
                }
                evt.consume();
            } else {//Nodes/edges mappings:
                if (classDisplayed == ClassDisplayed.NODE) {
                    final ContextMenuItemManipulator item = nodesActionMappings.get(evt.getKeyCode());
                    if (item != null) {
                        Node[] nodes = nodeTable.getNodesFromSelectedRows();
View Full Code Here


                            ((NodesManipulator) item).setup(nodes, nodes[0]);
                            if (item.isAvailable() && item.canExecute()) {
                                DataLaboratoryHelper.getDefault().executeManipulator(item);
                            }
                        }
                        evt.consume();
                    }
                } else if (classDisplayed == ClassDisplayed.EDGE) {
                    final ContextMenuItemManipulator item = edgesActionMappings.get(evt.getKeyCode());
                    if (item != null) {
                        Edge[] edges = edgeTable.getEdgesFromSelectedRows();
View Full Code Here

                            ((EdgesManipulator) item).setup(edges, edges[0]);
                            if (item.isAvailable() && item.canExecute()) {
                                DataLaboratoryHelper.getDefault().executeManipulator(item);
                            }
                        }
                        evt.consume();
                    }
                }
            }
        }
    }
View Full Code Here

            if (item != null) {
                ((GraphContextMenuItem) item).setup(eventBridge.getGraph(), eventBridge.getSelectedNodes());
                if (item.isAvailable() && item.canExecute()) {
                    DataLaboratoryHelper.getDefault().executeManipulator(item);
                }
                evt.consume();
            }
        }
    }

    /** This method is called from within the constructor to
View Full Code Here

        if ((control == (id == KeyEvent.KEY_PRESSED)) &&
          processKeyPress((popupowner != null) ? popupowner : focusowner,
            ke.isShiftDown(), ke.isControlDown(), ke.getModifiers(),
            control ? 0 : keychar, keycode)) {
          ke.consume();
        }
        else if ((keycode == KeyEvent.VK_TAB) ||
            ((keycode == KeyEvent.VK_F6) && (ke.isAltDown() || ke.isControlDown()))) {
          boolean outgo = (keycode == KeyEvent.VK_F6);
          if (!ke.isShiftDown() ? setNextFocusable(focusowner, outgo) :
View Full Code Here

        else if ((keycode == KeyEvent.VK_TAB) ||
            ((keycode == KeyEvent.VK_F6) && (ke.isAltDown() || ke.isControlDown()))) {
          boolean outgo = (keycode == KeyEvent.VK_F6);
          if (!ke.isShiftDown() ? setNextFocusable(focusowner, outgo) :
              setPreviousFocusable(focusowner, outgo)) {
            ke.consume();
          } else if (MOUSE_WHEEL != 0) { // 1.4
            if (!ke.isShiftDown()) {
                transferFocus();
            }
            else {
View Full Code Here

        }
        else if (keycode == KeyEvent.VK_F8) {
          for (Object splitpane = focusowner;
              splitpane != null; splitpane = getParent(splitpane)) {
            if (getClass(splitpane) == "splitpane") {
              setFocus(splitpane); repaint(splitpane); ke.consume(); break; //middle
            }
          }
        }
        else if ((id == KeyEvent.KEY_PRESSED) && ((keychar != 0) || ke.isActionKey()) &&
            checkMnemonic(focusowner, true, null, ke.getKeyCode(), ke.getModifiers())) {
View Full Code Here

            }
          }
        }
        else if ((id == KeyEvent.KEY_PRESSED) && ((keychar != 0) || ke.isActionKey()) &&
            checkMnemonic(focusowner, true, null, ke.getKeyCode(), ke.getModifiers())) {
          ke.consume();
        }
      }
    }
    else if (id == FocusEvent.FOCUS_LOST) {
      focusinside = false;
View Full Code Here

            if (notInCompositionMode)  {
                return;
            }
        }

        e.consume();
    }

    private void composeUnicodeEscape(char c) {
        switch (buffer.length()) {
            case  1// \\
View Full Code Here

            if (notInCompositionMode) {
                return;
            }
        }

        e.consume();
    }

    private void composeUnicodeEscape(char c) {
        switch (buffer.length()) {
            case 1// \\
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.