CoatMux extends ControlWrapper.AroundControl<Composite> { public <T extends Control> T setControl(Function<Composite, T> creator) { return makeTemporary(addControl(creator)); } CoatMux(Composite parent);  CoatMux(Composite parent, int style); RxGetter<Optional<Layer<?>>> rxCurrent(); void setEmpty(); Control getTopControl(); Layer<T> addCoat(Coat coat, @Nullable T value); Layer<T> addCoat(Coat.Returning<T> coat); Layer<T> addControl(Function<Composite, T> creator); Layer<T> addWrapper(Function<Composite, T> creator); void setCoat(Coat coat); T setCoatReturning(Coat.Returning<T> coat); T setControl(Function<Composite, T> creator); T setWrapper(Function<Composite, T> creator);  }
@Test public void ctabFolderTest() { InteractiveTest.testCoat("Test coat mux layout behavior inside a CTabFolder.", cmp -> { Layouts.setGrid(cmp); CTabFolder folder = new CTabFolder(cmp, SWT.BORDER | SWT.CLOSE); Layouts.setGridData(folder).grabAll(); ToolBarManager manager = new ToolBarManager(); manager.add(Actions.create("Add", () -> { CTabItem item = new CTabItem(folder, SWT.NONE); item.setText("New control"); Composite parent = new Composite(folder, SWT.NONE); randomColorMux(parent); item.setControl(parent); item.addListener(SWT.Dispose, e -> item.getControl().dispose()); folder.setSelection(item); })); Layouts.setGridData(manager.createControl(cmp)).grabHorizontal(); }); }