本文整理汇总了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;
}
示例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();
}
示例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;
}
示例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);
}
示例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);
}
}
示例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);
}
示例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 ());
}