Interface ControlWrapper

    • Method Detail

      • setLayoutData

        default void setLayoutData​(Object layoutData)
        Sets the LayoutData for this control.
      • getLayoutData

        default Object getLayoutData()
        Returns the LayoutData for this control.
      • getParent

        default Composite getParent()
        Returns the parent of this Control.
      • getShell

        default Shell getShell()
        Returns the parent Shell of this Control.
      • dispose

        default void dispose()
        Disposes the underlying control.
      • isDisposed

        default boolean isDisposed()
        Returns true iff the underlying control is disposed.
      • setParent

        default boolean setParent​(Composite parent)
        Changes the parent of the widget to be the one provided. Returns true if the parent is successfully changed
      • getRootControl

        Control getRootControl()
        Returns the wrapped Control (only appropriate for limited purposes!).

        The implementor of this ControlWrapper is free to change the wrapped Control as she sees fit, and she doesn't have to tell you about it! You shouldn't rely on this control being anything in particular.

        You can rely on this Control for:

        1. Managing lifetimes: `wrapped.getRootControl().addListener(SWT.Dispose, ...`

        But that's all. If you use it for something else, it's on you when it breaks.

      • transparent

        static <T extends ControlControlWrapper.Transparent<T> transparent​(T control)
        Most-efficient way to transparently pass a Control to a ControlWrapper API.