org.eclipse.ease.ui.tools

## Class TextWithImage

- java.lang.Object
- - org.eclipse.swt.widgets.Widget
  - - org.eclipse.swt.widgets.Control
    - - org.eclipse.swt.widgets.Scrollable
      - - org.eclipse.swt.widgets.Composite
        - - org.eclipse.ease.ui.tools.TextWithImage

All Implemented Interfaces:
  Drawable

    public class TextWithImage
    extends Composite

A text box with a label at the left hand side.

### Field Summary

### Fields inherited from class org.eclipse.swt.widgets.Composite

`embeddedHandle`

### Fields inherited from class org.eclipse.swt.widgets.Widget

`handle`

### Constructor Summary

Constructors
Constructor and Description
`TextWithImage(Composite parent, int style)`

### Method Summary

All Methods Instance Methods Concrete Methods
`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.

### Methods inherited from class org.eclipse.swt.widgets.Composite

`changed, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList`

### Methods inherited from class org.eclipse.swt.widgets.Scrollable

`computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar`

### Methods inherited from class org.eclipse.swt.widgets.Control

`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`

### Methods inherited from class org.eclipse.swt.widgets.Widget

`addDisposeListener, addListener, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, reskin, setData, setData, toString`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.eclipse.swt.graphics.Drawable

`isAutoScalable`

### Constructor Detail

#### TextWithImage

    public TextWithImage(Composite parent,
                         int style)

### Method Detail

#### dispose

    public void dispose()

Overrides:
  `dispose` in class `Widget`

#### getTextElement

    public Text getTextElement()

Get the underlying text widget instance.

Returns:
  text widget

#### setImage

    public void setImage(Image image)

Sets the receiver's image to the argument, which may be null indicating that no image should be displayed.

Parameters:
  `image` - the image to display on the receiver (may be null)
Throws:
  `java.lang.IllegalArgumentException` -
  - ERROR_INVALID_ARGUMENT - if the image has been disposed
  `SWTException` -
  - ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  - ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

#### getText

    public java.lang.String getText()

Returns the widget text.

The text for a text widget is the characters in the widget, or an empty string if this has never been set.

Returns:
  the widget text
Throws:
  `SWTException` -
  - ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  - ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

#### setText

    public void setText(java.lang.String string)

Sets the contents of the receiver to the given string. If the receiver has style SINGLE and the argument contains multiple lines of text, the result of this operation is undefined and may vary from platform to platform.

Note: If control characters like '\n', '\t' etc. are used in the string, then the behavior is platform dependent.

Parameters:
  `string` - the new text
Throws:
  `java.lang.IllegalArgumentException` -
  - ERROR_NULL_ARGUMENT - if the string is null
  `SWTException` -
  - ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  - ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver