|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.data.provider.impl.AbstractDataProvider
com.sun.data.provider.impl.AbstractTableDataProvider
com.sun.data.provider.impl.FilteredTableDataProvider
Specialized TableDataProvider that is filtered by a
specified TableDataFilter.
| Field Summary | |
protected TableDataFilter |
filter
|
protected TableDataProvider |
provider
|
| Fields inherited from class com.sun.data.provider.impl.AbstractTableDataProvider |
cursorRow, rowKeyList, rowKeyMap, tcListeners |
| Fields inherited from class com.sun.data.provider.impl.AbstractDataProvider |
dpListeners, fieldKeys |
| Constructor Summary | |
FilteredTableDataProvider()
|
|
| Method Summary | |
RowKey |
appendRow()
Appends a new row at the end of the list and returns the row key for the newly appended row. NOTE: The method should only be called after testing the
|
boolean |
canAppendRow()
This method is called to test if this TableDataProvider supports
the append operation. If rows can be appended to the list, this method
should return |
boolean |
canInsertRow(RowKey beforeRow)
This method is called to test if this TableDataProvider supports
resizability. If objects can be inserted and removed from the list,
this method should return The following methods will only be called if this method returns
|
boolean |
canRemoveRow(RowKey row)
This method is called to test if this TableDataProvider supports
the removeRow operation. If rows can be removed from the table, this
method should return |
boolean |
cursorFirst()
Move the cursor to the first row in this TableDataProvider. |
boolean |
cursorLast()
Move the cursor to the last row in this TableDataProvider. |
boolean |
cursorNext()
Move the cursor to the row after the current cursor row, unless the
cursor is currently at the last row |
boolean |
cursorPrevious()
Move the cursor to the row before the current cursor row, unless the cursor is currently at the first row. |
FieldKey |
getFieldKey(java.lang.String fieldId)
Returns the FieldKey associated with the specified data
element canonical id, if any; otherwise, return null. |
FieldKey[] |
getFieldKeys()
|
int |
getRowCount()
|
RowKey |
getRowKey(java.lang.String rowId)
|
RowKey[] |
getRowKeys(int count,
RowKey afterRow)
Returns an array of RowKey objects representing the requested
batch of RowKeys. If null is passed as the afterRow
parameter, the returned batch of RowKeys will start with the first one. |
TableDataFilter |
getTableDataFilter()
|
TableDataProvider |
getTableDataProvider()
|
java.lang.Class |
getType(FieldKey fieldKey)
Returns the data type of the data element referenced by the specified data key. |
java.lang.Object |
getValue(FieldKey fieldKey,
RowKey row)
Return value of the data element referenced by the specified
|
RowKey |
insertRow(RowKey beforeRow)
Inserts a new row at the specified row. NOTE: The method should only be called after testing the
|
boolean |
isReadOnly(FieldKey fieldKey)
Return a flag indicating whether the value of the data element
represented by the specified |
boolean |
isRowAvailable(RowKey row)
Returns true if the specified RowKey represents
data elements that are supported by this TableDataProvider;
otherwise, return false |
void |
removeRow(RowKey row)
Removes the specified row. NOTE: The method should only be called after testing the
|
void |
setTableDataFilter(TableDataFilter filter)
|
void |
setTableDataProvider(TableDataProvider provider)
|
void |
setValue(FieldKey fieldKey,
RowKey row,
java.lang.Object value)
Sets the value of the data element represented by the specified
|
| Methods inherited from class com.sun.data.provider.impl.AbstractTableDataProvider |
addTableCursorListener, addTableDataListener, findAll, findAll, findAll, findAll, findFirst, findFirst, findFirst, findFirst, fireCursorChanged, fireCursorChanging, fireRowAdded, fireRowRemoved, fireValueChanged, getAllRows, getCursorIndex, getCursorRow, getTableCursorListeners, getTableDataListeners, getValue, getValue, removeTableCursorListener, removeTableDataListener, setCursorIndex, setCursorRow, setValue, setValue |
| Methods inherited from class com.sun.data.provider.impl.AbstractDataProvider |
addDataListener, addFieldKey, addFieldKeys, clearFieldKeys, fireProviderChanged, fireValueChanged, getDataListeners, getFakeData, getFakeData, getType, getValue, isReadOnly, removeDataListener, removeFieldKey, removeFieldKeys, setValue, sortFieldKeys |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sun.data.provider.DataProvider |
addDataListener, getDataListeners, removeDataListener |
| Field Detail |
protected TableDataProvider provider
protected TableDataFilter filter
| Constructor Detail |
public FilteredTableDataProvider()
| Method Detail |
public void setTableDataProvider(TableDataProvider provider)
provider - TableDataProviderpublic TableDataProvider getTableDataProvider()
public void setTableDataFilter(TableDataFilter filter)
filter - TableDataFilterpublic TableDataFilter getTableDataFilter()
public FieldKey[] getFieldKeys()
throws DataProviderException
AbstractDataProvider
getFieldKeys in interface DataProvidergetFieldKeys in class AbstractDataProviderDataProviderException
public FieldKey getFieldKey(java.lang.String fieldId)
throws DataProviderException
DataProviderReturns the FieldKey associated with the specified data
element canonical id, if any; otherwise, return null.
getFieldKey in interface DataProvidergetFieldKey in class AbstractDataProviderfieldId - String
DataProviderException
public java.lang.Class getType(FieldKey fieldKey)
throws DataProviderException
Returns the data type of the data element referenced by the specified data key.
getType in interface DataProvidergetType in class AbstractTableDataProviderDataProviderException
public boolean isReadOnly(FieldKey fieldKey)
throws DataProviderException
Return a flag indicating whether the value of the data element
represented by the specified FieldKey can be modified via the
setValue() method.
isReadOnly in interface DataProviderisReadOnly in class AbstractTableDataProviderDataProviderException
public int getRowCount()
throws DataProviderException
getRowCount in interface TableDataProvidergetRowCount in class AbstractTableDataProviderDataProviderException
public RowKey[] getRowKeys(int count,
RowKey afterRow)
throws DataProviderException
RowKey objects representing the requested
batch of RowKeys. If null is passed as the afterRow
parameter, the returned batch of RowKeys will start with the first one.
getRowKeys in interface TableDataProvidergetRowKeys in class AbstractTableDataProviderDataProviderException
public RowKey getRowKey(java.lang.String rowId)
throws DataProviderException
getRowKey in interface TableDataProvidergetRowKey in class AbstractTableDataProviderDataProviderException
public boolean isRowAvailable(RowKey row)
throws DataProviderException
true if the specified RowKey represents
data elements that are supported by this TableDataProvider;
otherwise, return false
isRowAvailable in interface TableDataProviderisRowAvailable in class AbstractTableDataProviderDataProviderException
public java.lang.Object getValue(FieldKey fieldKey,
RowKey row)
throws DataProviderException
Return value of the data element referenced by the specified
FieldKey and RowKey.
getValue in interface TableDataProvidergetValue in class AbstractTableDataProviderDataProviderException
public void setValue(FieldKey fieldKey,
RowKey row,
java.lang.Object value)
throws DataProviderException
Sets the value of the data element represented by the specified
FieldKey and RowKey to the specified new value.
setValue in interface TableDataProvidersetValue in class AbstractTableDataProviderDataProviderException
public boolean canInsertRow(RowKey beforeRow)
throws DataProviderException
This method is called to test if this TableDataProvider supports
resizability. If objects can be inserted and removed from the list,
this method should return true. If the data provider is
not resizable, this method should return false.
The following methods will only be called if this method returns
true:
insertRow(RowKey beforeRow)
appendRow()
removeRow(RowKey rowKey)
canInsertRow in interface TableDataProvidercanInsertRow in class AbstractTableDataProviderDataProviderException
public RowKey insertRow(RowKey beforeRow)
throws DataProviderException
Inserts a new row at the specified row.
NOTE: The method should only be called after testing the
canInsertRow(RowKey beforeRow) to see if this
TableDataProvider supports resizing.
insertRow in interface TableDataProviderinsertRow in class AbstractTableDataProviderDataProviderException
public boolean canAppendRow()
throws DataProviderException
This method is called to test if this TableDataProvider supports
the append operation. If rows can be appended to the list, this method
should return true. If the data provider is not resizable,
or cannot support an append operation, this method should return
false.
canAppendRow in interface TableDataProvidercanAppendRow in class AbstractTableDataProviderDataProviderException
public RowKey appendRow()
throws DataProviderException
Appends a new row at the end of the list and returns the row key for the newly appended row.
NOTE: The method should only be called after testing the
canAppendRow() method to see if this TableDataProvider
supports the append operation.
appendRow in interface TableDataProviderappendRow in class AbstractTableDataProviderDataProviderException
public boolean canRemoveRow(RowKey row)
throws DataProviderException
This method is called to test if this TableDataProvider supports
the removeRow operation. If rows can be removed from the table, this
method should return true. If the data provider is does
not support removing rows, this method should return false.
canRemoveRow in interface TableDataProvidercanRemoveRow in class AbstractTableDataProviderDataProviderException
public void removeRow(RowKey row)
throws DataProviderException
Removes the specified row.
NOTE: The method should only be called after testing the
canRemoveRow(RowKey) method to see if this TableDataProvider
supports removing rows.
removeRow in interface TableDataProviderremoveRow in class AbstractTableDataProviderDataProviderException
public boolean cursorFirst()
throws DataProviderException
Move the cursor to the first row in this TableDataProvider.
cursorFirst in interface TableDataProvidercursorFirst in class AbstractTableDataProviderDataProviderException
public boolean cursorPrevious()
throws DataProviderException
Move the cursor to the row before the current cursor row, unless the cursor is currently at the first row.
cursorPrevious in interface TableDataProvidercursorPrevious in class AbstractTableDataProviderDataProviderException
public boolean cursorNext()
throws DataProviderException
Move the cursor to the row after the current cursor row, unless the
cursor is currently at the last row TableDataProvider.
cursorNext in interface TableDataProvidercursorNext in class AbstractTableDataProviderDataProviderException
public boolean cursorLast()
throws DataProviderException
Move the cursor to the last row in this TableDataProvider.
cursorLast in interface TableDataProvidercursorLast in class AbstractTableDataProviderDataProviderException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||