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


Java VBox.setMinWidth方法代码示例

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


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

示例1: initialize

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
public void initialize()
{
    packList = new VBox();
    packList.setMinWidth(400);
    packList.setPrefWidth(400);
    packList.setMaxWidth(400);
    packList.setAlignment(Pos.CENTER);
    searchPopOver = new PopOver(packList);
    searchPopOver.setArrowLocation(PopOver.ArrowLocation.TOP_CENTER);
    searchPopOver.setAutoHide(false);
    txtSearch.textProperty().addListener((observable, oldValue, newValue) -> search());
    txtSearch.focusedProperty().addListener((observable, oldValue, newValue) ->
    {
        if (newValue)
        {
            search();
        }
        else
        {
            searchPopOver.hide();
        }
    });
}
 
开发者ID:PaleoCrafter,项目名称:CurseSync,代码行数:24,代码来源:MainController.java

示例2: initUi

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
private void initUi() {
    VBox innerPane = new VBox();
    innerPane.setMinWidth(0);
    innerPane.setMaxWidth(Double.MAX_VALUE);

    VBox timelineBox = new VBox(player.getRoot(), timelineEditor.getRoot());
    VBox.setVgrow(outerPane, Priority.ALWAYS);
    VBox.setVgrow(scene.getRoot(), Priority.ALWAYS);
    VBox.setVgrow(timelineEditor.getRoot(), Priority.ALWAYS);

    rootBox.disableProperty().bind(saveDialogComponent.showingProperty());

    outerPane.getItems().addAll(innerPane, propertyEditor.getRoot());
    innerPane.getChildren().addAll(scene.getRoot(), timelineBox);
    rootBox.getChildren().addAll(menuBar.getRoot(), outerPane);
    root.getChildren().addAll(rootBox, saveDialogComponent.getOverlay(), saveDialogComponent.getRoot());
}
 
开发者ID:rmfisher,项目名称:fx-animation-editor,代码行数:18,代码来源:AnimationEditorComponent.java

示例3: createVerticalBox

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

示例4: getActionPane

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
private VBox getActionPane(){
progress= new Text("Office\nEntry Progress");
progress.setTextAlignment(TextAlignment.CENTER);
progress.setFont(Font.font("Times New Roman", 35));
lname= new Label("-Your Name here-");

Image iconf= new Image(Office_Entry.class.getResourceAsStream("/pic/finger.png"));
ImageView ivconf= new ImageView(iconf);
lpic= new Label();
lpic.setGraphic(ivconf);

Image img1= new Image(PersonalReports.class.getResourceAsStream("/pic/cross.png"));
ImageView imagvw= new ImageView(img1);
imagvw.setFitHeight(70);
imagvw.setFitWidth(70);
lnotexist= new Label("",imagvw);
lnotexist.setText("\n\n\n\n\nN/A");
lnotexist.setFont(Font.font("Cooper Black", 15));
lnotexist.setVisible(false);

txtfinger= new TextField();
txtfinger.setEditable(false);
txtfinger.setMaxWidth(160);		
txtfinger.setStyle("-fx-background-radius:10; -fx-background-color:#9CD777;");

txtsearch= new TextField();
initFilter();

Button btnView= new Button("View Records");
Button btnCloseView= new Button("Hide Records");

Button btnadd= new Button("save");
btnadd.setOnAction(e -> {
	setAddAttendance();
});

btnView.setOnAction(e -> {
	timelineDown.play();
});
btnCloseView.setOnAction(e -> {
	timelineUp.play();
});


VBox laywrong= new VBox();
laywrong.getChildren().addAll(lnotexist);
laywrong.setPadding(new Insets(0,0,0,0));
laywrong.setAlignment(Pos.CENTER);

HBox laytest= new HBox(5);
laytest.getChildren().addAll(txtfinger /* btnadd*/);
laytest.setAlignment(Pos.CENTER);

VBox laybtnsearch= new VBox();
laybtnsearch.getChildren().addAll(txtsearch);
laybtnsearch.setAlignment(Pos.CENTER);
laybtnsearch.setPadding(new Insets(20,0,0,0));

HBox laybtn= new HBox(5);
laybtn.getChildren().addAll(btnView, btnCloseView);
laybtn.setAlignment(Pos.CENTER);
VBox lay1= new VBox(10);
lay1.getChildren().addAll(progress, lpic, lname, laytest);
lay1.setAlignment(Pos.CENTER);
VBox layside= new VBox(25);
layside.getChildren().addAll(lay1, laybtn, laybtnsearch, laywrong);
layside.setAlignment(Pos.TOP_CENTER);
layside.setMinWidth(230);
layside.setPadding(new Insets(20,0,10,0));
return layside;
 }
 
