KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > fieldassist > IContentProposal


1 /*******************************************************************************
2  * Copyright (c) 2005, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jface.fieldassist;
12
13 /**
14  * IContentProposal describes a content proposal to be shown. It consists of the
15  * content that will be provided if the proposal is accepted, an optional label
16  * used to describe the content to the user, and an optional description that
17  * further elaborates the meaning of the proposal.
18  *
19  * @since 3.2
20  */

21 public interface IContentProposal {
22     /**
23      * Return the content represented by this proposal.
24      *
25      * @return the String content represented by this proposal.
26      */

27     public String JavaDoc getContent();
28
29     /**
30      * Return the integer position within the contents that the cursor should be
31      * placed after the proposal is accepted.
32      *
33      * @return the zero-based index position within the contents where the
34      * cursor should be placed after the proposal is accepted.
35      */

36     public int getCursorPosition();
37
38     /**
39      * Return the label used to describe this proposal.
40      *
41      * @return the String label used to display the proposal. If
42      * <code>null</code>, then the content will be displayed as the
43      * label.
44      */

45     public String JavaDoc getLabel();
46
47     /**
48      * Return a description that describes this proposal.
49      *
50      * @return the String label used to further the proposal. If
51      * <code>null</code>, then no description will be displayed.
52      */

53     public String JavaDoc getDescription();
54
55 }
56
Popular Tags