|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IControlContentAdapter
This interface is used to set and retrieve text content from an arbitrary
control. Clients are expected to implement this interface when defining a
ContentProposalAdapter, in order to specify how to retrieve and set
the contents of the control being adapted.
| Method Summary | |
|---|---|
String |
getControlContents(Control control)
Get the text contents of the control. |
int |
getCursorPosition(Control control)
Get the current cursor position in the control. |
Rectangle |
getInsertionBounds(Control control)
Get the bounds (in pixels) of the insertion point for the control content. |
void |
insertControlContents(Control control,
String contents,
int cursorPosition)
Insert the specified contents into the control's current contents. |
void |
setControlContents(Control control,
String contents,
int cursorPosition)
Set the contents of the specified control to the specified text. |
void |
setCursorPosition(Control control,
int index)
Set the current cursor position in the control. |
| Method Detail |
|---|
void setControlContents(Control control,
String contents,
int cursorPosition)
null.
control - the control whose contents are to be set (replaced).contents - the String specifying the new control content.cursorPosition - the zero-based index representing the desired cursor position
in the control's contents after the contents are set.
void insertControlContents(Control control,
String contents,
int cursorPosition)
null.
control - the control whose contents are to be altered.contents - the String to be inserted into the control contents.cursorPosition - the zero-based index representing the desired cursor position
within the inserted contents after the insertion is made.String getControlContents(Control control)
control - the control whose contents are to be retrieved.
int getCursorPosition(Control control)
control - the control whose position is to be retrieved.
Rectangle getInsertionBounds(Control control)
control - the control whose offset is to be retrieved.
void setCursorPosition(Control control,
int index)
control - the control whose cursor position is to be set.index - the zero-based index representing the cursor position in the
control's contents.
|
Eclipse Platform Release 3.7 |
|||||||||
| 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, 2011. All rights reserved.