public class CoatMux extends ControlWrapper.AroundControl<Composite>
Modifier and Type | Class and Description |
---|---|
class |
CoatMux.Layer<T>
Represents a persistent layer within this `CoatMux`.
|
ControlWrapper.AroundControl<T extends Control>, ControlWrapper.AroundWrapper<T extends ControlWrapper>, ControlWrapper.Transparent<T extends Control>
wrapped
Constructor and Description |
---|
CoatMux(Composite parent) |
CoatMux(Composite parent,
int style) |
Modifier and Type | Method and Description |
---|---|
<T> CoatMux.Layer<T> |
addCoat(Coat.Returning<T> coat)
Adds a persistent
CoatMux.Layer which will be populated immediately by the given `Coat.Returning`, using the return value as the key. |
<T> CoatMux.Layer<T> |
addCoat(Coat coat,
T value)
Adds a persistent
CoatMux.Layer which will be populated immediately by the given `Coat`, using `value` as the key. |
<T extends Control> |
addControl(Function<Composite,T> creator)
Adds a persistent
CoatMux.Layer which will be populated immediately by the given `Function |
<T extends ControlWrapper> |
addWrapper(Function<Composite,T> creator)
Adds a persistent
CoatMux.Layer which will be populated immediately by the given `Function |
Control |
getTopControl()
The Control at the top of the stack (possibly null).
|
com.diffplug.common.rx.RxGetter<Optional<CoatMux.Layer<?>>> |
rxCurrent()
The current layer (if any).
|
void |
setCoat(Coat coat)
Sets the current content of this `CoatMux`, gets disposed as soon as anything else becomes the top layer.
|
<T> T |
setCoatReturning(Coat.Returning<T> coat)
Sets the current content of this `CoatMux`, gets disposed as soon as anything else becomes the top layer.
|
<T extends Control> |
setControl(Function<Composite,T> creator)
Sets the current content of this `CoatMux`, gets disposed as soon as anything else becomes the top layer.
|
void |
setEmpty()
Sets the mux to be empty.
|
<T extends ControlWrapper> |
setWrapper(Function<Composite,T> creator)
Sets the current content of this `CoatMux`, gets disposed as soon as anything else becomes the top layer.
|
getRootControl
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dispose, getLayoutData, getParent, getShell, isDisposed, setLayoutData, setParent, transparent
public CoatMux(Composite parent)
public CoatMux(Composite parent, int style)
public com.diffplug.common.rx.RxGetter<Optional<CoatMux.Layer<?>>> rxCurrent()
public void setEmpty()
public Control getTopControl()
public <T> CoatMux.Layer<T> addCoat(Coat coat, @Nullable T value)
CoatMux.Layer
which will be populated immediately by the given `Coat`, using `value` as the key.public <T> CoatMux.Layer<T> addCoat(Coat.Returning<T> coat)
CoatMux.Layer
which will be populated immediately by the given `Coat.Returning`, using the return value as the key.public <T extends Control> CoatMux.Layer<T> addControl(Function<Composite,T> creator)
CoatMux.Layer
which will be populated immediately by the given `FunctionThe function must create exactly one child of the composite, and must return that child.
public <T extends ControlWrapper> CoatMux.Layer<T> addWrapper(Function<Composite,T> creator)
CoatMux.Layer
which will be populated immediately by the given `FunctionThe function must create exactly one child of the composite, and it must return that child.
public void setCoat(Coat coat)
public <T> T setCoatReturning(Coat.Returning<T> coat)
public <T extends Control> T setControl(Function<Composite,T> creator)
public <T extends ControlWrapper> T setWrapper(Function<Composite,T> creator)