Class netscape.peas.RowSupport
All Packages Class Hierarchy This Package Previous Next Index
Class netscape.peas.RowSupport
netscape.peas.RowSupport
- public class RowSupport
- 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.
-
RowSupport(boolean)
- Construct a row support object.
-
RowSupport(Row, boolean)
- Construct a row support object.
-
addPropertyChangeListener(PropertyChangeListener)
- Row data providers implement addPropertyChangeListener and publish
it in the beaninfo as their OnPropertyChange "add listner" method.
-
addRowChangeListener(RowChangeListener)
-
-
firePropertyChange(String, Object, Object)
- Delegate to our PropertyChangeSupport object.
-
fireRowChange(int, String, Object, Object, RowProvider, NotifyList)
- Delegate to our RowChangeSupport object.
-
getColumnName(int)
- Given a column's index (0..NumColumns), return its name
-
getColumnNames()
- Return an array of column names
-
getColumnNumber(String)
- support routine (also in javaform)
-
getColumnValues()
- return values held by this row support object
clone here of in client??
-
getColumnWidth(int)
- Given a column's index (0..NumColumns), return its width
-
getColumnWidths()
- Return an array of column widths
-
getInterface(String)
- Return an object which implements this specified (fully qualified) interface name.
-
getNumColumns()
- Return the number of columns.
-
getOriginalColumnValues()
- return values held by this row support object
clone here of in client??
-
getRowDelegator()
-
-
getValueByName(String)
- Given a column name, get its value.
-
getValueByNumber(int)
- Another flavor of "Dynamic-getter" method.
-
initializeColumnInfo(RowProvider)
- This method can be called by the data provider to
inform us (the client) of its column names
-
isNewRow(Object[])
-
-
isRowChanged()
-
-
isValidColumnNumber(int)
- Helper to validate a colun number.
-
propertyChange(PropertyChangeEvent)
- Standard bean property change event.
-
removePropertyChangeListener(PropertyChangeListener)
- Your basic remove listener method
-
removeRowChangeListener(RowChangeListener)
-
-
resetOriginalValues()
-
-
rowChange(RowChangeEvent)
- Twister rowChange event.
-
setColumnName(int, String)
-
-
setColumnNames(String[], int[], NotifyList)
- Set this row's column names, and notify listeners of the change in schema
by firing a RowChangeEvent.
-
setColumnValues(Object[], boolean)
- Set this row's values with given array of values
notify our listeners also.
-
setColumnWidth(int, int)
-
-
setNumColumns(int)
-
-
setValueByName(String, Object, NotifyList)
- Given a column's name, set its value to be this new value.
-
setValueByNumber(int, Object, NotifyList)
- Different flavor "dynamic-setter".
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.)
RowSupport
public RowSupport(boolean bDelegatorOwnsDataContext)
- Construct a row support object. No delegator is specified, so
we delegat to ourselves. For use by subclasses.
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.
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.
resetOriginalValues
protected synchronized void resetOriginalValues()
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.
setColumnName
public void setColumnName(int iCol,
String sName)
setColumnWidth
public synchronized void setColumnWidth(int iCol,
int iWidth)
setNumColumns
public void setNumColumns(int iNumColumns)
getNumColumns
public int getNumColumns()
- Return the number of columns.
getColumnNames
public String[] getColumnNames()
- Return an array of column names
getColumnName
public String getColumnName(int iColumnNumber)
- Given a column's index (0..NumColumns), return its name
getColumnWidths
public int[] getColumnWidths()
- Return an array of column widths
getColumnWidth
public int getColumnWidth(int iColumnNumber)
- Given a column's index (0..NumColumns), return its width
getColumnValues
public Object[] getColumnValues()
- return values held by this row support object
clone here of in client??
getOriginalColumnValues
public Object[] getOriginalColumnValues()
- return values held by this row support object
clone here of in client??
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.
getValueByNumber
public Object getValueByNumber(int iColumnNumber)
- Another flavor of "Dynamic-getter" method.
See @getValueByName.
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?
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener x)
- Your basic remove listener method
addRowChangeListener
public void addRowChangeListener(RowChangeListener oRowReceiver)
removeRowChangeListener
public void removeRowChangeListener(RowChangeListener oRowReceiver)
propertyChange
public void propertyChange(PropertyChangeEvent oEvent)
- Standard bean property change event. For us it means: "column value
in this row changed"
isRowChanged
public boolean isRowChanged()
rowChange
public void rowChange(RowChangeEvent oEvent)
- Twister rowChange event. For us it means: "column info has changed".
setValueByName
public void setValueByName(String sColumnName,
Object oNewValue,
NotifyList oNotify)
- Given a column's name, set its value to be this new value.
This is a "dymanic-setter". See @RowReceiver.getValueByName
setValueByNumber
public void setValueByNumber(int iColumnNumber,
Object oNewValue,
NotifyList oNotify)
- Different flavor "dynamic-setter". See @setValueByName.
initializeColumnInfo
public boolean initializeColumnInfo(RowProvider oRowProvider)
- This method can be called by the data provider to
inform us (the client) of its column names
getColumnNumber
public int getColumnNumber(String sColumnName)
- support routine (also in javaform)
isValidColumnNumber
public boolean isValidColumnNumber(int iColumnNumber)
- Helper to validate a colun number.
firePropertyChange
public void firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
- Delegate to our PropertyChangeSupport object.
fireRowChange
public void fireRowChange(int iChangeType,
String sColumnAffected,
Object oOldValue,
Object oNewValue,
RowProvider oRowProvider,
NotifyList oNotify)
- Delegate to our RowChangeSupport object.
getRowDelegator
protected Row getRowDelegator()
isNewRow
protected boolean isNewRow(Object oOldValue[])
All Packages Class Hierarchy This Package Previous Next Index