/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }