本文整理匯總了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);
}