2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
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.
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.
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.
22 package jalview.fts.api;
26 import javax.swing.JTable;
33 public interface GFTSPanelI
37 * Action performed when a text is entered in the search field.
39 * @param isFreshSearch
40 * if true a fresh search is executed else a pagination search is
43 public void searchAction(boolean isFreshSearch);
46 * Action performed when search results are selected and the 'ok' button is
49 public void okAction();
52 * Return the entered text
54 * @return the entered text
56 public String getTypedText();
59 * The JTable for presenting the query result
63 public JTable getResultTable();
66 * Return the title to display on the search interface main panel
68 * @return String - the title
70 public String getFTSFrameTitle();
73 * Return a singleton instance of FTSRestClientI
75 * @return FTSRestClientI
77 public FTSRestClientI getFTSRestClient();
80 * Set error message when one occurs
83 * the error message to set
85 public void setErrorMessage(String message);
88 * Updates the title displayed on the search interface's main panel
92 public void updateSearchFrameTitle(String newTitle);
95 * Controls the progress spinner, set to 'true' while search operation is in
96 * progress and 'false' after it completes
98 * @param isSearchInProgress
100 public void setSearchInProgress(Boolean isSearchInProgress);
103 * Action performed when previous page (<<) button is pressed pressed.
105 public void prevPageAction();
108 * Action performed when next page (>>) button is pressed pressed.
110 public void nextPageAction();
113 * Checks if the current service's search result is paginate-able
115 * @return true means the service provides paginated results
117 public boolean isPaginationEnabled();
120 * Updates the 'enabled' state for the previous page button
124 public void setPrevPageButtonEnabled(boolean isEnabled);
127 * Updates the 'enabled' state for the next page button
131 public void setNextPageButtonEnabled(boolean isEnabled);
134 * The HashMap used to store user preferences for summary table columns,
135 * window size and position
139 public Map<String, Integer> getTempUserPrefs();
142 * Returns unique key used for storing an FTSs instance cache items in the
143 * cache data structure
147 public String getCacheKey();
151 * @return user preference name for configuring this FTS search's autosearch
154 public String getAutosearchPreference();