本文整理汇总了Java中javafx.scene.control.Separator.setPrefWidth方法的典型用法代码示例。如果您正苦于以下问题:Java Separator.setPrefWidth方法的具体用法?Java Separator.setPrefWidth怎么用?Java Separator.setPrefWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.control.Separator
的用法示例。
在下文中一共展示了Separator.setPrefWidth方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addSeparator
import javafx.scene.control.Separator; //导入方法依赖的package包/类
/**
* Adds a separator on the list of tasks as the next element.
*/
private void addSeparator() {
Separator separator = new Separator();
AnchorPane.setLeftAnchor(separator, 17.0);
AnchorPane.setRightAnchor(separator, 17.0);
separator.setLayoutY(lastLayoutYLists + DISTANCE_BETWEEN_SEPARATOR);
separator.setPrefWidth(200.0);
taskListsAnchorPane.getChildren().add(separator);
lastLayoutYLists += 15;
}
示例2: createSeparator
import javafx.scene.control.Separator; //导入方法依赖的package包/类
public static Separator createSeparator(Orientation orientation, double width, Insets padding)
{
Separator separator = new Separator(orientation);
separator.setPrefWidth(width);
separator.setPadding(padding);
return separator;
}
示例3: addSpaceFiller
import javafx.scene.control.Separator; //导入方法依赖的package包/类
private void addSpaceFiller() {
Label lbl = new Label("{}");
lbl.setFont(Font.font(15));
editorsPane.getChildren().add(lbl);
Separator sep = new Separator(Orientation.HORIZONTAL);
sep.setOpaqueInsets(new Insets(lbl.getHeight() / 2));
sep.setPrefWidth(numEditorsPerRow * tfPrefWidth - lbl.getWidth() - 10);
editorsPane.getChildren().add(sep);
}
示例4: addSeparator
import javafx.scene.control.Separator; //导入方法依赖的package包/类
/**
*
* @param top
* @param left
* @param width
*/
protected void addSeparator(double top, double left, double width) {
Separator separator = new Separator(Orientation.HORIZONTAL);
separator.setPrefWidth(width);
separator.setPrefHeight(1);
container.getChildren().add(separator);
container.setTopAnchor(separator, top);
container.setLeftAnchor(separator, left);
}
示例5: openMenuContent
import javafx.scene.control.Separator; //导入方法依赖的package包/类
private Node openMenuContent() {
VBox openMenu = new VBox(2);
openMenu.setPadding(new Insets(3,3,3,3));
Button saveAsButton = new Button("Save As...");
saveAsButton.setOnAction(this::saveModelAs);
FXUtil.setButtonStackedIcons(saveAsButton, FontAwesomeIcons.SAVE, FontAwesomeIcons.PENCIL);
HBox saveAsHBox = newButtonHBox();
saveAsHBox.getChildren().addAll(saveAsButton, new Label("Save As..."));
Separator hSep = new Separator(Orientation.HORIZONTAL);
hSep.setPrefWidth(170);
importUAIModelButton.setOnAction(this::importUAIModel);
FXUtil.setDefaultButtonIcon(importUAIModelButton, FontAwesomeIcons.PUZZLE_PIECE);
HBox importUAIHBox = newButtonHBox();
importUAIHBox.getChildren().addAll(importUAIModelButton, new Label("Import UAI Model..."));
exportUAIModelButton.setOnAction(this::exportUAIModel);
FXUtil.setDefaultButtonIcon(exportUAIModelButton, FontAwesomeIcons.ARCHIVE);
HBox exportUAIHBox = newButtonHBox();
exportUAIHBox.getChildren().addAll(exportUAIModelButton, new Label("Export to UAI Model..."));
openMenu.getChildren().addAll(
saveAsHBox,
hSep,
importUAIHBox,
exportUAIHBox
);
return openMenu;
}