开发者ID:mikemacharia39,项目名称:gatepass,代码行数:72,代码来源:Office_Entry.java

示例5: constructContainer

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
	bp.setId("loginviewbg");
	
	AllFields = new HBox(50);
	AllFields.setAlignment(Pos.CENTER);
	AllFields.setMaxWidth(300);
	AllFields.setPadding(new Insets(20));
	AllFields.setPadding(new Insets(200,0,0,0));
	//AllFields.setMinWidth(740);
	
	Value = new VBox();
	Value.setMinWidth(400);
	Value.setSpacing(35);
	Buttons = new VBox();
	Buttons.setSpacing(5);
	Name = new HBox();
	
	inputName = new TextField();
	inputName.setPromptText("Names der Door");
	inputName.setAlignment(Pos.CENTER_LEFT);
	inputName.setMinWidth(50);
	
	name = new Label("Name");
	removeDoor = new Label("Door l�schen");
	removeStacks = new Label("Enfert den/die Stack/s der Door");
	titel = new Label("Bearbeiten");

	btnRemoveDoor = new AppButton("Entfernen");
	btnRemoveStack = new AppButton("L�schen");
	btnModify = new AppButton("�ndern");
	back = new BackButton(getFXController(),"Abbrechen");
	
	//Buttons.getChildren().addAll(,,btnRemoveStack,back);
	Name.getChildren().addAll(name,inputName);
	Value.getChildren().addAll(Name,removeDoor,removeStacks);
	Buttons.getChildren().addAll(btnModify,btnRemoveStack,btnRemoveDoor,back);
	AllFields.getChildren().addAll(Value,Buttons);
	
	/*inside.setLeft(AllFields);
	inside.setRight(Buttons);*/
	
	bp.setCenter(AllFields);
	
	/*
	btnCreate.setOnAction(e -> getFXController().showView("serverdoorview"));
	--Listenter to crete a door
	*/
	
	
	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:54,代码来源:DMOModifyDoorView.java

示例6: constructContainer

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
	bp.setId("loginviewbg");
	
	AllFields = new HBox(50);
	AllFields.setAlignment(Pos.CENTER);
	AllFields.setMaxWidth(300);
	AllFields.setPadding(new Insets(20));
	AllFields.setPadding(new Insets(200,0,0,0));
	//AllFields.setMinWidth(740);
	
	Value = new VBox();
	Value.setMinWidth(400);
	Value.setSpacing(35);
	Buttons = new VBox();
	Buttons.setSpacing(5);
	Name = new HBox();
	
	inputName = new TextField();
	inputName.setPromptText("Names der Door");
	inputName.setAlignment(Pos.CENTER_LEFT);
	inputName.setMinWidth(50);
	
	name = new Label("Name");
	removeDoor = new Label("Stack l�schen");
	titel = new Label("Bearbeiten");

	btnRemoveDoor = new AppButton("Entfernen");
	btnRemoveStack = new AppButton("Entfernen");
	btnModify = new AppButton("�ndern");
	back = new BackButton(getFXController(),"Abbrechen");
	
	//Buttons.getChildren().addAll(,,btnRemoveStack,back);
	Name.getChildren().addAll(name,inputName);
	Value.getChildren().addAll(Name,removeDoor);
	Buttons.getChildren().addAll(btnModify,btnRemoveDoor,back);
	AllFields.getChildren().addAll(Value,Buttons);
	
	/*inside.setLeft(AllFields); 
	inside.setRight(Buttons);*/
	
	bp.setCenter(AllFields);
	
	/*
	btnCreate.setOnAction(e -> getFXController().showView("serverdoorview"));
	--Listenter to crete a door
	*/
	
	
	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:53,代码来源:DMOModifyStackView.java

