org.progeeks.meta
Interface MetaTable

All Known Implementing Classes:
DefaultMetaTable

public interface MetaTable

An abstract representation of a table that allows Map-like access to the row properties. The table columns are defined by a single meta-class.

Version:
$Revision: 1.2 $
Author:
Paul Speed

Method Summary
 void addPropertyChangeListener(int column, java.beans.PropertyChangeListener l)
          Adds a property change listener that will be notified whenever the specified property changes in any row.
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds a property change listener that will be notified whenever any of the rows' properties change.
 void clearAllListeners()
          Clears all listeners from this object.
 int getColumnCount()
          Returns the number of columns in the table.
 int getColumnIndex(java.lang.String propertyName)
          Returns the column index of the specified property.
 MetaClass getMetaClass()
          Returns the meta-class associated with this object.
 MetaKit getMetaKit()
          Returns the meta-kit for this meta-object's implementation layer.
 MetaObject getMetaObject(int row)
          Returns the specified row as a meta-object.
 java.lang.Object getProperty(int row, int column)
          Returns the value of the specified property.
 PropertyInfo getPropertyInfo(int column)
          Returns the property info for a given column.
 PropertyMutator getPropertyMutator(int row, int column)
          Returns a mutator for the specified property.
 int getRowCount()
          Returns the number of rows in the table.
 int getRowIndex(MetaObject obj)
          Returns the row index for the specified meta-object.
 boolean hasListeners(int column)
          Returns true if the specified property name has listeners registered.
 void removePropertyChangeListener(int column, java.beans.PropertyChangeListener l)
          Removes the property change listener from a specific property.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes a previously added property change listener.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l, boolean removeAll)
          Removes the property change listener.
 void setProperty(int row, int column, java.lang.Object value)
          Sets the value of the specified property.
 

Method Detail

getPropertyInfo

PropertyInfo getPropertyInfo(int column)
Returns the property info for a given column.


getColumnIndex

int getColumnIndex(java.lang.String propertyName)
Returns the column index of the specified property.


getRowCount

int getRowCount()
Returns the number of rows in the table.


getColumnCount

int getColumnCount()
Returns the number of columns in the table.


setProperty

void setProperty(int row,
                 int column,
                 java.lang.Object value)
Sets the value of the specified property.


getProperty

java.lang.Object getProperty(int row,
                             int column)
Returns the value of the specified property.


getPropertyMutator

PropertyMutator getPropertyMutator(int row,
                                   int column)
Returns a mutator for the specified property.


getMetaObject

MetaObject getMetaObject(int row)
Returns the specified row as a meta-object. This is an optional operation and may throw an UnsupportedOpreationException.


getRowIndex

int getRowIndex(MetaObject obj)
Returns the row index for the specified meta-object. This is an optional operation and may throw an UnsupportedOpreationException.


getMetaClass

MetaClass getMetaClass()
Returns the meta-class associated with this object.


getMetaKit

MetaKit getMetaKit()
Returns the meta-kit for this meta-object's implementation layer.


addPropertyChangeListener

void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a property change listener that will be notified whenever any of the rows' properties change. ListPropertyChangeEvents that are delivered to this listener that have a source referring to this meta-table are notifications that the table contents have changed, as in a row being added or removed.


addPropertyChangeListener

void addPropertyChangeListener(int column,
                               java.beans.PropertyChangeListener l)
Adds a property change listener that will be notified whenever the specified property changes in any row.


hasListeners

boolean hasListeners(int column)
Returns true if the specified property name has listeners registered.


removePropertyChangeListener

void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a previously added property change listener.


removePropertyChangeListener

void removePropertyChangeListener(int column,
                                  java.beans.PropertyChangeListener l)
Removes the property change listener from a specific property.


removePropertyChangeListener

void removePropertyChangeListener(java.beans.PropertyChangeListener l,
                                  boolean removeAll)
Removes the property change listener. If removeAll is true then it will be removed from any properties it is registered with.


clearAllListeners

void clearAllListeners()
Clears all listeners from this object. This method is used to more easily "free" an object. It should be used with care since abuse can really mess things up.



Copyright © 2002-2003 Paul Speed. All Rights Reserved.