001/**
002 *                    BioJava development code
003 *
004 * This code may be freely distributed and modified under the
005 * terms of the GNU Lesser General Public Licence.  This should
006 * be distributed with the code.  If you do not have a copy,
007 * see:
008 *
009 *      http://www.gnu.org/copyleft/lesser.html
010 *
011 * Copyright for this code is held jointly by the individual
012 * authors.  These should be listed in @author doc comments.
013 *
014 * For more information on the BioJava project and its aims,
015 * or to join the biojava-l mailing list, visit the home page
016 * at:
017 *
018 *      http://www.biojava.org/
019 *
020 * Created on Sep 14, 2011
021 * Created by Andreas Prlic
022 *
023 * @since 3.0.2
024 */
025package org.biojava.nbio.structure.align.gui.autosuggest;
026
027import java.util.Vector;
028
029/** A class that provides auto-completion suggestions for JAutoSuggest
030 *
031 * @author AndreasPrlic
032 *
033 */
034public interface AutoSuggestProvider {
035
036        /** get a list of suggestions for a userInput
037         *
038         * @param userInput
039         * @return list of suggestions
040         */
041        public Vector<String> getSuggestion(String userInput);
042
043
044        /** set the maximum number of suggestions to return
045         *
046         * @param maxNrSuggestions
047         */
048        public void setMaxNrSuggestions(int maxNrSuggestions);
049
050
051        /** Get the maximun nr of suggestions
052         *
053         * @return maxNrSuggestions
054         */
055        public int getMaxNrSuggestions();
056
057
058        /** reset all suggestions
059         *
060         */
061        public void clear();
062
063
064        /** Interrupt searching for suggestions
065         *
066         */
067        public void stop();
068}