|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.fieldassist.ContentProposal
public class ContentProposal
A default implementation of IContentProposal
that allows clients to
specify a content proposal using simple constructors.
Constructor Summary | |
---|---|
ContentProposal(String content)
Create a content proposal whose label and content are the specified String. |
|
ContentProposal(String content,
String description)
Create a content proposal whose content and description are as specified in the parameters. |
|
ContentProposal(String content,
String label,
String description)
Create a content proposal whose content, label, and description are as specified in the parameters. |
|
ContentProposal(String content,
String label,
String description,
int cursorPosition)
Create a content proposal whose content, label, description, and cursor position are as specified in the parameters. |
Method Summary | |
---|---|
String |
getContent()
Return the content represented by this proposal. |
int |
getCursorPosition()
Return the integer position within the contents that the cursor should be placed after the proposal is accepted. |
String |
getDescription()
Return a description that describes this proposal. |
String |
getLabel()
Return the label used to describe this proposal. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContentProposal(String content)
content
- the String representing the content. Should not be
null
.public ContentProposal(String content, String description)
content
- the String representing the content. Should not be
null
. This string will also be used as the label.description
- the String representing the description, or null
if there should be no description.public ContentProposal(String content, String label, String description)
content
- the String representing the content. Should not be
null
.label
- the String representing the label. Should not be
null
.description
- the String representing the description, or null
if there should be no description.public ContentProposal(String content, String label, String description, int cursorPosition)
content
- the String representing the content. Should not be
null
.label
- the String representing the label. Should not be
null
.description
- the String representing the description, or null
if there should be no description.cursorPosition
- the zero-based index position within the contents where the
cursor should be placed after the proposal is accepted. The
range of the cursor position is from 0..N where N is the
number of characters in the content.
IllegalArgumentException
- if the index is not between 0 and the number of characters
in the content.Method Detail |
---|
public String getContent()
IContentProposal
getContent
in interface IContentProposal
public int getCursorPosition()
IContentProposal
getCursorPosition
in interface IContentProposal
public String getDescription()
IContentProposal
getDescription
in interface IContentProposal
null
, then no description will be displayed.public String getLabel()
IContentProposal
getLabel
in interface IContentProposal
null
, then the content will be displayed as the
label.
|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.