mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-09-19 22:01:12 +00:00
Focus provider combobox
This commit is contained in:
parent
774b005588
commit
88c5c1c7ac
|
@ -266,6 +266,7 @@ public class GuiDsStoreCreator extends MultiStepComp.Step<CompStructure<?>> {
|
|||
providerChoice.apply(struc -> struc.get().setDisable(true));
|
||||
}
|
||||
providerChoice.apply(GrowAugment.create(true, false));
|
||||
providerChoice.onSceneAssign(struc -> struc.get().requestFocus());
|
||||
|
||||
SimpleChangeListener.apply(provider, n -> {
|
||||
if (n != null) {
|
||||
|
|
|
@ -84,6 +84,13 @@ public abstract class Comp<S extends CompStructure<?>> {
|
|||
return apply(struc -> struc.get().setPrefHeight(height));
|
||||
}
|
||||
|
||||
public <T extends Comp<S>> T onSceneAssign(Augment<S> augment) {
|
||||
return apply(struc -> struc.get().sceneProperty().addListener((observable, oldValue, newValue) -> {
|
||||
if (newValue != null) {
|
||||
augment.augment(struc);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
public Comp<S> maxWidth(int width) {
|
||||
return apply(struc -> struc.get().setMaxWidth(width));
|
||||
|
|
Loading…
Reference in a new issue