Copyright © 2005 Scientific Applications. All Rights Reserved.

com.sciapp.table.locked
Class DefaultLockedTableModel

java.lang.Object
  extended by com.sciapp.table.locked.DefaultLockedTableModel
All Implemented Interfaces:
LockedTableModel, Serializable

public class DefaultLockedTableModel
extends Object
implements LockedTableModel, Serializable

DefaultLockedTableModel is the default implementation of a LockedTableModel.

See Also:
Serialized Form

Field Summary
protected  EventListenerList listenerList
          the listenerlist of LockedTableModelListeners
 
Fields inherited from interface com.sciapp.table.locked.LockedTableModel
BOTTOM_DIRECTION, LEFT_DIRECTION, RIGHT_DIRECTION, TOP_DIRECTION
 
Constructor Summary
DefaultLockedTableModel()
          Constructs a DefaultLockedTableModel.
 
Method Summary
 void addLockedTableModelListener(LockedTableModelListener l)
          Adds a LockedTableModelListener that is notified each time a locked row/column is added/removed from the table.
protected  void fireLockedChanged(LockedTableModelEvent e)
          Notifies listeners that the number of lockable rows/columns has changed.
 int getLockedColumns(int direction)
          Returns the locked columns at the top or bottom of the table.
 int getLockedRows(int direction)
          Returns the locked rows at the left or right of the table.
 void removeLockedTableModelListener(LockedTableModelListener l)
          Removes a LockedTableModelListener from the list that is notified each time a locked row/column is added/removed from the table.
 void setLockedColumns(int columns, int direction)
          Assigns the locked columns at the top or bottom of the table.
 void setLockedRows(int rows, int direction)
          Assigns the locked rows at the left or right of the table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listenerList

protected EventListenerList listenerList
the listenerlist of LockedTableModelListeners

Constructor Detail

DefaultLockedTableModel

public DefaultLockedTableModel()
Constructs a DefaultLockedTableModel.

Method Detail

addLockedTableModelListener

public void addLockedTableModelListener(LockedTableModelListener l)
Adds a LockedTableModelListener that is notified each time a locked row/column is added/removed from the table.

Specified by:
addLockedTableModelListener in interface LockedTableModel
Parameters:
l - the LockedTableModelListener to add

fireLockedChanged

protected void fireLockedChanged(LockedTableModelEvent e)
Notifies listeners that the number of lockable rows/columns has changed.

Parameters:
e - the event to forward

getLockedColumns

public int getLockedColumns(int direction)
Returns the locked columns at the top or bottom of the table.

Specified by:
getLockedColumns in interface LockedTableModel
Parameters:
direction - the direction - either TOP or BOTTOM.
Returns:
the locked columns at the top or bottom of the table.

getLockedRows

public int getLockedRows(int direction)
Returns the locked rows at the left or right of the table.

Specified by:
getLockedRows in interface LockedTableModel
Parameters:
direction - the direction - either LEFT or RIGHT.
Returns:
the locked rows at the left or right of the table.

removeLockedTableModelListener

public void removeLockedTableModelListener(LockedTableModelListener l)
Removes a LockedTableModelListener from the list that is notified each time a locked row/column is added/removed from the table.

Specified by:
removeLockedTableModelListener in interface LockedTableModel
Parameters:
l - the LockedTableModelListener to remove

setLockedColumns

public void setLockedColumns(int columns,
                             int direction)
Assigns the locked columns at the top or bottom of the table.

Specified by:
setLockedColumns in interface LockedTableModel
Parameters:
columns - the number of locked columns
direction - the direction - either TOP or BOTTOM.

setLockedRows

public void setLockedRows(int rows,
                          int direction)
Assigns the locked rows at the left or right of the table.

Specified by:
setLockedRows in interface LockedTableModel
Parameters:
rows - the number of locked rows
direction - the direction - either LEFT or RIGHT.

Copyright © 2005 Scientific Applications. All Rights Reserved.