001    package jigcell.compare;
002    
003    import javax.swing.JDialog;
004    
005    /**
006     * A component that can sit in the Comparator interface.
007     *
008     * <p>
009     * Additionally, a public constructor is required to be implemented:
010     * </p>
011     *
012     * <ul>
013     * <li>
014     * public &lt;INIT&gt; (Compare, String)
015     * </li>
016     * </ul>
017     *
018     * <p>
019     * where the first parameter will be the Comparator the component should become a part of and the second parameter is the component's unique
020     * identifier in the configuration.
021     * </p>
022     *
023     * <p>
024     * This code is licensed under the DARPA BioCOMP Open Source License.  See LICENSE for more details.
025     * </p>
026     *
027     * @author Nicholas Allen
028     */
029    
030    public interface ITab {
031    
032       /**
033        * Configuration key for tab name
034        */
035    
036       String CONFIG_TABNAME = "ITab.name";
037    
038       /**
039        * Indicates that the current Comparator state is exiting normal initialization
040        */
041    
042       String STATE_ENDINITIALIZE = "stable";
043    
044       /**
045        * Indicates that the current Comparator state is exiting UI construction
046        */
047    
048       String STATE_ENDUI = "ui_stable";
049    
050       /**
051        * Indicates that the current Comparator state is initializing
052        */
053    
054       String STATE_INITIALIZE = "initialize";
055    
056       /**
057        * Indicates that the current Comparator state is the normal running mode
058        */
059    
060       String STATE_RUNNING = "running";
061    
062       /**
063        * The defined Comparator states in temporal order
064        */
065    
066       String STATES [] = {STATE_INITIALIZE, STATE_ENDUI, STATE_ENDINITIALIZE, STATE_RUNNING};
067    
068       /**
069        * Creates an about dialog for this tab or null if this tab does not describe itself.
070        */
071    
072       JDialog createAboutDialog ();
073    
074       /**
075        * Creates a configuration editor for this tab or null if this tab does not support graphical configuration.
076        */
077    
078       IConfigEditor createConfigEditor ();
079    
080       /**
081        * The name of this tab.
082        */
083    
084       String getName ();
085    
086       /**
087        * Reads the view configuration from the Comparator.
088        *
089        * @param state Current state of the view
090        */
091    
092       void readConfiguration (String state);
093    }