< prev index next >

src/java.desktop/share/classes/java/awt/Event.java

Print this page


   1 /*
   2  * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 533     /**
 534      * An arbitrary argument of the event. The value of this field
 535      * depends on the type of event.
 536      * {@code arg} has been replaced by event specific property.
 537      *
 538      * @serial
 539      */
 540     public Object arg;
 541 
 542     /**
 543      * The next event. This field is set when putting events into a
 544      * linked list.
 545      * This has been replaced by EventQueue.
 546      *
 547      * @serial
 548      * @see java.awt.EventQueue
 549      */
 550     public Event evt;
 551 
 552     /* table for mapping old Event action keys to KeyEvent virtual keys. */
 553     private static final int actionKeyCodes[][] = {
 554     /*    virtual key              action key   */
 555         { KeyEvent.VK_HOME,        Event.HOME         },
 556         { KeyEvent.VK_END,         Event.END          },
 557         { KeyEvent.VK_PAGE_UP,     Event.PGUP         },
 558         { KeyEvent.VK_PAGE_DOWN,   Event.PGDN         },
 559         { KeyEvent.VK_UP,          Event.UP           },
 560         { KeyEvent.VK_DOWN,        Event.DOWN         },
 561         { KeyEvent.VK_LEFT,        Event.LEFT         },
 562         { KeyEvent.VK_RIGHT,       Event.RIGHT        },
 563         { KeyEvent.VK_F1,          Event.F1           },
 564         { KeyEvent.VK_F2,          Event.F2           },
 565         { KeyEvent.VK_F3,          Event.F3           },
 566         { KeyEvent.VK_F4,          Event.F4           },
 567         { KeyEvent.VK_F5,          Event.F5           },
 568         { KeyEvent.VK_F6,          Event.F6           },
 569         { KeyEvent.VK_F7,          Event.F7           },
 570         { KeyEvent.VK_F8,          Event.F8           },
 571         { KeyEvent.VK_F9,          Event.F9           },
 572         { KeyEvent.VK_F10,         Event.F10          },
 573         { KeyEvent.VK_F11,         Event.F11          },


   1 /*
   2  * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 533     /**
 534      * An arbitrary argument of the event. The value of this field
 535      * depends on the type of event.
 536      * {@code arg} has been replaced by event specific property.
 537      *
 538      * @serial
 539      */
 540     public Object arg;
 541 
 542     /**
 543      * The next event. This field is set when putting events into a
 544      * linked list.
 545      * This has been replaced by EventQueue.
 546      *
 547      * @serial
 548      * @see java.awt.EventQueue
 549      */
 550     public Event evt;
 551 
 552     /* table for mapping old Event action keys to KeyEvent virtual keys. */
 553     private static final int[][] actionKeyCodes = {
 554     /*    virtual key              action key   */
 555         { KeyEvent.VK_HOME,        Event.HOME         },
 556         { KeyEvent.VK_END,         Event.END          },
 557         { KeyEvent.VK_PAGE_UP,     Event.PGUP         },
 558         { KeyEvent.VK_PAGE_DOWN,   Event.PGDN         },
 559         { KeyEvent.VK_UP,          Event.UP           },
 560         { KeyEvent.VK_DOWN,        Event.DOWN         },
 561         { KeyEvent.VK_LEFT,        Event.LEFT         },
 562         { KeyEvent.VK_RIGHT,       Event.RIGHT        },
 563         { KeyEvent.VK_F1,          Event.F1           },
 564         { KeyEvent.VK_F2,          Event.F2           },
 565         { KeyEvent.VK_F3,          Event.F3           },
 566         { KeyEvent.VK_F4,          Event.F4           },
 567         { KeyEvent.VK_F5,          Event.F5           },
 568         { KeyEvent.VK_F6,          Event.F6           },
 569         { KeyEvent.VK_F7,          Event.F7           },
 570         { KeyEvent.VK_F8,          Event.F8           },
 571         { KeyEvent.VK_F9,          Event.F9           },
 572         { KeyEvent.VK_F10,         Event.F10          },
 573         { KeyEvent.VK_F11,         Event.F11          },


< prev index next >