All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class netscape.peas.RowSupport

java.lang.Object
   |
   +----netscape.peas.RowSupport

public class RowSupport
extends Object
implements Row
RowSupport provides a "simple" implementation to manage a row of data. A row of data consists of zero or more named fields. These have values which can change, at which time registered listeners will be notified via PropertyChange events. A separate event, RowChange is also available to notify interested RowChange listeners of changes in the number of, names of, or other attributes of the "columns" (fields). of this Row.


Constructor Index

 o RowSupport(boolean)
Construct a row support object.
 o RowSupport(Row, boolean)
Construct a row support object.

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
Row data providers implement addPropertyChangeListener and publish it in the beaninfo as their OnPropertyChange "add listner" method.
 o addRowChangeListener(RowChangeListener)
 o firePropertyChange(String, Object, Object)
Delegate to our PropertyChangeSupport object.
 o fireRowChange(int, String, Object, Object, RowProvider, NotifyList)
Delegate to our RowChangeSupport object.
 o getColumnName(int)
Given a column's index (0..NumColumns), return its name
 o getColumnNames()
Return an array of column names
 o getColumnNumber(String)
support routine (also in javaform)
 o getColumnValues()
return values held by this row support object clone here of in client??
 o getColumnWidth(int)
Given a column's index (0..NumColumns), return its width
 o getColumnWidths()
Return an array of column widths
 o getInterface(String)
Return an object which implements this specified (fully qualified) interface name.
 o getNumColumns()
Return the number of columns.
 o getOriginalColumnValues()
return values held by this row support object clone here of in client??
 o getRowDelegator()
 o getValueByName(String)
Given a column name, get its value.
 o getValueByNumber(int)
Another flavor of "Dynamic-getter" method.
 o initializeColumnInfo(RowProvider)
This method can be called by the data provider to inform us (the client) of its column names
 o isNewRow(Object[])
 o isRowChanged()
 o isValidColumnNumber(int)
Helper to validate a colun number.
 o propertyChange(PropertyChangeEvent)
Standard bean property change event.
 o removePropertyChangeListener(PropertyChangeListener)
Your basic remove listener method
 o removeRowChangeListener(RowChangeListener)
 o resetOriginalValues()
 o rowChange(RowChangeEvent)
Twister rowChange event.
 o setColumnName(int, String)
 o setColumnNames(String[], int[], NotifyList)
Set this row's column names, and notify listeners of the change in schema by firing a RowChangeEvent.
 o setColumnValues(Object[], boolean)
Set this row's values with given array of values notify our listeners also.
 o setColumnWidth(int, int)
 o setNumColumns(int)
 o setValueByName(String, Object)
Given a column's name, set its value to be this new value.
 o setValueByName(String, Object, NotifyList)
 o setValueByNumber(int, Object, NotifyList)
Different flavor "dynamic-setter".

Constructors

 o RowSupport
 public RowSupport(Row oDelegator,
                   boolean bDelegatorOwnsDataContext)
Construct a row support object. oDelegator is another object which delegates to this support object. bDelegatorOwnsDataContext flags whether or not the owner of this object (and hence this object) "own" the "schema" information of this row (e.g. names columns, etc.)

 o RowSupport
 public RowSupport(boolean bDelegatorOwnsDataContext)
Construct a row support object. No delegator is specified, so we delegat to ourselves. For use by subclasses.

Methods

 o getInterface
 public Object getInterface(String sInterfaceName)
Return an object which implements this specified (fully qualified) interface name. If this interface is not implemented, return null.

 o setColumnNames
 public void setColumnNames(String aColumnNames[],
                            int aColumnWidths[],
                            NotifyList oNotify)
Set this row's column names, and notify listeners of the change in schema by firing a RowChangeEvent.

 o resetOriginalValues
 protected synchronized void resetOriginalValues()
 o setColumnValues
 public void setColumnValues(Object aValues[],
                             boolean bNotify)
