/** * Returns a boolean indicating whether the table has a SortController. * If true, the call to getSortController is guaranteed to return a not-null * value. * * @return a boolean indicating whether the table has a SortController. * * @see #getSortController() */ protected boolean hasSortController() { return getRowSorter() instanceof SortController<?>; }
/** * Returns a boolean indicating whether the table has a SortController. * If true, the call to getSortController is guaranteed to return a not-null * value. * * @return a boolean indicating whether the table has a SortController. * * @see #getSortController() */ protected boolean hasSortController() { return getRowSorter() instanceof SortController<?>; }
/** * Returns a boolean indicating whether the table has a SortController. * If true, the call to getSortController is guaranteed to return a not-null * value. * * @return a boolean indicating whether the table has a SortController. * * @see #getSortController() */ protected boolean hasSortController() { return getRowSorter() instanceof SortController<?>; }
/** * Returns a boolean indicating whether the table has a SortController. * If true, the call to getSortController is guaranteed to return a not-null * value. * * @return a boolean indicating whether the table has a SortController. * * @see #getSortController() */ protected boolean hasSortController() { return getRowSorter() instanceof SortController<?>; }
/** * Convert row index from view coordinates to model coordinates accounting * for the presence of sorters and filters. * * @param viewIndex index in view coordinates * @return index in model coordinates * @throws IndexOutOfBoundsException if viewIndex < 0 or viewIndex >= getElementCount() */ public int convertIndexToModel(int viewIndex) { return getRowSorter() != null ? getRowSorter().convertRowIndexToModel(viewIndex):viewIndex; }
/** * Installs SortUI if the list has a rowSorter. Does nothing if not. */ protected void installSortUI() { if (list.getRowSorter() == null) return; sortUI = new ListSortUI(list, list.getRowSorter()); }
/** * Installs SortUI if the list has a rowSorter. Does nothing if not. */ protected void installSortUI() { if (list.getRowSorter() == null) return; sortUI = new ListSortUI(list, list.getRowSorter()); }
/** * Convert index from model coordinates to view coordinates accounting * for the presence of sorters and filters. * * @param modelIndex index in model coordinates * @return index in view coordinates if the model index maps to a view coordinate * or -1 if not contained in the view. * */ public int convertIndexToView(int modelIndex) { return getRowSorter() != null ? getRowSorter().convertRowIndexToView(modelIndex) : modelIndex; }
/** * Installs SortUI if the list has a rowSorter. Does nothing if not. */ protected void installSortUI() { if (list.getRowSorter() == null) return; sortUI = new ListSortUI(list, list.getRowSorter()); }
/** * Convert row index from view coordinates to model coordinates accounting * for the presence of sorters and filters. * * @param viewIndex index in view coordinates * @return index in model coordinates * @throws IndexOutOfBoundsException if viewIndex < 0 or viewIndex >= getElementCount() */ public int convertIndexToModel(int viewIndex) { return getRowSorter() != null ? getRowSorter().convertRowIndexToModel(viewIndex):viewIndex; }
/** * Installs SortUI if the list has a rowSorter. Does nothing if not. */ protected void installSortUI() { if (list.getRowSorter() == null) return; sortUI = new ListSortUI(list, list.getRowSorter()); }
/** * Convert row index from view coordinates to model coordinates accounting * for the presence of sorters and filters. * * @param viewIndex index in view coordinates * @return index in model coordinates * @throws IndexOutOfBoundsException if viewIndex < 0 or viewIndex >= getElementCount() */ public int convertIndexToModel(int viewIndex) { return getRowSorter() != null ? getRowSorter().convertRowIndexToModel(viewIndex):viewIndex; }
/** * Convert row index from view coordinates to model coordinates accounting * for the presence of sorters and filters. * * @param viewIndex index in view coordinates * @return index in model coordinates * @throws IndexOutOfBoundsException if viewIndex < 0 or viewIndex >= getElementCount() */ public int convertIndexToModel(int viewIndex) { return getRowSorter() != null ? getRowSorter().convertRowIndexToModel(viewIndex):viewIndex; }
/** * Convert index from model coordinates to view coordinates accounting * for the presence of sorters and filters. * * @param modelIndex index in model coordinates * @return index in view coordinates if the model index maps to a view coordinate * or -1 if not contained in the view. * */ public int convertIndexToView(int modelIndex) { return getRowSorter() != null ? getRowSorter().convertRowIndexToView(modelIndex) : modelIndex; }
/** * Convert index from model coordinates to view coordinates accounting * for the presence of sorters and filters. * * @param modelIndex index in model coordinates * @return index in view coordinates if the model index maps to a view coordinate * or -1 if not contained in the view. * */ public int convertIndexToView(int modelIndex) { return getRowSorter() != null ? getRowSorter().convertRowIndexToView(modelIndex) : modelIndex; }
/** * Returns the number of elements in this list in view * coordinates. If filters are active this number might be * less than the number of elements in the underlying model. * * @return number of elements in this list in view coordinates */ public int getElementCount() { return getRowSorter() != null ? getRowSorter().getViewRowCount(): getModel().getSize(); }
/** * Returns the number of elements in this list in view * coordinates. If filters are active this number might be * less than the number of elements in the underlying model. * * @return number of elements in this list in view coordinates */ public int getElementCount() { return getRowSorter() != null ? getRowSorter().getViewRowCount(): getModel().getSize(); }
/** * Returns the number of elements in this list in view * coordinates. If filters are active this number might be * less than the number of elements in the underlying model. * * @return number of elements in this list in view coordinates */ public int getElementCount() { return getRowSorter() != null ? getRowSorter().getViewRowCount(): getModel().getSize(); }
/** * Returns the number of elements in this list in view * coordinates. If filters are active this number might be * less than the number of elements in the underlying model. * * @return number of elements in this list in view coordinates */ public int getElementCount() { return getRowSorter() != null ? getRowSorter().getViewRowCount(): getModel().getSize(); }
@Override protected boolean validateInput() { // Either there is only one matching row, or there is one selected row. return list.getRowSorter().getViewRowCount() == 1 || list.getSelectedIndices().length == 1; }