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


Java VBox.setMaxWidth方法代码示例

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


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

示例1: start

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
@Override
public void start(Stage stage) {
  this.stage = stage;

  stage.initStyle(StageStyle.TRANSPARENT);

  VBox box = new VBox(20);
  box.setMaxWidth(Region.USE_PREF_SIZE);
  box.setMaxHeight(Region.USE_PREF_SIZE);
  box.setBackground(Background.EMPTY);
  String style = "-fx-background-color: rgba(255, 255, 255, 0.5);";
  box.setStyle(style);

  box.setPadding(new Insets(50));
  BorderPane root = new BorderPane(box);
  root.setStyle(style);
  root.setBackground(Background.EMPTY);
  Scene scene = new Scene(root);
  scene.setFill(Color.TRANSPARENT);
  stage.setScene(scene);

  ImageView splashView = new ImageView(splashImage);
  box.getChildren().addAll(splashView, new Label("ST Verification Studio is loading.."));
  stage.show();
  Rectangle2D primScreenBounds = Screen.getPrimary().getVisualBounds();
  stage.setX((primScreenBounds.getWidth() - stage.getWidth()) / 2);
  stage.setY((primScreenBounds.getHeight() - stage.getHeight()) / 2);
}
 
开发者ID:VerifAPS,项目名称:stvs,代码行数:29,代码来源:StvsPreloader.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: createText

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
/**
 * Creates the title and description text.
 * @return Returns a VBox containing the data.
 */
public VBox createText(){

    final VBox layout = new VBox(15.0f);
    layout.setAlignment(Pos.CENTER_LEFT);
    layout.setPadding(new Insets(10,10,10,10));
    layout.setMaxWidth(300.0f);

    lblTitle = new Label(this.title);
    lblTitle.setTextFill(javafx.scene.paint.Paint.valueOf("#ff0000"));
    lblTitle.setFont( javafx.scene.text.Font.font(FONT_NAME, FontWeight.EXTRA_BOLD,FONT_SIZE) );

    txtDescription = new Text(this.description);
    txtDescription.setFill(Paint.valueOf("#ffffff"));
    txtDescription.setFont( javafx.scene.text.Font.font(FONT_NAME, FontWeight.BOLD,12.0f) );
    txtDescription.setBoundsType(TextBoundsType.LOGICAL_VERTICAL_CENTER);

    layout.getChildren().add(lblTitle);
    layout.getChildren().add(txtDescription);

    return layout;

}
 
开发者ID:Theldus,项目名称:PSE,代码行数:27,代码来源:ItemViewAdapter.java

示例4: 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

示例5: constructContainer

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
	bp.setId("loginviewbg");
	
	list = new ListView<String>();
	items = FXCollections.observableArrayList("Philippe Kr�ttli","Irina Deck","Javier Martinez Alvarez","Frithjof Hoppe");
	list.setItems(items);		
	
	AllFields = new VBox(50);
	AllFields.setAlignment(Pos.CENTER);
	AllFields.setMaxWidth(300);
	AllFields.setPadding(new Insets(20));
	
	GroupName = new HBox(50);
	Option = new HBox(50);
	
	name = new Label("Name:");
	groupname = new Label("{Gruppenname}");
	
	btnAdd = new AppButton("Hinzuf�gen");
	btnRemove = new AppButton("Entfernen");
	back = new BackButton(getFXController(),"Zur�ck");
	
	
	
	GroupName.getChildren().addAll(name,groupname);
	Option.getChildren().addAll(back,btnAdd,btnRemove);
	
	AllFields.getChildren().addAll(GroupName,Option,list);
	
	
	bp.setCenter(AllFields);
	
	back.setOnAction(e -> getFXController().showView("groupview"));
	btnAdd.setOnAction(e -> getFXController().showView("userlistview"));
	
	btnRemove.setOnAction(e -> {
	Alert alert = new Alert(AlertType.CONFIRMATION);
	alert.setTitle("Mitglied l�schen");
	alert.setHeaderText("Sie sind gerade dabei ein Mitglied aus der Gruppe zu entfernen.");
	alert.setContentText("Sind Sie sich sicher, dass sie das tun wollen?");
	Optional<ButtonType> result = alert.showAndWait();
	if (result.get() == ButtonType.OK){
	    // ... user chose OK
	} else {
		Alert noDeletion = new Alert(AlertType.INFORMATION);
		noDeletion.setTitle("L�schvorgang abgebrochen");
		noDeletion.setHeaderText("Mitglied nicht gel�scht");
		noDeletion.setContentText("Der L�schvorgang wurde abgebrochen.");
		noDeletion.showAndWait();
	    alert.close();
	}});
	
	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:57,代码来源:GroupMemberView.java

