org.owasp.webscarab.util.swing
Class ColumnDataModel

java.lang.Object
  extended by org.owasp.webscarab.util.swing.ColumnDataModel

public abstract class ColumnDataModel
extends java.lang.Object

Represents a column of data, which can be looked up using a specific Object as a key

Author:
rogan

Field Summary
protected  javax.swing.event.EventListenerList _listenerList
          Maintains the list of listeners
 
Constructor Summary
protected ColumnDataModel()
          Creates a new ColumnDataModel
 
Method Summary
 void addColumnDataListener(ColumnDataListener l)
          Adds a listener to the column model
 void fireValueChanged(java.lang.Object key)
          notifies listeners that a single value has changed, and that the composing table should update its cells
 void fireValuesChanged()
          notifies listeners that all values in the column have changed, and that the composing table should update its cells
 java.lang.Class getColumnClass()
          Used by the "composing" table model to determine what the class of the column objects is.
abstract  java.lang.String getColumnName()
          used to determine the name of this column
abstract  java.lang.Object getValue(java.lang.Object key)
          Used to determine the value of the particular cell of the column, corresponding to the supplied key object
 void removeColumnDataListener(ColumnDataListener l)
          removes a listener from the column model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_listenerList

protected javax.swing.event.EventListenerList _listenerList
Maintains the list of listeners

Constructor Detail

ColumnDataModel

protected ColumnDataModel()
Creates a new ColumnDataModel

Method Detail

getColumnClass

public java.lang.Class getColumnClass()
Used by the "composing" table model to determine what the class of the column objects is.

Returns:
the default class of objects in this column

getColumnName

public abstract java.lang.String getColumnName()
used to determine the name of this column

Returns:
The name of the column

getValue

public abstract java.lang.Object getValue(java.lang.Object key)
Used to determine the value of the particular cell of the column, corresponding to the supplied key object

Parameters:
key - the "index" object
Returns:
the value

addColumnDataListener

public void addColumnDataListener(ColumnDataListener l)
Adds a listener to the column model

Parameters:
l - the listener to add

removeColumnDataListener

public void removeColumnDataListener(ColumnDataListener l)
removes a listener from the column model

Parameters:
l - the listener to remove

fireValueChanged

public void fireValueChanged(java.lang.Object key)
notifies listeners that a single value has changed, and that the composing table should update its cells

Parameters:
key - the index object that has changed

fireValuesChanged

public void fireValuesChanged()
notifies listeners that all values in the column have changed, and that the composing table should update its cells