mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-22 07:30:24 +00:00
Serial connect fixes
This commit is contained in:
parent
b7a3157f30
commit
734d4fdff8
14 changed files with 35 additions and 3 deletions
|
@ -51,7 +51,7 @@ public class StoreCreationComp extends DialogComp {
|
|||
Stage window;
|
||||
BiConsumer<DataStoreEntry, Boolean> consumer;
|
||||
Property<DataStoreProvider> provider;
|
||||
Property<DataStore> store;
|
||||
ObjectProperty<DataStore> store;
|
||||
Predicate<DataStoreProvider> filter;
|
||||
BooleanProperty busy = new SimpleBooleanProperty();
|
||||
Property<Validator> validator = new SimpleObjectProperty<>(new SimpleValidator());
|
||||
|
@ -60,6 +60,7 @@ public class StoreCreationComp extends DialogComp {
|
|||
ObservableValue<DataStoreEntry> entry;
|
||||
BooleanProperty changedSinceError = new SimpleBooleanProperty();
|
||||
BooleanProperty skippable = new SimpleBooleanProperty();
|
||||
BooleanProperty connectable = new SimpleBooleanProperty();
|
||||
StringProperty name;
|
||||
DataStoreEntry existingEntry;
|
||||
boolean staticDisplay;
|
||||
|
@ -68,7 +69,7 @@ public class StoreCreationComp extends DialogComp {
|
|||
Stage window,
|
||||
BiConsumer<DataStoreEntry, Boolean> consumer,
|
||||
Property<DataStoreProvider> provider,
|
||||
Property<DataStore> store,
|
||||
ObjectProperty<DataStore> store,
|
||||
Predicate<DataStoreProvider> filter,
|
||||
String initialName,
|
||||
DataStoreEntry existingEntry,
|
||||
|
@ -96,6 +97,12 @@ public class StoreCreationComp extends DialogComp {
|
|||
}
|
||||
});
|
||||
|
||||
this.provider.subscribe((n) -> {
|
||||
if (n != null) {
|
||||
connectable.setValue(n.canConnectDuringCreation());
|
||||
}
|
||||
});
|
||||
|
||||
this.apply(r -> {
|
||||
r.get().setPrefWidth(650);
|
||||
r.get().setPrefHeight(750);
|
||||
|
@ -239,7 +246,16 @@ public class StoreCreationComp extends DialogComp {
|
|||
finish();
|
||||
}
|
||||
})
|
||||
.visible(skippable));
|
||||
.visible(skippable),
|
||||
new ButtonComp(AppI18n.observable("connect"), null, () -> {
|
||||
var temp = DataStoreEntry.createTempWrapper(store.getValue());
|
||||
var action = provider.getValue().launchAction(temp);
|
||||
ThreadHelper.runFailableAsync(() -> {
|
||||
action.execute();
|
||||
});
|
||||
}).visible(connectable.and(Bindings.createBooleanBinding(() -> {
|
||||
return store.getValue() != null && store.getValue().isComplete();
|
||||
}, store))));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -100,6 +100,10 @@ public interface DataStoreProvider {
|
|||
return Comp.empty();
|
||||
}
|
||||
|
||||
default boolean canConnectDuringCreation() {
|
||||
return false;
|
||||
}
|
||||
|
||||
default Comp<?> createInsightsComp(ObservableValue<DataStore> store) {
|
||||
var content = Bindings.createStringBinding(
|
||||
() -> {
|
||||
|
|
|
@ -489,3 +489,4 @@ closeAllTabs=Luk alle faner
|
|||
closeLeftTabs=Luk faner til venstre
|
||||
closeRightTabs=Luk faner til højre
|
||||
addSerial=Seriel ...
|
||||
connect=Forbind
|
||||
|
|
|
@ -483,3 +483,4 @@ closeAllTabs=Alle Registerkarten schließen
|
|||
closeLeftTabs=Tabs nach links schließen
|
||||
closeRightTabs=Tabs nach rechts schließen
|
||||
addSerial=Serielle ...
|
||||
connect=Verbinden
|
||||
|
|
|
@ -487,3 +487,4 @@ closeAllTabs=Close all tabs
|
|||
closeLeftTabs=Close tabs to the left
|
||||
closeRightTabs=Close tabs to the right
|
||||
addSerial=Serial ...
|
||||
connect=Connect
|
||||
|
|
|
@ -470,3 +470,4 @@ closeAllTabs=Cerrar todas las pestañas
|
|||
closeLeftTabs=Cerrar pestañas a la izquierda
|
||||
closeRightTabs=Cerrar pestañas a la derecha
|
||||
addSerial=Serie ...
|
||||
connect=Conecta
|
||||
|
|
|
@ -470,3 +470,4 @@ closeAllTabs=Fermer tous les onglets
|
|||
closeLeftTabs=Ferme les onglets à gauche
|
||||
closeRightTabs=Ferme les onglets à droite
|
||||
addSerial=Série ...
|
||||
connect=Connecter
|
||||
|
|
|
@ -470,3 +470,4 @@ closeAllTabs=Chiudi tutte le schede
|
|||
closeLeftTabs=Chiudere le schede a sinistra
|
||||
closeRightTabs=Chiudere le schede a destra
|
||||
addSerial=Seriale ...
|
||||
connect=Collegare
|
||||
|
|
|
@ -470,3 +470,4 @@ closeAllTabs=すべてのタブを閉じる
|
|||
closeLeftTabs=タブを左に閉じる
|
||||
closeRightTabs=タブを右に閉じる
|
||||
addSerial=シリアル ...
|
||||
connect=接続する
|
||||
|
|
|
@ -470,3 +470,4 @@ closeAllTabs=Alle tabbladen sluiten
|
|||
closeLeftTabs=Tabbladen naar links sluiten
|
||||
closeRightTabs=Tabbladen naar rechts sluiten
|
||||
addSerial=Serieel ...
|
||||
connect=Maak verbinding met
|
||||
|
|
|
@ -470,3 +470,4 @@ closeAllTabs=Fecha todos os separadores
|
|||
closeLeftTabs=Fecha os separadores à esquerda
|
||||
closeRightTabs=Fecha os separadores à direita
|
||||
addSerial=Série ...
|
||||
connect=Liga-te
|
||||
|
|
|
@ -470,3 +470,4 @@ closeAllTabs=Закрыть все вкладки
|
|||
closeLeftTabs=Закрыть вкладки слева
|
||||
closeRightTabs=Закрывать вкладки справа
|
||||
addSerial=Серийный ...
|
||||
connect=Connect
|
||||
|
|
|
@ -471,3 +471,4 @@ closeAllTabs=Tüm sekmeleri kapat
|
|||
closeLeftTabs=Sekmeleri sola doğru kapatın
|
||||
closeRightTabs=Sekmeleri sağa doğru kapatın
|
||||
addSerial=Seri ...
|
||||
connect=Bağlan
|
||||
|
|
|
@ -470,3 +470,4 @@ closeAllTabs=关闭所有标签页
|
|||
closeLeftTabs=向左关闭标签
|
||||
closeRightTabs=向右关闭标签页
|
||||
addSerial=串行 ...
|
||||
connect=连接
|
||||
|
|
Loading…
Reference in a new issue