当前位置: 首页>>代码示例>>Java>>正文


Java HBox.setMinHeight方法代码示例

本文整理汇总了Java中javafx.scene.layout.HBox.setMinHeight方法的典型用法代码示例。如果您正苦于以下问题:Java HBox.setMinHeight方法的具体用法?Java HBox.setMinHeight怎么用?Java HBox.setMinHeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.scene.layout.HBox的用法示例。


在下文中一共展示了HBox.setMinHeight方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: NotificationBarPane

import javafx.scene.layout.HBox; //导入方法依赖的package包/类
public NotificationBarPane(Node content) {
    super(content);
    progressBar = new ProgressBar();
    label = new Label("infobar!");
    bar = new HBox(label);
    bar.setMinHeight(0.0);
    bar.getStyleClass().add("info-bar");
    bar.setFillHeight(true);
    setBottom(bar);
    // Figure out the height of the bar based on the CSS. Must wait until after we've been added to the parent node.
    sceneProperty().addListener(o -> {
        if (getParent() == null) return;
        getParent().applyCss();
        getParent().layout();
        barHeight = bar.getHeight();
        bar.setPrefHeight(0.0);
    });
    items = FXCollections.observableArrayList();
    items.addListener((ListChangeListener<? super Item>) change -> {
        config();
        showOrHide();
    });
}
 
开发者ID:Techsoul192,项目名称:legendary-guide,代码行数:24,代码来源:NotificationBarPane.java

示例2: createHorizontalBox

import javafx.scene.layout.HBox; //导入方法依赖的package包/类
public static HBox createHorizontalBox(double width, double height)
{
	HBox box = new HBox();
	box.setMinWidth(width);
	box.setMaxWidth(width);
	box.setMinHeight(height);
	box.setMaxHeight(height);
	return box;
}
 
开发者ID:PolyphasicDevTeam,项目名称:NoMoreOversleeps,代码行数:10,代码来源:JavaFxHelper.java

示例3: homeView

import javafx.scene.layout.HBox; //导入方法依赖的package包/类
public static Scene homeView(){

        BorderPane view = new BorderPane();

        Label title = new Label("Classroom Flipkart");
        title.setFont(new Font("Open Sans", 60));
        title.setTextFill(Color.web("#ededed"));

        HBox header = new HBox(25);
        header.setMinHeight(30);
        header.setAlignment(Pos.TOP_CENTER);

        Label login = new Label("Login");
        login.setPadding(new Insets(5));
        login.setFont(new Font("Open Sans", 20));
        login.setTextFill(Color.web("#ededed"));
        login.setCursor(Cursor.HAND);
        login.setStyle(" -fx-border-color: red; -fx-border-width: 0 0 3 0; -fx-border-insets: 0 0 1 0; ");

        Label register = new Label("Register");
        register.setPadding(new Insets(5));
        register.setFont(new Font("Open Sans", 20));
        register.setTextFill(Color.web("#ededed"));
        register.setCursor(Cursor.HAND);

        header.getChildren().addAll(login, register);

        userLogin loginObject = new userLogin();
        userSignUp signUpObject = new userSignUp();

        BorderPane credential = new BorderPane(loginObject.userLogin(), header, null, null, null);
        credential.setMaxWidth(350);
        credential.setStyle("-fx-background-color: rgba(0, 100, 100, 0.5); -fx-border-color: grey; -fx-border-width: 1 1 1 1;");

        login.setOnMouseClicked(e->{
            credential.setCenter(loginObject.userLogin());
            login.setStyle(" -fx-border-color: red; -fx-border-width: 0 0 3 0; -fx-border-insets: 0 0 1 0; ");
            register.setStyle("");
        });

        register.setOnMouseClicked(e->{
            credential.setCenter(signUpObject.userSignUp());
            login.setStyle("");
            register.setStyle(" -fx-border-color: red; -fx-border-width: 0 0 3 0; -fx-border-insets: 0 0 1 0; ");
        });

        VBox centerVB = new VBox(30);
        centerVB.setAlignment(Pos.CENTER);
        centerVB.getChildren().addAll(title, credential);

        view.setCenter(centerVB);

        Scene scene = new Scene(view,800,500);
        scene.getStylesheets().add(loginHome.class.getResource("../../resources/css/main.css").toExternalForm());

        image = loginHome.class.getResource("../../resources/images/splash.jpg").toExternalForm();
        view.setStyle("-fx-background-image: url('" + image + "'); " +
                "-fx-background-position: center center; " +
                "-fx-background-size: cover, auto; " +
                "-fx-background-repeat: stretch;");

        return  scene;
    }
 
开发者ID:madHEYsia,项目名称:ClassroomFlipkart,代码行数:64,代码来源:loginHome.java

示例4: updateEditedCell

import javafx.scene.layout.HBox; //导入方法依赖的package包/类
/**
 * Update an edited cell.
 *
 * @param cell the edited cell.
 */
@FXThread
public static void updateEditedCell(final Labeled cell) {

    final javafx.scene.Node graphic = cell.getGraphic();

    if (graphic instanceof HBox) {
        final HBox hbox = (HBox) graphic;
        hbox.setAlignment(Pos.CENTER_LEFT);
        hbox.setMinHeight(cell.getMinHeight());
    } else if (graphic instanceof Control) {
    }
}
 
开发者ID:JavaSaBr,项目名称:jmonkeybuilder,代码行数:18,代码来源:UIUtils.java


注:本文中的javafx.scene.layout.HBox.setMinHeight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。