private int convertToView(int index) { return pipeline != null ? pipeline.convertRowIndexToView(index) : index; }
private int convertToView(int index) { // TODO: JW: check for valid index? must be < pipeline.getInputSize() return (pipeline != null) && pipeline.isAssigned() ? pipeline.convertRowIndexToView(index) : index; }
/** * Convert row index from model coordinates to view coordinates accounting * for the presence of sorters and filters. * * @param row row index in model coordinates * @return row index in view coordinates */ public int convertRowIndexToView(int row) { return getFilters() != null ? getFilters().convertRowIndexToView(row) : row; }
/** * Convert index from model coordinates to view coordinates accounting * for the presence of sorters and filters. * * PENDING Filter guards against out of range - should not? * * @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 isFilterEnabled() ? getFilters().convertRowIndexToView( modelIndex) : modelIndex; }