Interface GenericVetoableChangeListener<V>

  • Type Parameters:
    V - The type of property value.
    All Superinterfaces:
    java.util.EventListener, java.beans.VetoableChangeListener
    All Known Implementing Classes:
    AbstractGenericVetoableChangeListener

    public interface GenericVetoableChangeListener<V>
    extends java.beans.VetoableChangeListener
    A JavaBeans vetoable change listener retrofitted to use generics to cast to proper value type. An implementing class must override the non-generic property change method and call the generic version, so that the property change can be noted by either method. The abstract version of this class, AbstractGenericVetoableChangeListener, will be used most often.
    Author:
    Garret Wilson
    • Method Detail

      • vetoableChange

        void vetoableChange​(GenericPropertyChangeEvent<V> genericPropertyChangeEvent)
                     throws java.beans.PropertyVetoException
        Called when a constrained property is changed.
        Parameters:
        genericPropertyChangeEvent - An event object describing the event source, the property that is changing, and its old and new values.
        Throws:
        java.beans.PropertyVetoException - if the recipient wishes the property change to be rolled back.