public class TextAssist
extends org.eclipse.swt.widgets.Composite
Text
Constructor and Description |
---|
TextAssist(org.eclipse.swt.widgets.Composite parent,
int style,
TextAssistContentProvider contentProvider)
Constructs a new instance of this class given its parent and a style
value describing its behavior and appearance.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(int eventType,
org.eclipse.swt.widgets.Listener listener) |
void |
addModifyListener(org.eclipse.swt.events.ModifyListener listener) |
void |
addSelectionListener(org.eclipse.swt.events.SelectionListener listener) |
void |
addVerifyListener(org.eclipse.swt.events.VerifyListener listener) |
void |
append(java.lang.String string) |
void |
clearSelection() |
org.eclipse.swt.graphics.Point |
computeSize(int wHint,
int hHint,
boolean changed) |
org.eclipse.swt.graphics.Rectangle |
computeTrim(int x,
int y,
int width,
int height) |
void |
copy() |
void |
cut() |
org.eclipse.swt.graphics.Color |
getBackground() |
int |
getCaretLineNumber() |
org.eclipse.swt.graphics.Point |
getCaretLocation() |
int |
getCaretPosition() |
int |
getCharCount() |
TextAssistContentProvider |
getContentProvider() |
boolean |
getDoubleClickEnabled() |
char |
getEchoChar() |
boolean |
getEditable() |
boolean |
getEnabled() |
org.eclipse.swt.graphics.Color |
getForeground() |
int |
getLineCount() |
java.lang.String |
getLineDelimiter() |
int |
getLineHeight() |
java.lang.String |
getMessage() |
int |
getNumberOfLines() |
int |
getOrientation() |
org.eclipse.swt.graphics.Point |
getSelection() |
int |
getSelectionCount() |
java.lang.String |
getSelectionText() |
int |
getTabs() |
java.lang.String |
getText() |
java.lang.String |
getText(int start,
int end) |
int |
getTextLimit() |
int |
getTopIndex() |
int |
getTopPixel() |
boolean |
getUseSingleClick()
Returns the single click enabled flag.
|
void |
insert(java.lang.String string) |
void |
paste() |
void |
removeModifyListener(org.eclipse.swt.events.ModifyListener listener) |
void |
removeSelectionListener(org.eclipse.swt.events.SelectionListener listener) |
void |
removeVerifyListener(org.eclipse.swt.events.VerifyListener listener) |
void |
selectAll() |
void |
setBackground(org.eclipse.swt.graphics.Color color) |
void |
setContentProvider(TextAssistContentProvider contentProvider) |
void |
setDoubleClickEnabled(boolean doubleClick) |
void |
setEchoChar(char echo) |
void |
setEditable(boolean editable) |
void |
setEnabled(boolean value) |
boolean |
setFocus() |
void |
setFont(org.eclipse.swt.graphics.Font font) |
void |
setForeground(org.eclipse.swt.graphics.Color color) |
void |
setMessage(java.lang.String string) |
void |
setNumberOfLines(int numberOfLines) |
void |
setOrientation(int orientation) |
void |
setRedraw(boolean redraw) |
void |
setSelection(int start) |
void |
setSelection(int start,
int end) |
void |
setSelection(org.eclipse.swt.graphics.Point selection) |
void |
setTabs(int tabs) |
void |
setText(java.lang.String text) |
void |
setTextLimit(int textLimit) |
void |
setTopIndex(int topIndex) |
void |
setUseSingleClick(boolean singleClick)
Sets the single click enabled flag.
|
void |
showSelection() |
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setLayout, setLayoutDeferred, setTabList
getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getFont, getLayoutData, getLocation, getMenu, getMonitor, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setLayoutData, setLocation, setLocation, setMenu, setParent, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
public TextAssist(org.eclipse.swt.widgets.Composite parent, int style, TextAssistContentProvider contentProvider)
The style value is either one of the style constants defined in class
SWT
which is applicable to instances of this class, or must
be built by bitwise OR'ing together (that is, using the
int
"|" operator) two or more of those SWT
style constants. The class description lists the style constants that are
applicable to the class. Style bits are also inherited from superclasses.
parent
- a composite control which will be the parent of the new
instance (cannot be null)style
- the style of control to constructcontentProvider
- the content providerjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- SWT.SINGLE
,
SWT.MULTI
,
SWT.READ_ONLY
,
SWT.WRAP
,
SWT.LEFT
,
SWT.RIGHT
,
SWT.CENTER
,
SWT.PASSWORD
,
SWT.SEARCH
,
SWT.ICON_SEARCH
,
SWT.ICON_CANCEL
,
Widget.checkSubclass()
,
Widget.getStyle()
public org.eclipse.swt.graphics.Color getBackground()
getBackground
in class org.eclipse.swt.widgets.Control
Control.getBackground()
public TextAssistContentProvider getContentProvider()
public org.eclipse.swt.graphics.Color getForeground()
getForeground
in class org.eclipse.swt.widgets.Control
Control.getForeground()
public void setBackground(org.eclipse.swt.graphics.Color color)
setBackground
in class org.eclipse.swt.widgets.Control
Control.setBackground(org.eclipse.swt.graphics.Color)
public void setContentProvider(TextAssistContentProvider contentProvider)
contentProvider
- the contentProvider to setpublic int getNumberOfLines()
public void setNumberOfLines(int numberOfLines)
numberOfLines
- the numberOfLines to setpublic void addListener(int eventType, org.eclipse.swt.widgets.Listener listener)
addListener
in class org.eclipse.swt.widgets.Widget
Widget.addListener(int,org.eclipse.swt.widgets.Listener)
public void addModifyListener(org.eclipse.swt.events.ModifyListener listener)
Text.addModifyListener(org.eclipse.swt.events.ModifyListener)
public void addSelectionListener(org.eclipse.swt.events.SelectionListener listener)
Text.addSelectionListener(org.eclipse.swt.events.SelectionListener)
public void addVerifyListener(org.eclipse.swt.events.VerifyListener listener)
Text.addVerifyListener(org.eclipse.swt.events.VerifyListener)
public void append(java.lang.String string)
Text.append(java.lang.String)
public void clearSelection()
Text.clearSelection()
public org.eclipse.swt.graphics.Point computeSize(int wHint, int hHint, boolean changed)
computeSize
in class org.eclipse.swt.widgets.Control
Control.computeSize(int, int, boolean)
public org.eclipse.swt.graphics.Rectangle computeTrim(int x, int y, int width, int height)
computeTrim
in class org.eclipse.swt.widgets.Scrollable
Scrollable.computeTrim(int, int, int, int)
public void copy()
Text.copy()
public void cut()
Text.cut()
public int getCaretLineNumber()
Text.getCaretLineNumber()
public org.eclipse.swt.graphics.Point getCaretLocation()
Text.getCaretLocation()
public int getCaretPosition()
Text.getCaretPosition()
public int getCharCount()
Text.getCharCount()
public boolean getDoubleClickEnabled()
Text.getDoubleClickEnabled()
public char getEchoChar()
Text.getEchoChar()
public boolean getEditable()
Text.getEditable()
public boolean getEnabled()
getEnabled
in class org.eclipse.swt.widgets.Control
Control.getEnabled()
public int getLineCount()
Text.getLineCount()
public java.lang.String getLineDelimiter()
Text.getLineDelimiter()
public int getLineHeight()
Text.getLineHeight()
public java.lang.String getMessage()
Text.getMessage()
public int getOrientation()
getOrientation
in class org.eclipse.swt.widgets.Control
Text.getOrientation()
public org.eclipse.swt.graphics.Point getSelection()
Text.getSelection()
public int getSelectionCount()
Text.getSelectionCount()
public java.lang.String getSelectionText()
Text.getSelectionText()
public int getTabs()
Text.getTabs()
public java.lang.String getText()
Text.getText()
public java.lang.String getText(int start, int end)
Text.getText(int, int)
public int getTextLimit()
Text.getTextLimit()
public int getTopIndex()
Text.getTopIndex()
public int getTopPixel()
Text.getTopPixel()
public boolean getUseSingleClick()
If the the single click flag is true, the user can select an entry with a single click. Otherwise, the user can select an entry with a double click.
org.eclipse.swt.SWTException
- public void insert(java.lang.String string)
Text.insert(java.lang.String)
public void paste()
Text.paste()
public void removeModifyListener(org.eclipse.swt.events.ModifyListener listener)
Text.removeModifyListener(org.eclipse.swt.events.ModifyListener)
public void removeSelectionListener(org.eclipse.swt.events.SelectionListener listener)
Text.removeSelectionListener(org.eclipse.swt.events.SelectionListener)
public void removeVerifyListener(org.eclipse.swt.events.VerifyListener listener)
Text.removeVerifyListener(org.eclipse.swt.events.VerifyListener)
public void selectAll()
Text.selectAll()
public void setDoubleClickEnabled(boolean doubleClick)
Text.setDoubleClickEnabled(boolean)
public void setEchoChar(char echo)
Text.setEchoChar(char)
public void setEditable(boolean editable)
Text.setEditable(boolean)
public void setEnabled(boolean value)
setEnabled
in class org.eclipse.swt.widgets.Control
Control.setEnabled(boolean)
public boolean setFocus()
setFocus
in class org.eclipse.swt.widgets.Composite
Composite.setFocus()
public void setFont(org.eclipse.swt.graphics.Font font)
setFont
in class org.eclipse.swt.widgets.Control
Text.setFont(org.eclipse.swt.graphics.Font)
public void setForeground(org.eclipse.swt.graphics.Color color)
setForeground
in class org.eclipse.swt.widgets.Control
Control.setForeground(org.eclipse.swt.graphics.Color)
public void setMessage(java.lang.String string)
Text.setMessage(java.lang.String)
public void setOrientation(int orientation)
setOrientation
in class org.eclipse.swt.widgets.Control
Text.setOrientation(int)
public void setRedraw(boolean redraw)
setRedraw
in class org.eclipse.swt.widgets.Control
Text.setRedraw(boolean)
public void setSelection(int start, int end)
Text.setSelection(int, int)
public void setSelection(int start)
Text.setSelection(int)
public void setSelection(org.eclipse.swt.graphics.Point selection)
Text.setSelection(org.eclipse.swt.graphics.Point)
public void setTabs(int tabs)
Text.setTabs(int)
public void setText(java.lang.String text)
Text.setText(java.lang.String)
public void setTextLimit(int textLimit)
Text.setTextLimit(int)
public void setUseSingleClick(boolean singleClick)
If the the single click flag is true, the user can select an entry with a single click. Otherwise, the user can select an entry with a double click.
singleClick
- the new single click flagorg.eclipse.swt.SWTException
- public void setTopIndex(int topIndex)
Text.setTopIndex(int)
public void showSelection()
Text.showSelection()