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;
24 import javax.swing.JTable;
31 public interface GFTSPanelI
35 * Action performed when a text is entered in the search field.
37 * @param isFreshSearch
38 * if true a fresh search is executed else a pagination search is
41 public void searchAction(boolean isFreshSearch);
44 * Action performed when search results are selected and the 'ok' button is
47 public void okAction();
50 * Return the entered text
52 * @return the entered text
54 public String getTypedText();
57 * The JTable for presenting the query result
61 public JTable getResultTable();
64 * Return the title to display on the search interface main panel
66 * @return String - the title
68 public String getFTSFrameTitle();
71 * Return a singleton instance of FTSRestClientI
73 * @return FTSRestClientI
75 public FTSRestClientI getFTSRestClient();
78 * Set error message when one occurs
81 * the error message to set
83 public void setErrorMessage(String message);
86 * Updates the title displayed on the search interface's main panel
90 public void updateSearchFrameTitle(String newTitle);
93 * Controls the progress spinner, set to 'true' while search operation is in
94 * progress and 'false' after it completes
96 * @param isSearchInProgress
98 public void setSearchInProgress(Boolean isSearchInProgress);
101 * Action performed when previous page (<<) button is pressed pressed.
103 public void prevPageAction();
106 * Action performed when next page (>>) button is pressed pressed.
108 public void nextPageAction();
111 * Checks if the current service's search result is paginate-able
113 * @return true means the service provides paginated results
115 public boolean isPaginationEnabled();
118 * Updates the 'enabled' state for the previous page button
122 public void setPrevPageButtonEnabled(boolean isEnabled);
125 * Updates the 'enabled' state for the next page button
129 public void setNextPageButtonEnabled(boolean isEnabled);