01: /*
02: * Sun Public License Notice
03: *
04: * The contents of this file are subject to the Sun Public License
05: * Version 1.0 (the "License"). You may not use this file except in
06: * compliance with the License. A copy of the License is available at
07: * http://www.sun.com/
08: *
09: * The Original Code is NetBeans. The Initial Developer of the Original
10: * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
11: * Microsystems, Inc. All Rights Reserved.
12: */
13:
14: package org.netbeans.editor.ext;
15:
16: /**
17: * Code copmletion view component interface. It best fits the <tt>JList</tt>
18: * but some users may require something else e.g. JTable for displaying the
19: * result of the completion query.
20: *
21: * @author Miloslav Metelka
22: * @version 1.00
23: */
24:
25: public interface CompletionView {
26:
27: /** Populate the view with the result from a query. */
28: public void setResult(CompletionQuery.Result result);
29:
30: /** Get the index of the currently selected item. */
31: public int getSelectedIndex();
32:
33: /**
34: * Go up to the previous item in the data list. The
35: * <tt>getSelectedIndex</tt> must reflect the change.
36: */
37: public void up();
38:
39: /**
40: * Go down to the next item in the data list. The <tt>getSelectedIndex</tt>
41: * must reflect the change.
42: */
43: public void down();
44:
45: /**
46: * Go up one page in the data item list. The <tt>getSelectedIndex</tt>
47: * must reflect the change.
48: */
49: public void pageUp();
50:
51: /**
52: * Go down one page in the data item list. The <tt>getSelectedIndex</tt>
53: * must reflect the change.
54: */
55: public void pageDown();
56:
57: /**
58: * Go to the first item in the data item list. The <tt>getSelectedIndex</tt>
59: * must reflect the change.
60: */
61: public void begin();
62:
63: /**
64: * Go to the last item in the data item list. The <tt>getSelectedIndex</tt>
65: * must reflect the change.
66: */
67: public void end();
68:
69: }
|