当前位置: 首页>>代码示例>>Java>>正文


Java AwesomeDude.setIcon方法代码示例

本文整理汇总了Java中de.jensd.fx.fontawesome.AwesomeDude.setIcon方法的典型用法代码示例。如果您正苦于以下问题:Java AwesomeDude.setIcon方法的具体用法?Java AwesomeDude.setIcon怎么用?Java AwesomeDude.setIcon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在de.jensd.fx.fontawesome.AwesomeDude的用法示例。


在下文中一共展示了AwesomeDude.setIcon方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ClickableBitcoinAddress

import de.jensd.fx.fontawesome.AwesomeDude; //导入方法依赖的package包/类
public ClickableBitcoinAddress() {
    try {
        FXMLLoader loader = new FXMLLoader(getClass().getResource("bitcoin_address.fxml"));
        loader.setRoot(this);
        loader.setController(this);
        // The following line is supposed to help Scene Builder, although it doesn't seem to be needed for me.
        loader.setClassLoader(getClass().getClassLoader());
        loader.load();

        AwesomeDude.setIcon(copyWidget, AwesomeIcon.COPY);
        Tooltip.install(copyWidget, new Tooltip("Copy address to clipboard"));

        AwesomeDude.setIcon(qrCode, AwesomeIcon.QRCODE);
        Tooltip.install(qrCode, new Tooltip("Show a barcode scannable with a mobile phone for this address"));

        addressStr = convert(address);
        addressLabel.textProperty().bind(addressStr);
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
}
 
开发者ID:creativechain,项目名称:creacoinj,代码行数:22,代码来源:ClickableBitcoinAddress.java

示例2: ClickableBitcoinAddress

import de.jensd.fx.fontawesome.AwesomeDude; //导入方法依赖的package包/类
public ClickableBitcoinAddress() {
    try {
        FXMLLoader loader = new FXMLLoader(getClass().getResource("bitcoin_address.fxml"));
        loader.setRoot(this);
        loader.setController(this);
        // The following line is supposed to help Scene Builder, although it doesn't seem to be needed for me.
        loader.setClassLoader(getClass().getClassLoader());
        loader.load();

        AwesomeDude.setIcon(copyWidget, AwesomeIcon.COPY);
        Tooltip.install(copyWidget, new Tooltip("Copy address to clipboard"));

        AwesomeDude.setIcon(qrCode, AwesomeIcon.QRCODE);
        Tooltip.install(qrCode, new Tooltip("Show a barcode scannable with a mobile phone for this address"));
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
}
 
开发者ID:keremhd,项目名称:mintcoinj,代码行数:19,代码来源:ClickableBitcoinAddress.java

示例3: requestPassphrase

import de.jensd.fx.fontawesome.AwesomeDude; //导入方法依赖的package包/类
public static String requestPassphrase()
{
	try
	{
		Stage dialogStage = new Stage ();
		dialogStage.setTitle ("BTC-1K");
		dialogStage.initModality (Modality.APPLICATION_MODAL);

		SignTransactionDialog dialog = new SignTransactionDialog (dialogStage);
		FXMLLoader loader = new FXMLLoader (SignTransactionDialog.class.getResource ("SignTransactionDialog.fxml"));
		loader.setController (dialog);
		loader.setRoot (dialog);
		loader.load ();

		AwesomeDude.setIcon (dialog.logoLabel, AwesomeIcon.KEY, "60");

		dialogStage.setScene (new Scene (dialog));
		dialogStage.showAndWait ();

		return dialog.passphrase.getText ();
	}
	catch (IOException e)
	{
		throw new RuntimeException (e);
	}
}
 
开发者ID:bitsofproof,项目名称:btc1k,代码行数:27,代码来源:SignTransactionDialog.java

示例4: setActive

import de.jensd.fx.fontawesome.AwesomeDude; //导入方法依赖的package包/类
public void setActive() {
    setId("trade-wizard-item-background-active");
    Label icon = new Label();
    icon.setPadding(new Insets(-3, 6, 0, 0));
    icon.setTextFill(Colors.BLUE);
    AwesomeDude.setIcon(icon, AwesomeIcon.ARROW_RIGHT);
    setGraphic(icon);
}
 
开发者ID:bisq-network,项目名称:exchange,代码行数:9,代码来源:TradeWizardItem.java

示例5: setCompleted

import de.jensd.fx.fontawesome.AwesomeDude; //导入方法依赖的package包/类
public void setCompleted() {
    setId("trade-wizard-item-background-completed");
    Label icon = new Label();
    icon.setPadding(new Insets(-3, 6, 0, 0));
    icon.setTextFill(Colors.GREEN);
    AwesomeDude.setIcon(icon, AwesomeIcon.OK);
    setGraphic(icon);
}
 
开发者ID:bisq-network,项目名称:exchange,代码行数:9,代码来源:TradeWizardItem.java

示例6: newIndexTab

import de.jensd.fx.fontawesome.AwesomeDude; //导入方法依赖的package包/类
public Tab newIndexTab() {
    Tab t = new Tab(/*"Index"*/);
    AwesomeDude.setIcon(t, AwesomeIcon.LIST);
    t.setContent(new IndexTreePane(core, new TaggerPane.TagReceiver() {

        @Override
        public void onTagSelected(String s) {
            NetentionJFX.popupObjectView(core, core.data.get(s));
        }
    }));
    return t;
}
 
开发者ID:automenta,项目名称:netentionj-desktop,代码行数:13,代码来源:NodeControlPane.java

示例7: MenuItem

import de.jensd.fx.fontawesome.AwesomeDude; //导入方法依赖的package包/类
MenuItem(Navigation navigation, ToggleGroup toggleGroup, String title, Class<? extends View> viewClass, AwesomeIcon awesomeIcon) {
    this.navigation = navigation;
    this.viewClass = viewClass;

    setToggleGroup(toggleGroup);
    setText(title);
    setId("account-settings-item-background-active");
    setPrefHeight(40);
    setPrefWidth(240);
    setAlignment(Pos.CENTER_LEFT);

    Label icon = new Label();
    AwesomeDude.setIcon(icon, awesomeIcon);
    icon.setTextFill(Paint.valueOf("#333"));
    icon.setPadding(new Insets(0, 5, 0, 0));
    icon.setAlignment(Pos.CENTER);
    icon.setMinWidth(25);
    icon.setMaxWidth(25);
    setGraphic(icon);

    selectedPropertyChangeListener = (ov, oldValue, newValue) -> {
        if (newValue) {
            setId("account-settings-item-background-selected");
            icon.setTextFill(Colors.BLUE);
        } else {
            setId("account-settings-item-background-active");
            icon.setTextFill(Paint.valueOf("#333"));
        }
    };

    disablePropertyChangeListener = (ov, oldValue, newValue) -> {
        if (newValue) {
            setId("account-settings-item-background-disabled");
            icon.setTextFill(Paint.valueOf("#ccc"));
        } else {
            setId("account-settings-item-background-active");
            icon.setTextFill(Paint.valueOf("#333"));
        }
    };
}
 
开发者ID:bisq-network,项目名称:exchange,代码行数:41,代码来源:AccountSettingsView.java

示例8: TextFieldWithCopyIcon

import de.jensd.fx.fontawesome.AwesomeDude; //导入方法依赖的package包/类
public TextFieldWithCopyIcon() {
    Label copyIcon = new Label();
    copyIcon.setLayoutY(3);
    copyIcon.getStyleClass().addAll("icon", "highlight");
    copyIcon.setTooltip(new Tooltip(Res.get("shared.copyToClipboard")));
    AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY);
    copyIcon.setOnMouseClicked(e -> {
        String text = getText();
        if (text != null && text.length() > 0) {
            String copyText;
            if (copyWithoutCurrencyPostFix) {
                String[] strings = text.split(" ");
                if (strings.length > 1)
                    copyText = strings[0]; // exclude the BTC postfix
                else
                    copyText = text;
            } else {
                copyText = text;
            }
            Utilities.copyToClipboard(copyText);
        }
    });
    textField = new TextField();
    textField.setEditable(false);
    textField.textProperty().bindBidirectional(text);
    AnchorPane.setRightAnchor(copyIcon, 5.0);
    AnchorPane.setRightAnchor(textField, 30.0);
    AnchorPane.setLeftAnchor(textField, 0.0);
    textField.focusTraversableProperty().set(focusTraversableProperty().get());
    //TODO app wide focus
    //focusedProperty().addListener((ov, oldValue, newValue) -> textField.requestFocus());

    getChildren().addAll(textField, copyIcon);
}
 
开发者ID:bisq-network,项目名称:exchange,代码行数:35,代码来源:TextFieldWithCopyIcon.java

示例9: AddressWithIconAndDirection

import de.jensd.fx.fontawesome.AwesomeDude; //导入方法依赖的package包/类
public AddressWithIconAndDirection(String text, String address, AwesomeIcon awesomeIcon, boolean received) {
    Label directionIcon = new Label();
    directionIcon.setLayoutY(3);
    directionIcon.getStyleClass().add("icon");
    directionIcon.getStyleClass().add(received ? "received-funds-icon" : "sent-funds-icon");
    AwesomeDude.setIcon(directionIcon, received ? AwesomeIcon.SIGNIN : AwesomeIcon.SIGNOUT);
    if (received)
        directionIcon.setRotate(180);
    directionIcon.setMouseTransparent(true);

    HBox hBox = new HBox();
    hBox.setSpacing(-1);
    Label label = new AutoTooltipLabel(text);
    label.setMouseTransparent(true);
    HBox.setMargin(label, new Insets(8, 0, 0, 0));
    HBox.setHgrow(label, Priority.ALWAYS);

    hyperlink = new HyperlinkWithIcon(address, awesomeIcon);
    HBox.setMargin(hyperlink, new Insets(0, 0, 0, 0));
    HBox.setHgrow(hyperlink, Priority.SOMETIMES);
    // You need to set max width to Double.MAX_VALUE to make HBox.setHgrow working like expected!
    // also pref width needs to be not default (-1)
    hyperlink.setMaxWidth(Double.MAX_VALUE);
    hyperlink.setPrefWidth(0);

    hBox.getChildren().addAll(label, hyperlink);

    AnchorPane.setLeftAnchor(directionIcon, 3.0);
    AnchorPane.setTopAnchor(directionIcon, 6.0);
    AnchorPane.setLeftAnchor(hBox, 22.0);
    AnchorPane.setRightAnchor(hBox, 15.0);
    getChildren().addAll(directionIcon, hBox);
}
 
开发者ID:bisq-network,项目名称:exchange,代码行数:34,代码来源:AddressWithIconAndDirection.java

示例10: start

import de.jensd.fx.fontawesome.AwesomeDude; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) {
    Pane root = new FlowPane();
    List<AwesomeIcon> values = new ArrayList<>(Arrays.asList(AwesomeIcon.values()));
    values.sort((o1, o2) -> o1.name().compareTo(o2.name()));
    for (AwesomeIcon icon : values) {
        Label label = new AutoTooltipLabel();
        Button button = new AutoTooltipButton(icon.name(), label);
        AwesomeDude.setIcon(label, icon);
        root.getChildren().add(button);
    }

    primaryStage.setScene(new Scene(root, 900, 850));
    primaryStage.show();
}
 
