本文整理匯總了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;
}