/[classpath]/classpath/javax/swing/event/ListDataEvent.java
ViewVC logotype

Diff of /classpath/javax/swing/event/ListDataEvent.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by mkoch, Sun Jun 8 12:14:56 2003 UTC revision 1.4 by mkoch, Tue Jun 24 19:09:41 2003 UTC
# Line 41  package javax.swing.event; Line 41  package javax.swing.event;
41  import java.util.EventObject;  import java.util.EventObject;
42    
43  /**  /**
  * ListDataEvent  
44   * @author Andrew Selkirk   * @author Andrew Selkirk
45   * @author Ronald Veldema   * @author Ronald Veldema
46   */   */
47  public class ListDataEvent extends EventObject {  public class ListDataEvent extends EventObject
48    {
49          //-------------------------------------------------------------    private static final serialVersionUID = -7131487416250401903L;
50          // Constants --------------------------------------------------    
51          //-------------------------------------------------------------    public static int CONTENTS_CHANGED = 0;
52      public static int INTERVAL_ADDED = 1;
53      public static int INTERVAL_REMOVED = 2;
54    
55      private int type = 0;
56      private int index0 = 0;
57      private int index1 = 0;
58                    
59          /**    /**
60           * Contents changed     * Creates a <code>ListDataEvent</code> object.
61           */     *
62          public static   int     CONTENTS_CHANGED        = 0;     * @param source The source of the event.
63       * @param type The type of the event
64          /**     * @param index0 Bottom of range
65           * Internal added     * @param index1 Top of range
66           */     */
67          public static   int     INTERVAL_ADDED          = 1;    public ListDataEvent(Object source, int type, int index0, int index1)
68      {
69          /**      super(source);
70           * Interval removed      this.type = type;
71           */      this.index0 = index0;
72          public static   int     INTERVAL_REMOVED        = 2;      this.index1 = index1;
73      }
   
         //-------------------------------------------------------------  
         // Variables --------------------------------------------------  
         //-------------------------------------------------------------  
   
         /**  
          * type  
          */  
         private                 int     type    = 0;  
           
         /**  
          * index0  
          */  
         private                 int     index0  = 0;  
74                    
75          /**    /**
76           * index1     * Returns the bottom index.
77           */     */
78          private                 int     index1  = 0;    public int getIndex0()
79      {
80        return index0;
81          //-------------------------------------------------------------    }
82          // Initialization ---------------------------------------------  
83          //-------------------------------------------------------------    /**
84               * Returns the top index.
85          /**     */
86           * Constructor ListDataEvent    public int getIndex1()
87           * @param source Source    {
88           * @param type Event type      return index1;
89           * @param index0 Bottom of range    }
90           * @param index1 Top of range  
91           */    /**
92          public ListDataEvent(Object source, int type,     * Returns the type of this event.
93                                                          int index0, int index1) {     */
94                  super(source);    public int getType()
95                  this.type       = type;    {
96                  this.index0     = index0;      return type;
97                  this.index1     = index1;    }
98          } // ListDataEvent()  }
   
   
         //-------------------------------------------------------------  
         // Methods ----------------------------------------------------  
         //-------------------------------------------------------------  
           
         /**  
          * getIndex0  
          * @returns index0  
          */  
         public int getIndex0() {  
                 return index0;  
         } // getIndex0()  
   
         /**  
          * getIndex1  
          * @returns index1  
          */  
         public int getIndex1() {  
                 return index1;  
         } // getIndex1()  
   
         /**  
          * Event type  
          * @returns Event type  
          */  
         public int getType() {  
                 return type;  
         } // getType()  
   
   
 } // ListDataEvent  

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26