Interface PropertyConstrainable

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addVetoableChangeListener​(java.beans.VetoableChangeListener listener)
      Adds a vetoable listener to the listener list.
      void addVetoableChangeListener​(java.lang.String propertyName, java.beans.VetoableChangeListener listener)
      Adds a vetoable change listener for a specific property.
      java.beans.VetoableChangeListener[] getVetoableChangeListeners()
      Returns the list of vetoable change listeners.
      java.beans.VetoableChangeListener[] getVetoableChangeListeners​(java.lang.String propertyName)
      Returns an array of all the listeners which have been associated with the named property.
      boolean hasVetoableChangeListeners​(java.lang.String propertyName)
      Checks if there are any vetoable change listeners for a specific property, including those registered on all properties.
      void removeVetoableChangeListener​(java.beans.VetoableChangeListener listener)
      Removes a vetoable change listener from the listener list.
      void removeVetoableChangeListener​(java.lang.String propertyName, java.beans.VetoableChangeListener listener)
      Removes a vetoable change listener for a specific property.
    • Method Detail

      • addVetoableChangeListener

        void addVetoableChangeListener​(java.beans.VetoableChangeListener listener)
        Adds a vetoable listener to the listener list. The listener is registered for all properties.

        The same listener object may be added more than once, and will be called as many times as it is added.

        If listener is null, no exception is thrown and no action is taken.

        Parameters:
        listener - The VetoableChangeListener to be added.
      • removeVetoableChangeListener

        void removeVetoableChangeListener​(java.beans.VetoableChangeListener listener)
        Removes a vetoable change listener from the listener list. This removes a VetoableChangeListener that was registered for all properties.

        If listener was added more than once to the same event source, it will be notified one less time after being removed.

        If listener is null, or was never added, no exception is thrown and no action is taken.

        Parameters:
        listener - The VetoableChangeListener to be removed
      • addVetoableChangeListener

        void addVetoableChangeListener​(java.lang.String propertyName,
                                       java.beans.VetoableChangeListener listener)
        Adds a vetoable change listener for a specific property. The listener will be invoked only when a call to BoundPropertyObject.fireVetoableChange(String, int, int) names that specific property.

        The same listener object may be added more than once. For each property, the listener will be invoked the number of times it was added for that property.

        If propertyName or listener is null, no exception is thrown and no action is taken.

        Parameters:
        propertyName - The name of the property to listen on.
        listener - The VetoableChangeListener to be added.
      • removeVetoableChangeListener

        void removeVetoableChangeListener​(java.lang.String propertyName,
                                          java.beans.VetoableChangeListener listener)
        Removes a vetoable change listener for a specific property.

        If listener was added more than once to the same event source for the specified property, it will be notified one less time after being removed.

        If propertyName is null, no exception is thrown and no action is taken.

        If listener is null, or was never added for the specified property, no exception is thrown and no action is taken.

        Parameters:
        propertyName - The name of the property that was listened on.
        listener - The VetoableChangeListener to be removed.
      • getVetoableChangeListeners

        java.beans.VetoableChangeListener[] getVetoableChangeListeners()
        Returns the list of vetoable change listeners. If named vetoable change listeners were added, then VetoableChangeListenerProxy wrappers will returned.
        Returns:
        All added vetoable change listeners, including vetoable change listener proxys if named vetoable change listeners were added.
      • getVetoableChangeListeners

        java.beans.VetoableChangeListener[] getVetoableChangeListeners​(java.lang.String propertyName)
        Returns an array of all the listeners which have been associated with the named property.
        Parameters:
        propertyName - The name of the property being listened to.
        Returns:
        All the VetoableChangeListeners associated with the named property; if no such listeners have been added, or if propertyName is null, an empty array is returned.
      • hasVetoableChangeListeners

        boolean hasVetoableChangeListeners​(java.lang.String propertyName)
        Checks if there are any vetoable change listeners for a specific property, including those registered on all properties. If propertyName is null, this method only checks for listeners registered on all properties.
        Parameters:
        propertyName - The property name.
        Returns:
        true if there are one or more listeners for the given property.