01: /*
02: * $RCSfile: PropertySourceChangeEvent.java,v $
03: *
04: * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
05: *
06: * Use is subject to license terms.
07: *
08: * $Revision: 1.1 $
09: * $Date: 2005/02/11 04:57:17 $
10: * $State: Exp $
11: */
12: package javax.media.jai;
13:
14: /**
15: * A class instances of which represent JAI properties as emitted for
16: * example by a <code>PropertySource</code> but in the guise of an event
17: * as defined for Java Beans. This class definition adds no functionality
18: * to that provided by the superclass per se. The significance of the
19: * derivation is that instances of this event by definition refer to properties
20: * in the JAI sense of the term. Otherwise put, this class provides an extra
21: * level of indirection.
22: *
23: * @see PropertyChangeEventJAI
24: * @see PropertySource
25: *
26: * @since JAI 1.1
27: */
28: public class PropertySourceChangeEvent extends PropertyChangeEventJAI {
29: /**
30: * Constructs a <code>PropertySourceChangeEvent</code>.
31: * <code>propertyName</code> is forced to lower case; all other
32: * parameters are passed unmodified to the superclass constructor.
33: * If <code>oldValue</code> or <code>newValue</code> is to indicate
34: * a property for which no value is defined, then the object
35: * <code>java.awt.Image.UndefinedProperty</code> should be passed.
36: *
37: * @exception NullPointerException if <code>propertyName</code> is
38: * <code>null</code>.
39: * @exception IllegalArgumentException if <code>source</code>,
40: * <code>oldValue</code> or <code>newValue</code> is
41: * <code>null</code>.
42: */
43: public PropertySourceChangeEvent(Object source,
44: String propertyName, Object oldValue, Object newValue) {
45: super (source, propertyName, oldValue, newValue);
46:
47: // Note: source and propertyName are checked for null in superclass.
48:
49: if (oldValue == null) {
50: throw new IllegalArgumentException(JaiI18N
51: .getString("PropertySourceChangeEvent0"));
52: } else if (newValue == null) {
53: throw new IllegalArgumentException(JaiI18N
54: .getString("PropertySourceChangeEvent1"));
55: }
56: }
57: }
|