package com.onaro.util.jfc; import javax.swing.table.TableModel; /** * Define utility methods that should be provided by classes extending {@link javax.swing.JTable} * which use a model that encapsulates other table models such as the {@link SortedTable} and * the {@link com.onaro.util.jfc.grouping.GroupingTable}. */ public interface EncapsulatingTable { /** * Index for row that can't be found in encapsulated model either because it doesn't exist or * because the encapsulation is an out-of-sync snapshot. */ public static int UNMAPPED_ROW = -1; /** * Gets the encapsulated table-model. * @return the encapsulated table-model */ public TableModel getEncapsulatedTableModel(); /** * Get the row number in the encapsulated model of a row in the encapsulating * model. * @param row row number in the encapsulating model * @return row number in the encapsulated model or {@link #UNMAPPED_ROW} if the row cannot be * mapped into a row in the encapsulated model */ public int getRowInEncapsulatedModel(int row); }