jdk/src/share/classes/java/awt/event/ActionEvent.java
changeset 16734 da1901d79073
parent 12813 c10ab96dcf41
child 20455 f6f9a0c2796b
equal deleted inserted replaced
16733:9267ec7004a1 16734:da1901d79073
     1 /*
     1 /*
     2  * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    25 
    25 
    26 package java.awt.event;
    26 package java.awt.event;
    27 
    27 
    28 import java.awt.AWTEvent;
    28 import java.awt.AWTEvent;
    29 import java.awt.Event;
    29 import java.awt.Event;
    30 import javax.tools.annotation.GenerateNativeHeader;
    30 import java.lang.annotation.Native;
    31 
    31 
    32 /**
    32 /**
    33  * A semantic event which indicates that a component-defined action occurred.
    33  * A semantic event which indicates that a component-defined action occurred.
    34  * This high-level event is generated by a component (such as a
    34  * This high-level event is generated by a component (such as a
    35  * <code>Button</code>) when
    35  * <code>Button</code>) when
    55  * @see <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/actionlistener.html">Tutorial: How to Write an Action Listener</a>
    55  * @see <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/actionlistener.html">Tutorial: How to Write an Action Listener</a>
    56  *
    56  *
    57  * @author Carl Quinn
    57  * @author Carl Quinn
    58  * @since 1.1
    58  * @since 1.1
    59  */
    59  */
    60 /* No native methods here, but the constants are needed in the supporting JNI code */
       
    61 @GenerateNativeHeader
       
    62 public class ActionEvent extends AWTEvent {
    60 public class ActionEvent extends AWTEvent {
    63 
    61 
    64     /**
    62     /**
    65      * The shift modifier. An indicator that the shift key was held
    63      * The shift modifier. An indicator that the shift key was held
    66      * down during the event.
    64      * down during the event.
    97     public static final int ACTION_LAST                 = 1001;
    95     public static final int ACTION_LAST                 = 1001;
    98 
    96 
    99     /**
    97     /**
   100      * This event id indicates that a meaningful action occured.
    98      * This event id indicates that a meaningful action occured.
   101      */
    99      */
   102     public static final int ACTION_PERFORMED    = ACTION_FIRST; //Event.ACTION_EVENT
   100     @Native public static final int ACTION_PERFORMED    = ACTION_FIRST; //Event.ACTION_EVENT
   103 
   101 
   104     /**
   102     /**
   105      * The nonlocalized string that gives more details
   103      * The nonlocalized string that gives more details
   106      * of what actually caused the event.
   104      * of what actually caused the event.
   107      * This information is very specific to the component
   105      * This information is very specific to the component