001    package jigcell.compare.ui;
002    
003    import jigcell.compare.IReadableDataSource;
004    import jigcell.compare.ITab;
005    import jigcell.compare.IWriteableDataSource;
006    
007    /**
008     * Represents a Comparator tab that has promised functionality for manipulating a collection of data.  Components supporting only a subset of
009     * these features should throw an UnsupportedOperationException to indicate features that are not supported.
010     * 
011     * <p>
012     * This code is licensed under the DARPA BioCOMP Open Source License.  See LICENSE for more details.
013     * </p>
014     *
015     * @author Nicholas Allen
016     */
017    
018    public interface IDataEditorTab extends ITab {
019    
020       /**
021        * Clears all data for this view.
022        */
023    
024       void clear ();
025    
026       /**
027        * Create a new data set for editing.
028        */
029    
030       void clearAndNew ();
031    
032       /**
033        * The current data source to work from.
034        */
035    
036       IWriteableDataSource getCurrentSource ();
037    
038       /**
039        * Loads the data for the view from some external source.
040        *
041        * @param source Data source to read from
042        */
043    
044       void load (IReadableDataSource source);
045    
046       /**
047        * Loads the data for the view from some external source without user prompting.
048        *
049        * @param source Data source to read from
050        */
051    
052       void loadDirect (IReadableDataSource source);
053    
054       /**
055        * Saves the data for the view to some external source.
056        *
057        * @param source Data source to write to
058        */
059    
060       void save (IWriteableDataSource source);
061    
062       /**
063        * Saves the data for the view to some external source without user prompting.
064        *
065        * @param source Data source to write to
066        */
067    
068       void saveDirect (IWriteableDataSource source);
069    
070       /**
071        * Sets the current data source to work from.
072        *
073        * @param source Data source
074        */
075    
076       void setCurrentSource (IWriteableDataSource source);
077    }