Class netscape.peas.TableApplication
All Packages Class Hierarchy This Package Previous Next Index
Class netscape.peas.TableApplication
netscape.peas.TableApplication
- public class TableApplication
- implements Row, Table
-
TableApplication()
-
-
addPropertyChangeListener(PropertyChangeListener)
- Row data providers implement addPropertyChangeListener and publish
it in the beaninfo as their OnPropertyChange "add listner" method.
-
addRow()
-
-
addRowChangeListener(RowChangeListener)
-
-
addTableChangeListener(TableChangeListener)
-
-
deleteRow()
-
-
deleteRow(int, boolean)
-
-
doSetCurrentRowNumber(int, boolean, boolean, NotifyList)
- override to set our view, unless value *came* from view
-
doUpdateRow(Object[], Object[], Object[])
-
-
executeQuery()
- Evalutate the query, and fetch the appropriate
amount of rows, based on the "bufferSize" property.
-
fetchMoreRows()
- Get more rows, if "rowsPending" property is true, otherwise does nothing.
-
firePropertyChange(String, Object, Object)
- Helper to fire property change.
-
fireRowChange(int, String, Object, Object, RowProvider, NotifyList)
-
-
fireTableChange(int, int, int, Object, TableProvider, NotifyList)
-
-
getColumnName(int)
- Given a column's index (0..NumColumns), return its name
-
getColumnNames()
- Return an array of column names
-
getColumnValues()
-
-
getColumnWidths()
- Return an array of column widths
-
getCurrentRowNumber()
- getCurrentRowNumber allows clients of this Table to get the
value of its its "currentRowNumber" property.
-
getCurrentRowValues()
-
-
getFetchBufferSize()
- Setter method for this cursor's "bufferSize" property.
-
getInterface(String)
- Return an object which implements this specified (fully qualified) interface name.
-
getNonCurrentRowValues(int)
-
-
getNumColumns()
- Return the number of columns.
-
getNumRowsFetched()
- Getter method for "NumRowsFetched" property.
-
getQuery()
- Getter method for this cursor's "query" property.
-
getRowsPending()
- Getter for the booelan "rowsPending" property.
-
getTable()
-
-
getValueByName(String)
- Given a column name, get its value.
-
getValueByNumber(int)
- Another flavor of "Dynamic-getter" method.
-
init()
-
-
initializeColumnInfo(RowProvider)
- This method is called when column names or other inforation has changed.
-
isCurrentRowChanged()
-
-
nextRow()
- Change the position of this cursor to the
next row.
-
performCommand(String, Object)
-
-
previousRow()
- Change the position of this cursor to the
next row.
-
propertyChange(PropertyChangeEvent)
- This method is typically called when we have been "wired" as
a listener to another component's bound property
-
removePropertyChangeListener(PropertyChangeListener)
- Your basic remove listener method
-
removeRowChangeListener(RowChangeListener)
-
-
removeTableChangeListener(TableChangeListener)
-
-
rowChange(RowChangeEvent)
- Twister rowChange event.
-
setColumnNames(String[], int[], NotifyList)
-
-
setCurrentRowNumber(int)
- setCurrentRowNumber allows clients of this Table adjust
its "currentRowNumber" property.
-
setFetchBufferSize(int)
- Getter method for this cursor's "bufferSize" property.
-
setQuery(String)
- Setter method for this cursor's "query" property.
-
setTableValue(int, int, Object, NotifyList)
- This method is called by this TableApplication, as well as others to
set our "model".
-
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".
-
setViewCurrentRow(int)
-
-
tableChange(TableChangeEvent)
-
-
updateCurrentRow()
-
TableApplication
public TableApplication()
init
public void init()
setViewCurrentRow
public void setViewCurrentRow(int iNewCurrentRow)
performCommand
public void performCommand(String command,
Object data)
setTableValue
public void setTableValue(int iRow,
int iColumn,
Object oNewValue,
NotifyList oNotify)
- This method is called by this TableApplication, as well as others to
set our "model". It is "overridden" here so we can update our
view when other actions (e.g. events) cause our model to be
changed for us by TableSupport.
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)
getNumColumns
public int getNumColumns()
- Return the number of columns.
getColumnNames
public String[] getColumnNames()
- Return an array of column names
getColumnWidths
public int[] getColumnWidths()
- Return an array of column widths
getColumnName
public String getColumnName(int iColumnNumber)
- Given a column's index (0..NumColumns), return its name
getColumnValues
public Object[] getColumnValues()
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
firePropertyChange
public void firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
- Helper to fire property change. Delegates to PropertyChangeSuppport member.
addRowChangeListener
public void addRowChangeListener(RowChangeListener oRowReceiver)
removeRowChangeListener
public void removeRowChangeListener(RowChangeListener oRowReceiver)
fireRowChange
public void fireRowChange(int iChangeType,
String sColumnAffected,
Object oOldValue,
Object oNewValue,
RowProvider oRowProvider,
NotifyList oNotify)
propertyChange
public void propertyChange(PropertyChangeEvent oEvent)
- This method is typically called when we have been "wired" as
a listener to another component's bound property
rowChange
public void rowChange(RowChangeEvent oEvent)
- Twister rowChange event. For us it means: "column info has changed".
initializeColumnInfo
public boolean initializeColumnInfo(RowProvider oRowProvider)
- This method is called when column names or other inforation has changed.
We are given a RowProvider into which we can call to get new column info.
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.
getCurrentRowValues
public RowProvider getCurrentRowValues()
getTable
public Table getTable()
addTableChangeListener
public void addTableChangeListener(TableChangeListener oListener)
removeTableChangeListener
public void removeTableChangeListener(TableChangeListener oListener)
fireTableChange
public void fireTableChange(int iChangeType,
int iRowAffected,
int iColumnAffected,
Object oNewValue,
TableProvider oTableProvider,
NotifyList oNotify)
getNonCurrentRowValues
public Object[] getNonCurrentRowValues(int iRowNumber)
updateCurrentRow
public void updateCurrentRow()
doUpdateRow
public void doUpdateRow(Object aColumnNames[],
Object aNewValues[],
Object aOldValues[])
isCurrentRowChanged
public boolean isCurrentRowChanged()
tableChange
public void tableChange(TableChangeEvent oEvent)
getQuery
public String getQuery()
- Getter method for this cursor's "query" property.
setQuery
public void setQuery(String sNewQuery)
- Setter method for this cursor's "query" property.
getFetchBufferSize
public int getFetchBufferSize()
- Setter method for this cursor's "bufferSize" property.
this specifies the number of rows fetched when the query
is executed, and on successive fetchMoreRows() calls.
A buffer size of 0 means that all rows are fetched before
control is returned from executeQuery.
setFetchBufferSize
public void setFetchBufferSize(int iNewBufferSize)
- Getter method for this cursor's "bufferSize" property.
this specifies the number of rows fetched when the query
is executed, and on successive fetchMoreRows() calls.
executeQuery
public void executeQuery()
- Evalutate the query, and fetch the appropriate
amount of rows, based on the "bufferSize" property.
If not all rows have been fetched, the rowsPending
property will have a "true" value. The numRowsFetched
property will equal the number of rows satisfying the query
only if the numRowsFetched property is "false".
deleteRow
public void deleteRow(int iRowNumber,
boolean bNotify)
deleteRow
public void deleteRow()
addRow
public void addRow()
getNumRowsFetched
public int getNumRowsFetched()
- Getter method for "NumRowsFetched" property. This
is the total number of rows satisfying the query if
and only if the "rowsPending" property is true.
getRowsPending
public boolean getRowsPending()
- Getter for the booelan "rowsPending" property.
fetchMoreRows
public void fetchMoreRows()
- Get more rows, if "rowsPending" property is true, otherwise does nothing.
getCurrentRowNumber
public int getCurrentRowNumber()
- getCurrentRowNumber allows clients of this Table to get the
value of its its "currentRowNumber" property. It ought to be
exposed in the beaninfo as the "read" method for this property.
setCurrentRowNumber
public boolean setCurrentRowNumber(int iNewRowNumber)
- setCurrentRowNumber allows clients of this Table adjust
its "currentRowNumber" property. It ought to be exposed in
the beaninfo as the "write" method for this property.
doSetCurrentRowNumber
public boolean doSetCurrentRowNumber(int iNewRowNumber,
boolean bNotify,
boolean bUpdateView,
NotifyList oNotifyList)
- override to set our view, unless value *came* from view
nextRow
public boolean nextRow()
- Change the position of this cursor to the
next row. Return false if there is none.
previousRow
public boolean previousRow()
- Change the position of this cursor to the
next row. Return false if there is none.
All Packages Class Hierarchy This Package Previous Next Index