Widget.setData

Sets the application defined widget data associated with the receiver to be the argument. The <em>widget data</em> is a single, unnamed field that is stored with every widget. <p> Applications may put arbitrary objects in this field. If the object stored in the widget data needs to be notified when the widget is disposed of, it is the application's responsibility to hook the Dispose event on the widget and do so. </p>

@param data the widget data

@exception SWTException <ul> <li>ERROR_WIDGET_DISPOSED - when the receiver has been disposed</li> <li>ERROR_THREAD_INVALID_ACCESS - when called from the wrong thread</li> </ul>

@see #getData()

  1. void setData(Object data)
    class Widget
    void
    setData
    (
    Object data
    )
  2. void setData(String key, Object value)

Meta