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


Java BorderPane.setId方法代码示例

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


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

示例1: constructContainer

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public Parent constructContainer() {
	// CSS formatierte Meldung auf BS bringen (mit div. Schrifteffekten)
	Text t = new Text("Starting Demo (please wait)...");
	t.setId("fancytext");

	// Button f�r Zur�ck zum Hauptmenue:
	Button b = new Button("Zur�ck...");
	b.setOnAction(e -> getFXController().showMainView());

	// Erstellt VBox Layout f�r beide obige Elemente:
	myLayout.setSpacing(50);
	myLayout.getChildren().addAll(t, b);
	
	// VBox in neuem Borderpane einf�gen, zwingend wenn Hintergrund neu sein soll
	// CSS liefert neue Darstellung:
	BorderPane bp = new BorderPane();
	bp.setCenter(myLayout);
	bp.setId("gamebg");
	
	// BP in Scene einf�gen:
	// TODO Auto-generated method stub
	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:25,代码来源:TestView.java

示例2: getContentPane

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override protected Parent getContentPane() {
    BorderPane root = new BorderPane();
    root.getStyleClass().add("preferences-stage");
    root.setId("PreferencesStage");

    FormPane formPane = new FormPane("preferences-stage-form", 3);
    // @formatter:off
    formPane.addFormField("Mouse Trigger: ", mouseTriggerField, mouseTriggerButton)
            .addFormField("Keyboard Trigger: ", keyTriggerField)
            .addFormField("Hide MarathonITE options from view: ", doNotHideMarathonITEBlurbs);
    // @formatter:on

    root.setCenter(formPane);
    root.setBottom(buttonBar);
    return root;
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:17,代码来源:PreferencesStage.java

示例3: HoverButton

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
public HoverButton (FXView v, String tipp, String targetView, String id) {
		myTipp = tipp;
		if (tooltipEnable == null) {
			/**
			 *  this all is to be more efficient when handling the event below
			 */
// TODO move to model
			tooltipEnable = v.getFXController().getModel("config").getDataList("tooltipp").get(0);
			isTooltipActif = true;
			if (tooltipEnable == null) {
				v.getFXController().getModel("config").doAction(Command.SET,"tooltipp","false");
			}
			if (tooltipEnable != null && tooltipEnable.equals("true")) {
				isTooltipActif = false;
			}
		}
	    BorderPane bp = new BorderPane();
	    bp.setOnMouseEntered( e -> {
				if (isTooltipActif && myTipp != null) {
					lernText.setText(myTipp);
				};
			}
		);
		bp.setOnMouseExited( e -> lernText.setText("") );
		if (targetView != null) {
			bp.setOnMouseClicked( e -> v.getFXController().showView(targetView) );
		}
	    bp.setMinSize(FXSettings.HoverButtonWidth,FXSettings.HoverButtonHeight);
	    if (id != null) bp.setId(id);
		getChildren().addAll(bp,lernText);
	    setAlignment(Pos.CENTER);
	}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:33,代码来源:HoverButton.java

示例4: constructContainer

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public Parent constructContainer() {
	this.getWindow().initStyle (StageStyle.TRANSPARENT);
	this.getWindow().setTitle ( Globals.appTitle + " " + subTitle );

	// Buttons ( Dekoration im CSS mit: .button {...} )
	Button startBtn   = new Button("Simulieren");
	Button optBtn 	  = new Button("Optionen");
	Button demoBtn    = new Button("Demo");
	Button helpBtn    = new Button("Hilfe");
	Button quitBtn    = new Button("Beenden");

	// Verhalten der Button bestimmen (View-Controller's):
	startBtn.setOnAction ( e -> this.getFXController().showView("simview") );
	optBtn.setOnAction   ( e -> getFXController().showView("optview") );
	demoBtn.setOnAction  ( e -> getFXController().showView("demoview") );
	helpBtn.setOnAction  ( e -> getFXController().showView("helpview") );
	quitBtn.setOnAction  ( e -> { getWindow().close(); } );

	// Zum Bsp. eine VBox als Layout und Container f�r die Buttons:
	VBox layout = new VBox();
	layout.getChildren().addAll(startBtn, optBtn, demoBtn, helpBtn,quitBtn); 

	// Neuer Container f�r das Haupt-Fenster (fakultativ, kann aber so eigens gestaltet werden):
	BorderPane bp = new BorderPane();
	bp.setCenter(layout);
	bp.setId("mainBS"); 	// CSS ID f�r eine allf�llig eigene Darstellung
	
	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:31,代码来源:SampleFXView.java

示例5: getContentPane

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override protected Parent getContentPane() {
    BorderPane root = new BorderPane();

    root.getStyleClass().add("MarathonFileChooser");
    root.setId("marathon-file-chooser");
    if (doesAllowChildren) {
        if (!fileChooserInfo.isFileCreation()) {
            propertiesView = new AddPropertiesView(new TestPropertiesInfo(fileChooserInfo.getFileToSave()));
            TitledPane titledPane = new TitledPane("Properties", propertiesView);
            centerPane.getChildren().addAll(splitPane, titledPane);
            root.setPrefWidth(540);
            root.setPrefHeight(580);
        } else {
            root.setPrefWidth(540);
            root.setPrefHeight(380);
            centerPane.getChildren().addAll(splitPane);
        }
    } else {
        root.setPrefWidth(540);
        root.setPrefHeight(380);
        centerPane.getChildren().add(childrenListView);
    }
    root.setCenter(centerPane);
    root.setBottom(buttonBar);
    return root;
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:27,代码来源:MarathonFileChooser.java

示例6: getContentPane

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override protected Parent getContentPane() {
    BorderPane content = new BorderPane();
    content.getStyleClass().add("function-stage");
    content.setId("functionStage");
    content.setCenter(mainSplitPane);
    content.setBottom(buttonBar);
    content.setPrefSize(700, 500);
    return content;
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:10,代码来源:FunctionStage.java

示例7: getContentPane

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override protected Parent getContentPane() {
    BorderPane root = new BorderPane();
    root.setId("message-stage");
    root.setCenter(new ScrollPane(textArea));
    root.setBottom(buttonBar);
    return root;
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:8,代码来源:MessageStage.java

示例8: getContentPane

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override protected Parent getContentPane() {
    addButtonsToVerticalButtonBar();
    BorderPane content = new BorderPane();
    content.getStyleClass().add("run-history-stage");
    content.setId("RunHistoryStage");
    content.setCenter(historyPane);
    content.setBottom(buttonBar);
    return content;
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:10,代码来源:RunHistoryStage.java

示例9: getContentPane

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override protected Parent getContentPane() {
    BorderPane borderPane = new BorderPane();
    borderPane.setId("check-list-input-stage");
    FormPane form = new FormPane("check-list-input-stage-form", 2);
    form.addFormField(labelText, inputTextField);
    borderPane.setCenter(form);
    borderPane.setBottom(buttonBar);
    return borderPane;
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:10,代码来源:CheckListView.java

示例10: show

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
private void show() {
	BorderPane bp = new BorderPane();
	bp.setPadding(new Insets(10,50,50,50));
	HBox hb = new HBox();
	hb.setPadding(new Insets(20,20,20,30));		
	//Implementing Nodes for GridPane
	Label lblUserName = new Label("Username");		
	Label lblPassword = new Label("Password");
	Label lblLanguage = new Label("Language");	

	Button btnReset = createButton("Reset", "btnLogin");
	Button btnRegister = createButton("Register", "btnReset");
	Button btnLogin = createButton("Login", "btnReset");

	//Adding GridPane
	GridPane gridPane = createGridPane(lblUserName, lblPassword, lblLanguage, btnLogin, btnReset, btnRegister);
	gridPane.setId("root");
	Text text = createText("Game Login");
	text.setId("text");
	//Adding text to HBox
	hb.getChildren().add(text);
	//Add ID's to Nodes
	bp.setId("bp");	
	//Add HBox and GridPane layout to BorderPane Layout
	bp.setTop(hb);
	bp.setCenter(gridPane); 				
	//Adding BorderPane to the scene and loading CSS
	scene = new Scene(bp);
	scene.getStylesheets().setAll(CSS_LOCATION);		
	//Action for btnLogin
	btnLogin.setOnAction(e -> buttonLoginAction());
	//Action for btnReset
	btnReset.setOnAction(e -> buttonResetAction());		
	//Action for btnRegister
	btnRegister.setOnAction(p -> {
		tempCheckUser = txtUserName.getText().toString();
		tempCheckPw = pf.getText().toString();
		if(tempCheckUser.length() < LENGTH_OF_USER || tempCheckPw.length() < LENGTH_OF_PASSWORD ){
			MessageShowing unsuccess = new MessageShowing();
			unsuccess.show("failure");
			tempCheckUser="";
			tempCheckPw = "";
			buttonResetAction();
			return;
		}
		usersModel.addUser(tempCheckUser, tempCheckPw);

		writer.write(tempCheckUser, tempCheckPw);
		((PopUpMessage) p).show("success");
		buttonResetAction();});	

	scene.setOnKeyPressed(e -> handleKeyInput(e.getCode()));
}
 
开发者ID:LtubSalad,项目名称:voogasalad-ltub,代码行数:54,代码来源:PasswordManager.java

示例11: constructContainer

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
	bp = new BorderPane();
	bp.setId("userviewbg");
	
	back = new BackButton(getFXController(),"Zur�ck");
	
	tabPane = new TabPane();
	tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
	tabPane.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Tab>() {
		   @Override
		   public void changed(ObservableValue<? extends Tab> ov, Tab tabOld, Tab tabNew) {
		      refreshView();
		   }
		});
	 
    	    
    Center = new VBox();
    Search = new HBox();
    Top = new VBox();
    
    
    txtSearch = new TextField();
    txtSearch.setPromptText("Suche nach Doors");
    txtSearch.setMinWidth(740);
    txtSearch.setMinHeight(50);;
    btnSearch = new AppButton("Suchen");
    btnCreate = new AppButton("++Erstellen++");
    btnCreate.setMinWidth(740);
    btnCreate.setMinWidth(740);
    btnCreate.setOnAction(e -> getFXController().showView("createdoorview"));
    
    StackShowList.setSpacing(20);
    Center.setSpacing(20);
    
    
    sMain = new ScrollPane();
    sMain.setContent(Center);
    
    Search.getChildren().addAll(txtSearch,btnSearch);
    Center.getChildren().addAll(StackShowList,btnCreate);
    
	back = new AppButton("Zur�ck");
	back.setOnAction(e-> getFXController().showView("dmodoorview"));
	
	
	Bottom = new VBox();

	Bottom.getChildren().addAll(back);
	Top.getChildren().addAll(Search,tabPane);
	
	bp.setTop(Top);
	bp.setCenter(sMain);
	bp.setBottom(Bottom);
	
	getFXController().getModel("serverstack").registerView(this);
	
	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:61,代码来源:DMOStackView.java

示例12: constructContainer

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
	bp = new BorderPane();
	bp.setId("userviewbg");
	
	back = new BackButton(getFXController(),"Zur�ck");
	
	tabPane = new TabPane();
	tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
	tabPane.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Tab>() {
		   @Override
		   public void changed(ObservableValue<? extends Tab> ov, Tab tabOld, Tab tabNew) {
		      refreshView();
		   }
		});
	 
    	    
    Center = new VBox();
    Search = new HBox();
    Top = new VBox();
    
    
    txtSearch = new TextField();
    txtSearch.setPromptText("Suche nach Doors");
    txtSearch.setMinWidth(740);
    txtSearch.setMinHeight(50);;
    btnSearch = new AppButton("Suchen");
    btnCreate = new AppButton("++Erstellen++");
    btnCreate.setMinWidth(590);
    btnCreate.setOnAction(e -> getFXController().showView("createdoorview"));
    
    StackShowList.setSpacing(20);
    Center.setSpacing(20);
    
    
    sMain = new ScrollPane();
    sMain.setContent(Center);
    
    Search.getChildren().addAll(txtSearch,btnSearch);
    Center.getChildren().addAll(StackShowList,btnCreate);
    
	back = new AppButton("Zur�ck");
	back.setOnAction(e-> getFXController().showView("saveuploadstackonserverdialogview"));
	
	
	Bottom = new VBox();

	Bottom.getChildren().addAll(back);
	Top.getChildren().addAll(Search,tabPane); 
	
	bp.setTop(Top);
	bp.setCenter(sMain);
	bp.setBottom(Bottom);
	
	getFXController().getModel("serverstack").registerView(this);
	
	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:60,代码来源:SaveDownloadstackOwnDMODoorSelectionView.java

示例13: constructContainer

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
	bp = new BorderPane();
	bp.setId("userviewbg");
	
	back = new BackButton(getFXController(),"Zur�ck");
	
	tabPane = new TabPane();
	tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
	tabPane.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Tab>() {
		   @Override
		   public void changed(ObservableValue<? extends Tab> ov, Tab tabOld, Tab tabNew) {
		      refreshView();
		   }
		});
	 
    	    
    Center = new VBox();
    Search = new HBox();
    Top = new VBox();
    
    
    txtSearch = new TextField();
    txtSearch.setPromptText("Suche nach Doors");
    txtSearch.setMinWidth(740);
    txtSearch.setMinHeight(50);;
    btnSearch = new AppButton("Suchen");
    btnCreate = new AppButton("++Erstellen++");
    btnCreate.setMinWidth(590);
    btnCreate.setOnAction(e -> getFXController().showView("createdoorview"));
    
    StackShowList.setSpacing(20);
    Center.setSpacing(20);
    
    
    sMain = new ScrollPane();
    sMain.setContent(Center);
    
    Search.getChildren().addAll(txtSearch,btnSearch);
    Center.getChildren().addAll(StackShowList,btnCreate);
    
	back = new AppButton("Zur�ck");
	back.setOnAction(e-> getFXController().showView("savedownloaddooronserverdialogview"));
	
	
	Bottom = new VBox();

	Bottom.getChildren().addAll(back);
	Top.getChildren().addAll(Search,tabPane);
	
	bp.setTop(Top);
	bp.setCenter(sMain);
	bp.setBottom(Bottom);
	
	getFXController().getModel("serverstack").registerView(this);
	
	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:60,代码来源:SaveDownloaddoorOwnDMOView.java

示例14: constructContainer

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
	bp = new BorderPane();
	bp.setId("userviewbg");
	
	back = new BackButton(getFXController(),"Zur�ck");
	
	tabPane = new TabPane();
	tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
	tabPane.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Tab>() {
		   @Override
		   public void changed(ObservableValue<? extends Tab> ov, Tab tabOld, Tab tabNew) {
		      refreshView();
		   }
		});
	 
    	    
    Center = new VBox();
    Search = new HBox();
    Top = new VBox();
    
    
    txtSearch = new TextField();
    txtSearch.setPromptText("Suche nach Doors");
    txtSearch.setMinWidth(740);
    txtSearch.setMinHeight(50);;
    btnSearch = new AppButton("Suchen");
    btnCreate = new AppButton("++Erstellen++");
    btnCreate.setMinWidth(740);
    btnCreate.setMinWidth(740);
    btnCreate.setOnAction(e -> getFXController().showView("createdoorview"));
    
    StackShowList.setSpacing(20);
    Center.setSpacing(20);
    
    
    sMain = new ScrollPane();
    sMain.setContent(Center);
    
    Search.getChildren().addAll(txtSearch,btnSearch);
    Center.getChildren().addAll(StackShowList,btnCreate);
    
	back = new AppButton("Zur�ck");
	back.setOnAction(e-> getFXController().showView("lernenselectionview"));
	
	
	Bottom = new VBox();

	Bottom.getChildren().addAll(back);
	Top.getChildren().addAll(Search,tabPane);
	
	bp.setTop(Top);
	bp.setCenter(sMain);
	bp.setBottom(Bottom);
	
	getFXController().getModel("serverstack").registerView(this);
	
	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:61,代码来源:DMODoorView.java

示例15: constructContainer

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
	bp = new BorderPane();
	bp.setId("userviewbg");
	
	back = new BackButton(getFXController(),"Zur�ck");
	
	tabPane = new TabPane();
	tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
	tabPane.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Tab>() {
		   @Override
		   public void changed(ObservableValue<? extends Tab> ov, Tab tabOld, Tab tabNew) {
		      refreshView();
		   }
		});
	 
    	    
    Center = new VBox();
    Search = new HBox();
    Top = new VBox();
    
    
    txtSearch = new TextField();
    txtSearch.setPromptText("Suche nach Doors");
    txtSearch.setMinWidth(740);
    txtSearch.setMinHeight(50);;
    btnSearch = new AppButton("Suchen");
    btnCreate = new AppButton("++Erstellen++");
    btnCreate.setMinWidth(590);
    btnCreate.setOnAction(e -> getFXController().showView("createdoorview"));
    
    StackShowList.setSpacing(20);
    Center.setSpacing(20);
    
    
    sMain = new ScrollPane();
    sMain.setContent(Center);
    
    Search.getChildren().addAll(txtSearch,btnSearch);
    Center.getChildren().addAll(StackShowList,btnCreate);
    
	back = new AppButton("Zur�ck");
	back.setOnAction(e-> getFXController().showView("doorsavepathselectionview"));
	
	
	Bottom = new VBox();

	Bottom.getChildren().addAll(back);
	Top.getChildren().addAll(Search,tabPane);
	
	bp.setTop(Top);
	bp.setCenter(sMain);
	bp.setBottom(Bottom);
	
	getFXController().getModel("serverstack").registerView(this);
	
	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:60,代码来源:SaveDownloadstackLocalView.java


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