use of bisq.desktop.components.indicator.TxConfidenceIndicator in project bisq-desktop by bisq-network.
the class BsqTxListItem method setupConfidence.
private void setupConfidence(BsqWalletService bsqWalletService) {
txConfidenceIndicator = new TxConfidenceIndicator();
txConfidenceIndicator.setId("funds-confidence");
Tooltip tooltip = new Tooltip();
txConfidenceIndicator.setProgress(0);
txConfidenceIndicator.setPrefSize(24, 24);
txConfidenceIndicator.setTooltip(tooltip);
txConfidenceListener = new TxConfidenceListener(txId) {
@Override
public void onTransactionConfidenceChanged(TransactionConfidence confidence) {
updateConfidence(confidence, tooltip);
}
};
bsqWalletService.addTxConfidenceListener(txConfidenceListener);
updateConfidence(bsqWalletService.getConfidenceForTxId(txId), tooltip);
}
use of bisq.desktop.components.indicator.TxConfidenceIndicator in project bisq-desktop by bisq-network.
the class StaticProgressIndicatorSkin method initialize.
@SuppressWarnings("deprecation")
private void initialize() {
TxConfidenceIndicator control = getSkinnable();
boolean isIndeterminate = control.isIndeterminate();
if (isIndeterminate) {
// clean up determinateIndicator
determinateIndicator = null;
// create spinner
spinner = new IndeterminateSpinner(control, this, spinEnabled.get(), progressColor.get());
getChildren().clear();
getChildren().add(spinner);
} else {
// clean up after spinner
if (spinner != null) {
spinner = null;
}
// create determinateIndicator
determinateIndicator = new StaticProgressIndicatorSkin.DeterminateIndicator(control, this, progressColor.get());
getChildren().clear();
getChildren().add(determinateIndicator);
}
}
Aggregations