Class SelectionModelGroup<T,V>

java.lang.Object
com.jidesoft.swing.SelectionModelGroup<T,V>
All Implemented Interfaces:
Serializable

public abstract class SelectionModelGroup<T,V> extends Object implements Serializable
This class is used to create a multiple-exclusion scope for a set of any selection model so that one selection model can have selected index at a time.
See Also:
  • Field Details

    • _models

      protected List<T> _models
    • _selectionListener

      protected V _selectionListener
  • Constructor Details

    • SelectionModelGroup

      public SelectionModelGroup()
      Creates a new SelectionModelGroup.
  • Method Details

    • createSelectionListener

      protected abstract V createSelectionListener()
    • addSelectionListener

      protected abstract void addSelectionListener(T model, V listener)
    • removeSelectionListener

      protected abstract void removeSelectionListener(T model, V listener)
    • add

      public void add(T model)
      Adds the ListSelectionModel to the group.
      Parameters:
      model - the ListSelectionModel to be added
    • add

      public void add(int index, T model)
      Adds the ListSelectionModel to the group.
      Parameters:
      model - the ListSelectionModel to be added
      index - the index
    • remove

      public void remove(T model)
      Removes the T from the group.
      Parameters:
      model - the T to be removed
    • removeAll

      public void removeAll()
      Removes all T's from the group.
    • getElements

      public List<T> getElements()
      Gets the registered models.
      Returns:
      the models.
    • getModels

      public List<T> getModels()
      Returns all the T that are participating in this group.
      Returns:
      an array of all Ts
    • getModelCount

      public int getModelCount()
      Returns the number of T in the group.
      Returns:
      the T count