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


Java Separator.setOrientation方法代碼示例

本文整理匯總了Java中javafx.scene.control.Separator.setOrientation方法的典型用法代碼示例。如果您正苦於以下問題:Java Separator.setOrientation方法的具體用法?Java Separator.setOrientation怎麽用?Java Separator.setOrientation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javafx.scene.control.Separator的用法示例。


在下文中一共展示了Separator.setOrientation方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createPage

import javafx.scene.control.Separator; //導入方法依賴的package包/類
private final HBox createPage(final Integer pageIndex) {
	VBox vbox1 = new VBox();
	VBox vbox2 = new VBox();
	HBox hbox = new HBox();

	int numberOfItems = items.size();
	int itemsOn1Page = itemsPerColumn * column;
	int page = itemsOn1Page * pageIndex;
	for (int i = page; (i < page + itemsPerColumn) && (i < numberOfItems); i++) {
		VBox.setMargin(items.get(i), new Insets(7, 15, 7, 7));
		vbox1.getChildren().add(items.get(i));
	}
	for (int i = page + itemsPerColumn; (i < page + column * itemsPerColumn) && (i < numberOfItems); i++) {
		VBox.setMargin(items.get(i), new Insets(7, 7, 7, 15));
		vbox2.getChildren().add(items.get(i));
	}
	hbox.getChildren().add(vbox1);
	Separator separator = new Separator();
	separator.setOrientation(Orientation.VERTICAL);
	hbox.getChildren().add(separator);
	hbox.getChildren().add(vbox2);
	return hbox;
}
 
開發者ID:Zsadany,項目名稱:DominantFreq,代碼行數:24,代碼來源:BulkDisplay.java

示例2: setAndShowResult

import javafx.scene.control.Separator; //導入方法依賴的package包/類
public void setAndShowResult(EcgAnalysis result) {
	analysis = result;
	ObservableList<Node> results = resultContent.getChildren();
	if (!results.isEmpty())
		results.removeAll(results);
	results.add(result.renderToGridPane());
	results.add(new Separator());
	HBox buttonRow = new HBox();
	buttonRow.getChildren().add(createProcessButton("Reprocess Ecg"));
	Separator separator = new Separator();
	separator.setOrientation(Orientation.VERTICAL);
	buttonRow.getChildren().add(separator);
	buttonRow.getChildren().add(createClearButton("Clear Result"));
	results.add(buttonRow);
	results.add(new Separator());
	setResultView();
}
 
開發者ID:Zsadany,項目名稱:DominantFreq,代碼行數:18,代碼來源:EcgItem.java

示例3: drawNode

import javafx.scene.control.Separator; //導入方法依賴的package包/類
@Override
public Node drawNode() {
    HBox root = new HBox();
    Separator separator = getSeparator();
    separator.setOrientation(Orientation.VERTICAL);
    if (separator.getOrientation() != Orientation.VERTICAL) {
        reportGetterFailure("separator.setOrientation()");
    }
    VBox box = new VBox();
    box.getChildren().addAll(new Label("[isVertical]"), separator);
    box.setAlignment(Pos.CENTER);
    root.getChildren().add(box);
    return root;
}
 
開發者ID:teamfx,項目名稱:openjfx-8u-dev-tests,代碼行數:15,代碼來源:SeparatorApp.java

示例4: addSeparator

import javafx.scene.control.Separator; //導入方法依賴的package包/類
public void addSeparator()
{
	Separator separator = new Separator();
	separator.setOrientation(Orientation.VERTICAL);
	separator.setMaxWidth(34);
	getChildren().add(separator);
}
 
開發者ID:creativitRy,項目名稱:ClearComposer,代碼行數:8,代碼來源:Toolbar.java

示例5: addSeparator

import javafx.scene.control.Separator; //導入方法依賴的package包/類
protected void addSeparator() {
    if (headLine != null) {
        Separator separator = new Separator();
        separator.setMouseTransparent(true);
        separator.setOrientation(Orientation.HORIZONTAL);
        separator.getStyleClass().add("separator");
        GridPane.setHalignment(separator, HPos.CENTER);
        GridPane.setRowIndex(separator, ++rowIndex);
        GridPane.setColumnSpan(separator, 2);

        gridPane.getChildren().add(separator);
    }
}
 
開發者ID:bisq-network,項目名稱:exchange,代碼行數:14,代碼來源:Overlay.java

示例6: PrintViewSkin

