Examples of consume()


Examples of games.stendhal.server.entity.item.ConsumableItem.consume()

      if (food.consumed()) {
        itemsToConsume.remove(0);
      } else {
        if (turn % food.getFrecuency() == 0) {
          logger.debug("Consumed item: " + food);
          final int amount = food.consume();
          if (isChoking()) {
            put("choking", amount);
          } else {
            if (has("choking")) {
              remove("choking");
View Full Code Here

Examples of io.s4.comm.zk.ZkQueue.consume()

        } else {
            System.out.println("Consumer");

            for (i = 0; i < max || true; i++) {
                try {
                    Integer r = (Integer) q.consume();
                    System.out.println("Item: " + r);
                } catch (KeeperException e) {
                    e.printStackTrace();
                    i--;
                } catch (InterruptedException e) {
View Full Code Here

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

    listener = new AWTEventListener() {
    @Override
    public void eventDispatched(AWTEvent event) {
      if (event instanceof InputEvent) {
      InputEvent ie = (InputEvent) event;
      ie.consume();
      }
    }
    };
  }
  return listener;
View Full Code Here

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

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

        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

Examples of java.awt.event.KeyEvent.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) :
              setPreviousFocusable(focusowner, outgo)) {
            ke.consume();
          } else if (MOUSE_WHEEL != 0) { // 1.4
            if (!ke.isShiftDown()) {
                transferFocus();
            }
            else {
View Full Code Here

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

        }
        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

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

            }
          }
        }
        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

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

            if(source == parentComponent) {
                MouseEvent  mouseEvent = (MouseEvent) event;
                boolean filter = handleEventFromParentComponent(mouseEvent);
                if(filter) {
                    mouseEvent.consume();
                }
                else {
                    lastMouseEvent = mouseEvent;
                }
            }
View Full Code Here

Examples of net.sf.jiga.xtended.impl.system.input.KeyEventWrapper.consume()

            if (match == null) {
                for (Iterator<KeyEventWrapper> it = readKew.get_sequence().iterator(); it.hasNext();) {
                    KeyEventWrapper rKew = it.next();
                    if (!rKew.isConsumed()) {
                        if (keyEvents.containsKey(rKew)) {
                            rKew.consume();
                            match = rKew;
                        }
                        break;
                    }
                }
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.