本文整理汇总了Java中javax.swing.RowSorter.addRowSorterListener方法的典型用法代码示例。如果您正苦于以下问题:Java RowSorter.addRowSorterListener方法的具体用法?Java RowSorter.addRowSorterListener怎么用?Java RowSorter.addRowSorterListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.RowSorter
的用法示例。
在下文中一共展示了RowSorter.addRowSorterListener方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: subscribeActual
import javax.swing.RowSorter; //导入方法依赖的package包/类
@Override
protected void subscribeActual(Observer<? super RowSorterEvent> observer) {
RowSorter<?> w = widget;
RowSorterEventConsumer aec = new RowSorterEventConsumer(observer, w);
observer.onSubscribe(aec);
w.addRowSorterListener(aec);
if (aec.get() == null) {
aec.onDispose(w);
}
}
示例2: RowSorterWrapper
import javax.swing.RowSorter; //导入方法依赖的package包/类
public RowSorterWrapper(RowSorter<M> delegate) {
this.delegate = delegate;
delegate.addRowSorterListener(getRowSorterListener());
}
示例3: ListSortUI
import javax.swing.RowSorter; //导入方法依赖的package包/类
/**
* Intanstiates a SortUI on the list which has the given RowSorter.
*
* @param list the list to control, must not be null
* @param sorter the rowSorter of the list, must not be null
* @throws NullPointerException if either the list or the sorter is null
* @throws IllegalStateException if the sorter is not the sorter installed
* on the list
*/
public ListSortUI(JXList list, RowSorter<? extends ListModel> sorter) {
this.sorter = Contract.asNotNull(sorter, "RowSorter must not be null");
this.list = Contract.asNotNull(list, "list must not be null");
if (sorter != list.getRowSorter()) throw
new IllegalStateException("sorter must be same as the one on list");
sorterListener = createRowSorterListener();
sorter.addRowSorterListener(sorterListener);
}