开发者ID:bisq-network,项目名称:exchange,代码行数:16,代码来源:AwesomeFontDemo.java

示例11: newTimeTab

import de.jensd.fx.fontawesome.AwesomeDude; //导入方法依赖的package包/类
public Tab newTimeTab() {
    Tab tab = new Tab(/*"Time"*/);
    AwesomeDude.setIcon(tab, AwesomeIcon.CLOCK_ALT);
    tab.setContent(new TimePanel());
            
    return tab;
}
 
开发者ID:automenta,项目名称:netentionj-desktop,代码行数:8,代码来源:NodeControlPane.java

示例12: initialize

import de.jensd.fx.fontawesome.AwesomeDude; //导入方法依赖的package包/类
public void initialize ()
{
	messageLabel.textProperty ().bind (Bindings.selectString (App.instance.restClient.currentTaskProperty (), "title"));
	AwesomeDude.setIcon (refreshButton, AwesomeIcon.REFRESH);
	refreshButton.setTooltip (new Tooltip ("Refresh transaction list"));

	toolsPane.getSelectionModel ().selectedItemProperty ().addListener (new ChangeListener<Tab> ()
	{
		@Override
		public void changed (ObservableValue<? extends Tab> v, Tab oldTab, Tab currentTab)
		{
			if ( "keygenTab".equals (oldTab.getId ()) )
			{
				clearKeyData ();
			}
		}
	});

	validateTextField (targetAddress, address, addressConverter ());
	validateTextField (amount, btc, adapter (new BigDecimalStringConverter ()));

	sendButton.disableProperty ().bind (new BooleanBinding ()
	{
		{
			bind (address, btc);
		}

		@Override
		protected boolean computeValue ()
		{
			return (address.get () == null || address.get ().isLeft () || btc.get () == null || btc.get ().isLeft ());
		}
	});

	refreshTransactionList ();
}
 
