|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.swing.RowFilter.Entry<M,I>
M - 模型的类型;例如 PersonModelI - 标识符的类型;使用 TableRowSorter 时,此类型为 Integerpublic abstract static class RowFilter.Entry<M,I>
一个传递给 RowFilter 实例的 Entry 对象,允许过滤器获取该条目的数据的值,以确定是否应该显示该条目。Entry 对象包含有关模型的信息以及从模型中获取底层值的方法。
RowFilter,
DefaultRowSorter.setRowFilter(javax.swing.RowFilter)| 构造方法摘要 | |
|---|---|
RowFilter.Entry()
创建一个 Entry。 |
|
| 方法摘要 | |
|---|---|
abstract I |
getIdentifier()
返回条目的标识符(在模型中)。 |
abstract M |
getModel()
返回底层模型。 |
String |
getStringValue(int index)
返回指定索引处的字符串值。 |
abstract Object |
getValue(int index)
返回指定索引处的值。 |
abstract int |
getValueCount()
返回条目中值的数量。 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public RowFilter.Entry()
Entry。
| 方法详细信息 |
|---|
public abstract M getModel()
public abstract int getValueCount()
public abstract Object getValue(int index)
null。当用于表时,索引对应于模型中的列号。
index - 要获取的值的索引
IndexOutOfBoundsException - 如果索引小于 0 或大于等于 getValueCountpublic String getStringValue(int index)
String 值进行过滤操作,则首选此方法而不是使用 getValue,因为 getValue(index).toString() 返回的结果可能与 getStringValue(index) 不同。
此实现检查有无 null 值后调用 getValue(index).toString()。如有必要,提供不同字符串转换的子类应该重写此方法。
index - 要获取的值的索引
非 null 字符串
IndexOutOfBoundsException - 如果索引小于 0 或大于等于 getValueCountpublic abstract I getIdentifier()
Integer 形式表示。
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。