Widget.setData

Sets the application defined property of the receiver with the specified name to the given value. <p> Applications may associate arbitrary objects with the receiver in this fashion. If the objects stored in the properties need 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 key the name of the property @param value the new value for the property

@exception SWTException <ul> <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> </ul>

@see #getData(String)

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

Meta