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


Java BorderPane.setRight方法代码示例

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


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

示例1: addToolBar

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
private void addToolBar() {
    TextField textField = new TextField();
    textField.getStyleClass().add("search-field");
    textField.textProperty().bindBidirectional(getSkinnable().filterTextProperty());

    Text clearIcon = FontAwesomeIconFactory.get().createIcon(FontAwesomeIcon.TIMES_CIRCLE, "18");
    CustomTextField customTextField = new CustomTextField();
    customTextField.getStyleClass().add("search-field");
    customTextField.setLeft(FontAwesomeIconFactory.get().createIcon(FontAwesomeIcon.SEARCH, "18px"));
    customTextField.setRight(clearIcon);
    customTextField.textProperty().bindBidirectional(getSkinnable().filterTextProperty());
    clearIcon.setOnMouseClicked(evt -> customTextField.setText(""));

    FlipPanel searchFlipPanel = new FlipPanel();
    searchFlipPanel.setFlipDirection(Orientation.HORIZONTAL);
    searchFlipPanel.getFront().getChildren().add(textField);
    searchFlipPanel.getBack().getChildren().add(customTextField);
    searchFlipPanel.visibleProperty().bind(getSkinnable().enableSortingAndFilteringProperty());

    getSkinnable().useControlsFXProperty().addListener(it -> {
        if (getSkinnable().isUseControlsFX()) {
            searchFlipPanel.flipToBack();
        } else {
            searchFlipPanel.flipToFront();
        }
    });

    showTrailerButton = new Button("Show Trailer");
    showTrailerButton.getStyleClass().add("trailer-button");
    showTrailerButton.setMaxHeight(Double.MAX_VALUE);
    showTrailerButton.setOnAction(evt -> showTrailer());

    BorderPane toolBar = new BorderPane();
    toolBar.setLeft(showTrailerButton);
    toolBar.setRight(searchFlipPanel);
    toolBar.getStyleClass().add("movie-toolbar");

    container.add(toolBar, 1, 0);
}
 
开发者ID:hendrikebbers,项目名称:ExtremeGuiMakeover,代码行数:40,代码来源:MovieViewSkin.java

示例2: setupAndShowPrimaryStage

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
private void setupAndShowPrimaryStage(Stage primaryStage) {
    messagesView.setItems(messages);

    send.setText("Send");

    BorderPane pane = new BorderPane();
    pane.setLeft(name);
    pane.setCenter(message);
    pane.setRight(send);

    BorderPane root = new BorderPane();
    root.setCenter(messagesView);
    root.setBottom(pane);

    primaryStage.setTitle("gRPC Chat");
    primaryStage.setScene(new Scene(root, 480, 320));

    primaryStage.show();
}
 
开发者ID:meteatamel,项目名称:grpc-samples-java,代码行数:20,代码来源:ChatClient.java

示例3: start

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
	primaryStage.setTitle("Test the Scripting");
	BorderPane root = new BorderPane();
	TextArea input = new TextArea();
	input.setPrefWidth(300);
	input.setPrefHeight(300);
	ScriptingExample scriptingExample = new ScriptingExample();
	Button executeButton = new Button("Execute");
	Button retrieveButton = new Button("Retrieve");
	executeButton.setOnAction(e -> scriptingExample.inputScript(input.getText()));
	retrieveButton.setOnAction(e ->scriptingExample.getTowersFromGroovy());
	root.setCenter(input);
	root.setBottom(executeButton);
	root.setRight(retrieveButton);
	primaryStage.setScene(new Scene(root));
	primaryStage.show();
	
}
 
开发者ID:LtubSalad,项目名称:voogasalad-ltub,代码行数:20,代码来源:ScriptingMainTest.java

示例4: createHeader

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
/**
 * Creates the header part for each cell. The header consists of a border pane
 * with the weekday label in the "left" position and the date label in the "right"
 * position.
 *
 * @return the header node
 */
protected Node createHeader() {
    headerPane = new BorderPane();
    headerPane.getStyleClass().add(AGENDA_VIEW_HEADER);
    headerPane.setVisible(headerPaneVisible);
    headerPane.managedProperty().bind(headerPane.visibleProperty());

    weekdayLabel = new Label();
    weekdayLabel.getStyleClass().add(AGENDA_VIEW_WEEKDAY_LABEL);
    weekdayLabel.setMinWidth(0);

    dateLabel = new Label();
    dateLabel.setMinWidth(0);
    dateLabel.getStyleClass().add(AGENDA_VIEW_DATE_LABEL);

    headerPane.setLeft(weekdayLabel);
    headerPane.setRight(dateLabel);

    return headerPane;
}
 
