jdk/src/share/classes/java/awt/event/ComponentEvent.java
changeset 16734 da1901d79073
parent 12813 c10ab96dcf41
child 20455 f6f9a0c2796b
equal deleted inserted replaced
16733:9267ec7004a1 16734:da1901d79073
     1 /*
     1 /*
     2  * Copyright (c) 1996, 2008, 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
    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.Component;
    29 import java.awt.Component;
    30 import java.awt.Rectangle;
    30 import java.awt.Rectangle;
    31 import javax.tools.annotation.GenerateNativeHeader;
    31 import java.lang.annotation.Native;
    32 
    32 
    33 /**
    33 /**
    34  * A low-level event which indicates that a component moved, changed
    34  * A low-level event which indicates that a component moved, changed
    35  * size, or changed visibility (also, the root class for the other
    35  * size, or changed visibility (also, the root class for the other
    36  * component-level events).
    36  * component-level events).
    63  * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/componentlistener.html">Tutorial: Writing a Component Listener</a>
    63  * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/componentlistener.html">Tutorial: Writing a Component Listener</a>
    64  *
    64  *
    65  * @author Carl Quinn
    65  * @author Carl Quinn
    66  * @since 1.1
    66  * @since 1.1
    67  */
    67  */
    68 /* No native methods here, but the constants are needed in the supporting JNI code */
       
    69 @GenerateNativeHeader
       
    70 public class ComponentEvent extends AWTEvent {
    68 public class ComponentEvent extends AWTEvent {
    71 
    69 
    72     /**
    70     /**
    73      * The first number in the range of ids used for component events.
    71      * The first number in the range of ids used for component events.
    74      */
    72      */
    80     public static final int COMPONENT_LAST              = 103;
    78     public static final int COMPONENT_LAST              = 103;
    81 
    79 
    82    /**
    80    /**
    83      * This event indicates that the component's position changed.
    81      * This event indicates that the component's position changed.
    84      */
    82      */
    85     public static final int COMPONENT_MOVED     = COMPONENT_FIRST;
    83     @Native public static final int COMPONENT_MOVED     = COMPONENT_FIRST;
    86 
    84 
    87     /**
    85     /**
    88      * This event indicates that the component's size changed.
    86      * This event indicates that the component's size changed.
    89      */
    87      */
    90     public static final int COMPONENT_RESIZED   = 1 + COMPONENT_FIRST;
    88     @Native public static final int COMPONENT_RESIZED   = 1 + COMPONENT_FIRST;
    91 
    89 
    92     /**
    90     /**
    93      * This event indicates that the component was made visible.
    91      * This event indicates that the component was made visible.
    94      */
    92      */
    95     public static final int COMPONENT_SHOWN     = 2 + COMPONENT_FIRST;
    93     @Native public static final int COMPONENT_SHOWN     = 2 + COMPONENT_FIRST;
    96 
    94 
    97     /**
    95     /**
    98      * This event indicates that the component was rendered invisible.
    96      * This event indicates that the component was rendered invisible.
    99      */
    97      */
   100     public static final int COMPONENT_HIDDEN    = 3 + COMPONENT_FIRST;
    98     @Native public static final int COMPONENT_HIDDEN    = 3 + COMPONENT_FIRST;
   101 
    99 
   102     /*
   100     /*
   103      * JDK 1.1 serialVersionUID
   101      * JDK 1.1 serialVersionUID
   104      */
   102      */
   105     private static final long serialVersionUID = 8101406823902992965L;
   103     private static final long serialVersionUID = 8101406823902992965L;