Class CoatMux

    • Constructor Detail

      • CoatMux

        public CoatMux​(Composite parent)
      • CoatMux

        public CoatMux​(Composite parent,
                       int style)
    • Method Detail

      • rxCurrent

        public RxGetter<java.util.Optional<CoatMux.Layer<?>>> rxCurrent()
        The current layer (if any).
      • setEmpty

        public void setEmpty()
        Sets the mux to be empty.
      • getTopControl

        public Control getTopControl()
        The Control at the top of the stack (possibly null).
      • addCoat

        public <T> CoatMux.Layer<T> addCoat​(com.diffplug.common.swt.Coat coat,
                                            @Nullable
                                            T value)
        Adds a persistent CoatMux.Layer which will be populated immediately by the given `Coat`, using `value` as the key.
      • addCoat

        public <T> CoatMux.Layer<T> addCoat​(com.diffplug.common.swt.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.
      • addControl

        public <T extends ControlCoatMux.Layer<T> addControl​(java.util.function.Function<Composite,​T> creator)
        Adds a persistent CoatMux.Layer which will be populated immediately by the given `Function`, with the returned control as the key.

        The function must create exactly one child of the composite, and must return that child.

      • addWrapper

        public <T extends ControlWrapperCoatMux.Layer<T> addWrapper​(java.util.function.Function<Composite,​T> creator)
        Adds a persistent CoatMux.Layer which will be populated immediately by the given `Function`, with the returned control as the key.

        The function must create exactly one child of the composite, and it must return that child.

      • setCoat

        public void setCoat​(com.diffplug.common.swt.Coat coat)
        Sets the current content of this `CoatMux`, gets disposed as soon as anything else becomes the top layer.
      • setCoatReturning

        public <T> T setCoatReturning​(com.diffplug.common.swt.Coat.Returning<T> coat)
        Sets the current content of this `CoatMux`, gets disposed as soon as anything else becomes the top layer.
      • setControl

        public <T extends Control> T setControl​(java.util.function.Function<Composite,​T> creator)
        Sets the current content of this `CoatMux`, gets disposed as soon as anything else becomes the top layer.
      • setWrapper

        public <T extends ControlWrapper> T setWrapper​(java.util.function.Function<Composite,​T> creator)
        Sets the current content of this `CoatMux`, gets disposed as soon as anything else becomes the top layer.