示例7: refresh

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
public void refresh() {

        reservationsWrapper.getChildren().clear();

        int i = 0;
        for(Reservation reservation : controller.getReservations()) {
            HBox horizontalWrapper = new HBox();
            horizontalWrapper.setSpacing(10);
            horizontalWrapper.setAlignment(Pos.CENTER);

            String filename = null;

            switch (reservation.getSpot().getSpotType()) {
                case HOUSE: filename = "cabin.png"; break;
                case TRAILER: filename = "trailer.png"; break;
                case RESTAURANT: filename = "cutlery.png"; break;
                case PARKING: filename = "parking.png"; break;
                case POOL: filename = "swimming-pool.png"; break;
                case SPORT: filename = "kayak.png"; break;
                case TENT: filename = "tent.png"; break;
            }

            Image bigImage = new Image(new File("res/items/x64/" + filename).toURI().toString());
            ImageView locationImageView = new ImageView(bigImage);
            HBox.setMargin(locationImageView, new Insets(0, 0, 0, 20));
            horizontalWrapper.getChildren().add(locationImageView);

            VBox verticalWrapper = new VBox();
            horizontalWrapper.getChildren().add(verticalWrapper);
            verticalWrapper.setAlignment(Pos.CENTER_LEFT);

            horizontalWrapper.setOnMouseClicked(mouseEvent -> {
                ReservationManagerDialog reservationManagerDialog = new ReservationManagerDialog(controller, reservation, new ImageView(bigImage));
                reservationManagerDialog.showAndWait();
                refresh();
            });

            verticalWrapper.setMinWidth(HomeView.TAB_CONTENT_W / 4);
            verticalWrapper.setPadding(new Insets(20));

            Client client = reservation.getClient();

            Text clientNameText = new Text(client.getFirstname() + " " + client.getLastname());
            clientNameText.setFont(new Font(20));
            clientNameText.setFill(Color.WHITE);
            verticalWrapper.getChildren().add(clientNameText);

            Text spotText = new Text("Emplacement : " + reservation.getSpot().getName());
            spotText.setFont(new Font(15));
            spotText.setFill(Color.WHITE);
            verticalWrapper.getChildren().add(spotText);

            Text personCountText = new Text("Nombre de personnnes : " + reservation.getPersonCount());
            personCountText.setFont(new Font(15));
            personCountText.setFill(Color.WHITE);
            verticalWrapper.getChildren().add(personCountText);

            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
            Text datesText = new Text("Dates début/fin : " + dateFormat.format(new Date(reservation.getStarttime().getTime())) + " / " + dateFormat.format(new Date(reservation.getEndtime().getTime())));
            datesText.setFont(new Font(15));
            datesText.setFill(Color.WHITE);
            verticalWrapper.getChildren().add(datesText);

            if (i++ % 2 == 1)
                horizontalWrapper.setStyle("-fx-background-color: #336699;");
            else
                horizontalWrapper.setStyle("-fx-background-color: #0F355C;");

            reservationsWrapper.getChildren().add(horizontalWrapper);
        }
    }
 
开发者ID:Moccko,项目名称:campingsimulator2017,代码行数:72,代码来源:ReservationsView.java

示例8: getActionPane

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
private VBox getActionPane(){
	progress= new Text("Gate\nEntry Progress");
	progress.setTextAlignment(TextAlignment.CENTER);
	progress.setFont(Font.font("Times New Roman", 35));
	lname= new Label("-Your Name here-");

	Image iconf= new Image(AllAttendance.class.getResourceAsStream("/pic/finger.png"));
	ImageView ivconf= new ImageView(iconf);
	lpic= new Label();
	lpic.setGraphic(ivconf);

	Image img1= new Image(PersonalReports.class.getResourceAsStream("/pic/cross.png"));
	ImageView imagvw= new ImageView(img1);
	imagvw.setFitHeight(70);
	imagvw.setFitWidth(70);
	lnotexist= new Label("",imagvw);
	lnotexist.setText("\n\n\n\n\nN/A");
	lnotexist.setFont(Font.font("Cooper Black", 15));
	lnotexist.setVisible(false);

	txtfinger= new TextField();
	txtfinger.setEditable(false);
	txtfinger.setMaxWidth(160);		
	txtfinger.setStyle("-fx-background-radius:10; -fx-background-color:#9CD777;");

	txtsearch= new TextField();
	initFilter();

	Button btnadd= new Button("save");
	btnadd.setOnAction(e -> {
		setAddAttendance();
	});

	Button btnView= new Button("View Records");
	Button btnCloseView= new Button("Hide Records");

	btnView.setOnAction(e -> {
		timelineDown.play();
	});
	btnCloseView.setOnAction(e -> {
		timelineUp.play();
	});

	VBox laywrong= new VBox();
	laywrong.getChildren().addAll(lnotexist);
	laywrong.setPadding(new Insets(0,0,0,0));
	laywrong.setAlignment(Pos.CENTER);

	HBox laytest= new HBox(5);
	laytest.getChildren().addAll(txtfinger  /* btnadd*/);
	laytest.setAlignment(Pos.CENTER);
	//btnadd was beside txtfinger

	VBox laybtnsearch= new VBox();
	laybtnsearch.getChildren().addAll(txtsearch);
	laybtnsearch.setAlignment(Pos.CENTER);
	laybtnsearch.setPadding(new Insets(20,0,0,0));

	HBox laybtn= new HBox(5);
	laybtn.getChildren().addAll(btnView, btnCloseView);
	laybtn.setAlignment(Pos.CENTER);
	VBox lay1= new VBox(10);
	lay1.getChildren().addAll(progress, lpic, lname, laytest);
	lay1.setAlignment(Pos.CENTER);
	VBox layside= new VBox(25);
	layside.getChildren().addAll(lay1, laybtn, laybtnsearch, laywrong);
	layside.setAlignment(Pos.TOP_CENTER);
	layside.setMinWidth(230);
	layside.setPadding(new Insets(20,0,10,0));
	return layside;
}
 
