Class AbstractLayout.ConstraintsPropertyChangeListener

  • All Implemented Interfaces:
    com.globalmentor.beans.GenericPropertyChangeListener<java.lang.Object>, java.beans.PropertyChangeListener, java.util.EventListener
    Enclosing class:
    AbstractLayout<T extends Constraints>

    protected class AbstractLayout.ConstraintsPropertyChangeListener
    extends com.globalmentor.beans.AbstractGenericPropertyChangeListener<java.lang.Object>
    A property change listener that listens for changes in a constraint object's properties and fires a layout constraints property change event in response. A LayoutConstraintsPropertyChangeEvent will be fired for each component associated with the constraints for which a property changed. Events are only fired for constraints of a type recognized by this layout.
    Author:
    Garret Wilson
    See Also:
    LayoutConstraintsPropertyChangeEvent
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void propertyChange​(com.globalmentor.beans.GenericPropertyChangeEvent<java.lang.Object> propertyChangeEvent)
      protected <V> void refirePropertyChange​(Component component, T constraints, java.lang.String propertyName, V oldValue, V newValue)
      Refires a constraint property change event for the layout in the form of a LayoutConstraintsPropertyChangeEvent.
      • Methods inherited from class com.globalmentor.beans.AbstractGenericPropertyChangeListener

        getGenericPropertyChangeEvent, propertyChange
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ConstraintsPropertyChangeListener

        protected ConstraintsPropertyChangeListener()
    • Method Detail

      • propertyChange

        public void propertyChange​(com.globalmentor.beans.GenericPropertyChangeEvent<java.lang.Object> propertyChangeEvent)

        This implementation fires a LayoutConstraintsPropertyChangeEvent indicating the constraints and associated component.

      • refirePropertyChange

        protected <V> void refirePropertyChange​(Component component,
                                                T constraints,
                                                java.lang.String propertyName,
                                                V oldValue,
                                                V newValue)
        Refires a constraint property change event for the layout in the form of a LayoutConstraintsPropertyChangeEvent.
        Type Parameters:
        V - The type of the values.
        Parameters:
        component - The component for which a constraint value changed.
        constraints - The constraints for which a value changed.
        propertyName - The name of the property being changed.
        oldValue - The old property value.
        newValue - The new property value.