开发者ID:dlemmermann,项目名称:CalendarFX,代码行数:27,代码来源:AgendaView.java

示例5: TaskCell

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
public TaskCell() {
	titleText = new Label();
	titleText.getStyleClass().add("task-title");

	messageText = new Label();
	messageText.getStyleClass().add("task-message");

	progressBar = new ProgressBar();
	progressBar.setMaxWidth(Double.MAX_VALUE);
	progressBar.setMaxHeight(8);
	progressBar.getStyleClass().add("task-progress-bar");

	cancelButton = new Button("Cancel");
	cancelButton.getStyleClass().add("task-cancel-button");
	cancelButton.setTooltip(new Tooltip("Cancel Task"));
	cancelButton.setOnAction(evt -> {
		if (task != null) {
			task.cancel(true);
		}
	});

	VBox vbox = new VBox();
	vbox.setSpacing(4);
	vbox.getChildren().add(titleText);
	vbox.getChildren().add(progressBar);
	vbox.getChildren().add(messageText);

	BorderPane.setAlignment(cancelButton, Pos.CENTER);
	BorderPane.setMargin(cancelButton, new Insets(0, 0, 0, 4));

	borderPane = new BorderPane();
	borderPane.setCenter(vbox);
	borderPane.setRight(cancelButton);
	setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
}
 
开发者ID:HearthProject,项目名称:OneClient,代码行数:36,代码来源:TaskSkin.java

示例6: createIconContent

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
public static Node createIconContent() {
    StackPane sp = new StackPane();
    BorderPane borderPane = new BorderPane();

    Rectangle rectangle = new Rectangle(62, 62, Color.LIGHTGREY);
    rectangle.setStroke(Color.BLACK);
    borderPane.setPrefSize(rectangle.getWidth(), rectangle.getHeight());
 
    Rectangle recTop = new Rectangle(62, 5, Color.web("#349b00"));
    recTop.setStroke(Color.BLACK);
    Rectangle recBottom = new Rectangle(62, 14, Color.web("#349b00"));
    recBottom.setStroke(Color.BLACK);
    Rectangle recLeft = new Rectangle(20, 41, Color.TRANSPARENT);
    recLeft.setStroke(Color.BLACK);
    Rectangle recRight = new Rectangle(20, 41, Color.TRANSPARENT);
    recRight.setStroke(Color.BLACK);
    Rectangle centerRight = new Rectangle(20, 41, Color.TRANSPARENT);
    centerRight.setStroke(Color.BLACK);
    borderPane.setRight(recRight);
    borderPane.setTop(recTop);
    borderPane.setLeft(recLeft);
    borderPane.setBottom(recBottom);
    borderPane.setCenter(centerRight);
 
    sp.getChildren().addAll(rectangle, borderPane);
    return new Group(sp);
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:28,代码来源:BorderPaneSample.java

示例7: draw

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public Node draw () {
    myLayout = new BorderPane();
    myScene = new SceneCreator(myGame, myLevel, myScale);
    mySpawningView = new SpawnerAuthoringView(myGame, myLevel, myScene.getRenderer(), myScale);
    myLayout.setRight(mySpawningView.draw());
    myLayout.setCenter(myScene.draw());
    myLayout.setBottom(createBottomForms());
    return myLayout;
}
 
开发者ID:tomrom95,项目名称:GameAuthoringEnvironment,代码行数:11,代码来源:LevelEditorView.java

示例8: start

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
	originalImageView = new ImageView();
	originalImageView.setFitHeight(sceneHeight);
	originalImageView.setFitWidth(sceneWidth/2);
	
	alteredImageView = new ImageView();
	alteredImageView.setFitHeight(sceneHeight);
	alteredImageView.setFitWidth(sceneWidth/2);

	BorderPane pane = new BorderPane();
	pane.setLeft(originalImageView);
	pane.setRight(alteredImageView);
	
	Scene scene = new Scene(pane, sceneWidth, sceneHeight);
	
	primaryStage.setTitle("Image Segmentation App");
	primaryStage.setScene(scene);
	primaryStage.show();
	
	
	BufferedImage originalImg = ImageIO.read(new File("./images/test.png"));
	originalImageView.setImage(SwingFXUtils.toFXImage(originalImg, null));

	int numOfClusters = 2;
	
	ImageMatrix imageMatrix = new ImageMatrix(originalImg, numOfClusters);
	Algorithm algorithm = new KMeansAlgorithm(imageMatrix);
	
	algorithm.process();
	BufferedImage segmentedImg = imageMatrix.getSegmentedImage();
	
	alteredImageView.setImage(SwingFXUtils.toFXImage(segmentedImg, null));
	
}
 