开发者ID:mikemacharia39,项目名称:gatepass,代码行数:72,代码来源:AllAttendance.java

示例9: getActionPane

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
private VBox getActionPane(){
 VBox hb = new VBox();
 Text cont= new Text("Contents Frame");
 cont.setFont(Font.font("Andalus", 19));
 
 VBox lcont= new VBox();
 lcont.getChildren().add(cont);
 lcont.setPadding(new Insets(20,0,20,0));
 
 hb.setAlignment(Pos.TOP_LEFT);
 hb.setPadding(new Insets(0,10,10,10));
 hb.setSpacing(10);
 hb.setPrefHeight(40);
 Button upBtn = new Button("The Main Page");
 upBtn.setOnAction(e ->{
timelineUp.play();

 });
 Button downBtn = new Button("Second Page");
 downBtn.setOnAction(e ->{
  timelineDown.play();
 });
 
 Button thirdBtn = new Button("third Page");
 thirdBtn.setOnAction(e ->{
  timelinethree.play();
 });
 
 Button fourthBtn = new Button("fourth Page");
 fourthBtn.setOnAction(e ->{
  timelinefour.play();
 });
 
 upBtn.setMinWidth(160);
 downBtn.setMinWidth(145);
 thirdBtn.setMinWidth(130);
 fourthBtn.setMinWidth(115);
 
 hb.getChildren().addAll(lcont,upBtn, downBtn, thirdBtn, fourthBtn);
 hb.setMinWidth(200);
 return hb;
}
 
开发者ID:mikemacharia39,项目名称:gatepass,代码行数:43,代码来源:Help.java

示例10: ConnectionManager

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
@SneakyThrows
public ConnectionManager(Stage parent, MessageByLocaleService localeService, UIProperties uiProperties,
        StorageProperties storageProperties) {
    this.localeService = localeService;
    this.uiProperties = uiProperties;
    this.storageProperties = storageProperties;

    initModality(Modality.APPLICATION_MODAL);
    initOwner(parent);
    setTitle(localeService.getMessage("ui.menu.file.manager.title"));
    Integer width = uiProperties.getConnectionManagerWidth();
    Integer height = uiProperties.getConnectionManagerHeight();
    Integer rightWidth = uiProperties.getConnectionManagerRightPaneWidth();
    Integer leftWidth = width - rightWidth;

    VBox connectionBox = new VBox(uiProperties.getNewConnectSpacing());
    connectionBox.setAlignment(Pos.CENTER);
    connectionBox.setMinWidth(leftWidth);
    connectionBox.setMaxWidth(leftWidth);

    table = buildConnectionDataTable(leftWidth);
    configurationsFile = getConfigurationsFile();
    if (!configurationsFile.exists()) {
        configurationsFile.createNewFile();
    }
    String json = Files.toString(configurationsFile, UTF_8);
    if (!StringUtils.isBlank(json)) {
        List<ConnectionData> connections = fromJson(json, ConnectionData.class);
        table.getItems().addAll(connections);
    }
    connectionBox.getChildren().add(table);

    VBox buttons = new VBox();
    buttons.setMinWidth(rightWidth);
    buttons.setMaxWidth(rightWidth);
    buttons.setSpacing(uiProperties.getConnectionManagerButtonsSpacing());
    buttons.setAlignment(Pos.CENTER);

    Button newConnection = getButton("+");
    newConnection.setOnAction(event -> onNewConnection());
    Button removeConnection = getButton("-");
    removeConnection.setOnAction(event -> onConnectionRemove());
    Button useConnection = getButton("✓");
    useConnection.setOnAction(event -> onConnectionUsage());

    buttons.getChildren().add(newConnection);
    buttons.getChildren().add(removeConnection);
    buttons.getChildren().add(useConnection);

    SplitPane splitPane = new SplitPane(connectionBox, buttons);
    Scene content = new Scene(splitPane, width, height);

    setScene(content);
    show();
}
 
开发者ID:Kindrat,项目名称:cassandra-client,代码行数:56,代码来源:ConnectionManager.java


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