當前位置: 首頁>>代碼示例>>Java>>正文


Java Separator類代碼示例

本文整理匯總了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);
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:18,代碼來源:CheckListView.java

示例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;
}
 
開發者ID:dlemmermann,項目名稱:CalendarFX,代碼行數:20,代碼來源:HelloRecurrenceView.java

示例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);
}
 
開發者ID:yiding-he,項目名稱:redisfx,代碼行數:25,代碼來源:FormDialog.java

示例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)
      );
}
 
開發者ID:XDean,項目名稱:CSS-Editor-FX,代碼行數:26,代碼來源:StatusBarManager.java

示例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();
}
 
開發者ID:kayler-renslow,項目名稱:arma-dialog-creator,代碼行數:27,代碼來源:HistoryListPopup.java

示例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;
}
 
開發者ID:teamfx,項目名稱:openjfx-8u-dev-tests,代碼行數:26,代碼來源:DragDropWithControls.java

示例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;
}
 
開發者ID:teamfx,項目名稱:openjfx-8u-dev-tests,代碼行數:17,代碼來源:SeparatorApp.java

示例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 );
}
 
開發者ID:DanGrew,項目名稱:JttDesktop,代碼行數:28,代碼來源:SimpleConfigurationTitle.java

示例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());
}
   }
 
開發者ID:DrBookings,項目名稱:drbookings,代碼行數:21,代碼來源:UpcomingController.java

示例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());
}
   }
 
開發者ID:DrBookings,項目名稱:drbookings,代碼行數:20,代碼來源:UpcomingController.java

示例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);

}
 
開發者ID:DrBookings,項目名稱:drbookings,代碼行數:21,代碼來源:BookingDetailsController.java

示例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");
}
 
開發者ID:gdi-by,項目名稱:downloadclient,代碼行數:24,代碼來源:UIFactory.java

示例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);
}
 
開發者ID:CLowcay,項目名稱:iso-game-engine,代碼行數:25,代碼來源:GlobalLocalPane.java

示例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();
}
 
開發者ID:mars-sim,項目名稱:mars-sim,代碼行數:26,代碼來源:FlyoutDemo.java

示例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);
}
 
開發者ID:keeps,項目名稱:roda-in,代碼行數:22,代碼來源:RuleModalPane.java


注:本文中的javafx.scene.control.Separator類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。