本文整理了Java中javafx.scene.control.Button.setAlignment()
方法的一些代码示例,展示了Button.setAlignment()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setAlignment()
方法的具体详情如下:
包路径:javafx.scene.control.Button
类名称:Button
方法名:setAlignment
暂无
代码示例来源: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: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @{inheritedDoc}
*/
@Override
public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) {
this.controller = (AbstractViewController) controller;
backIcon = new Button();
backIcon.setOnAction(e -> goBack());
IconUtils.setHeaderNavigationBack(backIcon);
backIcon.getStyleClass().addAll("ep-headerless-app-header-button", "hand-hover");
backIcon.setDisable(true);
backIcon.setVisible(true);
backIcon.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
backIcon.setAlignment(Pos.CENTER);
getChildren().addAll(backIcon);
getStyleClass().addAll("hand-hover");
//getStyleClass().add("ep-primary-menu-with-navbar-top-toolbar");
//getStyleClass().add("ep-primary-menu-with-navbar-toolbar");
setAlignment(Pos.CENTER);
setMinHeight(54);
addEventFilter(MouseEvent.MOUSE_CLICKED, e->{
});
}
代码示例来源:origin: org.controlsfx/controlsfx
button.setMaxHeight(Double.MAX_VALUE);
button.setMaxWidth(Double.MAX_VALUE);
button.setAlignment(Pos.CENTER_LEFT);
内容来源于网络,如有侵权,请联系作者删除!