emul/compact/src/main/java/java/beans/VetoableChangeListener.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Mon, 28 Jan 2013 18:12:47 +0100
branchjdk7-b147
changeset 601 5198affdb915
permissions -rw-r--r--
Adding ObjectInputStream and ObjectOutputStream (but without implementation). Adding PropertyChange related classes.
jaroslav@601
     1
/*
jaroslav@601
     2
 * Copyright (c) 1996, 1997, Oracle and/or its affiliates. All rights reserved.
jaroslav@601
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jaroslav@601
     4
 *
jaroslav@601
     5
 * This code is free software; you can redistribute it and/or modify it
jaroslav@601
     6
 * under the terms of the GNU General Public License version 2 only, as
jaroslav@601
     7
 * published by the Free Software Foundation.  Oracle designates this
jaroslav@601
     8
 * particular file as subject to the "Classpath" exception as provided
jaroslav@601
     9
 * by Oracle in the LICENSE file that accompanied this code.
jaroslav@601
    10
 *
jaroslav@601
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
jaroslav@601
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jaroslav@601
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
jaroslav@601
    14
 * version 2 for more details (a copy is included in the LICENSE file that
jaroslav@601
    15
 * accompanied this code).
jaroslav@601
    16
 *
jaroslav@601
    17
 * You should have received a copy of the GNU General Public License version
jaroslav@601
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
jaroslav@601
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jaroslav@601
    20
 *
jaroslav@601
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
jaroslav@601
    22
 * or visit www.oracle.com if you need additional information or have any
jaroslav@601
    23
 * questions.
jaroslav@601
    24
 */
jaroslav@601
    25
jaroslav@601
    26
package java.beans;
jaroslav@601
    27
jaroslav@601
    28
/**
jaroslav@601
    29
 * A VetoableChange event gets fired whenever a bean changes a "constrained"
jaroslav@601
    30
 * property.  You can register a VetoableChangeListener with a source bean
jaroslav@601
    31
 * so as to be notified of any constrained property updates.
jaroslav@601
    32
 */
jaroslav@601
    33
public interface VetoableChangeListener extends java.util.EventListener {
jaroslav@601
    34
    /**
jaroslav@601
    35
     * This method gets called when a constrained property is changed.
jaroslav@601
    36
     *
jaroslav@601
    37
     * @param     evt a <code>PropertyChangeEvent</code> object describing the
jaroslav@601
    38
     *                event source and the property that has changed.
jaroslav@601
    39
     * @exception PropertyVetoException if the recipient wishes the property
jaroslav@601
    40
     *              change to be rolled back.
jaroslav@601
    41
     */
jaroslav@601
    42
    void vetoableChange(PropertyChangeEvent evt)
jaroslav@601
    43
                                throws PropertyVetoException;
jaroslav@601
    44
}