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


Java BorderPane.setPadding方法代码示例

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


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

示例1: constructContainer

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public Parent constructContainer ()
{
	headLbl = new Label("Umbenennen");
	headLbl.setId("bold");

	AppButton backBtn = new AppButton("_Zur�ck");
	backBtn.setOnAction(e -> getFXController().showView("doorview"));

	BorderPane headLayout = new BorderPane(headLbl);
	headLayout.setPadding(new Insets(0, 0, 25, 0));

	renameLayout.setPadding(new Insets(10));
	renameLayout.setAlignment(Pos.TOP_CENTER);
	
	scroller.setMaxWidth(600);
	scroller.setFitToWidth(true);
	scroller.setPadding(new Insets(25));

	MainLayout maLay = new MainLayout(scroller, headLayout, new ControlLayout(backBtn));
	getFXController().getModel("stack").registerView(this);
	return maLay;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:24,代码来源:RenameView.java

示例2: LoadingStage

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
public LoadingStage(String title, String  noticeText) {
	this.setWidth(WIDTH);
	this.setHeight(HEIGHT);
	
	this.setTitle(title);
	progressBar = new ProgressBar();
	this.notice = new Label(noticeText);
	BorderPane mainPane = new BorderPane();
	Scene s = new Scene(mainPane);
	
	progressBar.setPrefWidth(WIDTH - 25);
	
	mainPane.setTop(notice);
	mainPane.setCenter(progressBar);
	
	mainPane.setPadding(new Insets(15));
	
	this.setScene(s);
}
 
开发者ID:ScreachFr,项目名称:titanium,代码行数:20,代码来源:LoadingStage.java

示例3: constructContainer

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
	public Parent constructContainer ()
	{
		backBtn.setOnAction(e ->
		{
			setData(getMyModel().getString(null));
			getWindow().getScene().widthProperty().removeListener(event ->
			{
				elements.setMinWidth(getWindow().getScene().getWidth() - 80);
			});
			getFXController().showLastView();
		});

		elements.setPadding(new Insets(30));
		elements.setAlignment(Pos.TOP_CENTER);

		VerticalScroller scroLay = new VerticalScroller(elements, 1);

		headLabel.setId("bold");
/*
		backBtn.setOnAction(e ->
		{
			setData();
		});
		*/
		BorderPane headLayout = new BorderPane(headLabel);
		headLayout.setPadding(new Insets(0, 0, 25, 0));
		
		MainLayout maLay = new MainLayout(scroLay, headLayout, new ControlLayout(backBtn));

		return maLay;
	}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:33,代码来源:RenameView_old.java

示例4: constructContainer

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public Parent constructContainer ()
{
	headLbl = new Label("");
	headLbl.setId("bold");

	BorderPane headLayout = new BorderPane(headLbl);
	headLayout.setPadding(new Insets(25));

	// Zur�ck Button
	backBtn = new AppButton("_Zur�ck");
	backBtn.setOnAction(e -> getFXController().showView("simpleeditorview"));

	// Info Button
	infobtn = new AppButton("Hilfe");
	infobtn.setOnAction(e -> getFXController().showView("bbcodeinfo"));

	// EditLayout
	editLayout.setPadding(new Insets(10));
	editLayout.setAlignment(Pos.TOP_CENTER);

	// Controll Layout
	ControlLayout conLay = new ControlLayout(backBtn, infobtn);

	// Main Layout
	MainLayout maLay = new MainLayout(editLayout, headLayout, conLay);

	return maLay;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:30,代码来源:EditorView.java

示例5: constructContainer

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public Parent constructContainer ()
{
	headLbl = new Label("");
	headLbl.setId("bold");

	AppButton backBtn = new AppButton("_Zur�ck");
	backBtn.setOnAction(e -> getFXController().showView("stack"));

	//Info Button
	AppButton infobtn = new AppButton("Hilfe");
	infobtn.setOnAction(e ->
	getFXController().showView("bbcodeinfo"));
	
	BorderPane headLayout = new BorderPane(headLbl);
	headLayout.setPadding(new Insets(0, 0, 25, 0));

	editLayout.setPadding(new Insets(10));
	editLayout.setAlignment(Pos.TOP_CENTER);
	
	scroller.setMaxWidth(600);
	scroller.setFitToWidth(true);
	scroller.setPadding(new Insets(25));
	

	MainLayout maLay = new MainLayout(scroller, headLayout, new ControlLayout(backBtn, infobtn));
	getFXController().getModel("cards").registerView(this);
	return maLay;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:30,代码来源:SimpleEditorView.java

示例6: createCenterLoadingBox

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
public static BorderPane createCenterLoadingBox(final int height)
{
	BorderPane pane = createBorderPane(450, height);
	pane.setStyle("-fx-background-color: rgba(20, 20, 20, 0.6); -fx-background-radius: 10px; -fx-border-radius: 10px; -fx-border-color: rgba(255, 255, 255, 0.1); -fx-border-width: 2px;");
	pane.setPadding(new Insets(10));
	return pane;
}
 
开发者ID:PolyphasicDevTeam,项目名称:NoMoreOversleeps,代码行数:8,代码来源:JavaFxHelper.java

示例7: formatcomment

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
public static BorderPane formatcomment(String timestamp, String comment){

        BorderPane notice = new BorderPane();
        notice.setPadding(new Insets(0,-20,0,10));
        notice.setMaxWidth(340);

        VBox noticeVB = new VBox(5);
        noticeVB.setStyle("-fx-background-color: transparent; -fx-border-color: #333; -fx-border-width: 1,1,1,1; -fx-border-radius: 10; -fx-text-color: #333;");

        Label commentLabel = new Label(comment);
        commentLabel.setPadding(new Insets(5));
        commentLabel.setFont(new Font("Cambria", 16));
        commentLabel.setTextFill(Color.web("#191919"));
        commentLabel.setWrapText(true);
        commentLabel.setMaxWidth(320);
        commentLabel.setAlignment(Pos.BOTTOM_LEFT);

        Label time = new Label(timeStampChangeFormat.timeStampChangeFormat(timestamp));
        time.setFont(new Font("Cambria", 12));
        time.setTextFill(Color.web("#4c4c4c"));
        time.setPadding(new Insets(5));
        time.setMaxWidth(320);
        time.setAlignment(Pos.BOTTOM_LEFT);

        noticeVB.getChildren().addAll(commentLabel,time);
        notice.setLeft(noticeVB);
        noticeVB.setStyle("-fx-background-color: #fff");

        return notice;

    }
 
开发者ID:madHEYsia,项目名称:ClassroomFlipkart,代码行数:32,代码来源:commentFormat.java

示例8: productbyType

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
public static BorderPane productbyType(String type) {

        BorderPane products = new BorderPane();
        products.setPadding(new Insets(10,20,10,20));

        Connection con = null;
        PreparedStatement stmt = null;
        ResultSet rs = null;

        String query = DBUtils.prepareSelectQuery(" * ",
                " classroomflipkart.productdetail AS T ," +
                        " ( "+ DBUtils.prepareSelectQuery("productId",
                                " classroomflipkart.homeproducts ",
                                "type = '"+type+"'")+
                        " ) AS S",
                " T.productId = S.productId ");

        try {
            con = DBUtils.getConnection();
            stmt = con.prepareStatement(query);
            rs = stmt.executeQuery();

            rs.last();
            int size = rs.getRow();

            if (size>0){
                rs.beforeFirst();

                Label title = new Label(type+"");
                title.setFont(Font.font("Open Sans", FontWeight.BOLD,17));
                title.setPadding(new Insets(10));
                title.setAlignment(Pos.CENTER);

                HBox productList = new HBox(20);
                productList.setAlignment(Pos.CENTER);

                while (rs.next()) {
                    String productId = rs.getString("productId");
                    String productName = rs.getString("productName");
                    String newPrice = rs.getString("newPrice");
                    String oldPrice = rs.getString("oldPrice");
                    String category = rs.getString("category");
                    String subcategory = rs.getString("subcategory");
                    String imageName = rs.getString("imageName");
                    String productAvailability = rs.getString("productAvailability");

                    productList.getChildren().add(productDetail.productByType(productId,productName,newPrice,oldPrice,category,subcategory,imageName, productAvailability));
                }

                ScrollPane proScroller = new ScrollPane(productList);
                proScroller.setFitToHeight(true);
                proScroller.setFitToWidth(true);
                proScroller.setPannable(true);
                proScroller.setPadding(new Insets(0,0,30,0));

                StackPane titlePane = new StackPane(title);
                titlePane.setAlignment(Pos.CENTER);

                StackPane productPane = new StackPane(proScroller);
                productPane.setAlignment(Pos.CENTER);

                products.setTop(titlePane);
                products.setCenter(productPane);
            }


        } catch (Exception e) {
            products.setCenter(new Label(e.getMessage()));
            e.printStackTrace();
        } finally {
            DBUtils.closeAll(rs, stmt, con);
            return products;
        }
    }
 
开发者ID:madHEYsia,项目名称:ClassroomFlipkart,代码行数:75,代码来源:fetchProducts.java

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

示例10: constructContainer

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

	webContent.loadContent("<html><body><b>Missing a manual</b></body></html>");
	try {
		// To avoid strange chars like "", the html -Tag is added here separately:
		webContent.loadContent("<html>"+Functions.fileToString(new File(
							   "src/views/txt/troubleshoot.htm"))+"</html>");
	} catch (Exception e) {
		e.printStackTrace();
	}
	double pageWidth = this.getFXController().getMyFXStage().getOPTIMAL_WIDTH();
	double pageHeight = this.getFXController().getMyFXStage().getOPTIMAL_HEIGHT();
	debug.Debugger.out("ManualView sizes: w:"+pageWidth+" h:"+pageHeight);
	
	//webPage.setPrefHeight(pageHeight);
	webPage.setPrefWidth(pageWidth*.93);
	//webContent.setJavaScriptEnabled(true);
	webPage.applyCss();

	Label labelTitel = new Label("Fehlerbehandlung");
	labelTitel.setId("anleitungstitel");

	BackButton backBtn = new BackButton(this.getFXController());

	BorderPane headLayout = new BorderPane(labelTitel);
	headLayout.setPadding(new Insets(20));

	ScrollPane scroller = new ScrollPane();
	scroller.setMaxWidth(pageWidth);

	scroller.setContent(webPage);
	scroller.setHbarPolicy(ScrollBarPolicy.NEVER);
	scroller.setVbarPolicy(ScrollBarPolicy.ALWAYS);
	scroller.setId("anleitung");

	HBox controlLayout = new HBox(20);
	controlLayout.setAlignment(Pos.BOTTOM_CENTER);
	controlLayout.getChildren().addAll(backBtn);
	controlLayout.setPadding(new Insets(10));

	BorderPane mainLayout = new BorderPane();
	mainLayout.setPadding(new Insets(15));
	mainLayout.setTop(headLayout);
	mainLayout.setCenter(scroller);
	mainLayout.setBottom(controlLayout);

	return mainLayout;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:50,代码来源:TroubleShootView.java

示例11: constructContainer

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public Parent constructContainer() {
	headLbl = new Label("");
	headLbl.setId("bold");

	HomeButton backBtn = new HomeButton(getFXController(), "_Zur�ck");
	AppButton newDoorBtn = new AppButton(txtNewTheme);
	
	Image trashImg = new Image("views/pictures/Papierkorb.png");
	ImageView trashImgView = new ImageView(trashImg);

	BorderPane headLayout = new BorderPane(headLbl);
	headLayout.setPadding(new Insets(0, 0, 25, 0));

	doorLayout.setPadding(new Insets(10));
	doorLayout.setAlignment(Pos.TOP_CENTER);

	scroller.setMaxWidth(600);
	scroller.setFitToWidth(true);
	scroller.setPadding(new Insets(25));
	
	ControlLayout conLay = new ControlLayout(backBtn, newDoorBtn, trashImgView);
	MainLayout maLay = new MainLayout(scroller, headLayout, conLay);
	
	newDoorBtn.setOnAction(e ->
	{
		newDoor();
	});
	
	trashImgView.setOnDragOver(event ->
	{
		if (event.getGestureSource() != trashImgView && event.getDragboard().hasString())
		{
			event.acceptTransferModes(TransferMode.COPY_OR_MOVE);
		}

		event.consume();
	});
	
	trashImgView.setOnDragDropped(event ->
	{
		Dragboard db = event.getDragboard();
		boolean success = false;
		if (db.hasString())
		{
			success = deleteDoor(db.getString());
		}

		event.setDropCompleted(success);
		event.consume();
	});
	
	getFXController().getModel("cards").registerView(this);
	return maLay;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:56,代码来源:DoorView_withoutDesign.java

示例12: constructContainer

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public Parent constructContainer() {
	webContent.loadContent("<html><body><b>Missing a manual</b></body></html>");
	try {
		// To avoid strange chars like "", the html -Tag is added here separately:
		webContent.loadContent("<html>"+Functions.fileToString(new File(
							   "src/views/txt/impressum.htm"))+"</html>");
	} catch (Exception e) {
		e.printStackTrace();
	}
	double pageWidth = this.getFXController().getMyFXStage().getOPTIMAL_WIDTH();
	double pageHeight = this.getFXController().getMyFXStage().getOPTIMAL_HEIGHT();
	debug.Debugger.out("ImpressumView sizes: w:"+pageWidth+" h:"+pageHeight);
	
	//webPage.setPrefHeight(pageHeight);
	//webContent.setJavaScriptEnabled(true);
	webPage.setPrefWidth(pageWidth*.93);
	webPage.applyCss();

	Label labelTitel = new Label("Impressum");
	labelTitel.setId("impressumtitel");

	AppButton backBtn = new AppButton("_Zur�ck");
	backBtn.setOnAction(e -> getFXController().showMainView());

	BorderPane headLayout = new BorderPane(labelTitel);
	headLayout.setPadding(new Insets(20));
		
	//Info: Die Links sind nun im Controlllayout damit sie mit dem
	//Zur�ckButton auf einer H�he sind.
	Hyperlink WISSlink = new Hyperlink("WISS Webseite");
	WISSlink.setOnAction(e -> Functions.openWebpage("http://www.wiss.ch/"));	
	Hyperlink BITLink = new Hyperlink("BIT Webseite");
	BITLink.setOnAction(e -> Functions.openWebpage("https://www.bit.admin.ch/"));		
	Hyperlink LehrlingeLink = new Hyperlink("Unsere Webseite");
	LehrlingeLink.setOnAction(e -> Functions.openWebpage("http://bund2015.wiss-bern.ch/"));

	WISSlink.setId("LinkiD");
	BITLink.setId("LinkiD");
	LehrlingeLink.setId("LinkiD");
	
	//ScrollPane scroller = new ScrollPane();
	//scroller.setMaxWidth(800);
	//scroller.setHbarPolicy(ScrollBarPolicy.NEVER);
	//scroller.setVbarPolicy(ScrollBarPolicy.ALWAYS);
	//scroller.setContent(contentLayout);
	
	//Contentlayout beinhaltet webpage
	VBox contentLayout = new VBox(20);
	contentLayout.setMinHeight(pageHeight*0.6);
	contentLayout.setPrefWidth(pageWidth*.93);		
	contentLayout.getChildren().addAll(webPage);
	
	//F�r die ControllButtons und die Links
	ControlLayout conLay = new ControlLayout(backBtn,WISSlink, BITLink, LehrlingeLink);
	
	MainLayout maLay = new MainLayout(contentLayout, headLayout, conLay);

	return maLay;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:61,代码来源:ImpressumView.java

示例13: constructContainer

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

	webContent.loadContent("<html><body><b>Missing a manual</b></body></html>");
	try {
		// To avoid strange chars like "", the html -Tag is added here separately:
		webContent.loadContent("<html>"+Functions.fileToString(new File(
							   "src/views/txt/anleitung.htm"))+"</html>");
	} catch (Exception e) {
		e.printStackTrace();
	}
	double pageWidth = this.getFXController().getMyFXStage().getOPTIMAL_WIDTH();
	double pageHeight = this.getFXController().getMyFXStage().getOPTIMAL_HEIGHT();
	debug.Debugger.out("ManualView sizes: w:"+pageWidth+" h:"+pageHeight);
	
	
	//webPage.setPrefHeight(pageHeight);
	//webContent.setJavaScriptEnabled(true);
	webPage.setPrefWidth(pageWidth*.93);
	webPage.applyCss();
	webPage.setId("anleitung");

	Label labelTitel = new Label("Anleitung");
	labelTitel.setId("anleitungstitel");

	BackButton backBtn = new BackButton(this.getFXController());

	BorderPane headLayout = new BorderPane(labelTitel);
	headLayout.setPadding(new Insets(5));

	//ScrollPane scroller = new ScrollPane();
	//scroller.setMaxWidth(800);
	//scroller.setHbarPolicy(ScrollBarPolicy.NEVER);
	//scroller.setVbarPolicy(ScrollBarPolicy.ALWAYS);
	//scroller.setContent(contentLayout);
	
	VBox contentLayout = new VBox(0);
	contentLayout.getChildren().addAll(webPage);
	contentLayout.setMinHeight(pageHeight*0.6);
	contentLayout.setPrefWidth(pageWidth*.93);		
	
	HBox controlLayout = new HBox(5);
	controlLayout.setAlignment(Pos.BOTTOM_CENTER);
	controlLayout.getChildren().addAll(backBtn);
	controlLayout.setPadding(new Insets(10));

	BorderPane mainLayout = new BorderPane();
	mainLayout.setPadding(new Insets(25));
	mainLayout.setTop(headLayout);
	mainLayout.setCenter(contentLayout);
	mainLayout.setBottom(controlLayout);
	
	return mainLayout;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:55,代码来源:ManualView.java

示例14: constructContainer

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public Parent constructContainer() {
	webContent.loadContent("<html><body><b>Missing a manual</b></body></html>");
	try {
		// To avoid strange chars like "", the html -Tag is added here separately:
		webContent.loadContent("<html>"+Functions.fileToString(new File(
							   "src/views/txt/quizlet.htm"))+"</html>");
	} catch (Exception e) {
		e.printStackTrace();
	}
	double pageWidth = this.getFXController().getMyFXStage().getOPTIMAL_WIDTH();
	double pageHeight = this.getFXController().getMyFXStage().getOPTIMAL_HEIGHT();
	debug.Debugger.out("QuizletView sizes: w:"+pageWidth+" h:"+pageHeight);
	
	//webContent.setJavaScriptEnabled(true);
	webPage.setPrefHeight(pageHeight);
	webPage.setPrefWidth(pageWidth*.93);
	webPage.applyCss();		
	
	Label labelTitel = new Label("Quizlet");
	labelTitel.setId("impressumtitel");

	AppButton backBtn = new AppButton("_Zur�ck");
	backBtn.setOnAction(e -> getFXController().showMainView());

	BorderPane headLayout = new BorderPane(labelTitel);
	headLayout.setPadding(new Insets(5));

	//ScrollPane scroller = new ScrollPane();
	//scroller.setMaxWidth(800);
	//scroller.setHbarPolicy(ScrollBarPolicy.NEVER);
	//scroller.setVbarPolicy(ScrollBarPolicy.ALWAYS);
	//scroller.setContent(contentLayout);
		
	Hyperlink QuizletLink = new Hyperlink("Quizlet");
	QuizletLink.setOnAction(e -> Functions.openWebpage("http://quizlet.com/"));
	QuizletLink.setId("LinkiD");
	
	VBox contentLayout = new VBox(0);
	contentLayout.getChildren().addAll(webPage);
	contentLayout.setMinHeight(pageHeight*0.6);
	contentLayout.setPrefWidth(pageWidth*.93);		
	
	HBox controlLayout = new HBox(5);
	controlLayout.setAlignment(Pos.BOTTOM_CENTER);
	controlLayout.getChildren().addAll(backBtn,QuizletLink);
	controlLayout.setPadding(new Insets(5));

	BorderPane mainLayout = new BorderPane();
	mainLayout.setPadding(new Insets(20));
	mainLayout.setTop(headLayout);
	mainLayout.setCenter(contentLayout);
	mainLayout.setBottom(controlLayout);


	return mainLayout;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:58,代码来源:QuizletInfoView.java

示例15: constructContainer

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public Parent constructContainer() {
	headLbl = new Label("");
	headLbl.setId("bold");

	AppButton backBtn =  new BackButton(getFXController(),"Zur�ck");
	AppButton newDoorBtn = new AppButton(txtNewTheme);
	
	Image trashImg = new Image("views/pictures/Papierkorb.png");
	ImageView trashImgView = new ImageView(trashImg);

	BorderPane headLayout = new BorderPane(headLbl);
	headLayout.setPadding(new Insets(0, 0, 25, 0));

	doorLayout.setPadding(new Insets(10));
	doorLayout.setAlignment(Pos.TOP_CENTER);

	scroller.setMaxWidth(600);
	scroller.setFitToWidth(true);
	scroller.setPadding(new Insets(25));
	
	ControlLayout conLay = new ControlLayout(backBtn, newDoorBtn, trashImgView);
	MainLayout maLay = new MainLayout(scroller, headLayout, conLay);
	
	newDoorBtn.setOnAction(e ->
	{
		newDoor();
	});
	
	backBtn.setOnAction(e -> getFXController().showView("lernenselectionview"));		
	trashImgView.setOnDragOver(event ->
	{
		if (event.getGestureSource() != trashImgView && event.getDragboard().hasString())
		{
			event.acceptTransferModes(TransferMode.COPY_OR_MOVE);
		}

		event.consume();
	});
	
	trashImgView.setOnDragDropped(event ->
	{
		Dragboard db = event.getDragboard();
		boolean success = false;
		if (db.hasString())
		{
			success = deleteDoor(db.getString());
		}

		event.setDropCompleted(success);
		event.consume();
	});
	
	getFXController().getModel("cards").registerView(this);
	return maLay;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:57,代码来源:DoorView.java


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