org.fxmisc.wellbehaved.skin will be removed in a future version.@Deprecated public final class Skins extends Object
Visual and a Behavior to
form a Skin. The factory methods are meant to be used to implement
the Control.createDefaultSkin() method.| Constructor and Description |
|---|
Skins()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static <C extends Control,V extends ComplexVisualBase<C>> |
createComplexSkin(C control,
Function<? super C,? extends V> visualFactory,
Function<? super V,? extends Behavior> behaviorFactory)
Deprecated.
Creates a skin whose visual is in direct control of managing the
control's child list.
|
static <C extends Control,V extends SimpleVisualBase<? super C>> |
createSimpleSkin(C control,
Function<? super C,? extends V> visualFactory,
Function<? super V,? extends Behavior> behaviorFactory)
Deprecated.
Creates a skin whose visual consists of a single node.
|
public static <C extends Control,V extends SimpleVisualBase<? super C>> Skin<C> createSimpleSkin(C control, Function<? super C,? extends V> visualFactory, Function<? super V,? extends Behavior> behaviorFactory)
protected Skin<?> createDefaultSkin() {
return Skins.createSimpleSkin(
this,
control -> new FooVisual<>(control),
(control, visual) -> new FooBehavior(control, visual));
}
or, more concisely
protected Skin<?> createDefaultSkin() {
return Skins.createSimpleSkin(this, FooVisual::new, FooBehavior::new);
}
control - control for which the skin is going to be created.visualFactory - function to create the Visual, given the control.behaviorFactory - function to create the Behavior, given the Visual.public static <C extends Control,V extends ComplexVisualBase<C>> Skin<C> createComplexSkin(C control, Function<? super C,? extends V> visualFactory, Function<? super V,? extends Behavior> behaviorFactory)
protected Skin<?> createDefaultSkin() {
return Skins.createComplexSkin(
this,
control -> new FooVisual<>(control),
(control, visual) -> new FooBehavior(control, visual));
}
or, more concisely
protected Skin<?> createDefaultSkin() {
return Skins.createComplexSkin(this, FooVisual::new, FooBehavior::new);
}
control - control for which the skin is going to be created.visualFactory - function to create the Visual, given the control.behaviorFactory - function to create the Behavior, given the Visual.