开发者ID:AbhishekVel,项目名称:Image-Segmentation,代码行数:36,代码来源:View.java

示例9: loadScene

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
private Scene loadScene(){
	
	//left
	controllerView = new ListView<String>();
	controllerView.setPadding(new Insets(5.0));
	controllerView.setMaxWidth(200);
	controllerView.getSelectionModel().selectedIndexProperty().addListener((obs, o, n)->{
		if(n.intValue() < 0)
			cancelSelection();
		else
			selectedHID(n.intValue());
	});
	for (int i = 0; i < FlashboardHIDControl.MAX_PORT_COUNT; i++) {
		controllerView.getItems().add(i + " - not connected");
	}
	
	HBox controllersBox = new HBox();
	controllersBox.setPadding(new Insets(10.0));
	controllersBox.getChildren().add(controllerView);
	
	//right
	axesDataBox = new VBox();
	buttonDataBox = new HBox();
	buttonDataBox.setSpacing(5.0);
	
	HBox dataBox = new HBox();
	dataBox.setSpacing(10.0);
	dataBox.setPadding(new Insets(5.0, 5.0, 5.0, 5.0));
	dataBox.getChildren().addAll(axesDataBox, buttonDataBox);
	
	BorderPane root = new BorderPane();
	root.setLeft(controllersBox);
	root.setRight(dataBox);
	
	return new Scene(root, 400, 300);
}
 
开发者ID:Flash3388,项目名称:FlashLib,代码行数:37,代码来源:HIDWindow.java

示例10: start

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) throws InterruptedException {
    this.primaryStage = primaryStage;
    //Application starts
    //Load Configurations to memory
    TatConfigManager configManager = new TatConfigManager(config);
    try {
       configManager.loadConfigItem();
       DateUtil.importPublicHoliday();
    } catch (IOException ioe){
        ioe.printStackTrace();
    }catch (ClassNotFoundException ce){
        ce.printStackTrace();
    }
    //Setup Menu
    appMenu = new MenuCreator().createApplicationLevelMenu(this, primaryStage, fm, config);
    
    //Setup Toolbar
    appToolbar = new ToolBarCreator().createApplicationLevelToolBar(this, primaryStage, fm, config);
    
    //Setup application border pane
    applicationPane = new BorderPane();

    //Setup left panel SplitPane frame
    leftPanelSp = createLeftPanelSplitPane();
    leftPanelSp.setPrefWidth(330);
    leftUpperTabPane = new LeftUpperTabPane();
    leftBottomTabPane = new LeftBottomTabPane(this);
    leftPanelSp.getItems().addAll(leftUpperTabPane, leftBottomTabPane);
    
    /**
     * Initialize the chart tab pane for the drawing area.
     * This is the centralized area to display OHLC charts
     * If a new chart is opened, it will add a tab for this
     * OHLC that all the related indicator canvas will be
     * add into the same tab
     */
    chartTabPane = new ChartTabPane(this);
    
    applicationPane.setLeft(leftPanelSp);
    applicationPane.setCenter(chartTabPane);
    
    rightVBox = new VBox();
    rightVBox.setPrefWidth(40);
    Rectangle rect = new Rectangle();
    rect.setFill(Color.DARKCYAN);
    rect.widthProperty().bind(rightVBox.widthProperty());
    rect.heightProperty().bind(leftPanelSp.heightProperty());
    rightVBox.getChildren().addAll(rect);
    rightVBox.prefHeightProperty().bind(applicationPane.heightProperty());
    applicationPane.setRight(rightVBox);
    //Bottom Status Bars
    bottomStatusHBox = new HBox();
    Rectangle bottomRect = new Rectangle();
    bottomRect.setFill(Color.DARKCYAN);
    bottomRect.widthProperty().bind(applicationPane.widthProperty());
    bottomRect.setHeight(40);
    bottomStatusHBox.getChildren().add(bottomRect);
    applicationPane.setBottom(bottomStatusHBox);
    //Packup things
    VBox topBox = new VBox(appMenu, appToolbar);
    applicationPane.setTop(topBox); 
  
    Scene scene = new Scene(applicationPane, 880, 600);
    scene.getStylesheets().add("style/stylesheet.css");
    Image appIcon = new Image("icon/TAT_LOGO_BLUE.png");
    primaryStage.getIcons().add(appIcon);
    primaryStage.setIconified(true);
    primaryStage.setTitle("Technical Analysis Tool Version 1.0.0");
    primaryStage.setScene(scene);
    primaryStage.setMinWidth(400);
    primaryStage.setMinHeight(350);
    primaryStage.setMaximized(true);

    BindProperties();
    
    primaryStage.show();
    
    System.out.println("javafx.runtime.version: " + System.getProperty("javafx.runtime.version"));
}
 
