|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.fieldassist.ComboContentAdapter
public class ComboContentAdapter
An IControlContentAdapter for SWT Combo controls. This is a
convenience class for easily creating a ContentProposalAdapter for
combo fields.
| Constructor Summary | |
|---|---|
ComboContentAdapter()
|
|
| 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. |
Point |
getSelection(Control control)
Get the current selection range in the control. |
void |
insertControlContents(Control control,
String text,
int cursorPosition)
Insert the specified contents into the control's current contents. |
void |
setControlContents(Control control,
String text,
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 |
setSelection(Control control,
Point range)
Set the current selection range in the control. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ComboContentAdapter()
| Method Detail |
|---|
public String getControlContents(Control control)
IControlContentAdapter
getControlContents in interface IControlContentAdaptercontrol - the control whose contents are to be retrieved.
public void setControlContents(Control control,
String text,
int cursorPosition)
IControlContentAdapternull.
setControlContents in interface IControlContentAdaptercontrol - the control whose contents are to be set (replaced).text - 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 text,
int cursorPosition)
IControlContentAdapternull.
insertControlContents in interface IControlContentAdaptercontrol - the control whose contents are to be altered.text - 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 int getCursorPosition(Control control)
IControlContentAdapter
getCursorPosition in interface IControlContentAdaptercontrol - the control whose position is to be retrieved.
public Rectangle getInsertionBounds(Control control)
IControlContentAdapter
getInsertionBounds in interface IControlContentAdaptercontrol - the control whose offset is to be retrieved.
public void setCursorPosition(Control control,
int index)
IControlContentAdapter
setCursorPosition in interface IControlContentAdaptercontrol - the control whose cursor position is to be set.index - the zero-based index representing the cursor position in the
control's contents.public Point getSelection(Control control)
IControlContentAdapter2
getSelection in interface IControlContentAdapter2control - the control whose position is to be retrieved.
IControlContentAdapter2.getSelection(org.eclipse.swt.widgets.Control)
public void setSelection(Control control,
Point range)
IControlContentAdapter2
setSelection in interface IControlContentAdapter2control - the control whose position is to be retrieved.range - a point representing the selection start and endIControlContentAdapter2.setSelection(org.eclipse.swt.widgets.Control,
org.eclipse.swt.graphics.Point)
|
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.