示例6: constructContainer

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
	bp.setId("loginviewbg");
	
	bottom = new HBox(50);
	bottom.setAlignment(Pos.CENTER);
	bottom.setMaxWidth(300);
	bottom.setPadding(new Insets(20,50,150,280));
	
	AllFields = new VBox(50);
	AllFields.setAlignment(Pos.CENTER);
	AllFields.setMaxWidth(300);
	AllFields.setPadding(new Insets(100,20,20,20));

	
	btnLocal = new AppButton("lokal speichern");
	btnServer = new AppButton("auf dem Server speichern");
	back = new BackButton(getFXController(), "Zur�ck");
	
	home = new HomeButton(getFXController());
	
	
	
	AllFields.getChildren().addAll(btnLocal, btnServer);
	bottom.getChildren().addAll(back, home);
	
	bp.setCenter(AllFields);
	bp.setBottom(bottom);
	
	btnLocal.setOnAction(e -> getFXController().showView("savedownloadstacklocal view"));
	btnServer.setOnAction(e -> getFXController().showView("savedownloadstackonserverdialogview"));
	back.setOnAction(e -> getFXController().showView("serverdoorview"));
	
	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:37,代码来源:StackSavepathSelectionView.java

示例7: constructContainer

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
	bp.setId("loginviewbg");

	bottom = new HBox(50);
	bottom.setAlignment(Pos.CENTER);
	bottom.setMaxWidth(300);
	bottom.setPadding(new Insets(20,50,150,280));

	AllFields = new VBox(50);
	AllFields.setAlignment(Pos.CENTER);
	AllFields.setMaxWidth(300);
	AllFields.setPadding(new Insets(100,20,20,20));


	btnOwnDMO = new AppButton("Eigenes DMO");
	btnForeignDMO = new AppButton("Fremdes DMO");
	back = new BackButton(getFXController(), "Zur�ck");

	home = new HomeButton(getFXController());

	AllFields.getChildren().addAll(btnOwnDMO, btnForeignDMO, back, home);
	bottom.getChildren().addAll(back, home);

	bp.setCenter(AllFields);
	bp.setBottom(bottom);

	btnOwnDMO.setOnAction(e -> getFXController().showView("savedownloaddoorowndmoview"));
	btnForeignDMO.setOnAction(e -> getFXController().showView("savedownloadstackforeigndmoview"));
	back.setOnAction(e -> getFXController().showView("serverdoorview"));

	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:35,代码来源:SaveDownloaddoorOnServerDialogView.java

示例8: constructContainer

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
	bp.setId("loginviewbg");
	
	bottom = new HBox(50);
	bottom.setAlignment(Pos.CENTER);
	bottom.setMaxWidth(300);
	bottom.setPadding(new Insets(20,50,150,280));
	
	AllFields = new VBox(50);
	AllFields.setAlignment(Pos.CENTER);
	AllFields.setMaxWidth(300);
	AllFields.setPadding(new Insets(100,20,20,20));

	
	btnLocal = new AppButton("lokal speichern");
	btnServer = new AppButton("auf dem Server speichern");
	back = new BackButton(getFXController(), "Zur�ck");
	
	home = new HomeButton(getFXController());
	
	
	
	AllFields.getChildren().addAll(btnLocal, btnServer);
	bottom.getChildren().addAll(back, home);
	
	bp.setCenter(AllFields);
	bp.setBottom(bottom);
	
	btnLocal.setOnAction(e -> getFXController().showView("savedownloadstacklocalview"));
	btnServer.setOnAction(e -> getFXController().showView("savedownloaddooronserverdialogview"));
	back.setOnAction(e -> getFXController().showView("serverdoorview"));
	
	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:37,代码来源:DoorSavepathSelectionView.java

