JComponentPack 1.5.0

com.zfqjava.swing
Class AbstractCellSpanModel

java.lang.Object
  extended by com.zfqjava.swing.AbstractCellSpanModel
All Implemented Interfaces:
CellSpanModel
Direct Known Subclasses:
DefaultCellSpanModel

public abstract class AbstractCellSpanModel
extends Object
implements CellSpanModel

Since:
JComponentPack 1.3 JDataGrid 2.7

Field Summary
protected  EventListenerList listenerList
          List of listeners
 
Constructor Summary
AbstractCellSpanModel()
           
 
Method Summary
 void addCellSpanListener(CellSpanListener l)
          Adds a listener to the list that is notified each time a change to the cell span model occurs.
protected  void fireCellMerged(Cell c)
          Forwards the given notification event to all CellSpanListeners that registered themselves as listeners for this cell span model.
protected  void fireCellSplitted(Cell c)
          Forwards the given notification event to all CellSpanListeners that registered themselves as listeners for this cell span model.
 CellSpanListener[] getCellSpanListeners()
          Returns an array of all the table model listeners registered on this model.
 EventListener[] getListeners(Class listenerType)
          Returns an array of all the objects currently registered as FooListeners upon this AbstractTableModel.
 void removeCellSpanListener(CellSpanListener l)
          Removes a listener from the list that is notified each time a change to the cell span model occurs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.zfqjava.swing.CellSpanModel
getCellSpans, getCellSpans, getSpannedCells, hasCellSpans, hasCellSpans, isSpannedCell, merge, split
 

Field Detail

listenerList

protected EventListenerList listenerList
List of listeners

Constructor Detail

AbstractCellSpanModel

public AbstractCellSpanModel()
Method Detail

addCellSpanListener

public void addCellSpanListener(CellSpanListener l)
Description copied from interface: CellSpanModel
Adds a listener to the list that is notified each time a change to the cell span model occurs.

Specified by:
addCellSpanListener in interface CellSpanModel
Parameters:
l - the CellSpanListener

removeCellSpanListener

public void removeCellSpanListener(CellSpanListener l)
Description copied from interface: CellSpanModel
Removes a listener from the list that is notified each time a change to the cell span model occurs.

Specified by:
removeCellSpanListener in interface CellSpanModel
Parameters:
l - the CellSpanListener

getCellSpanListeners

public CellSpanListener[] getCellSpanListeners()
Returns an array of all the table model listeners registered on this model.

Returns:
all of this model's CellSpanListeners or an empty array if no table model listeners are currently registered
See Also:
addCellSpanListener(com.zfqjava.swing.event.CellSpanListener), removeCellSpanListener(com.zfqjava.swing.event.CellSpanListener)

fireCellMerged

protected void fireCellMerged(Cell c)
Forwards the given notification event to all CellSpanListeners that registered themselves as listeners for this cell span model.

Parameters:
e - the event to be forwarded
See Also:
addCellSpanListener(com.zfqjava.swing.event.CellSpanListener), EventListenerList

fireCellSplitted

protected void fireCellSplitted(Cell c)
Forwards the given notification event to all CellSpanListeners that registered themselves as listeners for this cell span model.

Parameters:
e - the event to be forwarded
See Also:
addCellSpanListener(com.zfqjava.swing.event.CellSpanListener), EventListenerList

getListeners

public EventListener[] getListeners(Class listenerType)
Returns an array of all the objects currently registered as FooListeners upon this AbstractTableModel. FooListeners are registered using the addFooListener method.

You can specify the listenerType argument with a class literal, such as FooListener.class. For example, you can query a model m for its table model listeners with the following code:

CellSpanListener[] tmls = (CellSpanListener[])(m.getListeners(CellSpanListener.class));
If no such listeners exist, this method returns an empty array.

Parameters:
listenerType - the type of listeners requested; this parameter should specify an interface that descends from java.util.EventListener
Returns:
an array of all objects registered as FooListeners on this component, or an empty array if no such listeners have been added
Throws:
ClassCastException - if listenerType doesn't specify a class or interface that implements java.util.EventListener
See Also:
getCellSpanListeners()

JComponentPack 1.5.0

Send your Feedback
JComponentPack 1.5.0
Copyright © 2001-2007 Extreme Component, Inc. All rights reserved.