Package charva.awt.event

Examples of charva.awt.event.KeyEvent


     * Process events that are implemented by all components.
     * This can be overridden by subclasses, to handle custom events.
     */
    protected void processEvent(AWTEvent evt_) {
  if (evt_ instanceof KeyEvent) {
      KeyEvent ke = (KeyEvent) evt_;

      /* Find the ancestor Window that contains the component that
       * generated the keystroke.
       * Then we call the processKeyEvent method
       * of the ancestor Window, which calls the same method in its
View Full Code Here


        if (key_ > 255 || key_ < ' ')
            id = AWTEvent.KEY_PRESSED;
        else
            id = AWTEvent.KEY_TYPED;

        _evtQueue.postEvent(new KeyEvent(key_, id, source_));
    }
View Full Code Here

    protected void processEvent(AWTEvent evt_) {

  super.processEvent(evt_);

  if (evt_ instanceof KeyEvent) {
      KeyEvent key_event = (KeyEvent) evt_;
      if (( ! key_event.isConsumed()) &&
    key_event.getKeyCode() == KeyEvent.VK_ENTER &&
    super.isEnabled()) {
   
    EventQueue queue = Toolkit.getDefaultToolkit().getSystemEventQueue();
    queue.postEvent(new ActionEvent(this, getActionCommand()));
    key_event.consume();
      }
  }
  else if (evt_ instanceof ActionEvent)
      fireActionPerformed((ActionEvent) evt_);
  else if (evt_ instanceof ItemEvent)
View Full Code Here

TOP

Related Classes of charva.awt.event.KeyEvent

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.