sos.reports
Class AbstractReportSelectionModel

java.lang.Object
  |
  +--sos.reports.AbstractReportSelectionModel
All Implemented Interfaces:
ReportSelectionModel, java.io.Serializable
Direct Known Subclasses:
CellReportSelectionModel, CompositeReportSelectionModel, TemplateReportSelectionModel, TierReportSelectionModel

public abstract class AbstractReportSelectionModel
extends java.lang.Object
implements ReportSelectionModel, java.io.Serializable

A partial implementation of ReportSelectionModel that handles the registering, unregistering, and notification of listeners.

Subclasses must implement the following methods:

Since:
1.0
See Also:
ReportSelectionModel

Constructor Summary
protected AbstractReportSelectionModel()
          Creates an instance of AbstractReportSelectionModel.
 
Method Summary
 void addReportSelectionListener(ReportSelectionListener listener)
          Registers the specified listener so that it is notified when the selection changes.
protected  void fireSelectionChanged(boolean isAdjusting)
          Notifies all registered listeners that a series of changes has started or ended.
protected  void fireSelectionChanged(ReportSelectionEvent event)
          Notifies all registered listeners of the specified event.
protected  void fireSelectionChanged(java.util.Set elementsChanged)
          Notifies all registered listeners that the selection state of the specified elements may have changed.
 boolean getValueIsAdjusting()
          Returns true if the selection is undergoing a series of changes.
 void removeReportSelectionListener(ReportSelectionListener listener)
          Unregisters the specified listener so that it is not notified when the selection changes.
 void reportChanged(ReportEvent event)
          Updates itself (if necessary) as a result of a report modification.
 void setValueIsAdjusting(boolean isAdjusting)
          Sets whether or not the selection is about to undergo changes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface sos.reports.ReportSelectionModel
canSelect, clearSelection, getAnchorSelectionElement, getLeadSelectionElement, getSelectedElements, isSelected, select, setAnchorSelectionElement, setLeadSelectionElement, setSelectedElements
 

Constructor Detail

AbstractReportSelectionModel

protected AbstractReportSelectionModel()
Creates an instance of AbstractReportSelectionModel.

Method Detail

addReportSelectionListener

public void addReportSelectionListener(ReportSelectionListener listener)
Description copied from interface: ReportSelectionModel
Registers the specified listener so that it is notified when the selection changes.

Specified by:
addReportSelectionListener in interface ReportSelectionModel
Parameters:
listener - object to be notified when a change in the selection occurs

fireSelectionChanged

protected void fireSelectionChanged(boolean isAdjusting)
Notifies all registered listeners that a series of changes has started or ended.

Parameters:
isAdjusting - usually false to indicate that a series of selection changes has finished

fireSelectionChanged

protected void fireSelectionChanged(ReportSelectionEvent event)
Notifies all registered listeners of the specified event.

Parameters:
event - event to send to listeners

fireSelectionChanged

protected void fireSelectionChanged(java.util.Set elementsChanged)
Notifies all registered listeners that the selection state of the specified elements may have changed.

Parameters:
elementsChanged - set of report elements whose selection state may have changed

getValueIsAdjusting

public boolean getValueIsAdjusting()
Description copied from interface: ReportSelectionModel
Returns true if the selection is undergoing a series of changes.

Specified by:
getValueIsAdjusting in interface ReportSelectionModel
Returns:
true if the selection is currently adjusting
See Also:
ReportSelectionModel.setValueIsAdjusting(boolean)

removeReportSelectionListener

public void removeReportSelectionListener(ReportSelectionListener listener)
Description copied from interface: ReportSelectionModel
Unregisters the specified listener so that it is not notified when the selection changes.

Specified by:
removeReportSelectionListener in interface ReportSelectionModel
Parameters:
listener - object that does not wish to be notified when a change in the selection occurs

reportChanged

public void reportChanged(ReportEvent event)
Description copied from interface: ReportSelectionModel
Updates itself (if necessary) as a result of a report modification.

Specified by:
reportChanged in interface ReportSelectionModel
Parameters:
event - the event describing how the report has changed

setValueIsAdjusting

public void setValueIsAdjusting(boolean isAdjusting)
Description copied from interface: ReportSelectionModel
Sets whether or not the selection is about to undergo changes.

Specified by:
setValueIsAdjusting in interface ReportSelectionModel
Parameters:
isAdjusting - true if a series of changes is about to take place
See Also:
ReportSelectionModel.getValueIsAdjusting()


Copyright 2003, 2004 Side of Software (SOS). All rights reserved.