KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jdesktop > swing > data > ValueChangeEvent


1 /*
2  * $Id: ValueChangeEvent.java,v 1.1.1.1 2004/06/16 01:43:39 davidson1 Exp $
3  *
4  * Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle,
5  * Santa Clara, California 95054, U.S.A. All rights reserved.
6  */

7
8 package org.jdesktop.swing.data;
9
10 import java.util.EventObject JavaDoc;
11
12 /**
13  * Event indicating the value of a named data field within a
14  * DataModel has changed.
15  *
16  * @see ValueChangeListener
17  * @see DataModel
18  *
19  * @author Amy Fowler
20  * @version 1.0
21  */

22 public class ValueChangeEvent extends EventObject JavaDoc {
23
24     private String JavaDoc fieldName = null;
25
26     /**
27      * Instantiates a new value change event for the specified named
28      * field in the data model.
29      * @param source DataModel containing the changed data field
30      * @param fieldName String containing the name of the field that has changed
31      */

32     public ValueChangeEvent(DataModel source, String JavaDoc fieldName) {
33         super(source);
34         this.fieldName = fieldName;
35     }
36
37     /**
38      *
39      * @return String containing the name of the field that has changed
40      */

41     public String JavaDoc getFieldName() {
42         return fieldName;
43     }
44
45 }
46
Popular Tags