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


Java AwesomeDude类代码示例

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


AwesomeDude类属于de.jensd.fx.fontawesome包,在下文中一共展示了AwesomeDude类的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:HashEngineering,项目名称:megacoinj,代码行数:19,代码来源:ClickableBitcoinAddress.java

示例3: createSendButtons

import de.jensd.fx.fontawesome.AwesomeDude; //导入依赖的package包/类
public void createSendButtons(){
  	Label labelSend = AwesomeDude.createIconLabel(AwesomeIcon.SEND, "16");
labelSend.setPadding(new Insets(0,0,0,3));
btnSendTx.setGraphic(labelSend);
btnSendTx.setFont(Font.font(null, FontWeight.NORMAL, 14));
Label labelClear = AwesomeDude.createIconLabel(AwesomeIcon.TRASH_ALT, "18");
labelClear.setPadding(new Insets(0,0,0,3));
btnClearSendPane.setGraphic(labelClear);
btnClearSendPane.setFont(Font.font(null, FontWeight.NORMAL, 14));
txFee.lengthProperty().addListener(new ChangeListener<Number>(){
          @Override
          public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) { 
		if(newValue.longValue() > oldValue.longValue()){
		      char ch = txFee.getText().charAt(oldValue.intValue());  
		      //Check if the new character is the number or other's
			  if(!(ch >= '0' && ch <= '9') && ch != '.'){       
				   //if it's not number then just setText to previous one
				  setFeeTipText(); 
				  return;
			  }
		}
		else
			setFeeTipText();
          }
      });
  }
 
开发者ID:BitcoinAuthenticator,项目名称:Wallet,代码行数:27,代码来源:Controller.java

示例4: newWikiTab

import de.jensd.fx.fontawesome.AwesomeDude; //导入依赖的package包/类
public Tab newWikiTab() {
    final Tab t = new Tab(/*"Wiki"*/);
    AwesomeDude.setIcon(t, AwesomeIcon.TAGS);
    
    t.selectedProperty().addListener(new ChangeListener<Boolean>() {
        boolean firstvisible = true;

        @Override
        public void changed(ObservableValue<? extends Boolean> ov, Boolean b, Boolean t1) {
            if (firstvisible) {                
                t.setContent(new WikiTagger(core, "Self"));
                firstvisible = false;
            }
        }
        
    });
    
    return t;
}
 
开发者ID:automenta,项目名称:netentionj-desktop,代码行数:20,代码来源:NodeControlPane.java

示例5: newSpaceTab

import de.jensd.fx.fontawesome.AwesomeDude; //导入依赖的package包/类
public Tab newSpaceTab() {
    Tab t = new Tab(/*"Space"*/);
    AwesomeDude.setIcon(t, AwesomeIcon.MAP_MARKER);
    
    
    SwingNode swingMap = new SwingNode();
    t.selectedProperty().addListener(new ChangeListener<Boolean>() {
        boolean firstvisible = true;
        @Override
        public void changed(ObservableValue<? extends Boolean> o, Boolean a, Boolean b) {
            if (swingMap.isVisible() && firstvisible) {
                swingMap.setContent(new SwingMap( new GeoPosition(40.00, -80.00)));
                t.setContent(swingMap);
                firstvisible = false;
            }
        }
    });
    return t;
}
 
开发者ID:automenta,项目名称:netentionj-desktop,代码行数:20,代码来源:NodeControlPane.java

示例6: ClickableNuBitsAddress

import de.jensd.fx.fontawesome.AwesomeDude; //导入依赖的package包/类
public ClickableNuBitsAddress() {
    try {
        FXMLLoader loader = new FXMLLoader(getClass().getResource("nubits_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:Cybnate,项目名称:NuBitsj,代码行数:22,代码来源:ClickableNuBitsAddress.java

示例7: 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

示例8: setDisabled

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

示例9: 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

示例10: 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

示例11: 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,代码来源:VotingView.java

示例12: HyperlinkWithIcon

import de.jensd.fx.fontawesome.AwesomeDude; //导入依赖的package包/类
public HyperlinkWithIcon(String text, AwesomeIcon awesomeIcon) {

        super(text);

        Label icon = new Label();
        AwesomeDude.setIcon(icon, awesomeIcon);
        icon.setMinWidth(20);
        icon.setOpacity(0.7);
        icon.getStyleClass().add("hyperlink");

        setGraphic(icon);
        setContentDisplay(ContentDisplay.RIGHT);

        tooltipProperty().addListener((observable, oldValue, newValue) -> newValue.setStyle("-fx-text-fill: -bs-black"));
    }
 
开发者ID:bisq-network,项目名称:exchange,代码行数:16,代码来源:HyperlinkWithIcon.java

示例13: 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

示例14: 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

示例15: TxIdTextField

import de.jensd.fx.fontawesome.AwesomeDude; //导入依赖的package包/类
public TxIdTextField() {
    txConfidenceIndicator = new TxConfidenceIndicator();
    txConfidenceIndicator.setFocusTraversable(false);
    txConfidenceIndicator.setPrefSize(24, 24);
    txConfidenceIndicator.setId("funds-confidence");
    txConfidenceIndicator.setLayoutY(1);
    txConfidenceIndicator.setProgress(0);
    txConfidenceIndicator.setVisible(false);
    AnchorPane.setRightAnchor(txConfidenceIndicator, 0.0);
    progressIndicatorTooltip = new Tooltip("-");
    txConfidenceIndicator.setTooltip(progressIndicatorTooltip);

    copyIcon = new Label();
    copyIcon.setLayoutY(3);
    copyIcon.getStyleClass().addAll("icon", "highlight");
    copyIcon.setTooltip(new Tooltip(Res.get("txIdTextField.copyIcon.tooltip")));
    AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY);
    AnchorPane.setRightAnchor(copyIcon, 30.0);

    Tooltip tooltip = new Tooltip(Res.get("txIdTextField.blockExplorerIcon.tooltip"));

    blockExplorerIcon = new Label();
    blockExplorerIcon.getStyleClass().addAll("icon", "highlight");
    blockExplorerIcon.setTooltip(tooltip);
    AwesomeDude.setIcon(blockExplorerIcon, AwesomeIcon.EXTERNAL_LINK);
    blockExplorerIcon.setMinWidth(20);
    AnchorPane.setRightAnchor(blockExplorerIcon, 52.0);
    AnchorPane.setTopAnchor(blockExplorerIcon, 4.0);

    textField = new TextField();
    textField.setId("address-text-field");
    textField.setEditable(false);
    textField.setTooltip(tooltip);
    AnchorPane.setRightAnchor(textField, 80.0);
    AnchorPane.setLeftAnchor(textField, 0.0);
    textField.focusTraversableProperty().set(focusTraversableProperty().get());
    getChildren().addAll(textField, copyIcon, blockExplorerIcon, txConfidenceIndicator);
}
 
开发者ID:bisq-network,项目名称:exchange,代码行数:39,代码来源:TxIdTextField.java


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