01: /*=============================================================================
02: * Copyright Texas Instruments 2002. All Rights Reserved.
03: *
04: * This program is free software; you can redistribute it and/or modify
05: * it under the terms of the GNU General Public License as published by
06: * the Free Software Foundation; either version 2 of the License, or
07: * (at your option) any later version.
08: *
09: * This program is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: * GNU General Public License for more details.
13: *
14: * You should have received a copy of the GNU General Public License
15: * along with this program; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: */
18:
19: package ti.swing.console;
20:
21: /**
22: * To add tab completion, the {@link ConsoleKeyListener} uses an instance of
23: * this class to implement tab completion.
24: *
25: * @author Rob Clark
26: */
27: public interface ConsoleTabCompleter {
28: /**
29: * Called to find the string that will complete the current buffer. If no
30: * string will complete, return a zero length string. If multiple strings
31: * will complete, return the common prefix of those strings.
32: *
33: * @param buf the current buffer, ie. all the characters typed since the
34: * last >EOL<
35: * @return the completing string
36: */
37: public String complete(String buf);
38: }
39:
40: /*
41: * Local Variables:
42: * tab-width: 2
43: * indent-tabs-mode: nil
44: * mode: java
45: * c-indentation-style: java
46: * c-basic-offset: 2
47: * eval: (c-set-offset 'substatement-open '0)
48: * eval: (c-set-offset 'case-label '+)
49: * eval: (c-set-offset 'inclass '+)
50: * eval: (c-set-offset 'inline-open '0)
51: * End:
52: */
|