Class SwingBindings


  • public class SwingBindings
    extends Object
    A factory class for creating instances of the custom Swing Binding implementations provided by this package. See the package summary for full details on binding to Swing components.
    Author:
    Shannon Hickey
    • Method Detail

      • createJListBinding

        public static <E> JListBinding<E,​List<E>,​JList> createJListBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                       List<E> sourceList,
                                                                                       JList targetJList)
        Creates a JListBinding from direct references to a List and JList.
        Parameters:
        strategy - the update strategy
        sourceList - the source List
        targetJList - the target JList
        Returns:
        the JTableBinding
      • createJListBinding

        public static <E> JListBinding<E,​List<E>,​JList> createJListBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                       List<E> sourceList,
                                                                                       JList targetJList,
                                                                                       String name)
        Creates a named JListBinding from direct references to a List and JList.
        Parameters:
        strategy - the update strategy
        sourceList - the source List
        targetJList - the target JList
        Returns:
        the JListBinding
      • createJListBinding

        public static <E,​SS> JListBinding<E,​SS,​JList> createJListBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                           SS sourceObject,
                                                                                           Property<SS,​List<E>> sourceListProperty,
                                                                                           JList targetJList)
        Creates a JListBinding from an object and property that resolves to a List and a direct reference to a JList.
        Parameters:
        strategy - the update strategy
        sourceObject - the source object
        sourceListProperty - a property on the source object that resolves to a List
        targetJList - the target JList
        Returns:
        the JListBinding
        Throws:
        IllegalArgumentException - if sourceListProperty is null
      • createJListBinding

        public static <E,​SS> JListBinding<E,​SS,​JList> createJListBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                           SS sourceObject,
                                                                                           Property<SS,​List<E>> sourceListProperty,
                                                                                           JList targetJList,
                                                                                           String name)
        Creates a named JListBinding from an object and property that resolves to a List and a direct reference to a JList.
        Parameters:
        strategy - the update strategy
        sourceObject - the source object
        sourceListProperty - a property on the source object that resolves to a List
        targetJList - the target JList
        Returns:
        the JListBinding
        Throws:
        IllegalArgumentException - if sourceListProperty is null
      • createJListBinding

        public static <E,​TS> JListBinding<E,​List<E>,​TS> createJListBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                             List<E> sourceList,
                                                                                             TS targetObject,
                                                                                             Property<TS,​? extends JList> targetJListProperty)
        Creates a JListBinding from a direct reference to a List and an object and property that resolves to a JList.
        Parameters:
        strategy - the update strategy
        sourceList - the source List
        targetObject - the target object
        targetJListProperty - a property on the target object that resolves to a JList
        Returns:
        the JListBinding
        Throws:
        IllegalArgumentException - if targetJListProperty is null
      • createJListBinding

        public static <E,​TS> JListBinding<E,​List<E>,​TS> createJListBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                             List<E> sourceList,
                                                                                             TS targetObject,
                                                                                             Property<TS,​? extends JList> targetJListProperty,
                                                                                             String name)
        Creates a named JListBinding from a direct reference to a List and an object and property that resolves to a JList.
        Parameters:
        strategy - the update strategy
        sourceList - the source List
        targetObject - the target object
        targetJListProperty - a property on the target object that resolves to a JList
        Returns:
        the JListBinding
        Throws:
        IllegalArgumentException - if targetJListProperty is null
      • createJListBinding

        public static <E,​SS,​TS> JListBinding<E,​SS,​TS> createJListBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                                 SS sourceObject,
                                                                                                 Property<SS,​List<E>> sourceListProperty,
                                                                                                 TS targetObject,
                                                                                                 Property<TS,​? extends JList> targetJListProperty)
        Creates a JListBinding from an object and property that resolves to a List and an object and property that resolves to a JList.
        Parameters:
        strategy - the update strategy
        sourceObject - the source object
        sourceListProperty - a property on the source object that resolves to a List
        targetObject - the target object
        targetJListProperty - a property on the target object that resolves to a JList
        Returns:
        the JListBinding
        Throws:
        IllegalArgumentException - if sourceListProperty or targetJListProperty is null
      • createJListBinding

        public static <E,​SS,​TS> JListBinding<E,​SS,​TS> createJListBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                                 SS sourceObject,
                                                                                                 Property<SS,​List<E>> sourceListProperty,
                                                                                                 TS targetObject,
                                                                                                 Property<TS,​? extends JList> targetJListProperty,
                                                                                                 String name)
        Creates a named JListBinding from an object and property that resolves to a List and an object and property that resolves to a JList.
        Parameters:
        strategy - the update strategy
        sourceObject - the source object
        sourceListProperty - a property on the source object that resolves to a List
        targetObject - the target object
        targetJListProperty - a property on the target object that resolves to a JList
        Returns:
        the JListBinding
        Throws:
        IllegalArgumentException - if sourceListProperty or targetJListProperty is null
      • createJTableBinding

        public static <E> JTableBinding<E,​List<E>,​JTable> createJTableBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                          List<E> sourceList,
                                                                                          JTable targetJTable)
        Creates a JTableBinding from direct references to a List and JTable.
        Parameters:
        strategy - the update strategy
        sourceList - the source List
        targetJTable - the target JTable
        Returns:
        the JTableBinding
      • createJTableBinding

        public static <E> JTableBinding<E,​List<E>,​JTable> createJTableBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                          List<E> sourceList,
                                                                                          JTable targetJTable,
                                                                                          String name)
        Creates a named JTableBinding from direct references to a List and JTable.
        Parameters:
        strategy - the update strategy
        sourceList - the source List
        targetJTable - the target JTable
        Returns:
        the JTableBinding
      • createJTableBinding

        public static <E,​SS> JTableBinding<E,​SS,​JTable> createJTableBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                              SS sourceObject,
                                                                                              Property<SS,​List<E>> sourceListProperty,
                                                                                              JTable targetJTable)
        Creates a JTableBinding from an object and property that resolves to a List and a direct reference to a JTable.
        Parameters:
        strategy - the update strategy
        sourceObject - the source object
        sourceListProperty - a property on the source object that resolves to a List
        targetJTable - the target JTable
        Returns:
        the JTableBinding
        Throws:
        IllegalArgumentException - if sourceListProperty is null
      • createJTableBinding

        public static <E,​SS> JTableBinding<E,​SS,​JTable> createJTableBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                              SS sourceObject,
                                                                                              Property<SS,​List<E>> sourceListProperty,
                                                                                              JTable targetJTable,
                                                                                              String name)
        Creates a named JTableBinding from an object and property that resolves to a List and a direct reference to a JTable.
        Parameters:
        strategy - the update strategy
        sourceObject - the source object
        sourceListProperty - a property on the source object that resolves to a List
        targetJTable - the target JTable
        Returns:
        the JTableBinding
        Throws:
        IllegalArgumentException - if sourceListProperty is null
      • createJTableBinding

        public static <E,​TS> JTableBinding<E,​List<E>,​TS> createJTableBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                               List<E> sourceList,
                                                                                               TS targetObject,
                                                                                               Property<TS,​? extends JTable> targetJTableProperty)
        Creates a JTableBinding from a direct reference to a List and an object and property that resolves to a JTable.
        Parameters:
        strategy - the update strategy
        sourceList - the source List
        targetObject - the target object
        targetJTableProperty - a property on the target object that resolves to a JTable
        Returns:
        the JTableBinding
        Throws:
        IllegalArgumentException - if targetJTableProperty is null
      • createJTableBinding

        public static <E,​TS> JTableBinding<E,​List<E>,​TS> createJTableBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                               List<E> sourceList,
                                                                                               TS targetObject,
                                                                                               Property<TS,​? extends JTable> targetJTableProperty,
                                                                                               String name)
        Creates a named JTableBinding from a direct reference to a List and an object and property that resolves to a JTable.
        Parameters:
        strategy - the update strategy
        sourceList - the source List
        targetObject - the target object
        targetJTableProperty - a property on the target object that resolves to a JTable
        Returns:
        the JTableBinding
        Throws:
        IllegalArgumentException - if targetJTableProperty is null
      • createJTableBinding

        public static <E,​SS,​TS> JTableBinding<E,​SS,​TS> createJTableBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                                   SS sourceObject,
                                                                                                   Property<SS,​List<E>> sourceListProperty,
                                                                                                   TS targetObject,
                                                                                                   Property<TS,​? extends JTable> targetJTableProperty)
        Creates a JTableBinding from an object and property that resolves to a List and an object and property that resolves to a JTable.
        Parameters:
        strategy - the update strategy
        sourceObject - the source object
        sourceListProperty - a property on the source object that resolves to a List
        targetObject - the target object
        targetJTableProperty - a property on the target object that resolves to a JTable
        Returns:
        the JTableBinding
        Throws:
        IllegalArgumentException - if sourceListProperty or targetJTableProperty is null
      • createJTableBinding

        public static <E,​SS,​TS> JTableBinding<E,​SS,​TS> createJTableBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                                   SS sourceObject,
                                                                                                   Property<SS,​List<E>> sourceListProperty,
                                                                                                   TS targetObject,
                                                                                                   Property<TS,​? extends JTable> targetJTableProperty,
                                                                                                   String name)
        Creates a named JTableBinding from an object and property that resolves to a List and an object and property that resolves to a JTable.
        Parameters:
        strategy - the update strategy
        sourceObject - the source object
        sourceListProperty - a property on the source object that resolves to a List
        targetObject - the target object
        targetJTableProperty - a property on the target object that resolves to a JTable
        Returns:
        the JTableBinding
        Throws:
        IllegalArgumentException - if sourceListProperty or targetJTableProperty is null
      • createJComboBoxBinding

        public static <E> JComboBoxBinding<E,​List<E>,​JComboBox> createJComboBoxBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                                   List<E> sourceList,
                                                                                                   JComboBox targetJComboBox)
        Creates a JComboBoxBinding from direct references to a List and JComboBox.
        Parameters:
        strategy - the update strategy
        sourceList - the source List
        targetJComboBox - the target JComboBox
        Returns:
        the JComboBoxBinding
      • createJComboBoxBinding

        public static <E> JComboBoxBinding<E,​List<E>,​JComboBox> createJComboBoxBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                                   List<E> sourceList,
                                                                                                   JComboBox targetJComboBox,
                                                                                                   String name)
        Creates a named JComboBoxBinding from direct references to a List and JComboBox.
        Parameters:
        strategy - the update strategy
        sourceList - the source List
        targetJComboBox - the target JComboBox
        Returns:
        the JComboBoxBinding
      • createJComboBoxBinding

        public static <E,​SS> JComboBoxBinding<E,​SS,​JComboBox> createJComboBoxBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                                       SS sourceObject,
                                                                                                       Property<SS,​List<E>> sourceListProperty,
                                                                                                       JComboBox targetJComboBox)
        Creates a JComboBoxBinding from an object and property that resolves to a List and a direct reference to a JComboBox.
        Parameters:
        strategy - the update strategy
        sourceObject - the source object
        sourceListProperty - a property on the source object that resolves to a List
        targetJComboBox - the target JComboBox
        Returns:
        the JComboBoxBinding
        Throws:
        IllegalArgumentException - if sourceListProperty is null
      • createJComboBoxBinding

        public static <E,​SS> JComboBoxBinding<E,​SS,​JComboBox> createJComboBoxBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                                       SS sourceObject,
                                                                                                       Property<SS,​List<E>> sourceListProperty,
                                                                                                       JComboBox targetJComboBox,
                                                                                                       String name)
        Creates a named JComboBoxBinding from an object and property that resolves to a List and a direct reference to a JComboBox.
        Parameters:
        strategy - the update strategy
        sourceObject - the source object
        sourceListProperty - a property on the source object that resolves to a List
        targetJComboBox - the target JComboBox
        Returns:
        the JComboBoxBinding
        Throws:
        IllegalArgumentException - if sourceListProperty is null
      • createJComboBoxBinding

        public static <E,​TS> JComboBoxBinding<E,​List<E>,​TS> createJComboBoxBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                                     List<E> sourceList,
                                                                                                     TS targetObject,
                                                                                                     Property<TS,​? extends JComboBox> targetJComboBoxProperty)
        Creates a JComboBoxBinding from a direct reference to a List and an object and property that resolves to a JComboBox.
        Parameters:
        strategy - the update strategy
        sourceList - the source List
        targetObject - the target object
        targetJComboBoxProperty - a property on the target object that resolves to a JComboBox
        Returns:
        the JComboBoxBinding
        Throws:
        IllegalArgumentException - if targetJComboBoxProperty is null
      • createJComboBoxBinding

        public static <E,​TS> JComboBoxBinding<E,​List<E>,​TS> createJComboBoxBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                                     List<E> sourceList,
                                                                                                     TS targetObject,
                                                                                                     Property<TS,​? extends JComboBox> targetJComboBoxProperty,
                                                                                                     String name)
        Creates a named JComboBoxBinding from a direct reference to a List and an object and property that resolves to a JComboBox.
        Parameters:
        strategy - the update strategy
        sourceList - the source List
        targetObject - the target object
        targetJComboBoxProperty - a property on the target object that resolves to a JComboBox
        Returns:
        the JComboBoxBinding
        Throws:
        IllegalArgumentException - if targetJComboBoxProperty is null
      • createJComboBoxBinding

        public static <E,​SS,​TS> JComboBoxBinding<E,​SS,​TS> createJComboBoxBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                                         SS sourceObject,
                                                                                                         Property<SS,​List<E>> sourceListProperty,
                                                                                                         TS targetObject,
                                                                                                         Property<TS,​? extends JComboBox> targetJComboBoxProperty)
        Creates a JComboBoxBinding from an object and property that resolves to a List and an object and property that resolves to a JComboBox.
        Parameters:
        strategy - the update strategy
        sourceObject - the source object
        sourceListProperty - a property on the source object that resolves to a List
        targetObject - the target object
        targetJComboBoxProperty - a property on the target object that resolves to a JComboBox
        Returns:
        the JComboBoxBinding
        Throws:
        IllegalArgumentException - if sourceListProperty or targetJComboBoxProperty is null
      • createJComboBoxBinding

        public static <E,​SS,​TS> JComboBoxBinding<E,​SS,​TS> createJComboBoxBinding​(AutoBinding.UpdateStrategy strategy,
                                                                                                         SS sourceObject,
                                                                                                         Property<SS,​List<E>> sourceListProperty,
                                                                                                         TS targetObject,
                                                                                                         Property<TS,​? extends JComboBox> targetJComboBoxProperty,
                                                                                                         String name)
        Creates a named JComboBoxBinding from an object and property that resolves to a List and an object and property that resolves to a JComboBox.
        Parameters:
        strategy - the update strategy
        sourceObject - the source object
        sourceListProperty - a property on the source object that resolves to a List
        targetObject - the target object
        targetJComboBoxProperty - a property on the target object that resolves to a JComboBox
        Returns:
        the JComboBoxBinding
        Throws:
        IllegalArgumentException - if sourceListProperty or targetJComboBoxProperty is null