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


Java BorderPane.setLeft方法代码示例

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


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

示例1: start

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
    BorderPane root = new BorderPane();
    frame = new ImageView();
    mask = new ImageView();
    root.setLeft(frame);
    root.setCenter(mask);
    primaryStage.setTitle("Capture Color");
    primaryStage.setScene(new Scene(root, 900, 400));
    startLaserDetection();
    startGameSync();
    matBufferedSaver = new Saver<Mat>(){
        @Override
        protected void save(Mat item, int num) {
            try {
                ImageIO.write(Utils.matToBufferedImage(item),"jpeg", new File("images/im" + num+ ".jpg"));
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    };
    primaryStage.show();
}
 
开发者ID:kareem2048,项目名称:Asteroids-Laser-Controller,代码行数:24,代码来源:Main.java

示例2: initUI

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@PostConstruct
  void initUI(BorderPane pane) {
  	try {
	Button EnterButton = new Button();
	TextArea textbox = new TextArea();
	EnterButton.setText("Send Data");

	EnterButton.setOnAction((event) -> {
		String tmp = textbox.getText();
		Helper.handleButton(tmp);
	});

	textbox.setMaxWidth(500);
	textbox.setMaxHeight(100);
	textbox.setWrapText(true);
	textbox.setText("Type your sentence here");
	pane.setLeft(EnterButton);
	pane.setCenter(textbox);
}
      catch (Exception e)
      {
          e.printStackTrace();
      }
  }
 
开发者ID:agentlab,项目名称:SemanticRelationsEditor,代码行数:25,代码来源:InputPart.java

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

示例4: initializeInputControls

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
private Node initializeInputControls(){
	GridPane activatablecontrols = new GridPane();
	activatablecontrols.setAlignment(Pos.CENTER);
	activatablecontrols.setPadding(new Insets(10.0));
	activatablecontrols.setVgap(10.0);
	activatablecontrols.setHgap(10.0);
	controlsActivatable_Pane = activatablecontrols;
	
	GridPane inputcontrols = new GridPane();
	inputcontrols.setAlignment(Pos.CENTER);
	inputcontrols.setPadding(new Insets(10.0));
	inputcontrols.setVgap(10.0);
	inputcontrols.setHgap(15.0);
	controlsInput_Pane = inputcontrols;
	
	VBox estopBox = new VBox();
	estopBox.setSpacing(5.0);
	estopBox.setPadding(new Insets(10.0));
	estopBox.setAlignment(Pos.CENTER);
	estopBox.getChildren().addAll(Dashboard.getEmergencyStopControl().getRoot());
	
	SplitPane controlsPane = new SplitPane();
	controlsPane.setOrientation(Orientation.HORIZONTAL);
	controlsPane.getItems().addAll(inputcontrols, activatablecontrols);
	controlsPane.setMinSize(800.0, 150.0);
	
	BorderPane root = new BorderPane();
	root.setLeft(controlsPane);
	root.setRight(estopBox);
	return root;
}
 
开发者ID:Flash3388,项目名称:FlashLib,代码行数:32,代码来源:MainWindow.java

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

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

示例7: createLevelView

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
private void createLevelView (BorderPane gamePane) {

        gamePane.setRight(mySideBar.draw());
        gamePane.setLeft(myDisplay.draw());
        gamePane.setTop(myTools.draw());
        gamePane.setCenter(myRenderer.getPane());
        addRendererClip();
    }
 
开发者ID:tomrom95,项目名称:GameAuthoringEnvironment,代码行数:9,代码来源:GameEngine.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: buildUI

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
private Parent buildUI() {
	BorderPane root = new BorderPane();
	Insets margin = new Insets(10);
	Node leftPane = buildLeftPane();
	Node bottomPane = buildBottomPane();
	Node centerPane = buildCenterPane();
	root.setLeft(leftPane);
	root.setBottom(bottomPane);
	root.setCenter(centerPane);
	BorderPane.setMargin(bottomPane, margin);
	BorderPane.setMargin(centerPane, margin);
	return root;
}
 
开发者ID:jesuino,项目名称:java-ml-projects,代码行数:14,代码来源:App.java

示例10: createRegisterControlPanel

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
private Node createRegisterControlPanel()
{
	BorderPane registerPanel = new BorderPane();
	
	Label watchRegisterLabel = new Label("Watch Register: ");
	registerPanel.setLeft(watchRegisterLabel);
	setAlignment(watchRegisterLabel, Pos.CENTER);
	
	TextField registerNameField = new TextField();
	registerPanel.setCenter(registerNameField);
	setAlignment(registerNameField, Pos.CENTER);
	
	Button watchRegisterButton = new Button("Add");
	watchRegisterButton.setOnAction((event) -> watchRegister(registerNameField
			.getText()));
	registerPanel.setRight(watchRegisterButton);
	setAlignment(watchRegisterButton, Pos.CENTER);
	
	Pair<Node, ComboBox<String>> optionsRowPair = createDisplayOptionsRow();
	Node displayOptions = optionsRowPair.getKey();
	ComboBox<String> displayDropdown = optionsRowPair.getValue();
	displayDropdown.setOnAction((event) -> {
		String selection = displayDropdown.getSelectionModel().getSelectedItem();
		Function<Long, String> function = valueDisplayOptions.get(selection);
		registerDisplayFunction.set(function);
	});
	
	VBox controlPanel = new VBox();
	controlPanel.getChildren().add(registerPanel);
	controlPanel.getChildren().add(displayOptions);
	controlPanel.setAlignment(Pos.CENTER);
	setAlignment(controlPanel, Pos.CENTER);
	controlPanel.setPadding(new Insets(CP_PADDING));
	controlPanel.setSpacing(CP_SPACING);
	
	return controlPanel;
}
 
开发者ID:dhawal9035,项目名称:WebPLP,代码行数:38,代码来源:WatcherWindow.java

示例11: createDisplayOptionsRow

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
private Pair<Node, ComboBox<String>> createDisplayOptionsRow()
{
	BorderPane rowDisplay = new BorderPane();
	
	Label label = new Label("Display values as: ");
	rowDisplay.setLeft(label);
	
	ComboBox<String> dropdown = createDisplayOptionsDropdown();
	dropdown.setPrefWidth(Integer.MAX_VALUE);
	rowDisplay.setCenter(dropdown);
	
	return new Pair<>(rowDisplay, dropdown);
}
 
开发者ID:dhawal9035,项目名称:WebPLP,代码行数:14,代码来源:WatcherWindow.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: ConfigurationContext

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
private ConfigurationContext(GazePlay gazePlay, BorderPane root, Scene scene) {
    super(gazePlay, root, scene);

    HomeButton homeButton = createHomeButtonInConfigurationManagementScreen(gazePlay);

    HBox rightControlPane = new HBox();
    ControlPanelConfigurator.getSingleton().customizeControlePaneLayout(rightControlPane);
    rightControlPane.setAlignment(Pos.CENTER_RIGHT);
    rightControlPane.getChildren().add(homeButton);

    HBox leftControlPane = new HBox();
    ControlPanelConfigurator.getSingleton().customizeControlePaneLayout(leftControlPane);
    leftControlPane.setAlignment(Pos.CENTER_LEFT);

    BorderPane bottomControlPane = new BorderPane();
    bottomControlPane.setLeft(leftControlPane);
    bottomControlPane.setRight(rightControlPane);

    root.setBottom(bottomControlPane);

    GridPane gridPane = buildConfigGridPane(this);
    root.setCenter(gridPane);

    root.setStyle(
            "-fx-background-color: rgba(0, 0, 0, 1); -fx-background-radius: 8px; -fx-border-radius: 8px; -fx-border-width: 5px; -fx-border-color: rgba(60, 63, 65, 0.7); -fx-effect: dropshadow(three-pass-box, rgba(0, 0, 0, 0.8), 10, 0, 0, 0);");
}
 
开发者ID:schwabdidier,项目名称:GazePlay,代码行数:27,代码来源:ConfigurationContext.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.setLeft方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。