开发者ID:bitsofproof,项目名称:btc1k,代码行数:37,代码来源:MainController.java

示例13: showError

import de.jensd.fx.fontawesome.AwesomeDude; //导入方法依赖的package包/类
public static void showError (Exception e)
{
	try
	{
		Stage dialogStage = new Stage ();
		dialogStage.setTitle ("BTC-1K");
		dialogStage.initModality (Modality.APPLICATION_MODAL);

		ErrorDialog dialog = new ErrorDialog (dialogStage);

		FXMLLoader loader = new FXMLLoader (SignTransactionDialog.class.getResource ("ErrorDialog.fxml"));
		loader.setController (dialog);
		loader.setRoot (dialog);
		loader.load ();


		dialog.messageLabel.setText (e.getMessage ());

		AwesomeDude.setIcon (dialog.logoLabel, AwesomeIcon.WARNING, "60");

		dialogStage.setScene (new Scene (dialog));
		dialogStage.showAndWait ();
	}
	catch (Exception e1)
	{
		throw new IllegalStateException (e1);
	}
}
 
开发者ID:bitsofproof,项目名称:btc1k,代码行数:29,代码来源:ErrorDialog.java

示例14: MenuItem

import de.jensd.fx.fontawesome.AwesomeDude; //导入方法依赖的package包/类
MenuItem(Navigation navigation, ToggleGroup toggleGroup, String title, Class<? extends View> viewClass, AwesomeIcon awesomeIcon) {
    this.navigation = navigation;
    this.viewClass = viewClass;

    setToggleGroup(toggleGroup);
    setText(title);
    setId("account-settings-item-background-active");
    setPrefHeight(40);
    setPrefWidth(240);
    setAlignment(Pos.CENTER_LEFT);

    Label icon = new Label();
    AwesomeDude.setIcon(icon, awesomeIcon);
    if (viewClass == BsqReceiveView.class) {
        icon.setRotate(180);
        icon.setPadding(new Insets(0, 0, 0, 5));
    } else {
        icon.setPadding(new Insets(0, 5, 0, 0));
    }
    icon.setTextFill(Paint.valueOf("#333"));
    icon.setAlignment(Pos.CENTER);
    icon.setMinWidth(25);
    icon.setMaxWidth(25);
    setGraphic(icon);

    selectedPropertyChangeListener = (ov, oldValue, newValue) -> {
        if (newValue) {
            setId("account-settings-item-background-selected");
            icon.setTextFill(Colors.BLUE);
        } else {
            setId("account-settings-item-background-active");
            icon.setTextFill(Paint.valueOf("#333"));
        }
    };

    disablePropertyChangeListener = (ov, oldValue, newValue) -> {
        if (newValue) {
            setId("account-settings-item-background-disabled");
            icon.setTextFill(Paint.valueOf("#ccc"));
        } else {
            setId("account-settings-item-background-active");
            icon.setTextFill(Paint.valueOf("#333"));
        }
    };
}
 
