JAL-2071 further refactoring, optimisation, and house keeping for the generic Free...
[jalview.git] / src / jalview / fts / api / GFTSPanelI.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3  * Copyright (C) $$Year-Rel$$ The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3
10  * of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License
18  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
19  * The Jalview Authors are detailed in the 'AUTHORS' file.
20  */
21
22 package jalview.fts.api;
23
24 import javax.swing.JTable;
25
26 /**
27  * 
28  * @author tcnofoegbu
29  *
30  */
31 public interface GFTSPanelI
32 {
33
34   /**
35    * Action performed when a text is entered in the search field.
36    */
37   public void searchAction();
38
39   /**
40    * Action performed when search results are selected and the 'ok' button is
41    * pressed.
42    */
43   public void okAction();
44
45   /**
46    * Return the entered text
47    * 
48    * @return the entered text
49    */
50   public String getTypedText();
51
52   /**
53    * The JTable for presenting the query result
54    * 
55    * @return JTable
56    */
57   public JTable getResultTable();
58
59   /**
60    * Return the title to display on the search interface main panel
61    * 
62    * @return String - the title
63    */
64   public String getFTSFrameTitle();
65
66   /**
67    * Return a singleton instance of FTSRestClientI
68    * 
69    * @return FTSRestClientI
70    */
71   public FTSRestClientI getFTSRestClient();
72
73   /**
74    * Set error message when one occurs
75    * 
76    * @param message
77    *          the error message to set
78    */
79   public void setErrorMessage(String message);
80
81   /**
82    * Updates the title displayed on the search interface's main panel
83    * 
84    * @param newTitle
85    */
86   public void updateSearchFrameTitle(String newTitle);
87
88   /**
89    * Controls the progress spinner, set to 'true' while search operation is in
90    * progress and 'false' after it completes
91    * 
92    * @param isSearchInProgress
93    */
94   public void setSearchInProgress(Boolean isSearchInProgress);
95 }