本文整理汇总了Java中de.jensd.fx.fontawesome.AwesomeIcon类的典型用法代码示例。如果您正苦于以下问题:Java AwesomeIcon类的具体用法?Java AwesomeIcon怎么用?Java AwesomeIcon使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AwesomeIcon类属于de.jensd.fx.fontawesome包,在下文中一共展示了AwesomeIcon类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ClickableBitcoinAddress
import de.jensd.fx.fontawesome.AwesomeIcon; //导入依赖的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);
}
}
示例2: initialize
import de.jensd.fx.fontawesome.AwesomeIcon; //导入依赖的package包/类
@Override
public void initialize() {
listener = viewPath -> {
if (viewPath.size() != 4 || viewPath.indexOf(VotingView.class) != 2)
return;
selectedViewClass = viewPath.tip();
loadView(selectedViewClass);
};
ToggleGroup toggleGroup = new ToggleGroup();
dashboard = new MenuItem(navigation, toggleGroup, Res.get("shared.dashboard"), VotingDashboardView.class, AwesomeIcon.DASHBOARD);
vote = new MenuItem(navigation, toggleGroup, Res.get("share.vote"), VoteView.class, AwesomeIcon.EDIT);
history = new MenuItem(navigation, toggleGroup, Res.get("share.history"), VotingHistoryView.class, AwesomeIcon.TABLE);
leftVBox.getChildren().addAll(dashboard, vote, history);
}
示例3: initialize
import de.jensd.fx.fontawesome.AwesomeIcon; //导入依赖的package包/类
@Override
public void initialize() {
listener = viewPath -> {
if (viewPath.size() != 4 || viewPath.indexOf(CompensationView.class) != 2)
return;
selectedViewClass = viewPath.tip();
loadView(selectedViewClass);
};
ToggleGroup toggleGroup = new ToggleGroup();
create = new MenuItem(navigation, toggleGroup, Res.get("dao.compensation.menuItem.createRequest"), CreateCompensationRequestView.class, AwesomeIcon.EDIT);
active = new MenuItem(navigation, toggleGroup, Res.get("dao.compensation.menuItem.activeRequests"), ActiveCompensationRequestView.class, AwesomeIcon.ARROW_RIGHT);
past = new MenuItem(navigation, toggleGroup, Res.get("dao.compensation.menuItem.pastRequests"), PastCompensationRequestView.class, AwesomeIcon.LIST);
leftVBox.getChildren().addAll(create, active, past);
}
示例4: initialize
import de.jensd.fx.fontawesome.AwesomeIcon; //导入依赖的package包/类
@Override
public void initialize() {
listener = viewPath -> {
if (viewPath.size() != 4 || viewPath.indexOf(BsqWalletView.class) != 2)
return;
selectedViewClass = viewPath.tip();
loadView(selectedViewClass);
};
ToggleGroup toggleGroup = new ToggleGroup();
dashboard = new MenuItem(navigation, toggleGroup, Res.get("shared.dashboard"), BsqDashboardView.class, AwesomeIcon.DASHBOARD);
send = new MenuItem(navigation, toggleGroup, Res.get("dao.wallet.menuItem.send"), BsqSendView.class, AwesomeIcon.SIGNOUT);
receive = new MenuItem(navigation, toggleGroup, Res.get("dao.wallet.menuItem.receive"), BsqReceiveView.class, AwesomeIcon.SIGNIN);
transactions = new MenuItem(navigation, toggleGroup, Res.get("dao.wallet.menuItem.transactions"), BsqTxView.class, AwesomeIcon.TABLE);
leftVBox.getChildren().addAll(dashboard, send, receive, transactions);
// TODO just until DAO is enabled
if (!BisqEnvironment.isDAOActivatedAndBaseCurrencySupportingBsq()) {
dashboard.setDisable(true);
send.setDisable(true);
transactions.setDisable(true);
}
}
示例5: initialize
import de.jensd.fx.fontawesome.AwesomeIcon; //导入依赖的package包/类
@Override
public void initialize() {
listener = viewPath -> {
if (viewPath.size() != 4 || viewPath.indexOf(AccountSettingsView.class) != 2)
return;
selectedViewClass = viewPath.tip();
loadView(selectedViewClass);
};
ToggleGroup toggleGroup = new ToggleGroup();
paymentAccount = new MenuItem(navigation, toggleGroup, Res.get("account.menu.paymentAccount"), FiatAccountsView.class, AwesomeIcon.MONEY);
altCoinsAccountView = new MenuItem(navigation, toggleGroup, Res.get("account.menu.altCoinsAccountView"), AltCoinAccountsView.class, AwesomeIcon.LINK);
arbitratorSelection = new MenuItem(navigation, toggleGroup, Res.get("account.menu.arbitratorSelection"),
ArbitratorSelectionView.class, AwesomeIcon.USER_MD);
password = new MenuItem(navigation, toggleGroup, Res.get("account.menu.password"), PasswordView.class, AwesomeIcon.UNLOCK_ALT);
seedWords = new MenuItem(navigation, toggleGroup, Res.get("account.menu.seedWords"), SeedWordsView.class, AwesomeIcon.KEY);
backup = new MenuItem(navigation, toggleGroup, Res.get("account.menu.backup"), BackupView.class, AwesomeIcon.CLOUD_DOWNLOAD);
leftVBox.getChildren().addAll(paymentAccount, altCoinsAccountView, arbitratorSelection, password, seedWords, backup);
}
示例6: addLabelHyperlinkWithIcon
import de.jensd.fx.fontawesome.AwesomeIcon; //导入依赖的package包/类
public static Tuple2<Label, HyperlinkWithIcon> addLabelHyperlinkWithIcon(GridPane gridPane,
int rowIndex,
String labelTitle,
String title,
String url,
double top) {
Label label = addLabel(gridPane, rowIndex, labelTitle, top);
HyperlinkWithIcon hyperlinkWithIcon = new HyperlinkWithIcon(title, AwesomeIcon.EXTERNAL_LINK);
hyperlinkWithIcon.setOnAction(e -> GUIUtil.openWebPage(url));
GridPane.setRowIndex(hyperlinkWithIcon, rowIndex);
GridPane.setColumnIndex(hyperlinkWithIcon, 1);
GridPane.setMargin(hyperlinkWithIcon, new Insets(top, 0, 0, -4));
gridPane.getChildren().add(hyperlinkWithIcon);
return new Tuple2<>(label, hyperlinkWithIcon);
}
示例7: ClickableBitcoinAddress
import de.jensd.fx.fontawesome.AwesomeIcon; //导入依赖的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);
}
}
示例8: createSendButtons
import de.jensd.fx.fontawesome.AwesomeIcon; //导入依赖的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();
}
});
}
示例9: newWikiTab
import de.jensd.fx.fontawesome.AwesomeIcon; //导入依赖的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;
}
示例10: newSpaceTab
import de.jensd.fx.fontawesome.AwesomeIcon; //导入依赖的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;
}
示例11: crashReportsGraphic
import de.jensd.fx.fontawesome.AwesomeIcon; //导入依赖的package包/类
private Parent crashReportsGraphic() {
FAIcon icon;
icon = FAIcon.create().icon(AwesomeIcon.WARNING);
icon.setPadding(new Insets(0, 5, 0, 5));
Label reportCountLabel;
reportCountLabel = new Label("122");
reportCountLabel.setStyle("-fx-background-color:red; -fx-font-size:9; -fx-padding: 0 2 0 2; -fx-opacity:0.7");
reportCountLabel.setTextFill(Color.WHITE);
reportCountLabel.setText(unreadCrashReportsProperty.getValue().toString());
unreadCrashReportsProperty.addListener((o, oldv, newv) -> { reportCountLabel.setText(newv.toString()); });
reportCountLabel.visibleProperty().bind(unreadCrashReportsProperty.greaterThan(0));
StackPane stackPane = new StackPane(icon, reportCountLabel);
StackPane.setAlignment(reportCountLabel, Pos.TOP_RIGHT);
return stackPane;
}
示例12: updateExportIcon
import de.jensd.fx.fontawesome.AwesomeIcon; //导入依赖的package包/类
private void updateExportIcon(ModFunc item) {
AwesomeIcon icon;
String tooltipText;
if(item.isModule()) {
tooltipText = "Module";
icon = AwesomeIcon.CUBE;
}
else if(item.isExported()) {
tooltipText = "Exported function";
icon = AwesomeIcon.UNLOCK_ALT;
}
else {
tooltipText = "Unexported function";
icon = AwesomeIcon.LOCK;
}
exportToolTipText.set(tooltipText);
exportIconText.set(icon.toString());
}
示例13: ClickableNuBitsAddress
import de.jensd.fx.fontawesome.AwesomeIcon; //导入依赖的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);
}
}
示例14: requestPassphrase
import de.jensd.fx.fontawesome.AwesomeIcon; //导入依赖的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);
}
}
示例15: setDisabled
import de.jensd.fx.fontawesome.AwesomeIcon; //导入依赖的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);
}