Search in sources :

Example 16 with HyperlinkWithIcon

use of io.bitsquare.gui.components.HyperlinkWithIcon in project bitsquare by bitsquare.

the class AboutView method initialize.

public void initialize() {
    TitledGroupBg titledGroupBg = addTitledGroupBg(root, gridRow, 4, "About Bitsquare");
    GridPane.setColumnSpan(titledGroupBg, 2);
    Label label = addLabel(root, gridRow, "Bitsquare is an open source project and a decentralized network of users who want to " + "exchange Bitcoin with national currencies or alternative crypto currencies in a privacy protecting way. " + "Learn more about Bitsquare on our project web page.", Layout.FIRST_ROW_DISTANCE);
    label.setWrapText(true);
    GridPane.setColumnSpan(label, 2);
    GridPane.setHalignment(label, HPos.LEFT);
    HyperlinkWithIcon hyperlinkWithIcon = addHyperlinkWithIcon(root, ++gridRow, "Bitsquare web page", "https://bitsquare.io");
    GridPane.setColumnSpan(hyperlinkWithIcon, 2);
    hyperlinkWithIcon = addHyperlinkWithIcon(root, ++gridRow, "Source code", "https://github.com/bitsquare/bitsquare");
    GridPane.setColumnSpan(hyperlinkWithIcon, 2);
    hyperlinkWithIcon = addHyperlinkWithIcon(root, ++gridRow, "AGPL License", "https://github.com/bitsquare/bitsquare/blob/master/LICENSE");
    GridPane.setColumnSpan(hyperlinkWithIcon, 2);
    titledGroupBg = addTitledGroupBg(root, ++gridRow, 3, "Support Bitsquare", Layout.GROUP_DISTANCE);
    GridPane.setColumnSpan(titledGroupBg, 2);
    label = addLabel(root, gridRow, "Bitsquare is not a company but a community project and open for participation. " + "If you want to participate or support Bitsquare please follow the links below.", Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    label.setWrapText(true);
    GridPane.setColumnSpan(label, 2);
    GridPane.setHalignment(label, HPos.LEFT);
    hyperlinkWithIcon = addHyperlinkWithIcon(root, ++gridRow, "Contribute", "https://bitsquare.io/contribute");
    GridPane.setColumnSpan(hyperlinkWithIcon, 2);
    hyperlinkWithIcon = addHyperlinkWithIcon(root, ++gridRow, "Donate", "https://bitsquare.io/contribute/#donation");
    GridPane.setColumnSpan(hyperlinkWithIcon, 2);
    titledGroupBg = addTitledGroupBg(root, ++gridRow, 3, "Market price API providers", Layout.GROUP_DISTANCE);
    GridPane.setColumnSpan(titledGroupBg, 2);
    label = addLabel(root, gridRow, "Bitsquare uses market price feed providers for displaying the current exchange rate.", Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    label.setWrapText(true);
    GridPane.setColumnSpan(label, 2);
    GridPane.setHalignment(label, HPos.LEFT);
    addLabelHyperlinkWithIcon(root, ++gridRow, "Market price API provider for fiat: ", "BitcoinAverage", "https://bitcoinaverage.com");
    label = addLabel(root, ++gridRow, "Market price API providers for altcoins: Poloniex (http://poloniex.com) / Coinmarketcap (https://coinmarketcap.com) as fallback");
    GridPane.setColumnSpan(label, 2);
    GridPane.setHalignment(label, HPos.LEFT);
    titledGroupBg = addTitledGroupBg(root, ++gridRow, 2, "Version details", Layout.GROUP_DISTANCE);
    GridPane.setColumnSpan(titledGroupBg, 2);
    addLabelTextField(root, gridRow, "Application version:", Version.VERSION, Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    addLabelTextField(root, ++gridRow, "Versions of subsystems:", "Network version: " + Version.P2P_NETWORK_VERSION + "; P2P message version: " + Version.getP2PMessageVersion() + "; Local DB version: " + Version.LOCAL_DB_VERSION + "; Trade protocol version: " + Version.TRADE_PROTOCOL_VERSION);
}
Also used : Label(javafx.scene.control.Label) TitledGroupBg(io.bitsquare.gui.components.TitledGroupBg) HyperlinkWithIcon(io.bitsquare.gui.components.HyperlinkWithIcon)

Example 17 with HyperlinkWithIcon

use of io.bitsquare.gui.components.HyperlinkWithIcon in project bitsquare by bitsquare.

the class OpenOffersView method setOfferIdColumnCellFactory.

private void setOfferIdColumnCellFactory() {
    offerIdColumn.setCellValueFactory((openOfferListItem) -> new ReadOnlyObjectWrapper<>(openOfferListItem.getValue()));
    offerIdColumn.setCellFactory(new Callback<TableColumn<OpenOfferListItem, OpenOfferListItem>, TableCell<OpenOfferListItem, OpenOfferListItem>>() {

        @Override
        public TableCell<OpenOfferListItem, OpenOfferListItem> call(TableColumn<OpenOfferListItem, OpenOfferListItem> column) {
            return new TableCell<OpenOfferListItem, OpenOfferListItem>() {

                private HyperlinkWithIcon field;

                @Override
                public void updateItem(final OpenOfferListItem item, boolean empty) {
                    super.updateItem(item, empty);
                    if (item != null && !empty) {
                        field = new HyperlinkWithIcon(model.getTradeId(item), true);
                        field.setOnAction(event -> offerDetailsWindow.show(item.getOffer()));
                        field.setTooltip(new Tooltip("Open popup for details"));
                        setGraphic(field);
                    } else {
                        setGraphic(null);
                        if (field != null)
                            field.setOnAction(null);
                    }
                }
            };
        }
    });
}
Also used : OpenOffer(io.bitsquare.trade.offer.OpenOffer) WithdrawalView(io.bitsquare.gui.main.funds.withdrawal.WithdrawalView) Popup(io.bitsquare.gui.main.overlays.popups.Popup) MainView(io.bitsquare.gui.main.MainView) javafx.scene.control(javafx.scene.control) Fiat(org.bitcoinj.utils.Fiat) OfferDetailsWindow(io.bitsquare.gui.main.overlays.windows.OfferDetailsWindow) ActivatableViewAndModel(io.bitsquare.gui.common.view.ActivatableViewAndModel) VBox(javafx.scene.layout.VBox) FundsView(io.bitsquare.gui.main.funds.FundsView) FXML(javafx.fxml.FXML) Inject(javax.inject.Inject) Preferences(io.bitsquare.user.Preferences) HyperlinkWithIcon(io.bitsquare.gui.components.HyperlinkWithIcon) ReadOnlyObjectWrapper(javafx.beans.property.ReadOnlyObjectWrapper) Navigation(io.bitsquare.gui.Navigation) ImageView(javafx.scene.image.ImageView) FeePolicy(io.bitsquare.btc.FeePolicy) FxmlView(io.bitsquare.gui.common.view.FxmlView) Callback(javafx.util.Callback) SortedList(javafx.collections.transformation.SortedList) HyperlinkWithIcon(io.bitsquare.gui.components.HyperlinkWithIcon)

Aggregations

HyperlinkWithIcon (io.bitsquare.gui.components.HyperlinkWithIcon)17 FxmlView (io.bitsquare.gui.common.view.FxmlView)14 ReadOnlyObjectWrapper (javafx.beans.property.ReadOnlyObjectWrapper)14 javafx.scene.control (javafx.scene.control)14 Callback (javafx.util.Callback)14 Inject (javax.inject.Inject)14 SortedList (javafx.collections.transformation.SortedList)13 Popup (io.bitsquare.gui.main.overlays.popups.Popup)12 BSFormatter (io.bitsquare.gui.util.BSFormatter)12 FXML (javafx.fxml.FXML)12 VBox (javafx.scene.layout.VBox)12 GUIUtil (io.bitsquare.gui.util.GUIUtil)11 TradeDetailsWindow (io.bitsquare.gui.main.overlays.windows.TradeDetailsWindow)10 ObservableList (javafx.collections.ObservableList)10 AwesomeIcon (de.jensd.fx.fontawesome.AwesomeIcon)9 ActivatableView (io.bitsquare.gui.common.view.ActivatableView)9 OfferDetailsWindow (io.bitsquare.gui.main.overlays.windows.OfferDetailsWindow)9 Trade (io.bitsquare.trade.Trade)9 Tradable (io.bitsquare.trade.Tradable)8 TradeManager (io.bitsquare.trade.TradeManager)8