net.sf.jeppers.grid
Class AbstractStyleModel

java.lang.Object
  |
  +--net.sf.jeppers.grid.AbstractStyleModel
All Implemented Interfaces:
StyleModel
Direct Known Subclasses:
DefaultStyleModel

public abstract class AbstractStyleModel
extends Object
implements StyleModel

A base for StyleModel that provides handling of listeners.

Author:
Cameron Zemek

Field Summary
protected  EventListenerList listenerList
          List of event listeners
 
Constructor Summary
AbstractStyleModel()
           
 
Method Summary
 void addStyleModelListener(StyleModelListener listener)
          Add listener to model
 void fireCellStyleChanged(int row, int column)
          Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that the cell styles for the (row, column) as changed
 void fireCellStylesChanged(int firstRow, int firstColumn, int lastRow, int lastColumn)
          Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that the cell styles for the range (firstRow, firstColumn) to (lastRow, lastColumn) as changed
 void fireEditorAdded()
          Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that an editor has been added
 void fireEditorChanged(int row, int column)
          Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that the editor for the (row, column) has been changed
 void fireEditorRemoved()
          Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that an editor has been removed
 void fireEditorsChanged(int firstRow, int firstColumn, int lastRow, int lastColumn)
          Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that the editors for the range (firstRow, firstColumn) to (lastRow, lastColumn) have been changed
 void fireModelChanged()
          Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that the entire model has changed
 void fireRendererAdded()
          Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that a renderer has been added
 void fireRendererChanged(int row, int column)
          Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that the renderer for the (row, column) has been changed
 void fireRendererRemoved()
          Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that a renderer has been removed
 void fireRenderersChanged(int firstRow, int firstColumn, int lastRow, int lastColumn)
          Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that the renderers for the range (firstRow, firstColumn) to (lastRow, lastColumn) have been changed
 void fireStyleChanged(StyleModelEvent e)
          Forwards the given notification event to all StyleModelListeners that registered themselves as listeners for this StyleModel.
 EventListener[] getListeners(Class listenerType)
          Returns an array of all the listeners of the given type that were added to this model.
 void removeStyleModelListener(StyleModelListener listener)
          Remove listener from model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jeppers.grid.StyleModel
getCellStyle, getEditor, getRenderer, updateUI
 

Field Detail

listenerList

protected EventListenerList listenerList
List of event listeners

Constructor Detail

AbstractStyleModel

public AbstractStyleModel()
Method Detail

addStyleModelListener

public void addStyleModelListener(StyleModelListener listener)
Add listener to model

Specified by:
addStyleModelListener in interface StyleModel

removeStyleModelListener

public void removeStyleModelListener(StyleModelListener listener)
Remove listener from model

Specified by:
removeStyleModelListener in interface StyleModel

getListeners

public EventListener[] getListeners(Class listenerType)
Returns an array of all the listeners of the given type that were added to this model.

Returns:
all of the objects receiving listenerType notifications from this model

fireStyleChanged

public void fireStyleChanged(StyleModelEvent e)
Forwards the given notification event to all StyleModelListeners that registered themselves as listeners for this StyleModel.

Parameters:
e - the event to be forwarded
See Also:
addStyleModelListener(net.sf.jeppers.grid.StyleModelListener), StyleModelEvent, EventListenerList

fireCellStylesChanged

public void fireCellStylesChanged(int firstRow,
                                  int firstColumn,
                                  int lastRow,
                                  int lastColumn)
Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that the cell styles for the range (firstRow, firstColumn) to (lastRow, lastColumn) as changed


fireCellStyleChanged

public void fireCellStyleChanged(int row,
                                 int column)
Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that the cell styles for the (row, column) as changed


fireEditorsChanged

public void fireEditorsChanged(int firstRow,
                               int firstColumn,
                               int lastRow,
                               int lastColumn)
Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that the editors for the range (firstRow, firstColumn) to (lastRow, lastColumn) have been changed


fireEditorChanged

public void fireEditorChanged(int row,
                              int column)
Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that the editor for the (row, column) has been changed


fireRenderersChanged

public void fireRenderersChanged(int firstRow,
                                 int firstColumn,
                                 int lastRow,
                                 int lastColumn)
Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that the renderers for the range (firstRow, firstColumn) to (lastRow, lastColumn) have been changed


fireRendererChanged

public void fireRendererChanged(int row,
                                int column)
Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that the renderer for the (row, column) has been changed


fireEditorAdded

public void fireEditorAdded()
Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that an editor has been added


fireRendererAdded

public void fireRendererAdded()
Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that a renderer has been added


fireEditorRemoved

public void fireEditorRemoved()
Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that an editor has been removed


fireRendererRemoved

public void fireRendererRemoved()
Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that a renderer has been removed


fireModelChanged

public void fireModelChanged()
Notifies all StyleModelListeners that registered themselves as listeners for this StyleModel that the entire model has changed