embeddedHandle
Constructor and Description |
---|
TextWithImage(Composite parent,
int style) |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
java.lang.String |
getText()
Returns the widget text.
|
Text |
getTextElement()
Get the underlying text widget instance.
|
void |
setImage(Image image)
Sets the receiver's image to the argument, which may be null indicating that no image should be displayed.
|
void |
setText(java.lang.String string)
Sets the contents of the receiver to the given string.
|
changed, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, 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, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, addListener, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, reskin, setData, setData, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
isAutoScalable
public TextWithImage(Composite parent, int style)
public Text getTextElement()
public void setImage(Image image)
image
- the image to display on the receiver (may be null)java.lang.IllegalArgumentException
- SWTException
- public java.lang.String getText()
The text for a text widget is the characters in the widget, or an empty string if this has never been set.
SWTException
- public void setText(java.lang.String string)
Note: If control characters like '\n', '\t' etc. are used in the string, then the behavior is platform dependent.
string
- the new textjava.lang.IllegalArgumentException
- SWTException
-