use of com.sparrowwallet.drongo.wallet.KeystoreSource in project sparrow by sparrowwallet.
the class KeystoreController method selectSource.
public void selectSource(ActionEvent event) {
keystoreSourceToggleGroup.selectToggle(null);
ToggleButton sourceButton = (ToggleButton) event.getSource();
KeystoreSource keystoreSource = (KeystoreSource) sourceButton.getUserData();
if (keystoreSource != KeystoreSource.SW_WATCH) {
launchImportDialog(keystoreSource);
} else {
fingerprint.setText(DEFAULT_WATCH_ONLY_FINGERPRINT);
selectSourcePane.setVisible(false);
}
}
use of com.sparrowwallet.drongo.wallet.KeystoreSource in project sparrow by sparrowwallet.
the class KeystoreController method importKeystore.
public void importKeystore(ActionEvent event) {
KeystoreSource initialSource = keystore.getSource();
if (initialSource == null || !KeystoreImportDialog.getSupportedSources().contains(initialSource)) {
initialSource = KeystoreImportDialog.getSupportedSources().get(0);
}
launchImportDialog(initialSource);
}
use of com.sparrowwallet.drongo.wallet.KeystoreSource in project sparrow by sparrowwallet.
the class KeystoreImportController method initializeView.
public void initializeView(Wallet wallet) {
this.wallet = wallet;
importMenu.selectedToggleProperty().addListener((observable, oldValue, selectedToggle) -> {
if (selectedToggle == null) {
oldValue.setSelected(true);
return;
}
KeystoreSource importType = (KeystoreSource) selectedToggle.getUserData();
String fxmlName = importType.toString().toLowerCase();
if (importType == KeystoreSource.SW_SEED || importType == KeystoreSource.SW_WATCH) {
fxmlName = "sw";
}
setImportPane(fxmlName);
});
}
Aggregations