示例9: constructContainer

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
	bp.setId("loginviewbg");
	
	bottom = new HBox(50);
	bottom.setAlignment(Pos.CENTER);
	bottom.setMaxWidth(300);
	bottom.setPadding(new Insets(20,50,150,280));
	
	AllFields = new VBox(50);
	AllFields.setAlignment(Pos.CENTER);
	AllFields.setMaxWidth(300);
	AllFields.setPadding(new Insets(100,20,20,20));

	
	btnOwnDMO = new AppButton("Eigenes DMO");
	btnForeignDMO = new AppButton("Fremdes DMO");
	back = new BackButton(getFXController(), "Zur�ck");
	
	home = new HomeButton(getFXController());
	
	AllFields.getChildren().addAll(btnOwnDMO, btnForeignDMO, back, home);
	bottom.getChildren().addAll(back, home);
	
	bp.setCenter(AllFields);
	bp.setBottom(bottom);
	
	btnOwnDMO.setOnAction(e -> getFXController().showView("savedownloadstackowndmodoorselectionview"));
	btnForeignDMO.setOnAction(e -> getFXController().showView("savedownloadstackforeigndmoview"));
	back.setOnAction(e -> getFXController().showView("serverstackview"));
	
	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:35,代码来源:SaveUploadstackOnServerDialogView.java

示例10: constructContainer

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
	bp.setId("loginviewbg");
	
	AllFields = new VBox(50);
	AllFields.setAlignment(Pos.CENTER);
	AllFields.setMaxWidth(300);
	AllFields.setPadding(new Insets(20));
	
	Identifier = new HBox();
	Status = new HBox();
	Bottom = new HBox();
	
	inputName = new TextField();
	inputName.setPromptText("Names der Door");
	inputName.setAlignment(Pos.CENTER_LEFT);
	
	name = new Label("Name:");
	status = new Label("Status:");
	statusValue = new Label("{Door bereits vorhanden}");

	btnCreate = new AppButton("Erstellen");
	back = new BackButton(getFXController(),"Abbrechen");
	
	Identifier.getChildren().addAll(name,inputName);
	Status.getChildren().addAll(status,statusValue);
	Bottom.getChildren().addAll(back,btnCreate);
	AllFields.getChildren().addAll(Identifier,Status,Bottom);
	
	bp.setCenter(AllFields);
	
	/*
	btnCreate.setOnAction(e -> getFXController().showView("serverdoorview"));
	--Listenter to crete a door
	*/
	
	
	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:41,代码来源:CreateDoorView.java

示例11: constructContainer

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
	
	bp.setId("loginviewbg");
	
	list = new ListView<String>();
	items = FXCollections.observableArrayList("Philippe Kr�ttli","Irina Deck","Javier Martinez Alvarez","Frithjof Hoppe");
	list.setItems(items);		
	
	AllFields = new VBox(50);
	AllFields.setAlignment(Pos.CENTER);
	AllFields.setMaxWidth(300);
	AllFields.setPadding(new Insets(20));
	
	SearchUser = new HBox();
	Bottom = new HBox();
	
	txtUserName = new TextField();
	txtUserName.setMinHeight(50);
	txtUserName.setMinWidth(700);
	txtUserName.setPromptText("Email-Adresse des Benutzers");
	
	btnSearch = new AppButton("Suchen");
	btnAdd = new AppButton("Hinzuf�gen");
	back = new BackButton(getFXController(),"Zur�ck");
	
	SearchUser.getChildren().addAll(txtUserName,btnSearch);
	Bottom.getChildren().addAll(back,btnAdd);
	AllFields.getChildren().addAll(SearchUser,list,Bottom);
	
	bp.setLeft(AllFields);
	
	//btnSearch.setOnAction(e -> getFXController().showView("userlist"));
	
	
	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:39,代码来源:UserListView.java

示例12: constructContainer

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
	bp.setId("loginviewbg");
	
	bottom = new HBox(50);
	bottom.setAlignment(Pos.CENTER);
	bottom.setMaxWidth(300);
	bottom.setPadding(new Insets(20,50,150,280));
	
	AllFields = new VBox(50);
	AllFields.setAlignment(Pos.CENTER);
	AllFields.setMaxWidth(300);
	AllFields.setPadding(new Insets(100,20,20,20));

	
	btnOwnDMO = new AppButton("Eigenes DMO");
	btnForeignDMO = new AppButton("Fremdes DMO");
	back = new BackButton(getFXController(), "Zur�ck");
	
	home = new HomeButton(getFXController());
	
	AllFields.getChildren().addAll(btnOwnDMO, btnForeignDMO, back, home);
	bottom.getChildren().addAll(back, home);
	
	bp.setCenter(AllFields);
	bp.setBottom(bottom);
	
	btnOwnDMO.setOnAction(e -> getFXController().showView("savedownloadstackowndmoview"));
	btnForeignDMO.setOnAction(e -> getFXController().showView("savedownloadstackforeigndmoview"));
	back.setOnAction(e -> getFXController().showView("doorsavepathselectionview"));
	
	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:35,代码来源:SaveDownloadstackOnServerDialogView.java

