public interface IControlContentAdapter
ContentProposalAdapter
, in order to specify how to retrieve and set
the contents of the control being adapted.Modifier and Type | Method and Description |
---|---|
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.
|
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.
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.