本文整理汇总了Java中javafx.scene.control.Separator类的典型用法代码示例。如果您正苦于以下问题:Java Separator类的具体用法?Java Separator怎么用?Java Separator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Separator类属于javafx.scene.control包,在下文中一共展示了Separator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initComponents
import javafx.scene.control.Separator; //导入依赖的package包/类
private void initComponents(boolean selectable) {
initVerticalButtonBar();
pane = new ScrollPane();
HBox.setHgrow(pane, Priority.ALWAYS);
setCenter(pane);
if (selectable) {
setRight(verticalButtonBar);
verticalButtonBar.setStyle("-fx-padding: 5px");
verticalButtonBar.setDisable(true);
}
VBox titleBox = new VBox();
Label titleLabel = new Label("Editing CheckList", FXUIUtils.getIcon("newCheckList"));
titleLabel.getStyleClass().add("modaldialog-title");
titleBox.getChildren().add(titleLabel);
titleBox.getChildren().add(new Separator());
setTop(titleBox);
}
示例2: createControl
import javafx.scene.control.Separator; //导入依赖的package包/类
@Override
protected Node createControl() {
RecurrenceView view = new RecurrenceView();
Label label = new Label("Rule: " + view.getRecurrenceRule());
label.setMaxWidth(300);
label.setWrapText(true);
view.recurrenceRuleProperty().addListener(it -> label.setText(view.getRecurrenceRule()));
Separator separator = new Separator(Orientation.HORIZONTAL);
VBox box = new VBox(20);
box.setFillWidth(true);
box.getChildren().addAll(view, separator, label);
box.setAlignment(Pos.CENTER);
return box;
}
示例3: FormDialog
import javafx.scene.control.Separator; //导入依赖的package包/类
public FormDialog(Stage owner) {
VBox root = new VBox(10);
root.setPadding(new Insets(10));
root.getChildren().addAll(
getContentPane(),
new Separator(Orientation.HORIZONTAL),
getButtonsPane()
);
root.getStylesheets().add("css/style.css");
root.setMinWidth(200);
root.setMinHeight(100);
setScene(new Scene(root));
if (owner != null) {
this.initModality(Modality.WINDOW_MODAL);
this.initOwner(owner);
}
Icons.Logo.setToStage(this);
okButton.setOnAction(this::okButtonClicked);
cancelButton.setOnAction(this::cancelButtonClicked);
this.setOnCloseRequest(this::closeButtonClicked);
}
示例4: initBar
import javafx.scene.control.Separator; //导入依赖的package包/类
private void initBar() {
length.textProperty().bind(map(getCodeAreaValue(c -> c.textProperty()), t -> t.length()));
lines.textProperty().bind(map(getCodeAreaValue(c -> c.textProperty()), t -> StringUtil.countLine(t)));
caretLine.textProperty().bind(
map(getCodeAreaValue(c -> c.caretPositionProperty()), t -> StringUtil.countLine(area.getValue().getText().substring(0, t))));
caretColumn.textProperty().bind(map(getCodeAreaValue(c -> c.caretColumnProperty()), t -> t));
select.textProperty().bind(mapString(getCodeAreaValue(c -> c.selectedTextProperty()), t -> t.length() + " | " + StringUtil.countLine(t)));
charset.textProperty().bind(mapString(Options.charset.property(), t -> t.toString()));
inputType.textProperty().bind(Bindings.when(yep(overrideProperty)).then("Override").otherwise("Insert"));
bar.getRightItems().addAll(
margin(new Text("lines"), 0, 5), minWidth(lines, 60),
margin(new Text("length"), 0, 5), minWidth(length, 70),
new Separator(Orientation.VERTICAL),
margin(new Text("Col"), 0, 5), minWidth(caretColumn, 60),
margin(new Text("Line"), 0, 5), minWidth(caretLine, 60),
new Separator(Orientation.VERTICAL),
margin(new Text("Sel"), 0, 5), minWidth(select, 90),
new Separator(Orientation.VERTICAL),
minWidth(charset, 60),
new Separator(Orientation.VERTICAL),
minWidth(inputType, 60),
new Separator(Orientation.VERTICAL)
);
}
示例5: HistoryListPopup
import javafx.scene.control.Separator; //导入依赖的package包/类
public HistoryListPopup(@Nullable String popupTitle, @NotNull HistoryListProvider provider) {
super(ArmaDialogCreator.getPrimaryStage(), new VBox(5), popupTitle);
this.provider = provider;
myRootElement.setPadding(new Insets(10));
final ScrollPane scrollPane = new ScrollPane(stackPaneWrapper);
VBox.setVgrow(scrollPane, Priority.ALWAYS);
scrollPane.setFitToHeight(true);
scrollPane.setFitToWidth(true);
scrollPane.setStyle("-fx-background-color:transparent");
myRootElement.getChildren().addAll(scrollPane, new Separator(Orientation.HORIZONTAL), getBoundResponseFooter(false, true, false));
gridPaneContent.setVgap(15);
gridPaneContent.setHgap(5);
ColumnConstraints constraints = new ColumnConstraints(-1, -1, Double.MAX_VALUE, Priority.ALWAYS, HPos.CENTER, true);
gridPaneContent.getColumnConstraints().addAll(constraints, constraints);
myStage.setMinWidth(320);
myStage.setMinHeight(320);
myStage.setWidth(480);
stackPaneWrapper.setPrefHeight(320);
fillContent();
}
示例6: createRightPane
import javafx.scene.control.Separator; //导入依赖的package包/类
private Parent createRightPane() {
HBox hbox = new HBox(10);
VBox lbox = new VBox(10);
lbox.getChildren().addAll(targetControlPane, new Separator(), new Text("Target control type:"),
createControlCombo(targetControlPane, false), new Text("Target transfer modes:"), createTMSelect(targetModes));
VBox rbox = new VBox(10);
rbox.getChildren().addAll(new Text("Data formats:"), createFormatSelect(targetFormats),
ButtonBuilder.create().text("paste from clipboard").id(ID_FROM_CLIPBOARD_BUTTON).onAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent t) {
getDataFromClipboard(Clipboard.getSystemClipboard());
}
}).build());
VBox content = new VBox(10);
content.getChildren().addAll(new Text("Transfered content:"), transferedContentPane);
hbox.getChildren().addAll(lbox, new Separator(Orientation.VERTICAL), rbox,
new Separator(Orientation.VERTICAL), content);
if (parameters.size() > 0) {
hbox.setStyle("-fx-background-color: " + parameters.get(0) + ";");
}
return hbox;
}
示例7: drawNode
import javafx.scene.control.Separator; //导入依赖的package包/类
@Override
public Node drawNode() {
HBox root = new HBox();
root.setSpacing(spacing);
for (HPos pos : HPos.values()) {
Separator separator = getSeparator();
separator.setHalignment(pos);
if (separator.getHalignment() != pos) {
reportGetterFailure("separator.setHalignment()");
}
VBox box = new VBox();
box.getChildren().addAll(new Label("[" + pos.name() + "]"), separator);
root.getChildren().add(box);
}
return root;
}
示例8: SimpleConfigurationTitle
import javafx.scene.control.Separator; //导入依赖的package包/类
/**
* Constructs a new {@link SimpleConfigurationTitle}.
* @param title the {@link String} title.
* @param description the {@link String} description.
* @param styling the {@link JavaFxStyle} to use.
*/
SimpleConfigurationTitle( String title, String description, JavaFxStyle styling ) {
if ( title == null ) {
throw new IllegalArgumentException( "Title string must not be null." );
}
this.title = title;
this.description = description;
Label titleLabel = styling.createBoldLabel( title );
titleLabel.setAlignment( Pos.CENTER_LEFT );
getChildren().add( titleLabel );
if ( description != null ) {
Label descriptionLabel = styling.createWrappedTextLabel( description );
getChildren().add( descriptionLabel );
}
getChildren().add( new Separator() );
setSpacing( SPACING );
}
示例9: addCheckInNotes
import javafx.scene.control.Separator; //导入依赖的package包/类
private static void addCheckInNotes(final LocalDate date, final VBox box,
final List<CheckInOutDetails> checkInNotes) {
if (checkInNotes.size() > 0) {
for (final CheckInOutDetails next : checkInNotes) {
final TextFlow tf = new TextFlow();
final Text t0 = new Text("Room " + next.room);
t0.getStyleClass().add("emphasis");
final Text t1 = new Text(" (" + next.bookingOrigin + ")");
tf.getChildren().addAll(t0, t1);
if (!StringUtils.isBlank(next.notes)) {
final Text t2 = new Text(": " + next.notes);
t2.getStyleClass().add("guest-message");
tf.getChildren().add(t2);
}
box.getChildren().add(tf);
}
box.getChildren().add(new Separator());
}
}
示例10: addCheckOutNotes
import javafx.scene.control.Separator; //导入依赖的package包/类
private static void addCheckOutNotes(final LocalDate date, final VBox box,
final List<CheckInOutDetails> checkOutNotes) {
if (checkOutNotes.size() > 0) {
for (final CheckInOutDetails next : checkOutNotes) {
final TextFlow tf = new TextFlow();
final Text t0 = new Text("Room " + next.room);
t0.getStyleClass().add("emphasis");
final Text t1 = new Text(" (" + next.bookingOrigin + ")");
tf.getChildren().addAll(t0, t1);
if (!StringUtils.isBlank(next.notes)) {
final Text t2 = new Text(": " + next.notes);
t2.getStyleClass().add("guest-message");
tf.getChildren().add(t2);
}
box.getChildren().add(tf);
}
box.getChildren().add(new Separator());
}
}
示例11: addBookingEntry
import javafx.scene.control.Separator; //导入依赖的package包/类
private void addBookingEntry(final Booking be) {
// System.err.println("Adding entry for " + be);
final VBox box = new VBox(4);
// box.setPadding(new Insets(4));
addRow0(box, be);
box.getChildren().add(new Separator());
addRowNetEarnings(box, be);
box.getChildren().add(new Separator());
addRowFees(box, be);
box.getChildren().add(new Separator());
addRow4(box, be);
box.getChildren().add(new Separator());
addRow5(box, be);
box.getChildren().add(new Separator());
addRow1(box, be);
addRow2(box, be);
addModifyButton(box, be);
content.getChildren().add(box);
}
示例12: addRemoveButton
import javafx.scene.control.Separator; //导入依赖的package包/类
private static void addRemoveButton(
final VBox container,
final VBox root,
VBox dynroot,
HBox subroot,
ComboBox box) {
Button remove = new Button(I18n.getMsg("gui.remove"));
remove.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
ObservableList<Node> items = container.getChildren();
items.remove(root);
}
});
subroot.getChildren().addAll(box, remove);
subroot.setMargin(box, new Insets(MARGIN_5,
MARGIN_5, MARGIN_5, MARGIN_20));
subroot.setMargin(remove, new Insets(MARGIN_5,
MARGIN_5, MARGIN_5, MARGIN_5));
Separator sep = new Separator();
root.getChildren().addAll(subroot, dynroot, sep);
root.setId("process_parameter");
}
示例13: GlobalLocalPane
import javafx.scene.control.Separator; //导入依赖的package包/类
GlobalLocalPane(final Pane global, final Pane local) {
super();
this.global = global;
this.local = local;
global.setFocusTraversable(false);
local.setFocusTraversable(false);
final Node l1 = new Label("Global");
final Node l2 = new Label("Local");
final Node v1 = new VBox(l1, global);
final Node v2 = new Separator(Orientation.HORIZONTAL);
final Node v3 = new VBox(l2, local);
this.getChildren().addAll(v1, v2, v3);
this.setFocusTraversable(false);
l1.setFocusTraversable(false);
l2.setFocusTraversable(false);
v1.setFocusTraversable(false);
v2.setFocusTraversable(false);
v3.setFocusTraversable(false);
}
示例14: start
import javafx.scene.control.Separator; //导入依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
BorderPane pane = new BorderPane();
ToolBar toolBar = new ToolBar();
Label fileLabel = new Label("File");
flyout = createFlyout();
// Could be TOP, LEFT, RIGHT too!
flyout.setFlyoutSide(Flyout.Side.BOTTOM);
toolBar.getItems().addAll(
fileLabel,
new Separator(),
flyout
);
pane.setTop(toolBar);
Scene scene = new Scene(pane, 600, 200);
primaryStage.setScene(scene);
primaryStage.show();
}
示例15: createBottom
import javafx.scene.control.Separator; //导入依赖的package包/类
private void createBottom() {
createContinueButton();
createBackButton();
createCancelButton();
space = new HBox();
HBox.setHgrow(space, Priority.ALWAYS);
VBox bottom = new VBox();
VBox.setVgrow(bottom, Priority.ALWAYS);
Separator separator = new Separator();
buttons = new HBox(10);
buttons.setPadding(new Insets(10, 10, 10, 10));
buttons.setAlignment(Pos.CENTER);
buttons.getChildren().addAll(btCancel, space, btContinue);
bottom.getChildren().addAll(separator, buttons);
setBottom(bottom);
}