JIDE 3.5.15

com.jidesoft.swing
Class SelectionModelGroup<T,V>

java.lang.Object
  extended by com.jidesoft.swing.SelectionModelGroup<T,V>
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ListSelectionModelGroup, TreeSelectionModelGroup

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:
Serialized Form

Field Summary
protected  List<T> _models
           
protected  V _selectionListener
           
 
Constructor Summary
SelectionModelGroup()
          Creates a new SelectionModelGroup.
 
Method Summary
 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()
           
 List<T> getElements()
          Gets the registered models.
 int getModelCount()
          Returns the number of T in the group.
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_models

protected List<T> _models

_selectionListener

protected V _selectionListener
Constructor Detail

SelectionModelGroup

public SelectionModelGroup()
Creates a new SelectionModelGroup.

Method Detail

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

JIDE 3.5.15