示例13: 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

示例14: constructContainer

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
	
	bp.setId("loginviewbg");
	
	list = new ListView<String>();
	items = FXCollections.observableArrayList("Philippe Kr�ttli","Irina Deck","Javier Martinez Alvarez","Frithjof Hoppe");
	list.setItems(items);		
	
	AllFields = new VBox(50);
	AllFields.setAlignment(Pos.CENTER);
	AllFields.setMaxWidth(300);
	AllFields.setPadding(new Insets(20));
	
	tabPane = new TabPane();
	tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
	 
    Tab tabDerive = new Tab();
    tabDerive.setText("Derive");
    HBox hbox = new HBox();
    hbox.setPadding(new Insets(20, 0, 0, 0));
    hbox.setStyle("-fx-font: 24 'System Regular'");
    hbox.getChildren().add(new Label(tabDerive.getText()));
    hbox.setAlignment(Pos.CENTER);
    tabDerive.setContent(hbox);
         
    Tab tabTeamwork = new Tab();
    tabTeamwork.setText("Teamwork");
    HBox hbox2 = new HBox();
    hbox2.setPadding(new Insets(20, 0, 0, 0));
    hbox2.setStyle("-fx-font: 24 'System Regular'");
    hbox2.getChildren().add(new Label(tabTeamwork.getText()));
    hbox2.setAlignment(Pos.CENTER);
    tabTeamwork.setContent(hbox2);
         
    tabPane.getTabs().addAll(tabDerive, tabTeamwork);
    tabPane.getSelectionModel().getSelectedItem().setStyle("-fx-background-color:#a3a4a8");
    
    tabPane.setOnMouseClicked(e -> {
		for(Tab actTab:tabPane.getTabs())
		{
			actTab.setStyle("-fx-background-color:#f0f0f0");
		}
		tabPane.getSelectionModel().getSelectedItem().setStyle("-fx-background-color:#a3a4a8");
		
		if(tabPane.getSelectionModel().getSelectedIndex()== 0)
		{
			btnContinue.setOnAction(ev -> getFXController().showView("deriveserverdoorview"));
		} else
		{
			btnContinue.setOnAction(ev -> getFXController().showView("teamworkserverdoorview"));
		}
	});
	
	SearchDMO = new HBox();
	Bottom = new HBox();
	
	txtDMO = new TextField();
	txtDMO.setMinHeight(50);
	txtDMO.setMinWidth(700);
	txtDMO.setPromptText("Email-Adresse des Benutzers");
	
	btnSearch = new AppButton("Suchen");
	btnContinue = new AppButton("Weiter zum DMO");
	back = new BackButton(getFXController(),"Zur�ck");
		
	SearchDMO.getChildren().addAll(txtDMO,btnSearch);
	Bottom.getChildren().addAll(back, btnContinue);
	AllFields.getChildren().addAll(SearchDMO,list,Bottom);
	
	bp.setTop(tabPane);
	bp.setCenter(AllFields);
	bp.setBottom(Bottom);
		
	
	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:79,代码来源:SaveDownloadstackForeignDMOView.java

示例15: constructContainer

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
	bp.setId("loginviewbg");
	
	AllFields = new VBox(50);
	AllFields.setAlignment(Pos.CENTER);
	AllFields.setMaxWidth(300);
	AllFields.setPadding(new Insets(20));

	
	btnUserMgmt = new AppButton("Benutzerverwaltung");
	
	btnGroupMgmt = new AppButton("Gruppenverwaltung");
	
	home = new HomeButton(getFXController());
	
	AllFields.getChildren().addAll(btnUserMgmt, btnGroupMgmt, home);
	
	bp.setCenter(AllFields);
	
	btnUserMgmt.setOnAction(e -> getFXController().showView("userview"));
	btnGroupMgmt.setOnAction(e -> getFXController().showView("groupview"));
	
	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:27,代码来源:ManagementSelectionView.java


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