Package java.awt.event

Examples of java.awt.event.KeyEvent


    {
      if (event instanceof KeyEvent == false)
      {
        return;
      }
      final KeyEvent keyevent = (KeyEvent) event;
      if (KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow() ==
          ReportDesignerFrame.this)
      {
        context.setSelectionWaiting(keyevent.isShiftDown());
      }
    }
View Full Code Here


       
        //create the event handler for key preview functionality
        keyEventListener = new AWTEventListener() {
            public void eventDispatched(AWTEvent aWTEvent) {
                if (aWTEvent instanceof KeyEvent) {
                    KeyEvent evt = (KeyEvent)aWTEvent;
                    for (KeyListener kl : getKeyListeners()) {
                        int id = aWTEvent.getID();
                        switch (id) {
                            case KeyEvent.KEY_PRESSED:
                                kl.keyPressed(evt);
View Full Code Here

    footerPolygons = new ClickablePolygons();
  }
  @Override
  public void gameUpdate(Event e, Object notice) {
    if (e instanceof KeyPressEvent){
      KeyEvent key= ((KeyPressEvent)e).getKey();
      if (key.getKeyCode()==KeyEvent.VK_ESCAPE){
        new ViewChangeEvent(MainView.class).notify(EViewChangeEvent.CLOSE_DIALOG);
        new ViewChangeEvent(NoticeView.class).notify(EViewChangeEvent.NOTICE_HIDE);
        Event.remove(this);
      }
    }
View Full Code Here

    footerPolygons = new ClickablePolygons();
  }
  @Override
  public void gameUpdate(Event e, Object notice) {
    if (e instanceof KeyPressEvent){
      KeyEvent key= ((KeyPressEvent)e).getKey();
      if (key.getKeyCode()==KeyEvent.VK_ESCAPE){
        new ViewChangeEvent(MainView.class).notify(EViewChangeEvent.CLOSE_DIALOG);
        new ViewChangeEvent(NoticeView.class).notify(EViewChangeEvent.NOTICE_HIDE);
        Event.remove(this);
      }
    }
View Full Code Here

    enabled=flag;
  }
  @Override
  public void gameUpdate(Event e, Object notice) {
    if (e instanceof KeyPressEvent){
      KeyEvent key= ((KeyPressEvent)e).getKey();
      if (key.getKeyCode()==KeyEvent.VK_ESCAPE){
        new ViewChangeEvent(MainView.class).notify(EViewChangeEvent.CLOSE_DIALOG);
        new ViewChangeEvent(NoticeView.class).notify(EViewChangeEvent.NOTICE_HIDE);
        Event.remove(this);
      }
    }
View Full Code Here

    enabled=flag;
  }
  @Override
  public void gameUpdate(Event e, Object notice) {
    if (e instanceof KeyPressEvent){
      KeyEvent key= ((KeyPressEvent)e).getKey();
      if (key.getKeyCode()==KeyEvent.VK_ESCAPE){
        new ViewChangeEvent(MainView.class).notify(EViewChangeEvent.CLOSE_DIALOG);
        new ViewChangeEvent(NoticeView.class).notify(EViewChangeEvent.NOTICE_HIDE);
        Event.remove(this);
      }
    }
View Full Code Here

//
//  }
  @Override
  public void gameUpdate(Event e, Object eventNotice) {
    if (e instanceof KeyPressEvent){
      KeyEvent key= ((KeyPressEvent)e).getKey();
      if (key.isControlDown() && key.getKeyCode()==KeyEvent.VK_Q){
        closeWindow();
      }
    }
    // New Game events
    if (e instanceof NewGameEvent){
View Full Code Here

    enabled=flag;
  }
  @Override
  public void gameUpdate(Event e, Object notice) {
    if (e instanceof KeyPressEvent){
      KeyEvent key= ((KeyPressEvent)e).getKey();
      if (key.getKeyCode()==KeyEvent.VK_ESCAPE){
        new ViewChangeEvent(MainView.class).notify(EViewChangeEvent.CLOSE_DIALOG);
        new ViewChangeEvent(NoticeView.class).notify(EViewChangeEvent.NOTICE_HIDE);
        Event.remove(this);
      }
    }
View Full Code Here

    return movableAmount;
  }
  @Override
  public void gameUpdate(Event e, Object notice) {
    if (e instanceof KeyPressEvent){
      KeyEvent key= ((KeyPressEvent)e).getKey();
      if (key.getKeyCode()==KeyEvent.VK_ESCAPE){
        new ViewChangeEvent(MainView.class).notify(EViewChangeEvent.CLOSE_DIALOG);
        new ViewChangeEvent(NoticeView.class).notify(EViewChangeEvent.NOTICE_HIDE);
        Event.remove(this);
      }
    }
View Full Code Here

    enabled=flag;
  }
  @Override
  public void gameUpdate(Event e, Object notice) {
    if (e instanceof KeyPressEvent){
      KeyEvent key= ((KeyPressEvent)e).getKey();
      if (key.getKeyCode()==KeyEvent.VK_ESCAPE){
        new ViewChangeEvent(MainView.class).notify(EViewChangeEvent.CLOSE_DIALOG);
        new ViewChangeEvent(NoticeView.class).notify(EViewChangeEvent.NOTICE_HIDE);
        Event.remove(this);
      }
    }
View Full Code Here

TOP

Related Classes of java.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.