to.etc.domui.component.tbl
Class AbstractSelectionModel<T>

java.lang.Object
  extended by to.etc.domui.component.tbl.AbstractSelectionModel<T>
All Implemented Interfaces:
ISelectionModel<T>
Direct Known Subclasses:
InstanceSelectionModel, KeySelectionModel

public abstract class AbstractSelectionModel<T>
extends java.lang.Object
implements ISelectionModel<T>

Abstract base class for selection models which handles the registration and calling of listeners. It implements none of the selection logic: use one of the subclasses for that.

Author:
Frits Jalvingh Created on Feb 17, 2011

Constructor Summary
AbstractSelectionModel()
           
 
Method Summary
 void addListener(ISelectionListener<T> l)
          Add a listener that will receive notifications when the selections change.
protected  void callChanged(T item, boolean on)
           
protected  void callSelectionAllChanged()
           
 void removeListener(ISelectionListener<T> l)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface to.etc.domui.component.tbl.ISelectionModel
clearSelection, getSelectionCount, isMultiSelect, isSelected, selectAll, setInstanceSelected
 

Constructor Detail

AbstractSelectionModel

public AbstractSelectionModel()
Method Detail

addListener

public void addListener(ISelectionListener<T> l)
Description copied from interface: ISelectionModel
Add a listener that will receive notifications when the selections change.

Specified by:
addListener in interface ISelectionModel<T>

removeListener

public void removeListener(ISelectionListener<T> l)
Specified by:
removeListener in interface ISelectionModel<T>

callChanged

protected void callChanged(T item,
                           boolean on)
                    throws java.lang.Exception
Throws:
java.lang.Exception

callSelectionAllChanged

protected void callSelectionAllChanged()
                                throws java.lang.Exception
Throws:
java.lang.Exception