src/share/classes/sun/awt/CausedFocusEvent.java

Print this page




  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 sun.awt;
  27 
  28 import java.awt.event.FocusEvent;
  29 import java.awt.Component;
  30 
  31 /**
  32  * This class represents FocusEvents with a known "cause" - reason why this event happened. It can
  33  * be mouse press, traversal, activation, and so on - all causes are described as Cause enum. The
  34  * event with the cause can be constructed in two ways - explicitly through constructor of
  35  * CausedFocusEvent class or implicitly, by calling appropriate requestFocusXXX method with "cause"
  36  * parameter. The default cause is UNKNOWN.
  37  */

  38 public class CausedFocusEvent extends FocusEvent {
  39     public enum Cause {
  40         UNKNOWN,
  41         MOUSE_EVENT,
  42         TRAVERSAL,
  43         TRAVERSAL_UP,
  44         TRAVERSAL_DOWN,
  45         TRAVERSAL_FORWARD,
  46         TRAVERSAL_BACKWARD,
  47         MANUAL_REQUEST,
  48         AUTOMATIC_TRAVERSE,
  49         ROLLBACK,
  50         NATIVE_SYSTEM,
  51         ACTIVATION,
  52         CLEAR_GLOBAL_FOCUS_OWNER,
  53         RETARGETED
  54     };
  55 
  56     private final Cause cause;
  57 




  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 sun.awt;
  27 
  28 import java.awt.event.FocusEvent;
  29 import java.awt.Component;
  30 
  31 /**
  32  * This class represents FocusEvents with a known "cause" - reason why this event happened. It can
  33  * be mouse press, traversal, activation, and so on - all causes are described as Cause enum. The
  34  * event with the cause can be constructed in two ways - explicitly through constructor of
  35  * CausedFocusEvent class or implicitly, by calling appropriate requestFocusXXX method with "cause"
  36  * parameter. The default cause is UNKNOWN.
  37  */
  38 @SuppressWarnings("serial")
  39 public class CausedFocusEvent extends FocusEvent {
  40     public enum Cause {
  41         UNKNOWN,
  42         MOUSE_EVENT,
  43         TRAVERSAL,
  44         TRAVERSAL_UP,
  45         TRAVERSAL_DOWN,
  46         TRAVERSAL_FORWARD,
  47         TRAVERSAL_BACKWARD,
  48         MANUAL_REQUEST,
  49         AUTOMATIC_TRAVERSE,
  50         ROLLBACK,
  51         NATIVE_SYSTEM,
  52         ACTIVATION,
  53         CLEAR_GLOBAL_FOCUS_OWNER,
  54         RETARGETED
  55     };
  56 
  57     private final Cause cause;
  58