Set this row's values with given array of values notify our listeners also. Saved values are reset to these new values. What this means (w.r.t. update) is that calls to this method are interpreted as "we've got a new row", as opposed to "the user changed all this row's values". In order to achieve the second, one ought to set each value individually using either setValueByName or setValueByNumber.

 o setColumnName
 public void setColumnName(int iCol,
                           String sName)
 o setColumnWidth
 public synchronized void setColumnWidth(int iCol,
                                         int iWidth)
 o setNumColumns
 public void setNumColumns(int iNumColumns)
 o getNumColumns
 public int getNumColumns()
Return the number of columns.

 o getColumnNames
 public String[] getColumnNames()
Return an array of column names

 o getColumnName
 public String getColumnName(int iColumnNumber)
Given a column's index (0..NumColumns), return its name

 o getColumnWidths
 public int[] getColumnWidths()
Return an array of column widths

 o getColumnWidth
 public int getColumnWidth(int iColumnNumber)
Given a column's index (0..NumColumns), return its width

 o getColumnValues
 public Object[] getColumnValues()
return values held by this row support object clone here of in client??

 o getOriginalColumnValues
 public Object[] getOriginalColumnValues()
return values held by this row support object clone here of in client??

 o getValueByName
 public Object getValueByName(String sColumnName)
Given a column name, get its value. This is a "Dynamic-getter" method. Unlike "normal" setter methods ("void getFoo();"), dynamic-getters can be used for properties whose names are known at compile time.

 o getValueByNumber
 public Object getValueByNumber(int iColumnNumber)
Another flavor of "Dynamic-getter" method. See @getValueByName.

 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener x)
Row data providers implement addPropertyChangeListener and publish it in the beaninfo as their OnPropertyChange "add listner" method. Technically, it does not need to be a member of this interface, but hey, why not?

 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener x)
Your basic remove listener method

 o addRowChangeListener
 public void addRowChangeListener(RowChangeListener oRowReceiver)
 o removeRowChangeListener
 public void removeRowChangeListener(RowChangeListener oRowReceiver)
 o propertyChange
 public void propertyChange(PropertyChangeEvent oEvent)
Standard bean property change event. For us it means: "column value in this row changed"

 o isRowChanged
 public boolean isRowChanged()
 o rowChange
 public void rowChange(RowChangeEvent oEvent)
Twister rowChange event. For us it means: "column info has changed".

 o setValueByName
 public void setValueByName(String sColumnName,
                            Object oNewValue)
Given a column's name, set its value to be this new value. This is a "dymanic-setter". See @RowReceiver.getValueByName

 o setValueByName
 public void setValueByName(String sColumnName,
                            Object oNewValue,
                            NotifyList oNotify)
 o setValueByNumber
 public void setValueByNumber(int iColumnNumber,
                              Object oNewValue,
                              NotifyList oNotify)
Different flavor "dynamic-setter". See @setValueByName.

 o initializeColumnInfo
 public boolean initializeColumnInfo(RowProvider oRowProvider)
This method can be called by the data provider to inform us (the client) of its column names

 o getColumnNumber
 public int getColumnNumber(String sColumnName)
support routine (also in javaform)

 o isValidColumnNumber
 public boolean isValidColumnNumber(int iColumnNumber)
Helper to validate a colun number.

 o firePropertyChange
 public void firePropertyChange(String propertyName,
                                Object oldValue,
                                Object newValue)
Delegate to our PropertyChangeSupport object.

 o fireRowChange
 public void fireRowChange(int iChangeType,
                           String sColumnAffected,
                           Object oOldValue,
                           Object oNewValue,
                           RowProvider oRowProvider,
                           NotifyList oNotify)
Delegate to our RowChangeSupport object.

 o getRowDelegator
 protected Row getRowDelegator()
 o isNewRow
 protected boolean isNewRow(Object oOldValue[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index