Package com.jidesoft.swing
Class SelectionModelGroup<T,V>
java.lang.Object
com.jidesoft.swing.SelectionModelGroup<T,V>
- All Implemented Interfaces:
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the ListSelectionModel to the group.void
Adds the ListSelectionModel to the group.protected abstract void
addSelectionListener
(T model, V listener) protected abstract V
Gets the registered models.int
Returns the number of T in the group.Returns all the T that are participating in this group.void
Removes the T from the group.void
Removes all T's from the group.protected abstract void
removeSelectionListener
(T model, V listener)
-
Field Details
-
_models
-
_selectionListener
-
-
Constructor Details
-
SelectionModelGroup
public SelectionModelGroup()Creates a newSelectionModelGroup
.
-
-
Method Details
-
createSelectionListener
-
addSelectionListener
-
removeSelectionListener
-
add
Adds the ListSelectionModel to the group.- Parameters:
model
- the ListSelectionModel to be added
-
add
Adds the ListSelectionModel to the group.- Parameters:
model
- the ListSelectionModel to be addedindex
- the index
-
remove
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
Gets the registered models.- Returns:
- the models.
-
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
-