import javafx.scene.control.Separator; //導入方法依賴的package包/類
public PrintViewSkin(PrintView control) {
    super(control);

    GridPane gridPane = new GridPane();
    gridPane.getStyleClass().add("container");
    gridPane.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);

    RowConstraints row1 = new RowConstraints();
    RowConstraints row2 = new RowConstraints();

    ColumnConstraints col1 = new ColumnConstraints();
    ColumnConstraints col2 = new ColumnConstraints();
    ColumnConstraints col3 = new ColumnConstraints();

    row1.setVgrow(Priority.ALWAYS);
    row2.setVgrow(Priority.NEVER);

    col1.setHgrow(Priority.ALWAYS);
    col2.setHgrow(Priority.NEVER);
    col3.setHgrow(Priority.NEVER);

    row1.setFillHeight(true);
    row2.setFillHeight(true);

    col1.setFillWidth(true);
    col2.setFillWidth(true);
    col3.setFillWidth(true);

    col1.setMaxWidth(Double.MAX_VALUE);
    col3.setMaxWidth(Region.USE_PREF_SIZE);
    col3.setMinWidth(Region.USE_PREF_SIZE);

    row1.setMaxHeight(Double.MAX_VALUE);
    row2.setMinHeight(Region.USE_PREF_SIZE);

    gridPane.getRowConstraints().setAll(row1, row2);
    gridPane.getColumnConstraints().setAll(col1, col2, col3);

    // preview pane
    PreviewPane previewPane = control.getPreviewPane();
    gridPane.add(previewPane, 0, 0);
    GridPane.setRowSpan(previewPane, 2);

    // settings
    SettingsView settingsView = control.getSettingsView();
    gridPane.add(settingsView, 2, 0);

    // separator
    Separator separator = new Separator();
    separator.setOrientation(Orientation.VERTICAL);
    GridPane.setRowSpan(separator, 2);
    gridPane.add(separator, 1, 0);

    // button bar
    Button cancelBtn = new Button(Messages.getString("PrintView.CANCEL_BUTTON"));
    cancelBtn.onActionProperty().bind(control.onCancelProperty());

    Button continueBtn = new Button(Messages.getString("PrintView.CONTINUE_BUTTON"));
    continueBtn.onActionProperty().bind(control.onContinueProperty());

    HBox buttonsBar = new HBox();
    buttonsBar.getStyleClass().add("button-bar");
    buttonsBar.getChildren().addAll(cancelBtn, continueBtn);

    gridPane.add(buttonsBar, 2, 1);

    getChildren().add(gridPane);
}
 
開發者ID:dlemmermann,項目名稱:CalendarFX,代碼行數:69,代碼來源:PrintViewSkin.java

示例7: MainframeStage

import javafx.scene.control.Separator; //導入方法依賴的package包/類
public MainframeStage (TelnetState telnetState, int mainframePort)     // usually 5555
{
  this.telnetState = telnetState;

  mainframeServer = new MainframeServer (mainframePort);
  mainframeServer.setStage (this);

  GuiFactory gui = new GuiFactory ();
  final VBox vbox1 = gui.getVBox ();

  for (int i = 0; i < 10; i++)
    buttons.add (gui.getButton ("Empty", vbox1, BUTTON_WIDTH));

  Separator separator = new Separator ();
  separator.setOrientation (Orientation.HORIZONTAL);

  final VBox vbox2 = gui.getVBox ();
  btnReadBuffer = gui.getButton ("Read Buffer", vbox2, BUTTON_WIDTH);
  btnReadModified = gui.getButton ("Read Modified", vbox2, BUTTON_WIDTH);
  btnReadModifiedAll = gui.getButton ("Read Mod All", vbox2, BUTTON_WIDTH);
  btnEraseAllUnprotected = gui.getButton ("Erase All Unpr", vbox2, BUTTON_WIDTH);
  btnProgramTab1 = gui.getButton ("PT 1", vbox2, BUTTON_WIDTH);
  btnProgramTab2 = gui.getButton ("PT 2", vbox2, BUTTON_WIDTH);
  btnProgramTab3 = gui.getButton ("PT 3", vbox2, BUTTON_WIDTH);

  final ToggleGroup modeGroup = new ToggleGroup ();

  btnFieldMode = gui.getRadioButton ("Field Mode", vbox2, modeGroup);
  btnExtendedFieldMode = gui.getRadioButton ("Extended Field Mode", vbox2, modeGroup);
  btnCharacterMode = gui.getRadioButton ("Character Mode", vbox2, modeGroup);
  btnFieldMode.setSelected (true);                    // match the default setting

  modeGroup.selectedToggleProperty ().addListener (new OnToggleHandler ());

  BorderPane borderPane = new BorderPane ();
  borderPane.setLeft (vbox1);
  borderPane.setRight (vbox2);

  Scene scene = new Scene (borderPane);
  setTitle ("Mainframe: " + mainframePort);
  setScene (scene);

  setX (1000);
  setY (100);

  prepareButtons ();

  setOnCloseRequest (e -> Platform.exit ());
}
 
開發者ID:xframium,項目名稱:xframium-java,代碼行數:50,代碼來源:MainframeStage.java


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