Show a tooltip if the text is truncated

This commit is contained in:
Christoph Atteneder 2017-12-20 12:52:51 +01:00
parent 5ce2a67d0c
commit 9820e31381
No known key found for this signature in database
GPG key ID: CD5DC1C529CDFD3B
43 changed files with 188 additions and 112 deletions

View file

@ -60,6 +60,7 @@ import io.bisq.gui.common.view.CachingViewLoader;
import io.bisq.gui.common.view.View;
import io.bisq.gui.common.view.ViewLoader;
import io.bisq.gui.common.view.guice.InjectorViewFactory;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.main.MainView;
import io.bisq.gui.main.debug.DebugView;
import io.bisq.gui.main.overlays.popups.Popup;
@ -398,7 +399,7 @@ public class BisqApp extends Application {
}
private void showFPSWindow() {
Label label = new Label();
Label label = new AutoTooltipLabel();
EventStreams.animationTicks()
.latestN(100)
.map(ticks -> {

View file

@ -20,7 +20,7 @@ public class AddressWithIconAndDirection extends AnchorPane {
private final Label openLinkIcon;
public AddressWithIconAndDirection(String text, String address, AwesomeIcon awesomeIcon, boolean received) {
Label directionIcon = new Label();
Label directionIcon = new AutoTooltipLabel();
directionIcon.setLayoutY(3);
directionIcon.getStyleClass().add(received ? "received-funds-icon" : "sent-funds-icon");
AwesomeDude.setIcon(directionIcon, received ? AwesomeIcon.SIGNIN : AwesomeIcon.SIGNOUT);
@ -28,7 +28,7 @@ public class AddressWithIconAndDirection extends AnchorPane {
HBox hBox = new HBox();
hBox.setSpacing(-1);
Label label = new Label(text);
Label label = new AutoTooltipLabel(text);
label.setMouseTransparent(true);
HBox.setMargin(label, new Insets(4, 0, 0, 0));
HBox.setHgrow(label, Priority.ALWAYS);
@ -43,7 +43,7 @@ public class AddressWithIconAndDirection extends AnchorPane {
hBox.getChildren().addAll(label, hyperlink);
openLinkIcon = new Label();
openLinkIcon = new AutoTooltipLabel();
openLinkIcon.setLayoutY(3);
openLinkIcon.getStyleClass().add("external-link-icon");
openLinkIcon.setOpacity(0.7);

View file

@ -0,0 +1,48 @@
package io.bisq.gui.components;
import com.sun.javafx.scene.control.skin.LabelSkin;
import javafx.scene.Node;
import javafx.scene.control.Label;
import javafx.scene.control.Skin;
import javafx.scene.control.Tooltip;
import javafx.scene.text.Text;
public class AutoTooltipLabel extends Label {
public AutoTooltipLabel(){
super();
}
public AutoTooltipLabel(String text) {
super(text);
}
@Override
protected Skin<?> createDefaultSkin() {
return new AutoTooltipLabelSkin(this);
}
private class AutoTooltipLabelSkin extends LabelSkin {
private final Label truncateToFitLabel;
public AutoTooltipLabelSkin(Label label) {
super(label);
this.truncateToFitLabel = label;
}
@Override
protected void layoutChildren(double x, double y, double w, double h) {
super.layoutChildren(x, y, w, h);
for (Node node : getChildren()) {
if (node instanceof Text) {
String displayedText = ((Text) node).getText();
if (displayedText.equals(truncateToFitLabel.getText())) {
truncateToFitLabel.setTooltip(null);
} else {
truncateToFitLabel.setTooltip(new Tooltip(truncateToFitLabel.getText()));
}
}
}
}
}
}

View file

@ -72,7 +72,7 @@ public class BsqAddressTextField extends AnchorPane {
//focusedProperty().addListener((ov, oldValue, newValue) -> textField.requestFocus());
Label copyIcon = new Label();
Label copyIcon = new AutoTooltipLabel();
copyIcon.setLayoutY(3);
copyIcon.getStyleClass().add("copy-icon");
copyIcon.setTooltip(new Tooltip(Res.get("addressTextField.copyToClipboard")));

View file

@ -28,7 +28,7 @@ public class HyperlinkWithIcon extends HBox {
setSpacing(5);
hyperlink = new Hyperlink(text);
icon = new Label();
icon = new AutoTooltipLabel();
icon.getStyleClass().add("external-link-icon");
AwesomeDude.setIcon(icon, awesomeIcon);
icon.setMinWidth(20);

View file

@ -68,7 +68,7 @@ public class InfoDisplay extends Parent {
GridPane.setMargin(icon, new Insets(-2, 0, 0, 0));
GridPane.setRowSpan(icon, 2);
label = new Label();
label = new AutoTooltipLabel();
label.textProperty().bind(text);
label.setTextOverrun(OverrunStyle.WORD_ELLIPSIS);
// width is set a frame later so we hide it first
@ -79,7 +79,7 @@ public class InfoDisplay extends Parent {
// We need that to know if we have a wrapping or not.
// Did not find a way to get that from the API.
Label testLabel = new Label();
Label testLabel = new AutoTooltipLabel();
testLabel.textProperty().bind(text);
textFlow = new TextFlow();

View file

@ -172,7 +172,7 @@ public class InputTextField extends TextField {
private static void createErrorPopOver(String errorMessage) {
Label errorLabel = new Label(errorMessage);
Label errorLabel = new AutoTooltipLabel(errorMessage);
errorLabel.setId("validation-error");
errorLabel.setPadding(new Insets(0, 10, 0, 10));
errorLabel.setOnMouseClicked(e -> hideErrorMessageDisplay());
@ -183,4 +183,4 @@ public class InputTextField extends TextField {
errorMessageDisplay.setArrowIndent(5);
}
}
}

View file

@ -159,7 +159,7 @@ public class PasswordTextField extends PasswordField {
private static void createErrorPopOver(String errorMessage) {
Label errorLabel = new Label(errorMessage);
Label errorLabel = new AutoTooltipLabel(errorMessage);
errorLabel.setId("validation-error");
errorLabel.setPadding(new Insets(0, 10, 0, 10));
errorLabel.setOnMouseClicked(e -> hideErrorMessageDisplay());
@ -170,4 +170,4 @@ public class PasswordTextField extends PasswordField {
errorMessageDisplay.setArrowIndent(5);
}
}
}

View file

@ -132,7 +132,7 @@ public class PeerInfoIcon extends Group {
numTradesPane.setMouseTransparent(true);
ImageView numTradesCircle = new ImageView();
numTradesCircle.setId("image-green_circle");
numTradesLabel = new Label();
numTradesLabel = new AutoTooltipLabel();
numTradesLabel.relocate(5, 1);
numTradesLabel.setId("ident-num-label");
numTradesPane.getChildren().addAll(numTradesCircle, numTradesLabel);
@ -142,7 +142,7 @@ public class PeerInfoIcon extends Group {
tagPane.setMouseTransparent(true);
ImageView tagCircle = new ImageView();
tagCircle.setId("image-blue_circle");
tagLabel = new Label();
tagLabel = new AutoTooltipLabel();
tagLabel.relocate(5, 1);
tagLabel.setId("ident-num-label");
tagPane.getChildren().addAll(tagCircle, tagLabel);

View file

@ -40,7 +40,7 @@ public class TextFieldWithCopyIcon extends AnchorPane {
///////////////////////////////////////////////////////////////////////////////////////////
public TextFieldWithCopyIcon() {
Label copyIcon = new Label();
Label copyIcon = new AutoTooltipLabel();
copyIcon.setLayoutY(3);
copyIcon.getStyleClass().add("copy-icon");
copyIcon.setTooltip(new Tooltip(Res.get("shared.copyToClipboard")));

View file

@ -28,6 +28,7 @@ import io.bisq.core.app.BisqEnvironment;
import io.bisq.core.exceptions.BisqException;
import io.bisq.gui.Navigation;
import io.bisq.gui.common.view.*;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.components.BusyAnimation;
import io.bisq.gui.main.account.AccountView;
import io.bisq.gui.main.dao.DaoView;
@ -286,7 +287,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
textField.setFocusTraversable(false);
textField.setStyle("-fx-alignment: center; -fx-background-color: white;");
Label label = new Label(text);
Label label = new AutoTooltipLabel(text);
label.setId("nav-balance-label");
label.setPadding(new Insets(0, 5, 0, 5));
label.setPrefWidth(textField.getPrefWidth());
@ -372,7 +373,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
);
});
Label label = new Label(Res.get("mainView.marketPrice.provider"));
Label label = new AutoTooltipLabel(Res.get("mainView.marketPrice.provider"));
label.setId("nav-balance-label");
label.setPadding(new Insets(0, 5, 0, 2));
@ -422,7 +423,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
// createBitcoinInfoBox
btcSplashInfo = new Label();
btcSplashInfo = new AutoTooltipLabel();
btcSplashInfo.textProperty().bind(model.btcInfo);
walletServiceErrorMsgListener = (ov, oldValue, newValue) -> btcSplashInfo.setId("splash-error-state-msg");
model.walletServiceErrorMsg.addListener(walletServiceErrorMsgListener);
@ -455,7 +456,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
// create P2PNetworkBox
splashP2PNetworkLabel = new Label();
splashP2PNetworkLabel = new AutoTooltipLabel();
splashP2PNetworkLabel.setWrapText(true);
splashP2PNetworkLabel.setMaxWidth(500);
splashP2PNetworkLabel.setTextAlignment(TextAlignment.CENTER);
@ -542,7 +543,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
setTopAnchor(separator, 0d);
// BTC
Label btcInfoLabel = new Label();
Label btcInfoLabel = new AutoTooltipLabel();
btcInfoLabel.setId("footer-pane");
btcInfoLabel.textProperty().bind(model.btcInfo);
@ -580,7 +581,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
setBottomAnchor(blockchainSyncBox, 7d);
// version
versionLabel = new Label();
versionLabel = new AutoTooltipLabel();
versionLabel.setId("footer-pane");
versionLabel.setTextAlignment(TextAlignment.CENTER);
versionLabel.setAlignment(Pos.BASELINE_CENTER);
@ -602,7 +603,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
});
// P2P Network
Label p2PNetworkLabel = new Label();
Label p2PNetworkLabel = new AutoTooltipLabel();
p2PNetworkLabel.setId("footer-pane");
setRightAnchor(p2PNetworkLabel, 33d);
setBottomAnchor(p2PNetworkLabel, 7d);
@ -635,7 +636,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
}
private void setupNotificationIcon(Pane buttonHolder) {
Label label = new Label();
Label label = new AutoTooltipLabel();
label.textProperty().bind(model.numPendingTradesAsString);
label.relocate(5, 1);
label.setId("nav-alert-label");
@ -654,7 +655,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
}
private void setupDisputesIcon(Pane buttonHolder) {
Label label = new Label();
Label label = new AutoTooltipLabel();
label.textProperty().bind(model.numOpenDisputesAsString);
label.relocate(5, 1);
label.setId("nav-alert-label");

View file

@ -29,6 +29,7 @@ import io.bisq.core.payment.PaymentAccountFactory;
import io.bisq.core.payment.payload.PaymentMethod;
import io.bisq.gui.common.view.ActivatableViewAndModel;
import io.bisq.gui.common.view.FxmlView;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.components.TitledGroupBg;
import io.bisq.gui.components.paymentmethods.CryptoCurrencyForm;
import io.bisq.gui.components.paymentmethods.PaymentMethodForm;
@ -92,7 +93,7 @@ public class AltCoinAccountsView extends ActivatableViewAndModel<GridPane, AltCo
if (newValue != null)
onSelectAccount(newValue);
};
Label placeholder = new Label(Res.get("shared.noAccountsSetupYet"));
Label placeholder = new AutoTooltipLabel(Res.get("shared.noAccountsSetupYet"));
placeholder.setWrapText(true);
paymentAccountsListView.setPlaceholder(placeholder);
}
@ -208,7 +209,7 @@ public class AltCoinAccountsView extends ActivatableViewAndModel<GridPane, AltCo
@Override
public ListCell<PaymentAccount> call(ListView<PaymentAccount> list) {
return new ListCell<PaymentAccount>() {
final Label label = new Label();
final Label label = new AutoTooltipLabel();
final ImageView icon = ImageUtil.getImageViewById(ImageUtil.REMOVE_ICON);
final Button removeButton = new Button("", icon);
final AnchorPane pane = new AnchorPane(label, removeButton);

View file

@ -23,6 +23,7 @@ import io.bisq.common.locale.Res;
import io.bisq.common.util.Tuple2;
import io.bisq.gui.common.view.ActivatableViewAndModel;
import io.bisq.gui.common.view.FxmlView;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.components.TableGroupHeadline;
import io.bisq.gui.main.overlays.popups.Popup;
import io.bisq.gui.util.ImageUtil;
@ -143,7 +144,7 @@ public class ArbitratorSelectionView extends ActivatableViewAndModel<GridPane, A
@Override
public ListCell<String> call(ListView<String> list) {
return new ListCell<String>() {
final Label label = new Label();
final Label label = new AutoTooltipLabel();
final ImageView icon = ImageUtil.getImageViewById(ImageUtil.REMOVE_ICON);
final Button removeButton = new Button("", icon);
final AnchorPane pane = new AnchorPane(label, removeButton);

View file

@ -26,6 +26,7 @@ import io.bisq.core.payment.*;
import io.bisq.core.payment.payload.PaymentMethod;
import io.bisq.gui.common.view.ActivatableViewAndModel;
import io.bisq.gui.common.view.FxmlView;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.components.TitledGroupBg;
import io.bisq.gui.components.paymentmethods.*;
import io.bisq.gui.main.overlays.popups.Popup;
@ -118,7 +119,7 @@ public class FiatAccountsView extends ActivatableViewAndModel<GridPane, FiatAcco
if (newValue != null)
onSelectAccount(newValue);
};
Label placeholder = new Label(Res.get("shared.noAccountsSetupYet"));
Label placeholder = new AutoTooltipLabel(Res.get("shared.noAccountsSetupYet"));
placeholder.setWrapText(true);
paymentAccountsListView.setPlaceholder(placeholder);
}
@ -221,7 +222,7 @@ public class FiatAccountsView extends ActivatableViewAndModel<GridPane, FiatAcco
@Override
public ListCell<PaymentAccount> call(ListView<PaymentAccount> list) {
return new ListCell<PaymentAccount>() {
final Label label = new Label();
final Label label = new AutoTooltipLabel();
final ImageView icon = ImageUtil.getImageViewById(ImageUtil.REMOVE_ICON);
final Button removeButton = new Button("", icon);
final AnchorPane pane = new AnchorPane(label, removeButton);

View file

@ -22,6 +22,7 @@ import de.jensd.fx.fontawesome.AwesomeIcon;
import io.bisq.common.locale.Res;
import io.bisq.gui.Navigation;
import io.bisq.gui.common.view.*;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.main.MainView;
import io.bisq.gui.main.dao.DaoView;
import io.bisq.gui.main.dao.compensation.active.ActiveCompensationRequestView;
@ -143,7 +144,7 @@ class MenuItem extends ToggleButton {
setPrefWidth(240);
setAlignment(Pos.CENTER_LEFT);
Label icon = new Label();
Label icon = new AutoTooltipLabel();
AwesomeDude.setIcon(icon, awesomeIcon);
icon.setTextFill(Paint.valueOf("#333"));
icon.setPadding(new Insets(0, 5, 0, 0));

View file

@ -25,6 +25,7 @@ import io.bisq.core.dao.compensation.CompensationRequestManager;
import io.bisq.gui.Navigation;
import io.bisq.gui.common.view.ActivatableView;
import io.bisq.gui.common.view.FxmlView;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.components.InputTextField;
import io.bisq.gui.components.TableGroupHeadline;
import io.bisq.gui.main.MainView;
@ -124,7 +125,7 @@ public class ActiveCompensationRequestView extends ActivatableView<SplitPane, Vo
// tableView.setMinHeight(100);
tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
tableView.setPlaceholder(new Label(Res.get("table.placeholder.noData")));
tableView.setPlaceholder(new AutoTooltipLabel(Res.get("table.placeholder.noData")));
sortedList = new SortedList<>(compensationRequestManger.getObservableList());
tableView.setItems(sortedList);
setColumns();

View file

@ -22,6 +22,7 @@ import de.jensd.fx.fontawesome.AwesomeIcon;
import io.bisq.common.locale.Res;
import io.bisq.gui.Navigation;
import io.bisq.gui.common.view.*;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.main.MainView;
import io.bisq.gui.main.dao.DaoView;
import io.bisq.gui.main.dao.voting.dashboard.VotingDashboardView;
@ -143,7 +144,7 @@ class MenuItem extends ToggleButton {
setPrefWidth(240);
setAlignment(Pos.CENTER_LEFT);
Label icon = new Label();
Label icon = new AutoTooltipLabel();
AwesomeDude.setIcon(icon, awesomeIcon);
icon.setTextFill(Paint.valueOf("#333"));
icon.setPadding(new Insets(0, 5, 0, 0));

View file

@ -21,6 +21,7 @@ import io.bisq.common.UserThread;
import io.bisq.common.locale.Res;
import io.bisq.core.dao.vote.VoteItem;
import io.bisq.core.dao.vote.VotingDefaultValues;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.components.InputTextField;
import javafx.beans.property.DoubleProperty;
import javafx.beans.value.ChangeListener;
@ -78,7 +79,7 @@ public class ParameterViewItem {
hBox.setSpacing(5);
vBox.getChildren().add(hBox);
label = new Label(voteItem.getName() + ":");
label = new AutoTooltipLabel(voteItem.getName() + ":");
HBox.setMargin(label, new Insets(4, 0, 0, 0));
numberChangeListener = (observable, oldValue, newValue) -> {
if ((double) newValue > 0) {

View file

@ -23,6 +23,7 @@ import io.bisq.common.locale.Res;
import io.bisq.core.app.BisqEnvironment;
import io.bisq.gui.Navigation;
import io.bisq.gui.common.view.*;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.main.MainView;
import io.bisq.gui.main.dao.DaoView;
import io.bisq.gui.main.dao.wallet.dashboard.BsqDashboardView;
@ -159,7 +160,7 @@ class MenuItem extends ToggleButton {
setPrefWidth(240);
setAlignment(Pos.CENTER_LEFT);
Label icon = new Label();
Label icon = new AutoTooltipLabel();
AwesomeDude.setIcon(icon, awesomeIcon);
icon.setTextFill(Paint.valueOf("#333"));
icon.setPadding(new Insets(0, 5, 0, 0));

View file

@ -30,6 +30,7 @@ import io.bisq.core.provider.price.PriceFeedService;
import io.bisq.core.user.Preferences;
import io.bisq.gui.common.view.ActivatableView;
import io.bisq.gui.common.view.FxmlView;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.components.HyperlinkWithIcon;
import io.bisq.gui.main.dao.wallet.BsqBalanceUtil;
import io.bisq.gui.util.BsqFormatter;
@ -91,7 +92,7 @@ public class BsqDashboardView extends ActivatableView<GridPane, Void> implements
addLabelTextField(root, gridRow, Res.get("dao.wallet.dashboard.genesisBlockHeight"),
String.valueOf(bsqChainState.getGenesisBlockHeight()), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
Label label = new Label(Res.get("dao.wallet.dashboard.genesisTxId"));
Label label = new AutoTooltipLabel(Res.get("dao.wallet.dashboard.genesisTxId"));
GridPane.setRowIndex(label, ++gridRow);
root.getChildren().add(label);
hyperlinkWithIcon = new HyperlinkWithIcon(bsqChainState.getGenesisTxId(), AwesomeIcon.EXTERNAL_LINK);

View file

@ -33,6 +33,7 @@ import io.bisq.core.user.Preferences;
import io.bisq.gui.common.view.ActivatableView;
import io.bisq.gui.common.view.FxmlView;
import io.bisq.gui.components.AddressWithIconAndDirection;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.components.HyperlinkWithIcon;
import io.bisq.gui.main.dao.wallet.BsqBalanceUtil;
import io.bisq.gui.util.BsqFormatter;
@ -332,7 +333,7 @@ public class BsqTxView extends ActivatableView<GridPane, Void> {
if (field != null)
field.setOnAction(null);
label = new Label(item.isBurnedBsqTx() ?
label = new AutoTooltipLabel(item.isBurnedBsqTx() ?
Res.get("dao.wallet.bsqFee") : Res.get("funds.tx.direction.self"));
setGraphic(label);
} else {

View file

@ -29,10 +29,7 @@ import io.bisq.core.provider.fee.FeeService;
import io.bisq.core.user.Preferences;
import io.bisq.gui.common.view.ActivatableView;
import io.bisq.gui.common.view.FxmlView;
import io.bisq.gui.components.AddressTextField;
import io.bisq.gui.components.HyperlinkWithIcon;
import io.bisq.gui.components.InputTextField;
import io.bisq.gui.components.TitledGroupBg;
import io.bisq.gui.components.*;
import io.bisq.gui.main.overlays.popups.Popup;
import io.bisq.gui.main.overlays.windows.QRCodeWindow;
import io.bisq.gui.util.BSFormatter;
@ -122,7 +119,7 @@ public class DepositView extends ActivatableView<VBox, Void> {
walletService.getOrCreateAddressEntry(AddressEntry.Context.AVAILABLE);
tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
tableView.setPlaceholder(new Label(Res.get("funds.deposit.noAddresses")));
tableView.setPlaceholder(new AutoTooltipLabel(Res.get("funds.deposit.noAddresses")));
tableViewSelectionListener = (observableValue, oldValue, newValue) -> {
if (newValue != null)
fillForm(newValue.getAddressString());
@ -316,7 +313,7 @@ public class DepositView extends ActivatableView<VBox, Void> {
public void updateItem(final DepositListItem item, boolean empty) {
super.updateItem(item, empty);
if (item != null && !empty) {
setGraphic(new Label(item.getUsage()));
setGraphic(new AutoTooltipLabel(item.getUsage()));
} else {
setGraphic(null);
}

View file

@ -23,6 +23,7 @@ import io.bisq.core.btc.wallet.BtcWalletService;
import io.bisq.core.btc.wallet.WalletService;
import io.bisq.core.trade.Tradable;
import io.bisq.core.trade.Trade;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.util.BSFormatter;
import javafx.scene.control.Label;
import org.bitcoinj.core.Address;
@ -58,7 +59,7 @@ class LockedListItem {
}
// balance
balanceLabel = new Label();
balanceLabel = new AutoTooltipLabel();
balanceListener = new BalanceListener(getAddress()) {
@Override
public void onBalanceChanged(Coin balance, Transaction tx) {

View file

@ -30,6 +30,7 @@ import io.bisq.core.trade.TradeManager;
import io.bisq.core.user.Preferences;
import io.bisq.gui.common.view.ActivatableView;
import io.bisq.gui.common.view.FxmlView;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.components.HyperlinkWithIcon;
import io.bisq.gui.main.overlays.windows.OfferDetailsWindow;
import io.bisq.gui.main.overlays.windows.TradeDetailsWindow;
@ -96,7 +97,7 @@ public class LockedView extends ActivatableView<VBox, Void> {
balanceColumn.setText(Res.get("shared.balanceWithCur", Res.getBaseCurrencyCode()));
tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
tableView.setPlaceholder(new Label(Res.get("funds.locked.noFunds")));
tableView.setPlaceholder(new AutoTooltipLabel(Res.get("funds.locked.noFunds")));
setDateColumnCellFactory();
setDetailsColumnCellFactory();
@ -254,9 +255,9 @@ public class LockedView extends ActivatableView<VBox, Void> {
field.setTooltip(new Tooltip(Res.get("tooltip.openPopupForDetails")));
setGraphic(field);
} else if (addressEntry.getContext() == AddressEntry.Context.ARBITRATOR) {
setGraphic(new Label(Res.get("shared.arbitratorsFee")));
setGraphic(new AutoTooltipLabel(Res.get("shared.arbitratorsFee")));
} else {
setGraphic(new Label(Res.get("shared.noDetailsAvailable")));
setGraphic(new AutoTooltipLabel(Res.get("shared.noDetailsAvailable")));
}
} else {

View file

@ -22,6 +22,7 @@ import io.bisq.core.btc.listeners.BalanceListener;
import io.bisq.core.btc.wallet.BtcWalletService;
import io.bisq.core.offer.OpenOffer;
import io.bisq.core.trade.Tradable;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.util.BSFormatter;
import javafx.scene.control.Label;
import org.bitcoinj.core.Address;
@ -48,7 +49,7 @@ class ReservedListItem {
addressString = addressEntry.getAddressString();
// balance
balanceLabel = new Label();
balanceLabel = new AutoTooltipLabel();
balanceListener = new BalanceListener(getAddress()) {
@Override
public void onBalanceChanged(Coin balance, Transaction tx) {

View file

@ -30,6 +30,7 @@ import io.bisq.core.trade.TradeManager;
import io.bisq.core.user.Preferences;
import io.bisq.gui.common.view.ActivatableView;
import io.bisq.gui.common.view.FxmlView;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.components.HyperlinkWithIcon;
import io.bisq.gui.main.overlays.windows.OfferDetailsWindow;
import io.bisq.gui.main.overlays.windows.TradeDetailsWindow;
@ -96,7 +97,7 @@ public class ReservedView extends ActivatableView<VBox, Void> {
balanceColumn.setText(Res.get("shared.balanceWithCur", Res.getBaseCurrencyCode()));
tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
tableView.setPlaceholder(new Label(Res.get("funds.reserved.noFunds")));
tableView.setPlaceholder(new AutoTooltipLabel(Res.get("funds.reserved.noFunds")));
setDateColumnCellFactory();
setDetailsColumnCellFactory();
@ -253,9 +254,9 @@ public class ReservedView extends ActivatableView<VBox, Void> {
field.setTooltip(new Tooltip(Res.get("tooltip.openPopupForDetails")));
setGraphic(field);
} else if (item.getAddressEntry().getContext() == AddressEntry.Context.ARBITRATOR) {
setGraphic(new Label(Res.get("shared.arbitratorsFee")));
setGraphic(new AutoTooltipLabel(Res.get("shared.arbitratorsFee")));
} else {
setGraphic(new Label(Res.get("shared.noDetailsAvailable")));
setGraphic(new AutoTooltipLabel(Res.get("shared.noDetailsAvailable")));
}
} else {

View file

@ -37,6 +37,7 @@ import io.bisq.core.user.Preferences;
import io.bisq.gui.common.view.ActivatableView;
import io.bisq.gui.common.view.FxmlView;
import io.bisq.gui.components.AddressWithIconAndDirection;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.components.HyperlinkWithIcon;
import io.bisq.gui.main.overlays.popups.Popup;
import io.bisq.gui.main.overlays.windows.OfferDetailsWindow;
@ -137,7 +138,7 @@ public class TransactionsView extends ActivatableView<VBox, Void> {
revertTxColumn.setText(Res.get("shared.revert", Res.getBaseCurrencyCode()));
tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
tableView.setPlaceholder(new Label(Res.get("funds.tx.noTxAvailable")));
tableView.setPlaceholder(new AutoTooltipLabel(Res.get("funds.tx.noTxAvailable")));
setDateColumnCellFactory();
setDetailsColumnCellFactory();
@ -383,7 +384,7 @@ public class TransactionsView extends ActivatableView<VBox, Void> {
field.setTooltip(new Tooltip(Res.get("tooltip.openPopupForDetails")));
setGraphic(field);
} else {
setGraphic(new Label(item.getDetails()));
setGraphic(new AutoTooltipLabel(item.getDetails()));
}
} else {
setGraphic(null);

View file

@ -21,6 +21,7 @@ import io.bisq.common.locale.Res;
import io.bisq.core.btc.AddressEntry;
import io.bisq.core.btc.listeners.BalanceListener;
import io.bisq.core.btc.wallet.BtcWalletService;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.util.BSFormatter;
import javafx.scene.control.Label;
import lombok.Getter;
@ -49,7 +50,7 @@ class WithdrawalListItem {
addressString = addressEntry.getAddressString();
// balance
balanceLabel = new Label();
balanceLabel = new AutoTooltipLabel();
balanceListener = new BalanceListener(getAddress()) {
@Override
public void onBalanceChanged(Coin balance, Transaction tx) {

View file

@ -36,6 +36,7 @@ import io.bisq.core.user.Preferences;
import io.bisq.core.util.CoinUtil;
import io.bisq.gui.common.view.ActivatableView;
import io.bisq.gui.common.view.FxmlView;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.components.HyperlinkWithIcon;
import io.bisq.gui.main.overlays.popups.Popup;
import io.bisq.gui.main.overlays.windows.WalletPasswordWindow;
@ -148,7 +149,7 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
selectColumn.setText(Res.get("shared.select"));
tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
tableView.setPlaceholder(new Label(Res.get("funds.withdrawal.noFundsAvailable")));
tableView.setPlaceholder(new AutoTooltipLabel(Res.get("funds.withdrawal.noFundsAvailable")));
tableView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
setAddressColumnCellFactory();

View file

@ -26,6 +26,7 @@ import io.bisq.core.offer.OfferPayload;
import io.bisq.gui.Navigation;
import io.bisq.gui.common.view.ActivatableViewAndModel;
import io.bisq.gui.common.view.FxmlView;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.main.MainView;
import io.bisq.gui.main.offer.BuyOfferView;
import io.bisq.gui.main.offer.SellOfferView;
@ -114,7 +115,7 @@ public class OfferBookChartView extends ActivatableViewAndModel<VBox, OfferBookC
Res.get("shared.offers"),
model.preferences));
Label currencyLabel = new Label(Res.getWithCol("shared.currency"));
Label currencyLabel = new AutoTooltipLabel(Res.getWithCol("shared.currency"));
HBox currencyHBox = new HBox();
currencyHBox.setSpacing(5);
currencyHBox.setPadding(new Insets(5, -20, -5, 20));
@ -448,11 +449,11 @@ public class OfferBookChartView extends ActivatableViewAndModel<VBox, OfferBookC
}
tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
Label placeholder = new Label(Res.get("table.placeholder.noItems", Res.get("shared.offers")));
Label placeholder = new AutoTooltipLabel(Res.get("table.placeholder.noItems", Res.get("shared.offers")));
placeholder.setWrapText(true);
tableView.setPlaceholder(placeholder);
Label titleLabel = new Label();
Label titleLabel = new AutoTooltipLabel();
titleLabel.setStyle("-fx-font-weight: bold; -fx-font-size: 16; -fx-alignment: center");
UserThread.execute(() -> titleLabel.prefWidthProperty().bind(tableView.widthProperty()));

View file

@ -21,6 +21,7 @@ import io.bisq.common.locale.CurrencyUtil;
import io.bisq.common.locale.Res;
import io.bisq.gui.common.view.ActivatableViewAndModel;
import io.bisq.gui.common.view.FxmlView;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.util.BSFormatter;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.collections.ListChangeListener;
@ -65,7 +66,7 @@ public class SpreadView extends ActivatableViewAndModel<GridPane, SpreadViewMode
GridPane.setVgrow(tableView, Priority.ALWAYS);
GridPane.setHgrow(tableView, Priority.ALWAYS);
root.getChildren().add(tableView);
Label placeholder = new Label(Res.get("table.placeholder.noData"));
Label placeholder = new AutoTooltipLabel(Res.get("table.placeholder.noData"));
placeholder.setWrapText(true);
tableView.setPlaceholder(placeholder);
@ -285,7 +286,7 @@ public class SpreadView extends ActivatableViewAndModel<GridPane, SpreadViewMode
public void updateItem(final SpreadItem item, boolean empty) {
super.updateItem(item, empty);
if (item != null && !empty) {
// TODO maybe show exra colums with item.priceSpread and use real amount diff
// TODO maybe show exra colums with item.priceSpread and use real amount diff
// not % based
if (item.priceSpread != null)
setText(item.percentage);

View file

@ -27,6 +27,7 @@ import io.bisq.core.offer.OfferPayload;
import io.bisq.core.trade.statistics.TradeStatistics2;
import io.bisq.gui.common.view.ActivatableViewAndModel;
import io.bisq.gui.common.view.FxmlView;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.main.market.trades.charts.price.CandleStickChart;
import io.bisq.gui.main.market.trades.charts.volume.VolumeChart;
import io.bisq.gui.util.BSFormatter;
@ -117,7 +118,7 @@ public class TradesChartsView extends ActivatableViewAndModel<VBox, TradesCharts
createCharts();
createTable();
nrOfTradeStatisticsLabel = new Label(" "); // set empty string for layout
nrOfTradeStatisticsLabel = new AutoTooltipLabel(" "); // set empty string for layout
nrOfTradeStatisticsLabel.setId("num-offers");
nrOfTradeStatisticsLabel.setPadding(new Insets(-5, 0, -10, 5));
root.getChildren().addAll(toolBox, priceChart, volumeChart, tableView, nrOfTradeStatisticsLabel);
@ -408,7 +409,7 @@ public class TradesChartsView extends ActivatableViewAndModel<VBox, TradesCharts
///////////////////////////////////////////////////////////////////////////////////////////
private HBox getToolBox() {
Label currencyLabel = new Label(Res.getWithCol("shared.currency"));
Label currencyLabel = new AutoTooltipLabel(Res.getWithCol("shared.currency"));
currencyLabel.setPadding(new Insets(0, 4, 0, 0));
currencyComboBox = new ComboBox<>();
@ -420,7 +421,7 @@ public class TradesChartsView extends ActivatableViewAndModel<VBox, TradesCharts
Pane spacer = new Pane();
HBox.setHgrow(spacer, Priority.ALWAYS);
Label label = new Label("Interval:");
Label label = new AutoTooltipLabel("Interval:");
label.setPadding(new Insets(0, 4, 0, 0));
toggleGroup = new ToggleGroup();
@ -644,7 +645,7 @@ public class TradesChartsView extends ActivatableViewAndModel<VBox, TradesCharts
tableView.getColumns().add(directionColumn);
tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
Label placeholder = new Label(Res.get("table.placeholder.noData"));
Label placeholder = new AutoTooltipLabel(Res.get("table.placeholder.noData"));
placeholder.setWrapText(true);
tableView.setPlaceholder(placeholder);
dateColumn.setSortType(TableColumn.SortType.DESCENDING);

View file

@ -32,6 +32,7 @@
package io.bisq.gui.main.market.trades.charts.price;
import io.bisq.common.locale.Res;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.main.market.trades.charts.CandleData;
import io.bisq.gui.util.Layout;
import javafx.geometry.HPos;
@ -46,12 +47,12 @@ import javafx.util.StringConverter;
*/
public class CandleTooltip extends GridPane {
private final StringConverter<Number> priceStringConverter;
private final Label openValue = new Label();
private final Label closeValue = new Label();
private final Label highValue = new Label();
private final Label lowValue = new Label();
private final Label averageValue = new Label();
private final Label dateValue = new Label();
private final Label openValue = new AutoTooltipLabel();
private final Label closeValue = new AutoTooltipLabel();
private final Label highValue = new AutoTooltipLabel();
private final Label lowValue = new AutoTooltipLabel();
private final Label averageValue = new AutoTooltipLabel();
private final Label dateValue = new AutoTooltipLabel();
CandleTooltip(StringConverter<Number> priceStringConverter) {
this.priceStringConverter = priceStringConverter;
@ -60,12 +61,12 @@ public class CandleTooltip extends GridPane {
setVgap(2);
Label open = new Label(Res.get("market.trades.tooltip.candle.open"));
Label close = new Label(Res.get("market.trades.tooltip.candle.close"));
Label high = new Label(Res.get("market.trades.tooltip.candle.high"));
Label low = new Label(Res.get("market.trades.tooltip.candle.low"));
Label average = new Label(Res.get("market.trades.tooltip.candle.average"));
Label date = new Label(Res.get("market.trades.tooltip.candle.date"));
Label open = new AutoTooltipLabel(Res.get("market.trades.tooltip.candle.open"));
Label close = new AutoTooltipLabel(Res.get("market.trades.tooltip.candle.close"));
Label high = new AutoTooltipLabel(Res.get("market.trades.tooltip.candle.high"));
Label low = new AutoTooltipLabel(Res.get("market.trades.tooltip.candle.low"));
Label average = new AutoTooltipLabel(Res.get("market.trades.tooltip.candle.average"));
Label date = new AutoTooltipLabel(Res.get("market.trades.tooltip.candle.date"));
setConstraints(open, 0, 0);
setConstraints(openValue, 1, 0);
setConstraints(close, 0, 1);
@ -97,4 +98,4 @@ public class CandleTooltip extends GridPane {
averageValue.setText(priceStringConverter.toString(candleData.average));
dateValue.setText(candleData.date);
}
}
}

View file

@ -810,7 +810,7 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
imageView = new ImageView();
imageView.setPickOnBounds(true);
directionLabel = new Label();
directionLabel = new AutoTooltipLabel();
directionLabel.setAlignment(Pos.CENTER);
directionLabel.setPadding(new Insets(-5, 0, 0, 0));
directionLabel.setId("direction-icon-label");
@ -908,9 +908,9 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
GridPane.setColumnSpan(payFundsTitledGroupBg, 3);
payFundsTitledGroupBg.setVisible(false);
totalToPayLabel = new Label(Res.get("shared.totalsNeeded"));
totalToPayLabel = new AutoTooltipLabel(Res.get("shared.totalsNeeded"));
totalToPayLabel.setVisible(false);
totalToPayInfoIconLabel = new Label();
totalToPayInfoIconLabel = new AutoTooltipLabel();
totalToPayInfoIconLabel.setVisible(false);
HBox totalToPayBox = new HBox();
totalToPayBox.setSpacing(4);
@ -964,13 +964,13 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
fundFromSavingsWalletButton.setDefaultButton(true);
fundFromSavingsWalletButton.setDefaultButton(false);
fundFromSavingsWalletButton.setOnAction(e -> model.fundFromSavingsWallet());
Label label = new Label(Res.get("shared.OR"));
Label label = new AutoTooltipLabel(Res.get("shared.OR"));
label.setPadding(new Insets(5, 0, 0, 0));
Button fundFromExternalWalletButton = new Button(Res.get("shared.fundFromExternalWalletButton"));
fundFromExternalWalletButton.setDefaultButton(false);
fundFromExternalWalletButton.setOnAction(e -> GUIUtil.showFeeInfoBeforeExecute(this::openWallet));
waitingForFundsBusyAnimation = new BusyAnimation();
waitingForFundsLabel = new Label();
waitingForFundsLabel = new AutoTooltipLabel();
waitingForFundsLabel.setPadding(new Insets(5, 0, 0, 0));
fundingHBox.getChildren().addAll(fundFromSavingsWalletButton, label, fundFromExternalWalletButton, waitingForFundsBusyAnimation, waitingForFundsLabel);
@ -1034,7 +1034,7 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
VBox amountBox = amountInputBoxTuple.second;
// x
xLabel = new Label();
xLabel = new AutoTooltipLabel();
xLabel.setFont(Font.font("Helvetica-Bold", 20));
xLabel.setPadding(new Insets(14, 3, 0, 3));
xLabel.setMinWidth(14);
@ -1075,7 +1075,7 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
toggleButtonsHBox.getChildren().addAll(fixedPriceButton, useMarketBasedPriceButton);
// =
Label resultLabel = new Label("=");
Label resultLabel = new AutoTooltipLabel("=");
resultLabel.setFont(Font.font("Helvetica-Bold", 20));
resultLabel.setPadding(new Insets(14, 2, 0, 2));
@ -1173,7 +1173,7 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
Tuple2<Label, VBox> amountInputBoxTuple = getTradeInputBox(amountValueCurrencyBox,
Res.get("createOffer.amountPriceBox.minAmountDescription"));
Label xLabel = new Label("x");
Label xLabel = new AutoTooltipLabel("x");
xLabel.setFont(Font.font("Helvetica-Bold", 20));
xLabel.setPadding(new Insets(14, 3, 0, 3));
xLabel.setVisible(false); // we just use it to get the same layout as the upper row
@ -1236,7 +1236,7 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
}
private void addPayInfoEntry(GridPane infoGridPane, int row, String labelText, String value) {
Label label = new Label(labelText);
Label label = new AutoTooltipLabel(labelText);
TextField textField = new TextField(value);
textField.setMinWidth(500);
textField.setEditable(false);

View file

@ -31,6 +31,7 @@ import io.bisq.core.user.DontShowAgainLookup;
import io.bisq.gui.Navigation;
import io.bisq.gui.common.view.ActivatableViewAndModel;
import io.bisq.gui.common.view.FxmlView;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.components.HyperlinkWithIcon;
import io.bisq.gui.components.PeerInfoIcon;
import io.bisq.gui.main.MainView;
@ -170,7 +171,7 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
tableView.getSortOrder().add(priceColumn);
tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
Label placeholder = new Label(Res.get("table.placeholder.noItems", Res.get("shared.offers")));
Label placeholder = new AutoTooltipLabel(Res.get("table.placeholder.noItems", Res.get("shared.offers")));
placeholder.setWrapText(true);
tableView.setPlaceholder(placeholder);
@ -193,7 +194,7 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
paymentMethodColumn.setComparator((o1, o2) -> o1.getOffer().getPaymentMethod().compareTo(o2.getOffer().getPaymentMethod()));
avatarColumn.setComparator((o1, o2) -> o1.getOffer().getOwnerNodeAddress().getFullAddress().compareTo(o2.getOffer().getOwnerNodeAddress().getFullAddress()));
nrOfOffersLabel = new Label("");
nrOfOffersLabel = new AutoTooltipLabel("");
nrOfOffersLabel.setId("num-offers");
GridPane.setHalignment(nrOfOffersLabel, HPos.LEFT);
GridPane.setVgrow(nrOfOffersLabel, Priority.NEVER);

View file

@ -702,7 +702,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
imageView = new ImageView();
imageView.setPickOnBounds(true);
directionLabel = new Label();
directionLabel = new AutoTooltipLabel();
directionLabel.setAlignment(Pos.CENTER);
directionLabel.setPadding(new Insets(-5, 0, 0, 0));
directionLabel.setId("direction-icon-label");
@ -762,7 +762,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
private void addOfferAvailabilityLabel() {
offerAvailabilityBusyAnimation = new BusyAnimation();
offerAvailabilityLabel = new Label(Res.get("takeOffer.fundsBox.isOfferAvailable"));
offerAvailabilityLabel = new AutoTooltipLabel(Res.get("takeOffer.fundsBox.isOfferAvailable"));
HBox hBox = new HBox();
hBox.setSpacing(10);
@ -781,9 +781,9 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
GridPane.setColumnSpan(payFundsPane, 3);
payFundsPane.setVisible(false);
totalToPayLabel = new Label(Res.get("shared.totalsNeeded"));
totalToPayLabel = new AutoTooltipLabel(Res.get("shared.totalsNeeded"));
totalToPayLabel.setVisible(false);
totalToPayInfoIconLabel = new Label();
totalToPayInfoIconLabel = new AutoTooltipLabel();
totalToPayInfoIconLabel.setVisible(false);
HBox totalToPayBox = new HBox();
totalToPayBox.setSpacing(4);
@ -836,13 +836,13 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
fundFromSavingsWalletButton.setDefaultButton(true);
fundFromSavingsWalletButton.setDefaultButton(false);
fundFromSavingsWalletButton.setOnAction(e -> model.fundFromSavingsWallet());
Label label = new Label(Res.get("shared.OR"));
Label label = new AutoTooltipLabel(Res.get("shared.OR"));
label.setPadding(new Insets(5, 0, 0, 0));
Button fundFromExternalWalletButton = new Button(Res.get("shared.fundFromExternalWalletButton"));
fundFromExternalWalletButton.setDefaultButton(false);
fundFromExternalWalletButton.setOnAction(e -> GUIUtil.showFeeInfoBeforeExecute(this::openWallet));
waitingForFundsBusyAnimation = new BusyAnimation(false);
waitingForFundsLabel = new Label();
waitingForFundsLabel = new AutoTooltipLabel();
waitingForFundsLabel.setPadding(new Insets(5, 0, 0, 0));
fundingHBox.getChildren().addAll(fundFromSavingsWalletButton,
label,
@ -908,7 +908,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
VBox amountBox = amountInputBoxTuple.second;
// x
Label xLabel = new Label("x");
Label xLabel = new AutoTooltipLabel("x");
xLabel.setFont(Font.font("Helvetica-Bold", 20));
xLabel.setPadding(new Insets(14, 3, 0, 3));
@ -923,7 +923,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
VBox priceBox = priceInputBoxTuple.second;
// =
Label resultLabel = new Label("=");
Label resultLabel = new AutoTooltipLabel("=");
resultLabel.setFont(Font.font("Helvetica-Bold", 20));
resultLabel.setPadding(new Insets(14, 2, 0, 2));
@ -969,7 +969,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
Tuple2<Label, VBox> amountInputBoxTuple = getTradeInputBox(amountValueCurrencyBox,
Res.get("takeOffer.amountPriceBox.amountRangeDescription"));
Label xLabel = new Label("x");
Label xLabel = new AutoTooltipLabel("x");
xLabel.setFont(Font.font("Helvetica-Bold", 20));
xLabel.setPadding(new Insets(14, 3, 0, 3));
xLabel.setVisible(false); // we just use it to get the same layout as the upper row
@ -992,7 +992,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
///////////////////////////////////////////////////////////////////////////////////////////
private Tuple2<Label, VBox> getTradeInputBox(HBox amountValueBox, String promptText) {
Label descriptionLabel = new Label(promptText);
Label descriptionLabel = new AutoTooltipLabel(promptText);
descriptionLabel.setId("input-description-label");
descriptionLabel.setPrefWidth(190);
@ -1045,7 +1045,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
}
private void addPayInfoEntry(GridPane infoGridPane, int row, String labelText, String value) {
Label label = new Label(labelText);
Label label = new AutoTooltipLabel(labelText);
TextField textField = new TextField(value);
textField.setMinWidth(500);
textField.setEditable(false);

View file

@ -1,6 +1,7 @@
package io.bisq.gui.main.overlays.windows;
import io.bisq.common.locale.Res;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.main.overlays.Overlay;
import javafx.geometry.HPos;
import javafx.geometry.Insets;
@ -51,7 +52,7 @@ public class QRCodeWindow extends Overlay<QRCodeWindow> {
gridPane.getChildren().add(qrCodeImageView);
String request = bitcoinURI.replace("%20", " ").replace("?", "\n?").replace("&", "\n&");
Label infoLabel = new Label(Res.get("qRCodeWindow.request", request));
Label infoLabel = new AutoTooltipLabel(Res.get("qRCodeWindow.request", request));
infoLabel.setMouseTransparent(true);
infoLabel.setWrapText(true);
infoLabel.setId("popup-qr-code-info");

View file

@ -19,6 +19,7 @@ package io.bisq.gui.main.overlays.windows;
import io.bisq.common.app.DevEnv;
import io.bisq.common.locale.Res;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.components.InputTextField;
import io.bisq.gui.main.overlays.Overlay;
import io.bisq.gui.main.overlays.popups.Popup;
@ -103,7 +104,7 @@ public class UnlockArbitrationRegistrationWindow extends Overlay<UnlockArbitrati
}
private void addInputFields() {
Label label = new Label(Res.get("shared.enterPrivKey"));
Label label = new AutoTooltipLabel(Res.get("shared.enterPrivKey"));
label.setWrapText(true);
GridPane.setMargin(label, new Insets(3, 0, 0, 0));
GridPane.setRowIndex(label, ++rowIndex);

View file

@ -23,6 +23,7 @@ import io.bisq.common.locale.Res;
import io.bisq.common.util.Tuple2;
import io.bisq.core.btc.wallet.WalletsManager;
import io.bisq.core.crypto.ScryptUtil;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.components.BusyAnimation;
import io.bisq.gui.components.PasswordTextField;
import io.bisq.gui.main.overlays.Overlay;
@ -160,7 +161,7 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
}
private void addInputFields() {
Label label = new Label(Res.get("password.enterPassword"));
Label label = new AutoTooltipLabel(Res.get("password.enterPassword"));
label.setWrapText(true);
GridPane.setMargin(label, new Insets(3, 0, 0, 0));
GridPane.setRowIndex(label, ++rowIndex);
@ -177,7 +178,7 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
private void addButtons() {
BusyAnimation busyAnimation = new BusyAnimation(false);
Label deriveStatusLabel = new Label();
Label deriveStatusLabel = new AutoTooltipLabel();
unlockButton = new Button(Res.get("shared.unlock"));
unlockButton.setDefaultButton(true);
@ -244,7 +245,7 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
}
private void showRestoreScreen() {
Label headLine2Label = new Label(Res.get("seed.restore.title"));
Label headLine2Label = new AutoTooltipLabel(Res.get("seed.restore.title"));
headLine2Label.setId("popup-headline");
headLine2Label.setMouseTransparent(true);
GridPane.setHalignment(headLine2Label, HPos.LEFT);

View file

@ -21,6 +21,7 @@ import com.google.common.base.Joiner;
import io.bisq.common.locale.Res;
import io.bisq.common.util.Utilities;
import io.bisq.core.alert.Alert;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.components.BusyAnimation;
import io.bisq.gui.main.overlays.Overlay;
import io.bisq.gui.main.overlays.popups.Popup;
@ -108,7 +109,7 @@ public class DisplayUpdateDownloadWindow extends Overlay<DisplayUpdateDownloadWi
busyAnimation = new BusyAnimation(false);
Label statusLabel = new Label();
Label statusLabel = new AutoTooltipLabel();
statusLabel.managedProperty().bind(statusLabel.visibleProperty());
HBox hBox = new HBox();

View file

@ -31,6 +31,7 @@ import io.bisq.core.btc.Restrictions;
import io.bisq.core.btc.wallet.BtcWalletService;
import io.bisq.core.user.DontShowAgainLookup;
import io.bisq.core.util.CoinUtil;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.components.InputTextField;
import io.bisq.gui.components.TitledGroupBg;
import io.bisq.gui.main.MainView;
@ -142,7 +143,7 @@ public class BuyerStep4View extends TradeStepView {
hBox.setSpacing(10);
useSavingsWalletButton = new Button(Res.get("portfolio.pending.step5_buyer.moveToBisqWallet"));
useSavingsWalletButton.setDefaultButton(false);
Label label = new Label(Res.get("shared.OR"));
Label label = new AutoTooltipLabel(Res.get("shared.OR"));
label.setPadding(new Insets(5, 0, 0, 0));
withdrawToExternalWalletButton = new Button(Res.get("portfolio.pending.step5_buyer.withdrawExternal"));
withdrawToExternalWalletButton.setDefaultButton(false);

View file

@ -30,6 +30,7 @@ import io.bisq.gui.app.BisqApp;
import io.bisq.gui.common.model.Activatable;
import io.bisq.gui.common.view.ActivatableViewAndModel;
import io.bisq.gui.common.view.FxmlView;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.components.InputTextField;
import io.bisq.gui.components.TitledGroupBg;
import io.bisq.gui.main.overlays.popups.Popup;
@ -155,7 +156,7 @@ public class NetworkSettingsView extends ActivatableViewAndModel<GridPane, Activ
tableView.setMinHeight(180);
tableView.setPrefHeight(180);
tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
tableView.setPlaceholder(new Label(Res.get("table.placeholder.noData")));
tableView.setPlaceholder(new AutoTooltipLabel(Res.get("table.placeholder.noData")));
tableView.getSortOrder().add(creationDateColumn);
creationDateColumn.setSortType(TableColumn.SortType.ASCENDING);

View file

@ -31,6 +31,7 @@ import io.bisq.gui.app.BisqApp;
import io.bisq.gui.common.model.Activatable;
import io.bisq.gui.common.view.ActivatableViewAndModel;
import io.bisq.gui.common.view.FxmlView;
import io.bisq.gui.components.AutoTooltipLabel;
import io.bisq.gui.components.InputTextField;
import io.bisq.gui.components.TitledGroupBg;
import io.bisq.gui.main.overlays.popups.Popup;
@ -267,7 +268,7 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Activatab
autoSelectArbitratorsCheckBox = addLabelCheckBox(root, ++gridRow,
Res.get("setting.preferences.autoSelectArbitrators"), "").second;
// ignoreTraders
// ignoreTraders
ignoreTradersListInputTextField = addLabelInputTextField(root, ++gridRow,
Res.get("setting.preferences.ignorePeers")).second;
ignoreTradersListListener = (observable, oldValue, newValue) ->
@ -303,14 +304,14 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Activatab
fiatCurrenciesListView = fiatTuple.second;
fiatCurrenciesListView.setMinHeight(2 * Layout.LIST_ROW_HEIGHT + 2);
fiatCurrenciesListView.setPrefHeight(3 * Layout.LIST_ROW_HEIGHT + 2);
Label placeholder = new Label(Res.get("setting.preferences.noFiat"));
Label placeholder = new AutoTooltipLabel(Res.get("setting.preferences.noFiat"));
placeholder.setWrapText(true);
fiatCurrenciesListView.setPlaceholder(placeholder);
fiatCurrenciesListView.setCellFactory(new Callback<ListView<FiatCurrency>, ListCell<FiatCurrency>>() {
@Override
public ListCell<FiatCurrency> call(ListView<FiatCurrency> list) {
return new ListCell<FiatCurrency>() {
final Label label = new Label();
final Label label = new AutoTooltipLabel();
final ImageView icon = ImageUtil.getImageViewById(ImageUtil.REMOVE_ICON);
final Button removeButton = new Button("", icon);
final AnchorPane pane = new AnchorPane(label, removeButton);
@ -354,7 +355,7 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Activatab
GridPane.setColumnIndex(cryptoCurrenciesListView, 3);
cryptoCurrenciesListView.setMinHeight(2 * Layout.LIST_ROW_HEIGHT + 2);
cryptoCurrenciesListView.setPrefHeight(3 * Layout.LIST_ROW_HEIGHT + 2);
placeholder = new Label(Res.get("setting.preferences.noAltcoins"));
placeholder = new AutoTooltipLabel(Res.get("setting.preferences.noAltcoins"));
placeholder.setWrapText(true);
cryptoCurrenciesListView.setPlaceholder(placeholder);
cryptoCurrenciesListView.setCellFactory(new Callback<ListView<CryptoCurrency>, ListCell<CryptoCurrency>>() {
@ -449,12 +450,12 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Activatab
private void activateGeneralOptions() {
List<BaseCurrencyNetwork> baseCurrencyNetworks = Arrays.asList(BaseCurrencyNetwork.values());
// We don't support DOGE anymore due lack of interest but leave it in the code in case it will get
// We don't support DOGE anymore due lack of interest but leave it in the code in case it will get
// re-activated some day
baseCurrencyNetworks = baseCurrencyNetworks.stream()
.filter(e -> !e.isDoge())
.collect(Collectors.toList());
// show ony mainnet in production version
if (!DevEnv.DEV_MODE)
baseCurrencyNetworks = baseCurrencyNetworks.stream()