Class MultiSelectionInList<E>


  • public class MultiSelectionInList<E>
    extends Object
    Author:
    Felix Leipold Date: 20.10.2005 This class represents a multi selection in has a ListModel representing the set of possible and an ObservableList representing the current selection. Note: Unlike SingleSelectionInList this class does not enforce constraints on the selection. That means you can add items to the selection that are not in the list. But we should definitly think about it. Firstly we could add a listener to the selection which removes invalid elements that are added. The disadvantage of this solution lies in the fact that there is phase in which we are invalid. Secondly we might consider wrapping the ObservableList to prevent illegal selections. So only while reducing the possible we might run into problems. (What circumstances?)
    • Constructor Detail

      • MultiSelectionInList

        public MultiSelectionInList​(ListModel<E> list)
      • MultiSelectionInList

        public MultiSelectionInList​(E[] list)
    • Method Detail

      • getSelection

        public com.jgoodies.common.collect.ObservableList<E> getSelection()