开发者ID:bisq-network,项目名称:exchange,代码行数:46,代码来源:BsqWalletView.java

示例15: BsqAddressTextField

import de.jensd.fx.fontawesome.AwesomeDude; //导入方法依赖的package包/类
public BsqAddressTextField() {
    TextField textField = new TextField();
    textField.setId("address-text-field");
    textField.setEditable(false);
    textField.textProperty().bind(address);
    String tooltipText = Res.get("addressTextField.copyToClipboard");
    textField.setTooltip(new Tooltip(tooltipText));

    textField.setOnMousePressed(event -> wasPrimaryButtonDown = event.isPrimaryButtonDown());
    textField.setOnMouseReleased(event -> {
        if (wasPrimaryButtonDown && address.get() != null && address.get().length() > 0) {
            Utilities.copyToClipboard(address.get());
            Notification walletFundedNotification = new Notification()
                    .notification(Res.get("addressTextField.addressCopiedToClipboard"))
                    .hideCloseButton()
                    .autoClose();

            walletFundedNotification.show();
        }

        wasPrimaryButtonDown = false;
    });

    textField.focusTraversableProperty().set(focusTraversableProperty().get());
    //TODO app wide focus
    //focusedProperty().addListener((ov, oldValue, newValue) -> textField.requestFocus());


    Label copyIcon = new Label();
    copyIcon.setLayoutY(3);
    copyIcon.getStyleClass().addAll("icon", "highlight");
    copyIcon.setTooltip(new Tooltip(Res.get("addressTextField.copyToClipboard")));
    AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY);
    copyIcon.setOnMouseClicked(e -> GUIUtil.showFeeInfoBeforeExecute(() -> {
        if (address.get() != null && address.get().length() > 0)
            Utilities.copyToClipboard(address.get());
    }));

    AnchorPane.setRightAnchor(copyIcon, 5.0);
    AnchorPane.setRightAnchor(textField, 30.0);
    AnchorPane.setLeftAnchor(textField, 0.0);

    getChildren().addAll(textField, copyIcon);
}
 
开发者ID:bisq-network,项目名称:exchange,代码行数:45,代码来源:BsqAddressTextField.java


注:本文中的de.jensd.fx.fontawesome.AwesomeDude.setIcon方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。