Class AddRemovePanel<T>

  • Type Parameters:
    T - the type of the objects in the list.
    All Implemented Interfaces:
    ImageObserver, MenuContainer, Serializable, Accessible

    public class AddRemovePanel<T>
    extends JPanel
    This component displays two list (available list and selected list) with some buttons to move the components of one list to the other.
    See Also:
    Serialized Form
    • Constructor Detail

      • AddRemovePanel

        public AddRemovePanel​(Class<T> theClass)
        Constructor of the default add remove panel (including 'Add All' and 'Remove All' buttons). The class is required to avoid warnings in compilation.
        Parameters:
        theClass - the class of the objects in the panel.
    • Method Detail

      • setEnabled

        public void setEnabled​(boolean enable)
        Enables the state of the components in the panel.
        Overrides:
        setEnabled in class JComponent
        Parameters:
        enable - whether to enable the components in the panel or not.
      • getAvailableLabel

        public JLabel getAvailableLabel()
        Returns the available label contained in the panel.
        Returns:
        the available label contained in the panel.
      • getAvailableListModel

        public SortableListModel<T> getAvailableListModel()
        Returns the list of elements in the available list.
        Returns:
        the list of elements in the available list.
      • getSelectedLabel

        public JLabel getSelectedLabel()
        Returns the selected label contained in the panel.
        Returns:
        the selected label contained in the panel.
      • getSelectedListModel

        public SortableListModel<T> getSelectedListModel()
        Returns the list of elements in the selected list.
        Returns:
        the list of elements in the selected list.
      • getAvailableList

        public JList getAvailableList()
        Returns the available list.
        Returns:
        the available list.
      • getSelectedList

        public JList getSelectedList()
        Returns the selected list.
        Returns:
        the selected list.