本文整理了Java中javafx.scene.control.Button.setTextAlignment()
方法的一些代码示例,展示了Button.setTextAlignment()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setTextAlignment()
方法的具体详情如下:
包路径:javafx.scene.control.Button
类名称:Button
方法名:setTextAlignment
暂无
代码示例来源:origin: speedment/speedment
@Override
public Button createNode() {
final Button btn = new Button(text, icon.view());
btn.setTextAlignment(TextAlignment.CENTER);
btn.setAlignment(Pos.CENTER);
btn.setMnemonicParsing(false);
btn.setLayoutX(10);
btn.setLayoutY(10);
btn.setPadding(new Insets(8, 12, 8, 12));
btn.setOnAction(handler);
btn.setTooltip(new Tooltip(tooltip));
return btn;
}
}
代码示例来源:origin: torakiki/pdfsam
public ClosePane(EventHandler<ActionEvent> handler) {
setAlignment(Pos.CENTER_RIGHT);
getStyleClass().addAll(Style.CONTAINER.css());
Button closeButton = new Button(DefaultI18nContext.getInstance().i18n("Close"));
closeButton.getStyleClass().addAll(Style.BUTTON.css());
closeButton.setTextAlignment(TextAlignment.CENTER);
closeButton.setOnAction(ofNullable(handler).orElse(defaultHandler));
getChildren().add(closeButton);
}
}
代码示例来源:origin: torakiki/pdfsam
private HBox buildFooter() {
Button closeButton = new Button(DefaultI18nContext.getInstance().i18n("Close"));
closeButton.getStyleClass().addAll(Style.BUTTON.css());
closeButton.setTextAlignment(TextAlignment.CENTER);
closeButton.setOnAction(e -> eventStudio().broadcast(activeteCurrentModule()));
HBox footer = new HBox(closeButton);
footer.getStyleClass().addAll(Style.CLOSE_FOOTER.css());
return footer;
}
代码示例来源:origin: torakiki/pdfsam
public HidingPane() {
Button closeButton = new Button(DefaultI18nContext.getInstance().i18n("Close"));
closeButton.getStyleClass().addAll(Style.BUTTON.css());
closeButton.setTextAlignment(TextAlignment.CENTER);
closeButton.setOnAction(e -> this.setVisible(false));
HBox bottom = new HBox(closeButton);
bottom.setAlignment(Pos.CENTER_RIGHT);
bottom.getStyleClass().addAll(Style.CONTAINER.css());
super.setBottom(bottom);
}
}
内容来源于网络,如有侵权,请联系作者删除!