Package com.diffplug.common.swt
Class OnePerWidget<WidgetType extends Widget,T>
- java.lang.Object
-
- com.diffplug.common.swt.OnePerWidget<WidgetType,T>
-
-
Constructor Summary
Constructors Constructor Description OnePerWidget()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Tcreate(WidgetType ctl)Creates a new object for the control.TforWidget(WidgetType ctl)Returns the object for the given control.static <WidgetType extends Widget,T>
OnePerWidget<WidgetType,T>from(java.util.function.Function<? super WidgetType,? extends T> creator)Creates a OnePerWidget instance where objects are created using the given function.
-
-
-
Method Detail
-
from
public static <WidgetType extends Widget,T> OnePerWidget<WidgetType,T> from(java.util.function.Function<? super WidgetType,? extends T> creator)
Creates a OnePerWidget instance where objects are created using the given function.
-
forWidget
public T forWidget(WidgetType ctl)
Returns the object for the given control.
-
create
protected abstract T create(WidgetType ctl)
Creates a new object for the control.
-
-