1 /*
   2  * Copyright (c) 2002, 2015, 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
  23  * questions.
  24  */
  25 
  26 package com.sun.java.accessibility.util;
  27 
  28 /**
  29  * EventID contains integer constants that map to event support in
  30  * AWT and Swing.  They are used by primarily by AWTEventMonitor,
  31  * AWTEventsListener, SwingEventMonitor, and SwingEventListener, but
  32  * can be freely used by any other class.
  33  *
  34  * @see AWTEventMonitor
  35  * @see SwingEventMonitor
  36  *
  37  */
  38 @jdk.Exported
  39 public class EventID {
  40 
  41     /**
  42      * Maps to AWT Action support (i.e., ActionListener and ActionEvent)
  43      */
  44     static public final int ACTION              = 0;
  45 
  46     /**
  47      * Maps to AWT Adjustment support (i.e., AdjustmentListener
  48      * and AdjustmentEvent)
  49      */
  50     static public final int ADJUSTMENT          = 1;
  51 
  52     /**
  53      * Maps to AWT Component support (i.e., ComponentListener
  54      * and ComponentEvent)
  55      */
  56     static public final int COMPONENT           = 2;
  57 
  58     /**
  59      * Maps to AWT Container support (i.e., ContainerListener
  60      * and ContainerEvent)
  61      */
  62     static public final int CONTAINER           = 3;
  63 
  64     /**
  65      * Maps to AWT Focus support (i.e., FocusListener and FocusEvent)
  66      */
  67     static public final int FOCUS               = 4;
  68 
  69     /**
  70      * Maps to AWT Item support (i.e., ItemListener and ItemEvent)
  71      */
  72     static public final int ITEM                = 5;
  73 
  74     /**
  75      * Maps to AWT Key support (i.e., KeyListener and KeyEvent)
  76      */
  77     static public final int KEY                 = 6;
  78 
  79     /**
  80      * Maps to AWT Mouse support (i.e., MouseListener and MouseEvent)
  81      */
  82     static public final int MOUSE               = 7;
  83 
  84     /**
  85      * Maps to AWT MouseMotion support (i.e., MouseMotionListener
  86      * and MouseMotionEvent)
  87      */
  88     static public final int MOTION              = 8;
  89 
  90     /**
  91      * Maps to AWT Text support (i.e., TextListener and TextEvent)
  92      */
  93     static public final int TEXT                = 10;
  94 
  95     /**
  96      * Maps to AWT Window support (i.e., WindowListener and WindowEvent)
  97      */
  98     static public final int WINDOW              = 11;
  99 
 100     /**
 101      * Maps to Swing Ancestor support (i.e., AncestorListener and
 102      * AncestorEvent)
 103      */
 104     static public final int ANCESTOR           = 12;
 105 
 106     /**
 107      * Maps to Swing Text Caret support (i.e., CaretListener and
 108      * CaretEvent)
 109      */
 110     static public final int CARET              = 13;
 111 
 112     /**
 113      * Maps to Swing CellEditor support (i.e., CellEditorListener and
 114      * CellEditorEvent)
 115      */
 116     static public final int CELLEDITOR         = 14;
 117 
 118     /**
 119      * Maps to Swing Change support (i.e., ChangeListener and
 120      * ChangeEvent)
 121      */
 122     static public final int CHANGE             = 15;
 123 
 124     /**
 125      * Maps to Swing TableColumnModel support (i.e.,
 126      * TableColumnModelListener and TableColumnModelEvent)
 127      */
 128     static public final int COLUMNMODEL        = 16;
 129 
 130     /**
 131      * Maps to Swing Document support (i.e., DocumentListener and
 132      * DocumentEvent)
 133      */
 134     static public final int DOCUMENT           = 17;
 135 
 136     /**
 137      * Maps to Swing ListData support (i.e., ListDataListener and
 138      * ListDataEvent)
 139      */
 140     static public final int LISTDATA           = 18;
 141 
 142     /**
 143      * Maps to Swing ListSelection support (i.e., ListSelectionListener and
 144      * ListSelectionEvent)
 145      */
 146     static public final int LISTSELECTION      = 19;
 147 
 148     /**
 149      * Maps to Swing Menu support (i.e., MenuListener and
 150      * MenuEvent)
 151      */
 152     static public final int MENU               = 20;
 153 
 154     /**
 155      * Maps to Swing PopupMenu support (i.e., PopupMenuListener and
 156      * PopupMenuEvent)
 157      */
 158     static public final int POPUPMENU          = 21;
 159 
 160     /**
 161      * Maps to Swing TableModel support (i.e., TableModelListener and
 162      * TableModelEvent)
 163      */
 164     static public final int TABLEMODEL         = 22;
 165 
 166     /**
 167      * Maps to Swing TreeExpansion support (i.e., TreeExpansionListener and
 168      * TreeExpansionEvent)
 169      */
 170     static public final int TREEEXPANSION      = 23;
 171 
 172     /**
 173      * Maps to Swing TreeModel support (i.e., TreeModelListener and
 174      * TreeModelEvent)
 175      */
 176     static public final int TREEMODEL          = 24;
 177 
 178     /**
 179      * Maps to Swing TreeSelection support (i.e., TreeSelectionListener and
 180      * TreeSelectionEvent)
 181      */
 182     static public final int TREESELECTION      = 25;
 183 
 184     /**
 185      * Maps to Swing UndoableEdit support (i.e., UndoableEditListener and
 186      * UndoableEditEvent)
 187      */
 188     static public final int UNDOABLEEDIT       = 26;
 189 
 190     /**
 191      * Maps to Beans PropertyChange support (i.e., PropertyChangeListener
 192      * and PropertyChangeEvent)
 193      */
 194     static public final int PROPERTYCHANGE     = 27;
 195 
 196     /**
 197      * Maps to Beans VetoableChange support (i.e., VetoableChangeListener
 198      * and VetoableChangeEvent)
 199      */
 200     static public final int VETOABLECHANGE     = 28;
 201 
 202     /**
 203      * Maps to Swing InternalFrame support (i.e., InternalFrameListener)
 204      */
 205     static public final int INTERNALFRAME      = 29;
 206 }