|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
public 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.public 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.public String getControlContents(Control control)
control
- the control whose contents are to be retrieved.
public int getCursorPosition(Control control)
control
- the control whose position is to be retrieved.
public Rectangle getInsertionBounds(Control control)
control
- the control whose offset is to be retrieved.
public 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.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.