本文整理汇总了Java中javafx.scene.layout.FlowPane.setHgap方法的典型用法代码示例。如果您正苦于以下问题:Java FlowPane.setHgap方法的具体用法?Java FlowPane.setHgap怎么用?Java FlowPane.setHgap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.layout.FlowPane
的用法示例。
在下文中一共展示了FlowPane.setHgap方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupTools
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
/**
* Setup the tools tab.
* @param toolTab
*/
private void setupTools(Tab toolTab) {
FlowPane flow = new FlowPane();
flow.setAlignment(Pos.CENTER);
flow.setHgap(5);
flow.setVgap(5);
for(final EditorDefinition definition : EditorDefinition.values()) {
final Button button = new Button(definition.getName());
button.setMinWidth(150);
button.setMinHeight(50);
button.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent actionEvent) {
if(!editors.containsKey(definition))
addEditor(definition);
}
});
flow.getChildren().add(button);
}
toolTab.setContent(flow);
}
示例2: getCenterPane
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
private FlowPane getCenterPane() {
FlowPane timerLabelPane = new FlowPane();
timerLabelPane.getChildren().add(timerLabel);
timerLabelPane.setVgap(10);
timerLabelPane.setAlignment(Pos.CENTER);
FlowPane taskLabelPane = new FlowPane();
taskLabelPane.getChildren().addAll(currentTaskLabel, selectedTaskLabel);
taskLabelPane.setVgap(10);
taskLabelPane.setAlignment(Pos.CENTER);
FlowPane taskPane = new FlowPane();
taskPane.setHgap(10);
taskPane.setVgap(10);
taskPane.setAlignment(Pos.CENTER);
taskPane.getChildren().add(setTaskButton);
taskPane.getChildren().add(taskLabelPane);
FlowPane centerPane = new FlowPane();
centerPane.setOrientation(Orientation.VERTICAL);
centerPane.setVgap(10);
centerPane.setAlignment(Pos.CENTER);
centerPane.getChildren().add(timerLabelPane);
centerPane.getChildren().add(taskPane);
return centerPane;
}
示例3: getTimerButtonsPane
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
private FlowPane getTimerButtonsPane() {
FlowPane timerButtonsPane = new FlowPane();
timerButtonsPane.getChildren().add(resetButton);
timerButtonsPane.getChildren().add(changeStateButton);
timerButtonsPane.setHgap(10);
timerButtonsPane.setPadding(new Insets(0, 0, 25, 0));
timerButtonsPane.setAlignment(Pos.CENTER);
return timerButtonsPane;
}
示例4: getSignOutButtonPane
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
private FlowPane getSignOutButtonPane() {
FlowPane signOutButtonPane = new FlowPane();
signOutButtonPane.setPadding(new Insets(25, 25, 25, 25));
signOutButtonPane.setHgap(10);
signOutButtonPane.getChildren().add(signedInUserLabel);
signOutButtonPane.getChildren().add(currentUserLabel);
signOutButtonPane.getChildren().add(signOutButton);
return signOutButtonPane;
}
示例5: getUserButtonsPane
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
private FlowPane getUserButtonsPane() {
FlowPane userButtonsPane = new FlowPane();
userButtonsPane.getChildren().add(signInButton);
userButtonsPane.getChildren().add(registerButton);
userButtonsPane.setAlignment(Pos.CENTER);
userButtonsPane.setHgap(10);
userButtonsPane.setPadding(new Insets(25, 25, 25, 25));
return userButtonsPane;
}
示例6: start
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
@Override
public void start(Stage stage) {
FlowPane main = new FlowPane();
main.setVgap(20);
main.setHgap(20);
CheckBox cb = new CheckBox("CheckBox");
JFXCheckBox jfxCheckBox = new JFXCheckBox("JFX CheckBox");
JFXCheckBox customJFXCheckBox = new JFXCheckBox("Custom JFX CheckBox");
customJFXCheckBox.getStyleClass().add("custom-jfx-check-box");
main.getChildren().add(cb);
main.getChildren().add(jfxCheckBox);
main.getChildren().add(customJFXCheckBox);
StackPane pane = new StackPane();
pane.getChildren().add(main);
StackPane.setMargin(main, new Insets(100));
pane.setStyle("-fx-background-color:WHITE");
final Scene scene = new Scene(pane, 600, 200);
scene.getStylesheets().add(CheckBoxDemo.class.getResource("/css/jfoenix-components.css").toExternalForm());
stage.setTitle("JFX CheckBox Demo ");
stage.setScene(scene);
stage.setResizable(false);
stage.show();
}
示例7: start
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
@Override
public void start(Stage stage) {
FlowPane main = new FlowPane();
main.setVgap(20);
main.setHgap(20);
DatePicker datePicker = new DatePicker();
main.getChildren().add(datePicker);
JFXDatePicker datePickerFX = new JFXDatePicker();
main.getChildren().add(datePickerFX);
datePickerFX.setPromptText("pick a date");
JFXTimePicker blueDatePicker = new JFXTimePicker();
blueDatePicker.setDefaultColor(Color.valueOf("#3f51b5"));
blueDatePicker.setOverLay(true);
main.getChildren().add(blueDatePicker);
StackPane pane = new StackPane();
pane.getChildren().add(main);
StackPane.setMargin(main, new Insets(100));
pane.setStyle("-fx-background-color:WHITE");
final Scene scene = new Scene(pane, 400, 700);
final ObservableList<String> stylesheets = scene.getStylesheets();
stylesheets.addAll(MainDemo.class.getResource("/css/jfoenix-fonts.css").toExternalForm(),
MainDemo.class.getResource("/css/jfoenix-design.css").toExternalForm());
stage.setTitle("JFX Date Picker Demo");
stage.setScene(scene);
stage.show();
}
示例8: start
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
@Override
public void start(Stage stage) {
FlowPane main = new FlowPane();
main.setVgap(20);
main.setHgap(20);
main.getChildren().add(new Button("Java Button"));
JFXButton jfoenixButton = new JFXButton("JFoenix Button");
main.getChildren().add(jfoenixButton);
JFXButton button = new JFXButton("RAISED BUTTON");
button.getStyleClass().add("button-raised");
main.getChildren().add(button);
JFXButton button1 = new JFXButton("DISABLED");
button1.setDisable(true);
main.getChildren().add(button1);
StackPane pane = new StackPane();
pane.getChildren().add(main);
StackPane.setMargin(main, new Insets(100));
pane.setStyle("-fx-background-color:WHITE");
final Scene scene = new Scene(pane, 800, 200);
scene.getStylesheets().add(ButtonDemo.class.getResource("/css/jfoenix-components.css").toExternalForm());
stage.setTitle("JFX Button Demo");
stage.setScene(scene);
stage.show();
}
示例9: createStad
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
/**
* FlowPane met GebouwKaartViews
*/
private void createStad() {
stadPane = new FlowPane();
stadPane.setPadding(new Insets(125, 0, 5, 50));
stadPane.setVgap(-40);
stadPane.setHgap(-15);
stadPane.setPrefWrapLength(360);
// Loop door gebouwKaartViews en voeg ze toe aan het FlowPane
for (GebouwKaartView gebouwKaartView: gebouwKaartViews) {
stadPane.getChildren().add(gebouwKaartView.view()); // Voeg view to aan Pane
}
}
示例10: addCheckboxes
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
private void addCheckboxes() {
Label evidenceLabel = addLabel(gridPane, ++rowIndex, Res.get("disputeSummaryWindow.evidence"), 10);
GridPane.setValignment(evidenceLabel, VPos.TOP);
CheckBox tamperProofCheckBox = new AutoTooltipCheckBox(Res.get("disputeSummaryWindow.evidence.tamperProof"));
CheckBox idVerificationCheckBox = new AutoTooltipCheckBox(Res.get("disputeSummaryWindow.evidence.id"));
CheckBox screenCastCheckBox = new AutoTooltipCheckBox(Res.get("disputeSummaryWindow.evidence.video"));
tamperProofCheckBox.selectedProperty().bindBidirectional(disputeResult.tamperProofEvidenceProperty());
idVerificationCheckBox.selectedProperty().bindBidirectional(disputeResult.idVerificationProperty());
screenCastCheckBox.selectedProperty().bindBidirectional(disputeResult.screenCastProperty());
FlowPane checkBoxPane = new FlowPane();
checkBoxPane.setHgap(20);
checkBoxPane.setVgap(5);
checkBoxPane.getChildren().addAll(tamperProofCheckBox, idVerificationCheckBox, screenCastCheckBox);
GridPane.setRowIndex(checkBoxPane, rowIndex);
GridPane.setColumnIndex(checkBoxPane, 1);
GridPane.setMargin(checkBoxPane, new Insets(10, 0, 0, 0));
gridPane.getChildren().add(checkBoxPane);
}
示例11: addCurrenciesGrid
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
private void addCurrenciesGrid(boolean isEditable) {
Label label = addLabel(gridPane, ++gridRow, Res.get("payment.supported.okpay"), 0);
GridPane.setValignment(label, VPos.TOP);
FlowPane flowPane = new FlowPane();
flowPane.setPadding(new Insets(10, 10, 10, 10));
flowPane.setVgap(10);
flowPane.setHgap(10);
if (isEditable)
flowPane.setId("flow-pane-checkboxes-bg");
else
flowPane.setId("flow-pane-checkboxes-non-editable-bg");
CurrencyUtil.getAllOKPayCurrencies().stream().forEach(e ->
{
CheckBox checkBox = new AutoTooltipCheckBox(e.getCode());
checkBox.setMouseTransparent(!isEditable);
checkBox.setSelected(okPayAccount.getTradeCurrencies().contains(e));
checkBox.setMinWidth(60);
checkBox.setMaxWidth(checkBox.getMinWidth());
checkBox.setTooltip(new Tooltip(e.getName()));
checkBox.setOnAction(event -> {
if (checkBox.isSelected())
okPayAccount.addCurrency(e);
else
okPayAccount.removeCurrency(e);
updateAllInputsValid();
});
flowPane.getChildren().add(checkBox);
});
GridPane.setRowIndex(flowPane, gridRow);
GridPane.setColumnIndex(flowPane, 1);
gridPane.getChildren().add(flowPane);
}
示例12: createDetailsPane
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
private FlowPane createDetailsPane() {
FlowPane detailsPane = new FlowPane();
detailsPane.setMaxWidth(CARD_WIDTH);
detailsPane.setPrefWrapLength(CARD_WIDTH);
detailsPane.setHgap(3);
detailsPane.setVgap(3);
return detailsPane;
}
示例13: createAssignedUserPane
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
private FlowPane createAssignedUserPane() {
FlowPane assignedUserPane = new FlowPane();
assignedUserPane.setPadding(new Insets(5, 5, 5, 5));
assignedUserPane.setHgap(3);
assignedUserPane.setVgap(5);
assignedUserPane.setStyle("-fx-border-radius: 3;");
assignedUserPane.setId(IdGenerator.getAssigneePickerAssignedUserPaneId());
return assignedUserPane;
}
示例14: createGroupPane
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
private FlowPane createGroupPane(Insets padding) {
FlowPane group = new FlowPane();
group.setHgap(5);
group.setVgap(5);
group.setPadding(padding);
return group;
}
示例15: createRepoPane
import javafx.scene.layout.FlowPane; //导入方法依赖的package包/类
private FlowPane createRepoPane(Insets padding) {
FlowPane repo = new FlowPane();
repo.setHgap(5);
repo.setVgap(5);
repo.setPadding(padding);
return repo;
}