本文整理了Java中javafx.scene.layout.BorderPane.setBottom()
方法的一些代码示例,展示了BorderPane.setBottom()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BorderPane.setBottom()
方法的具体详情如下:
包路径:javafx.scene.layout.BorderPane
类名称:BorderPane
方法名:setBottom
暂无
代码示例来源:origin: torakiki/pdfsam
@Inject
public OpenWithDialog(StylesConfig styles, List<Module> modules) {
initModality(Modality.WINDOW_MODAL);
initStyle(StageStyle.UTILITY);
setResizable(false);
setTitle(DefaultI18nContext.getInstance().i18n("Open with"));
this.modules = modules.stream().sorted(comparing(m -> m.descriptor().getName())).collect(toList());
messageTitle.getStyleClass().add("-pdfsam-open-with-dialog-title");
BorderPane containerPane = new BorderPane();
containerPane.getStyleClass().addAll(Style.CONTAINER.css());
containerPane.getStyleClass().addAll("-pdfsam-open-with-dialog", "-pdfsam-open-with-container");
containerPane.setTop(messageTitle);
BorderPane.setAlignment(messageTitle, Pos.TOP_CENTER);
filesList.setPrefHeight(150);
containerPane.setCenter(filesList);
buttons.getStyleClass().addAll(Style.CONTAINER.css());
containerPane.setBottom(buttons);
BorderPane.setAlignment(buttons, Pos.CENTER);
Scene scene = new Scene(containerPane);
scene.getStylesheets().addAll(styles.styles());
scene.setOnKeyReleased(new HideOnEscapeHandler(this));
setScene(scene);
eventStudio().addAnnotatedListeners(this);
}
代码示例来源:origin: torakiki/pdfsam
public HidingPane() {
Button closeButton = new Button(DefaultI18nContext.getInstance().i18n("Close"));
closeButton.getStyleClass().addAll(Style.BUTTON.css());
closeButton.setTextAlignment(TextAlignment.CENTER);
closeButton.setOnAction(e -> this.setVisible(false));
HBox bottom = new HBox(closeButton);
bottom.setAlignment(Pos.CENTER_RIGHT);
bottom.getStyleClass().addAll(Style.CONTAINER.css());
super.setBottom(bottom);
}
}
代码示例来源:origin: torakiki/pdfsam
@Inject
public InfoStage(InfoPane infoPane, List<Image> logos, StylesConfig styles) {
BorderPane containerPane = new BorderPane();
containerPane.getStyleClass().addAll(Style.CONTAINER.css());
containerPane.setCenter(infoPane);
containerPane.setBottom(new ClosePane());
Scene scene = new Scene(containerPane);
scene.getStylesheets().addAll(styles.styles());
scene.setOnKeyReleased(new HideOnEscapeHandler(this));
setScene(scene);
setTitle(DefaultI18nContext.getInstance().i18n("Document details"));
getIcons().addAll(logos);
setMaximized(true);
}
代码示例来源:origin: org.copper-engine/copper-monitoring-client
@Override
// This method is called by the FXMLLoader when initialization is complete
public void initialize(URL fxmlFileLocation, ResourceBundle resources) {
assert borderPane != null : "fx:id=\"borderPane\" was not injected: check your FXML file 'SqlResult.fxml'.";
assert resultTable != null : "fx:id=\"resultTable\" was not injected: check your FXML file 'SqlResult.fxml'.";
borderPane.setBottom(createTableControls(resultTable));
}
代码示例来源:origin: torakiki/pdfsam
@Inject
public LogStage(LogPane logPane, LogListView logView, List<Image> logos, StylesConfig styles) {
BorderPane containerPane = new BorderPane();
containerPane.getStyleClass().addAll(Style.CONTAINER.css());
containerPane.setCenter(logPane);
containerPane.setBottom(new ClosePane((a) -> eventStudio().broadcast(HideStageRequest.INSTANCE, "LogStage")));
Scene scene = new Scene(containerPane);
scene.getStylesheets().addAll(styles.styles());
scene.setOnKeyReleased(k -> {
if (this.isShowing() && new KeyCodeCombination(KeyCode.ESCAPE).match(k)) {
eventStudio().broadcast(HideStageRequest.INSTANCE, "LogStage");
}
});
setScene(scene);
setTitle(DefaultI18nContext.getInstance().i18n("Log register"));
getIcons().addAll(logos);
setMaximized(true);
eventStudio().addAnnotatedListeners(this);
this.onShowingProperty().addListener((o, oldVal, newVal) -> logView.scrollToBottomIfShowing());
eventStudio().add(logView, LOGSTAGE_EVENTSTATION);
}
代码示例来源:origin: stackoverflow.com
BorderPane root = new BorderPane();
Label centeredText = new Label("I want this text centered!");
Button unorganizedButton = new Button("Press me");
BorderPane.setAlignment(centeredText, Pos.CENTER);
root.setTop(centeredText);
root.setBottom(unorganizedButton);
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
private void updateBottomTrim(ObservableValue<? extends Node> o, Node oldValue, Node newValue) {
if (oldValue != null) {
Pane pane = (Pane) lookup("#bottom-trim-area"); //$NON-NLS-1$
if (pane == null) {
this.trimPane.setBottom(null);
} else {
pane.getChildren().remove(newValue);
}
}
if (newValue != null) {
Pane pane = (Pane) lookup("#bottom-trim-area"); //$NON-NLS-1$
if (pane == null) {
this.trimPane.setBottom(newValue);
} else {
pane.getChildren().add(newValue);
}
}
}
代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls
private void updateBottomTrim(ObservableValue<? extends Node> o, Node oldValue, Node newValue) {
if (oldValue != null) {
Pane pane = (Pane) lookup("#bottom-trim-area"); //$NON-NLS-1$
if (pane == null) {
this.trimPane.setBottom(null);
} else {
pane.getChildren().remove(newValue);
}
}
if (newValue != null) {
Pane pane = (Pane) lookup("#bottom-trim-area"); //$NON-NLS-1$
if (pane == null) {
this.trimPane.setBottom(newValue);
} else {
pane.getChildren().add(newValue);
}
}
}
代码示例来源:origin: stackoverflow.com
private PopupWindow keyboard;
private final Rectangle2D visualBounds = Screen.getPrimary().getVisualBounds();
private final Rectangle2D bounds = Screen.getPrimary().getBounds();
private final double taskbarHeight=bounds.getHeight()-visualBounds.getHeight();
@Override
public void start(Stage stage) {
TextField tfComment = new TextField();
tfComment.setPromptText("Enter comment");
BorderPane borderPane = new BorderPane(new Button("Click"));
borderPane.setBottom(tfComment);
Scene scene = new Scene(borderPane);
stage.setScene(scene);
stage.setX(visualBounds.getMinX());
stage.setY(visualBounds.getMinY());
stage.setWidth(visualBounds.getWidth());
stage.setHeight(visualBounds.getHeight());
stage.show();
}
代码示例来源:origin: stackoverflow.com
public void start(Stage primaryStage) {
ComboBox<String> combobox1 = new ComboBox<>();
ComboBox<String> combobox2 = new ComboBox<>();
combobox2.setDisable(true);
combobox2.setStyle("-fx-opacity: 1;");
BorderPane root = new BorderPane();
root.setPadding(new Insets(15));
root.setTop(combobox1);
root.setBottom(combobox2);
Scene scene = new Scene(root, 400, 400);
primaryStage.setScene(scene);
primaryStage.show();
}
代码示例来源:origin: com.intuit.karate/karate-core
public AppSession(BorderPane rootPane, File workingDir, Feature feature, String env, CallContext callContext) {
this.rootPane = rootPane;
this.workingDir = workingDir;
FeatureContext featureContext = FeatureContext.forFeatureAndWorkingDir(env, feature, workingDir);
exec = new ExecutionContext(System.currentTimeMillis(), featureContext, callContext, null, null, null);
featureUnit = new FeatureExecutionUnit(exec);
featureUnit.init();
featureOutlinePanel = new FeatureOutlinePanel(this);
DragResizer.makeResizable(featureOutlinePanel, false, false, false, true);
List<ScenarioExecutionUnit> units = featureUnit.getScenarioExecutionUnits();
scenarioPanels = new ArrayList(units.size());
units.forEach(unit -> scenarioPanels.add(new ScenarioPanel(this, unit)));
rootPane.setLeft(featureOutlinePanel);
logPanel = new LogPanel(logger);
DragResizer.makeResizable(logPanel, false, false, true, false);
rootPane.setBottom(logPanel);
}
代码示例来源:origin: stackoverflow.com
public void start(Stage stage){
// create the scene
stage.setTitle("WhitePlay");
browser = new Browser();
BorderPane root = new BorderPane();
root.setCenter(browser);
Button button = new Button("Play");
root.setBottom(button);
button.setOnAction(a -> System.out.println("Play"));
scene = new Scene(root, 992, 620, Color.web("#000000"));
stage.setScene(scene);
stage.show();
}
代码示例来源:origin: PhoenicisOrg/phoenicis
/**
* {@inheritDoc}
*/
@Override
public void initialise() {
final BorderPane container = new BorderPane();
container.getStyleClass().add("sidebar");
// set the search box at the top of the side bar
container.setTop(createSearchBox());
// set the main content of the sidebar
container.setCenter(createMainContent());
// set the list widget selector at the bottom of the sidebar
container.setBottom(createListWidgetSelector());
getChildren().addAll(container);
}
代码示例来源:origin: org.controlsfx/controlsfx
private void updateLayout(Orientation orientation) {
borderPane.getChildren().clear();
switch (orientation) {
case HORIZONTAL:
borderPane.setLeft(minusRegion);
borderPane.setCenter(slider);
borderPane.setRight(plusRegion);
break;
case VERTICAL:
borderPane.setTop(plusRegion);
borderPane.setCenter(slider);
borderPane.setBottom(minusRegion);
break;
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
public void layout(AbstractTableStructure structure) {
if ((structure.getHeader() != null) || structure.getToolbar().isPresent()) {
if ((structure.getHeader() != null) && structure.getToolbar().isPresent()) {
VBox header = new VBox();
header.getChildren().addAll(structure.getHeader().getDisplay(), structure.getToolbar().get());
layout.setTop(header);
}
else if (structure.getToolbar().isPresent()) {
layout.setTop(structure.getToolbar().get());
} else {
layout.setTop(structure.getHeader().getDisplay());
}
}
if (structure.getTableStructure() != null) {
layout.setCenter(structure.getTableStructure());
}
if (structure.getPagination() != null) {
layout.setBottom(structure.getPagination().get());
}
}
代码示例来源:origin: org.jrebirth.af/component
void reloadButtonBar() {
node().setTop(null);
node().setBottom(null);
node().setLeft(null);
node().setRight(null);
initButtonBar();
}
代码示例来源:origin: org.jrebirth/sample
/**
* {@inheritDoc}
*/
@Override
protected void initView() {
this.defaultCommand = new Button("Trigger a default Command into JIT");
this.uiCommand = new Button("Trigger an UI Command into JAT");
this.pooledCommand = new Button("Trigger a pooled Command into JTP");
getRootNode().setCenter(
LabelBuilder.create()
.text("JRebirth Sample")
.build()
);
getRootNode().setBottom(FlowPaneBuilder.create().children(
this.defaultCommand,
this.uiCommand,
this.pooledCommand
).build());
}
代码示例来源:origin: org.jrebirth.af/component
private void initButtonBar() {
switch (model().object().orientation()) {
case top:
node().setTop(buildButtonBar(true));
break;
case bottom:
node().setBottom(buildButtonBar(true));
break;
case left:
node().setLeft(buildButtonBar(false));
break;
case right:
node().setRight(buildButtonBar(false));
break;
}
}
代码示例来源:origin: PhoenicisOrg/phoenicis
protected void drawFooter() {
HBox footer = new HBox();
footer.setAlignment(Pos.CENTER_RIGHT);
footer.setPadding(new Insets(8));
footer.setSpacing(10);
footer.setPrefHeight(45);
footer.setId("footer");
getParent().getRoot().setBottom(footer);
Button cancelButton = new Button(tr("Cancel"));
nextButton = new Button(tr("Next"));
footer.getChildren().addAll(cancelButton, nextButton);
cancelButton.setOnMouseClicked(event -> {
cancelButton.setDisable(true);
messageWaitingForResponse.sendCancelSignal();
});
}
代码示例来源:origin: org.jrebirth.af.showcase/todos
/**
* {@inheritDoc}
*/
@Override
protected void initView() {
super.initView();
final ImageView appName = new ImageView(TodosImages.HEADER_LOGO.get());
node().setTop(appName);
this.borderPane = new BorderPane();
node().setCenter(this.borderPane);
this.borderPane.setTop(model().headerModel().node());
this.borderPane.setCenter(model().contentModel().node());
this.borderPane.setBottom(model().statusModel().node());
}
内容来源于网络,如有侵权,请联系作者删除!