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.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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<T>
_models
protected 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 void
add(int index, T model)
Adds the ListSelectionModel to the group.void
add(T model)
Adds the ListSelectionModel to the group.protected abstract void
addSelectionListener(T model, V listener)
protected abstract V
createSelectionListener()
java.util.List<T>
getElements()
Gets the registered models.int
getModelCount()
Returns the number of T in the group.java.util.List<T>
getModels()
Returns all the T that are participating in this group.void
remove(T model)
Removes the T from the group.void
removeAll()
Removes all T's from the group.protected abstract void
removeSelectionListener(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
-
-