public final class Skins
extends java.lang.Object
| Constructor and Description |
|---|
Skins() |
| Modifier and Type | Method and Description |
|---|---|
static <C extends javafx.scene.control.Control,V extends ComplexVisualBase<C>> |
createComplexSkin(C control,
java.util.function.Function<? super C,? extends V> visualFactory,
java.util.function.Function<? super V,? extends Behavior> behaviorFactory)
Creates a skin whose visual is in direct control of managing the
control's child list.
|
static <C extends javafx.scene.control.Control,V extends SimpleVisualBase<? super C>> |
createSimpleSkin(C control,
java.util.function.Function<? super C,? extends V> visualFactory,
java.util.function.Function<? super V,? extends Behavior> behaviorFactory)
Creates a skin whose visual consists of a single node.
|
public static <C extends javafx.scene.control.Control,V extends SimpleVisualBase<? super C>> javafx.scene.control.Skin<C> createSimpleSkin(C control, java.util.function.Function<? super C,? extends V> visualFactory, java.util.function.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 javafx.scene.control.Control,V extends ComplexVisualBase<C>> javafx.scene.control.Skin<C> createComplexSkin(C control, java.util.function.Function<? super C,? extends V> visualFactory, java.util.function.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.