com.eliad.model
Class AbstractSpanModel

java.lang.Object
  |
  +--com.eliad.model.AbstractGenericModel
        |
        +--com.eliad.model.AbstractSpanModel
Direct Known Subclasses:
AbstractCollectionSpanModel, AbstractDirectSpanModel, AbstractQuerySpanModel

public abstract class AbstractSpanModel
extends com.eliad.model.AbstractGenericModel
implements SpanModel

A base for SpanModel, providing a standard handling of listeners

Version:
1.0 04/08/00
Author:
Patrick Mérissert-Coffinières
See Also:
Serialized Form

Fields inherited from class com.eliad.model.AbstractGenericModel
listeners_
 
Constructor Summary
AbstractSpanModel()
           
 
Method Summary
 void addSpanModelListener(SpanModelListener l)
          Adds a listener to the list that's notified each time a change to the span model occurs.
 void fireSpanAdded(int anchorRow, int anchorColumn, int newRowCount, int newColumnCount)
          Forwards the given notification event to all SpanModelListeners that registered themselves as listeners for this table model.
 void fireSpanColumnsDeleted(int firstColumn, int columnCount)
          Forwards a "columns removed" notification event to all SpanModelListeners that registered themselves as listeners for this span model.
 void fireSpanColumnsInserted(int firstColumn, int columnCount)
          Forwards a "columns added" notification event to all SpanModelListeners that registered themselves as listeners for this span model.
 void fireSpanModelChanged()
          Forwards the given notification event to all SpanModelListeners that registered themselves as listeners for this table model.
 void fireSpanRemoved(int anchorRow, int anchorColumn, int oldRowCount, int oldColumnCount)
          Forwards the given notification event to all SpanModelListeners that registered themselves as listeners for this table model.
 void fireSpanRowsDeleted(int firstRow, int rowCount)
          Forwards a "rows removed" notification event to all SpanModelListeners that registered themselves as listeners for this span model.
 void fireSpanRowsInserted(int firstRow, int rowCount)
          Forwards a "rows added" notification event to all SpanModelListeners that registered themselves as listeners for this span model.
protected  void fireSpanStructureChanged(int type, int first, int count)
          Forwards a "structure incrementally changed" notification event to all SpanModelListeners that registered themselves as listeners for this span model.
 void fireSpanUpdated(int anchorRow, int anchorColumn, int oldRowCount, int oldColumnCount, int newRowCount, int newColumnCount)
          Forwards the given notification event to all SpanModelListeners that registered themselves as listeners for this table model.
protected  void propagateDataChange(SpanModelEvent e)
          Implements the mechanism thats fires an event-oriented data change.
protected  void propagateModelChange(SpanModelEvent e)
          Implements the mechanism that fires an event-oriented model change.
protected  void propagateStructureChange(SpanModelEvent e)
          this method implements the mechanism to fire a event oriented structure changed.
 void removeSpanModelListener(SpanModelListener l)
          Removes a listener from the list that's notified each time a change to the data model occurs.
 
Methods inherited from class com.eliad.model.AbstractGenericModel
getListenerCount, getListeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSpanModel

public AbstractSpanModel()
Method Detail

addSpanModelListener

public void addSpanModelListener(SpanModelListener l)
Adds a listener to the list that's notified each time a change to the span model occurs. The implementation uses a simple Vector, but also handles the case where a manager is added, ensuring it is only present once, and always before any non-managers position.
Specified by:
addSpanModelListener in interface SpanModel
Parameters:
l - the SpanModelListener

removeSpanModelListener

public void removeSpanModelListener(SpanModelListener l)
Removes a listener from the list that's notified each time a change to the data model occurs.
Specified by:
removeSpanModelListener in interface SpanModel
Parameters:
l - the SpanModelListener

propagateDataChange

protected void propagateDataChange(SpanModelEvent e)
Implements the mechanism thats fires an event-oriented data change.

propagateModelChange

protected void propagateModelChange(SpanModelEvent e)
Implements the mechanism that fires an event-oriented model change.

propagateStructureChange

protected void propagateStructureChange(SpanModelEvent e)
this method implements the mechanism to fire a event oriented structure changed.

fireSpanModelChanged

public void fireSpanModelChanged()
Forwards the given notification event to all SpanModelListeners that registered themselves as listeners for this table model.
See Also:
addSpanModelListener(com.eliad.model.SpanModelListener), SpanModelEvent, EventListenerList

fireSpanStructureChanged

protected void fireSpanStructureChanged(int type,
                                        int first,
                                        int count)
Forwards a "structure incrementally changed" notification event to all SpanModelListeners that registered themselves as listeners for this span model.
See Also:
addSpanModelListener(com.eliad.model.SpanModelListener), SpanModelEvent, EventListenerList

fireSpanAdded

public void fireSpanAdded(int anchorRow,
                          int anchorColumn,
                          int newRowCount,
                          int newColumnCount)
Forwards the given notification event to all SpanModelListeners that registered themselves as listeners for this table model.
Parameters:
e - the event to be forwarded
See Also:
addSpanModelListener(com.eliad.model.SpanModelListener), SpanModelEvent, EventListenerList

fireSpanRemoved

public void fireSpanRemoved(int anchorRow,
                            int anchorColumn,
                            int oldRowCount,
                            int oldColumnCount)
Forwards the given notification event to all SpanModelListeners that registered themselves as listeners for this table model.
Parameters:
e - the event to be forwarded
See Also:
addSpanModelListener(com.eliad.model.SpanModelListener), SpanModelEvent, EventListenerList

fireSpanUpdated

public void fireSpanUpdated(int anchorRow,
                            int anchorColumn,
                            int oldRowCount,
                            int oldColumnCount,
                            int newRowCount,
                            int newColumnCount)
Forwards the given notification event to all SpanModelListeners that registered themselves as listeners for this table model.
Parameters:
e - the event to be forwarded
See Also:
addSpanModelListener(com.eliad.model.SpanModelListener), SpanModelEvent, EventListenerList

fireSpanRowsInserted

public void fireSpanRowsInserted(int firstRow,
                                 int rowCount)
Forwards a "rows added" notification event to all SpanModelListeners that registered themselves as listeners for this span model.
See Also:
addSpanModelListener(com.eliad.model.SpanModelListener), SpanModelEvent, EventListenerList

fireSpanRowsDeleted

public void fireSpanRowsDeleted(int firstRow,
                                int rowCount)
Forwards a "rows removed" notification event to all SpanModelListeners that registered themselves as listeners for this span model.
See Also:
addSpanModelListener(com.eliad.model.SpanModelListener), SpanModelEvent, EventListenerList

fireSpanColumnsInserted

public void fireSpanColumnsInserted(int firstColumn,
                                    int columnCount)
Forwards a "columns added" notification event to all SpanModelListeners that registered themselves as listeners for this span model.
See Also:
addSpanModelListener(com.eliad.model.SpanModelListener), SpanModelEvent, EventListenerList

fireSpanColumnsDeleted

public void fireSpanColumnsDeleted(int firstColumn,
                                   int columnCount)
Forwards a "columns removed" notification event to all SpanModelListeners that registered themselves as listeners for this span model.
See Also:
addSpanModelListener(com.eliad.model.SpanModelListener), SpanModelEvent, EventListenerList