Package com.jidesoft.swing
Class SelectionModelGroup<T,V>
- java.lang.Object
-
- com.jidesoft.swing.SelectionModelGroup<T,V>
-
- All Implemented Interfaces:
java.io.Serializable
public abstract class SelectionModelGroup<T,V> extends java.lang.Object implements java.io.SerializableThis 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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<T>_modelsprotected V_selectionListener
-
Constructor Summary
Constructors Constructor Description SelectionModelGroup()Creates a newSelectionModelGroup.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidadd(int index, T model)Adds the ListSelectionModel to the group.voidadd(T model)Adds the ListSelectionModel to the group.protected abstract voidaddSelectionListener(T model, V listener)protected abstract VcreateSelectionListener()java.util.List<T>getElements()Gets the registered models.intgetModelCount()Returns the number of T in the group.java.util.List<T>getModels()Returns all the T that are participating in this group.voidremove(T model)Removes the T from the group.voidremoveAll()Removes all T's from the group.protected abstract voidremoveSelectionListener(T model, V listener)
-
-
-
Method Detail
-
createSelectionListener
protected abstract V createSelectionListener()
-
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 addedindex- 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 java.util.List<T> getElements()
Gets the registered models.- Returns:
- the models.
-
getModels
public java.util.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
-
-