开发者ID:ztan5,项目名称:TechnicalAnalysisTool,代码行数:81,代码来源:TatMain.java

示例11: BorderPaneSample

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
public BorderPaneSample() {
    super(400, 400);
    BorderPane borderPane = new BorderPane();

    //Top content
    Rectangle topRectangle = new Rectangle(400, 23, Color.DARKSEAGREEN);
    topRectangle.setStroke(Color.BLACK);
    borderPane.setTop(topRectangle);

    //Left content
    Label label1 = new Label("Left hand");
    Label label2 = new Label("Choice One");
    Label label3 = new Label("Choice Two");
    Label label4 = new Label("Choice Three");
    VBox leftVbox = new VBox();
    leftVbox.getChildren().addAll(label1, label2, label3, label4);
    borderPane.setLeft(leftVbox);

    //Right content
    Label rightlabel1 = new Label("Right hand");
    Label rightlabel2 = new Label("Thing A");
    Label rightlabel3 = new Label("Thing B");
    VBox rightVbox = new VBox();
    rightVbox.getChildren().addAll(rightlabel1, rightlabel2, rightlabel3);
    borderPane.setRight(rightVbox);

    //Center content
    Label centerLabel = new Label("We're in the center area.");
    ImageView imageView = new ImageView(ICON_48);

    //Using AnchorPane only to position items in the center
    AnchorPane centerAP = new AnchorPane();
    AnchorPane.setTopAnchor(centerLabel, Double.valueOf(5));
    AnchorPane.setLeftAnchor(centerLabel, Double.valueOf(20));
    AnchorPane.setTopAnchor(imageView, Double.valueOf(40));
    AnchorPane.setLeftAnchor(imageView, Double.valueOf(30));
    centerAP.getChildren().addAll(centerLabel, imageView);
    borderPane.setCenter(centerAP);

    //Bottom content
    Label bottomLabel = new Label("I am a status message, and I am at the bottom.");
    borderPane.setBottom(bottomLabel);

    getChildren().add(borderPane);
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:46,代码来源:BorderPaneSample.java

示例12: start

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) {
    StackPane centerPane = new StackPane();
    Button centerButton = new Button();
    centerButton.setText("Center");
    centerButton.setOnAction( new ButtonEventHandler("Center") );
    centerPane.getChildren().add(centerButton);
    
    StackPane bottomPane = new StackPane();
    Button bottomButton = new Button();
    bottomButton.setText("Bottom");
    bottomButton.setOnAction( new ButtonEventHandler("Bottom") );
    bottomPane.getChildren().add(bottomButton);
    
    StackPane topPane = new StackPane();
    Button topButton = new Button();
    topButton.setText("Top");
    topButton.setOnAction( new ButtonEventHandler("Top") );
    topPane.getChildren().add(topButton);
    
    StackPane leftPane = new StackPane();
    Button leftButton = new Button();
    leftButton.setText("Left");
    leftButton.setOnAction( new ButtonEventHandler("Left") );
    leftPane.getChildren().add(leftButton);
    
    IHasAButton button = new IHasAButton("SOmething else");
    
    
    StackPane rightPane = new StackPane();
    Button rightButton = new Button();
    rightButton.setText("Right");
    rightButton.setOnAction( new ButtonEventHandler("Right") );
    rightPane.getChildren().add(rightButton);
    
    BorderPane root = new BorderPane();
    root.setCenter(centerPane);
    root.setTop(topPane);
    root.setBottom(bottomPane);
    root.setLeft(leftPane);
    root.setRight(button.getStackPane());
    
    Scene scene = new Scene(root, 300, 250);
    
    primaryStage.setTitle("Hello World!");
    primaryStage.setScene(scene);
    primaryStage.show();
}
 
开发者ID:EricCharnesky,项目名称:CIS2353-Fall2017,代码行数:49,代码来源:JavaFXApplication1.java

示例13: buildStatusBar

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
private BorderPane buildStatusBar() {
    BorderPane statusBar = new BorderPane();
    statusBar.setLeft(statusLabel);
    statusBar.setRight(bytesBar);
    return statusBar;
}
 
开发者ID:Glavo,项目名称:ClassViewer,代码行数:7,代码来源:ParsedViewerPane.java

