Interface Binding


  • public interface Binding
    A bi-directional binding between one or more Swing GUI components and a property in a value container.

    This class is not intended to be implemented by clients.

    Since:
    Ceres 0.6
    Version:
    $Revision$ $Date$
    • Method Detail

      • getContext

        BindingContext getContext()
        Returns:
        The binding context.
      • getComponentAdapter

        ComponentAdapter getComponentAdapter()
        Returns:
        The component adapter.
      • getPropertyName

        String getPropertyName()
        Returns:
        The name of the bound property.
      • getPropertyValue

        Object getPropertyValue()
        Returns:
        The value of the bound property.
      • setPropertyValue

        void setPropertyValue​(Object value)
        Sets the value of the bound property. This may trigger a property change event in the associated PropertyContainer. Whether or not setting the value was successful can be retrieved by getProblem().
        Parameters:
        value - The new value of the bound property.
      • getProblem

        BindingProblem getProblem()
        Gets the current problem. If the GUI is in sync with the associated property, the method will return null.
        Returns:
        The current problem, or null.
        Since:
        Ceres 0.10
      • clearProblem

        void clearProblem()
        Clears the current problem.
        Since:
        Ceres 0.10
      • reportProblem

        BindingProblem reportProblem​(BindingException cause)
        Reports a problem. The method sets the current problem and will cause the context to fire a problem-occurred event.
        Parameters:
        cause - The cause.
        Returns:
        The resulting problem.
        Since:
        Ceres 0.10
      • isAdjustingComponents

        boolean isAdjustingComponents()
        Tests if this binding is currently adjusting the bound GUI components.
        Returns:
        true if so.
        See Also:
        adjustComponents()