001    package jigcell.compare.ui;
002    
003    import jigcell.compare.ITab;
004    
005    /**
006     * Represents a Comparator tab that has promised functionality for manipulating the rows of a table view.  Components supporting only a subset
007     * of these features should throw an UnsupportedOperationException to indicate features that are not supported.
008     * 
009     * <p>
010     * This code is licensed under the DARPA BioCOMP Open Source License.  See LICENSE for more details.
011     * </p>
012     *
013     * @author Nicholas Allen
014     */
015    
016    public interface IRowEditorTab extends ITab {
017    
018       /**
019        * Adds a new row to the view.
020        */
021    
022       void addRow ();
023    
024       /**
025        * Adds several new rows to the view.
026        *
027        * @param count Number of rows
028        */
029    
030       void addRows (int count);
031    
032       /**
033        * Deletes a row from the table.
034        *
035        * @param row Row
036        */
037    
038       void deleteRow (int row);
039    
040       /**
041        * Deletes rows from the table.
042        *
043        * @param rows Rows
044        */
045    
046       void deleteRows (int rows []);
047    
048       /**
049        * The number of rows in the table.
050        */
051    
052       int getRowCount ();
053    
054       /**
055        * The data for a row in the table or null if the row is not valid.
056        *
057        * @param row Row
058        */
059    
060       Object getRowData (int row);
061    
062       /**
063        * Inserts a row at a specified location.
064        *
065        * @param row Row to insert at
066        */
067    
068       void insertRow (int row);
069    
070       /**
071        * Inserts a number of new rows at a specified location.
072        *
073        * @param row Row to insert at
074        * @param count Number of rows to insert
075        */
076    
077       void insertRows (int row, int count);
078    
079       /**
080        * Moves selected rows down.
081        *
082        * @param rows Rows
083        */
084    
085       void moveRowsDown (int rows []);
086    
087       /**
088        * Moves selected rows up.
089        *
090        * @param rows Rows
091        */
092    
093       void moveRowsUp (int rows []);
094    }