use of bisq.desktop.components.HyperlinkWithIcon in project bisq-desktop by bisq-network.
the class TacWindow method addMessage.
@Override
protected void addMessage() {
super.addMessage();
String fontStyleClass = smallScreen ? "small-text" : "normal-text";
messageLabel.getStyleClass().add(fontStyleClass);
HyperlinkWithIcon hyperlinkWithIcon = addHyperlinkWithIcon(gridPane, ++rowIndex, Res.get("tacWindow.arbitrationSystem"), "https://bisq.network/arbitration_system.pdf");
hyperlinkWithIcon.getStyleClass().add(fontStyleClass);
GridPane.setMargin(hyperlinkWithIcon, new Insets(-6, 0, -20, -4));
}
use of bisq.desktop.components.HyperlinkWithIcon in project bisq-desktop by bisq-network.
the class WithdrawalView method setAddressColumnCellFactory.
// /////////////////////////////////////////////////////////////////////////////////////////
// ColumnCellFactories
// /////////////////////////////////////////////////////////////////////////////////////////
private void setAddressColumnCellFactory() {
addressColumn.setCellValueFactory((addressListItem) -> new ReadOnlyObjectWrapper<>(addressListItem.getValue()));
addressColumn.setCellFactory(new Callback<TableColumn<WithdrawalListItem, WithdrawalListItem>, TableCell<WithdrawalListItem, WithdrawalListItem>>() {
@Override
public TableCell<WithdrawalListItem, WithdrawalListItem> call(TableColumn<WithdrawalListItem, WithdrawalListItem> column) {
return new TableCell<WithdrawalListItem, WithdrawalListItem>() {
private HyperlinkWithIcon hyperlinkWithIcon;
@Override
public void updateItem(final WithdrawalListItem item, boolean empty) {
super.updateItem(item, empty);
if (item != null && !empty) {
String address = item.getAddressString();
hyperlinkWithIcon = new HyperlinkWithIcon(address, AwesomeIcon.EXTERNAL_LINK);
hyperlinkWithIcon.setOnAction(event -> openBlockExplorer(item));
hyperlinkWithIcon.setTooltip(new Tooltip(Res.get("tooltip.openBlockchainForAddress", address)));
setGraphic(hyperlinkWithIcon);
} else {
setGraphic(null);
if (hyperlinkWithIcon != null)
hyperlinkWithIcon.setOnAction(null);
}
}
};
}
});
}
use of bisq.desktop.components.HyperlinkWithIcon in project bisq-desktop by bisq-network.
the class FailedTradesView method setTradeIdColumnCellFactory.
private void setTradeIdColumnCellFactory() {
tradeIdColumn.setCellValueFactory((offerListItem) -> new ReadOnlyObjectWrapper<>(offerListItem.getValue()));
tradeIdColumn.setCellFactory(new Callback<TableColumn<FailedTradesListItem, FailedTradesListItem>, TableCell<FailedTradesListItem, FailedTradesListItem>>() {
@Override
public TableCell<FailedTradesListItem, FailedTradesListItem> call(TableColumn<FailedTradesListItem, FailedTradesListItem> column) {
return new TableCell<FailedTradesListItem, FailedTradesListItem>() {
private HyperlinkWithIcon field;
@Override
public void updateItem(final FailedTradesListItem item, boolean empty) {
super.updateItem(item, empty);
if (item != null && !empty) {
field = new HyperlinkWithIcon(model.getTradeId(item));
field.setOnAction(event -> tradeDetailsWindow.show(item.getTrade()));
field.setTooltip(new Tooltip(Res.get("tooltip.openPopupForDetails")));
setGraphic(field);
} else {
setGraphic(null);
if (field != null)
field.setOnAction(null);
}
}
};
}
});
}
use of bisq.desktop.components.HyperlinkWithIcon in project bisq-desktop by bisq-network.
the class AboutView method initialize.
@Override
public void initialize() {
TitledGroupBg titledGroupBg = addTitledGroupBg(root, gridRow, 4, Res.get("setting.about.aboutBisq"));
GridPane.setColumnSpan(titledGroupBg, 2);
Label label = addLabel(root, gridRow, Res.get("setting.about.about"), Layout.FIRST_ROW_DISTANCE);
label.setWrapText(true);
GridPane.setColumnSpan(label, 2);
GridPane.setHalignment(label, HPos.LEFT);
HyperlinkWithIcon hyperlinkWithIcon = addHyperlinkWithIcon(root, ++gridRow, Res.get("setting.about.web"), "https://bisq.network");
GridPane.setColumnSpan(hyperlinkWithIcon, 2);
hyperlinkWithIcon = addHyperlinkWithIcon(root, ++gridRow, Res.get("setting.about.code"), "https://github.com/bisq-network/exchange");
GridPane.setColumnSpan(hyperlinkWithIcon, 2);
hyperlinkWithIcon = addHyperlinkWithIcon(root, ++gridRow, Res.get("setting.about.agpl"), "https://github.com/bisq-network/exchange/blob/master/LICENSE");
GridPane.setColumnSpan(hyperlinkWithIcon, 2);
titledGroupBg = addTitledGroupBg(root, ++gridRow, 3, Res.get("setting.about.support"), Layout.GROUP_DISTANCE);
GridPane.setColumnSpan(titledGroupBg, 2);
label = addLabel(root, gridRow, Res.get("setting.about.def"), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
label.setWrapText(true);
GridPane.setColumnSpan(label, 2);
GridPane.setHalignment(label, HPos.LEFT);
hyperlinkWithIcon = addHyperlinkWithIcon(root, ++gridRow, Res.get("setting.about.contribute"), "https://bisq.network/contribute");
GridPane.setColumnSpan(hyperlinkWithIcon, 2);
hyperlinkWithIcon = addHyperlinkWithIcon(root, ++gridRow, Res.get("setting.about.donate"), "https://bisq.network/contribute/#donation");
GridPane.setColumnSpan(hyperlinkWithIcon, 2);
final boolean isBtc = Res.getBaseCurrencyCode().equals("BTC");
titledGroupBg = addTitledGroupBg(root, ++gridRow, isBtc ? 3 : 2, Res.get("setting.about.providers"), Layout.GROUP_DISTANCE);
GridPane.setColumnSpan(titledGroupBg, 2);
label = addLabel(root, gridRow, Res.get(isBtc ? "setting.about.apisWithFee" : "setting.about.apis"), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
label.setWrapText(true);
GridPane.setColumnSpan(label, 2);
GridPane.setHalignment(label, HPos.LEFT);
addLabelTextField(root, ++gridRow, Res.get("setting.about.pricesProvided"), Res.get("setting.about.pricesProviders", "BitcoinAverage (https://bitcoinaverage.com)", "Poloniex (https://poloniex.com)", "Coinmarketcap (https://coinmarketcap.com)"));
if (isBtc)
addLabelTextField(root, ++gridRow, Res.get("setting.about.feeEstimation.label"), "21 (https://bitcoinfees.earn.com)");
titledGroupBg = addTitledGroupBg(root, ++gridRow, 2, Res.get("setting.about.versionDetails"), Layout.GROUP_DISTANCE);
GridPane.setColumnSpan(titledGroupBg, 2);
addLabelTextField(root, gridRow, Res.get("setting.about.version"), Version.VERSION, Layout.FIRST_ROW_AND_GROUP_DISTANCE);
addLabelTextField(root, ++gridRow, Res.get("setting.about.subsystems.label"), Res.get("setting.about.subsystems.val", Version.P2P_NETWORK_VERSION, Version.getP2PMessageVersion(), Version.LOCAL_DB_VERSION, Version.TRADE_PROTOCOL_VERSION));
}
use of bisq.desktop.components.HyperlinkWithIcon in project bisq-desktop by bisq-network.
the class LockedView method setAddressColumnCellFactory.
private void setAddressColumnCellFactory() {
addressColumn.setCellValueFactory((addressListItem) -> new ReadOnlyObjectWrapper<>(addressListItem.getValue()));
addressColumn.setCellFactory(new Callback<TableColumn<LockedListItem, LockedListItem>, TableCell<LockedListItem, LockedListItem>>() {
@Override
public TableCell<LockedListItem, LockedListItem> call(TableColumn<LockedListItem, LockedListItem> column) {
return new TableCell<LockedListItem, LockedListItem>() {
private HyperlinkWithIcon hyperlinkWithIcon;
@Override
public void updateItem(final LockedListItem item, boolean empty) {
super.updateItem(item, empty);
if (item != null && !empty) {
String address = item.getAddressString();
hyperlinkWithIcon = new HyperlinkWithIcon(address, AwesomeIcon.EXTERNAL_LINK);
hyperlinkWithIcon.setOnAction(event -> openBlockExplorer(item));
hyperlinkWithIcon.setTooltip(new Tooltip(Res.get("tooltip.openBlockchainForAddress", address)));
setGraphic(hyperlinkWithIcon);
} else {
setGraphic(null);
if (hyperlinkWithIcon != null)
hyperlinkWithIcon.setOnAction(null);
}
}
};
}
});
}
Aggregations