示例14: getPane

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
public BorderPane getPane() {
	TableView<Details> table = new TableView<Details>();
	PieChart chart =new PieChart() ;
	ObservableList<Details> list = FXCollections.observableArrayList();
	TableColumn<Details, String> name = new TableColumn<>("Name");
	name.setPrefWidth(100);
	TableColumn<Details, String> todayExpense = new TableColumn<>("Today Expense");
	todayExpense.setPrefWidth(105);
	TableColumn<Details, String> todayUnits = new TableColumn<>("Today Units");
	todayUnits.setPrefWidth(100);
	TableColumn<Details, String> totalExpense = new TableColumn<>("Total Expense");
	totalExpense.setPrefWidth(100);
	TableColumn<Details, String> totalUnits = new TableColumn<>("Total Units");
	totalUnits.setPrefWidth(100);
	name.setCellValueFactory(new PropertyValueFactory<Details,String>("name"));
	todayExpense.setCellValueFactory(new PropertyValueFactory<Details,String>("todayExpense"));
	todayUnits.setCellValueFactory(new PropertyValueFactory<Details,String>("todayUnits"));
	totalExpense.setCellValueFactory(new PropertyValueFactory<Details,String>("totalExpense"));
	totalUnits.setCellValueFactory(new PropertyValueFactory<Details,String>("totalUnits"));
	table.getColumns().addAll(name,todayExpense,todayUnits,totalExpense,totalUnits);
	Details detail1 = new Details("Lights", "3400", "40", "6000", "67");
	list.addAll(detail1, new Details("Refrigerator", "40000", "40", "8000", "67"),new Details("Television", "3000", "40", "5000", "67"),new Details("Fans", "300", "20", "600", "47"),new Details("A.C", "7000", "80", "10000", "100"),new Details("Oven", "3400", "50", "6500", "70"),new Details("Washing Machine", "3700", "60", "6500", "80"));
	table.setItems(list);
	ObservableList<PieChart.Data> pieChartData = FXCollections.observableArrayList(
			new PieChart.Data("Device 1", 200),
			new PieChart.Data("Device 2", 130),
			new PieChart.Data("Device 3", 100),
			new PieChart.Data("Device 4", 200)
		
			);
	chart.setLabelsVisible(false);
	chart.setLegendVisible(true);
	chart.setMaxSize(400, 400);
	chart.setLegendSide(Side.RIGHT);
	chart.setLabelLineLength(3);
	chart.setLegendSide(Side.BOTTOM);
	chart.setData(pieChartData);
	BorderPane pane = new BorderPane();
	pane.setStyle("-fx-background-color: #1d1d1d");
	pane.setLeft(table);
	pane.setRight(chart);
	
	return pane;
	  
}
 
开发者ID:naeemkhan12,项目名称:IOTproject,代码行数:46,代码来源:ChartControls.java

示例15: display

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

		window = new Stage();
		window.setTitle("Home");
		Label titleLabel = new Label("Master Hash");

		titleLabel.setFont(Font.font("Verdana", FontWeight.BOLD, 30));
		titleLabel.setAlignment(Pos.CENTER);

		Button newLoginButton = new Button();
		newLoginButton.setText("New Login");
		newLoginButton.setOnAction(e -> NewLogin.display());

		TableColumn<Table, String> nameCol = new TableColumn<>("Name");
		nameCol.setMinWidth(200);
		nameCol.setCellValueFactory(new PropertyValueFactory<>("name"));

		TableColumn<Table, String> usernameCol = new TableColumn<>("Username");
		usernameCol.setMinWidth(200);
		usernameCol.setCellValueFactory(new PropertyValueFactory<>("username"));

		TableColumn<Table, String> passwordCol = new TableColumn<>("Password");
		passwordCol.setMinWidth(200);
		passwordCol.setCellValueFactory(new PropertyValueFactory<>("password"));

		BorderPane borderPane = new BorderPane();
		borderPane.setLeft(titleLabel);
		borderPane.setRight(newLoginButton);
		borderPane.setPadding(new Insets(20, 20, 10, 20));

		table = new TableView<>();
		table.setItems(getTable());

		ObservableList<TableColumn<Table, ?>> columns = table.getColumns();
		columns.add(nameCol);
		columns.add(usernameCol);
		columns.add(passwordCol);

		VBox vBox = new VBox(10);
		vBox.getChildren().addAll(borderPane, table);

		Scene scene = new Scene(vBox, 600, 600);
		window.setScene(scene);
		window.show();
	}
 
开发者ID:MorrisB--,项目名称:MasterHash,代码行数:46,代码来源:Home.java


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