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


Java BorderPane类代码示例

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


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

示例1: start

import javafx.scene.layout.BorderPane; //导入依赖的package包/类
@Override
public void start(Stage primaryStage) {
    primaryStage.setTitle("Atbash JWK Manager");

    BorderPane root = new BorderPane();

    Scene scene = new Scene(root, 600, 350, Color.WHITE);
    primaryStage.setMinWidth(500);
    primaryStage.setMinHeight(300);

    new ApplicationMenu(primaryStage, root).initialize();
    new HomeView(primaryStage, root).initialize();
    new Footer(primaryStage, root).initialize();

    root.prefHeightProperty().bind(scene.heightProperty());
    root.prefWidthProperty().bind(scene.widthProperty());

    primaryStage.setScene(scene);
    primaryStage.show();
}
 
开发者ID:atbashEE,项目名称:atbash-octopus,代码行数:21,代码来源:JWKManagerUI.java

示例2: showLaunchingScreen

import javafx.scene.layout.BorderPane; //导入依赖的package包/类
/**
   * Launch and show the launching screen
   */
  public void showLaunchingScreen(){
Stage promptWindow = new Stage();
promptWindow.setTitle(get_langBundle().getString("welcome"));
try {
	FXMLLoader loader = new FXMLLoader();
          loader.setLocation(getClass().getResource("/view/LaunchingScreen.fxml"));
          loader.setController(new LaunchingScreenController(this,promptWindow));
          loader.setResources(ResourceBundle.getBundle("bundles.Lang", _locale));
          BorderPane layout = (BorderPane) loader.load();
	Scene launchingScene = new Scene(layout,404,250);
	//ENLEVER LE COMMENTAIRE POUR ACTIVER LA BETA CSS FLAT DESIGN
	//rootLayout.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
	promptWindow.setScene(launchingScene);
	promptWindow.showAndWait();
	
	// if project empty -> launch interview creation
	if(this.getCurrentProject().getEntretiens().isEmpty()){
		rootLayout.setCenter(null);
		this.getRootLayoutController().newInterview();
	}
} catch (IOException e) {
	e.printStackTrace();
}
  }
 
开发者ID:coco35700,项目名称:uPMT,代码行数:28,代码来源:Main.java

示例3: overlay

import javafx.scene.layout.BorderPane; //导入依赖的package包/类
protected Parent overlay(int window, int yCode) {
    EncoderParameters params = getEncoderParameters();
    double ye = params.matrix.fromLumaCode(yCode);
    double yo = params.transfer.eotf(ye);
    CIExy xy = getColor(yo);

    String text = format("HDR10 grayscale CIE(x=%.4f, y=%.4f) %.1f%% Y%d,"
            + " %.1f nit", xy.x, xy.y, ye * 100.0, yCode, yo * 10000.0);

    Label label = new Label(text);
    label.setFont(font(40));
    label.setTextFill(gray(max(0.25, min(0.5, ye))));

    BorderPane.setMargin(label, new Insets(20));
    BorderPane layout = new BorderPane();
    layout.setBackground(EMPTY);
    layout.setBottom(label);
    return layout;
}
 
开发者ID:testing-av,项目名称:testing-video,代码行数:20,代码来源:CalibrationBase.java

示例4: doAction

import javafx.scene.layout.BorderPane; //导入依赖的package包/类
protected void doAction() {
    BorderPane rowPane = rowController.getRoot();
    GridPane associationPane = associationController.getRoot();
    Association selectedAssociation = associationController.getSelectedAssociation();
    Optional<Association> opt = associationController.getCustomAssociation();
    if (opt.isPresent() && annotation != null) {
        Association customAssociation = opt.get();
        Command cmd;
        if (selectedAssociation == null) {
            // Create new association
            cmd = new CreateAssociationsCmd(customAssociation, Arrays.asList(annotation));
        }
        else {
            // Update existing association
            Association a = new Association(selectedAssociation.getUuid(), customAssociation);
            cmd = new UpdateAssociationCmd(annotation.getObservationUuid(), selectedAssociation, a);
        }
        toolBox.getEventBus().send(cmd);
        this.root.getChildren().remove(associationPane);
        this.root.getChildren().add(rowPane);
    }
}
 
开发者ID:mbari-media-management,项目名称:vars-annotation,代码行数:23,代码来源:RowEditorController.java

示例5: paneFor

import javafx.scene.layout.BorderPane; //导入依赖的package包/类
private Pane paneFor(Component component) {
  if (panes.containsKey(component)) {
    return panes.get(component);
  }

  BorderPane pane = new BorderPane(component.getView());
  ActionList.registerSupplier(pane, () -> actionsForComponent(component));
  pane.getStyleClass().add("layout-stack");
  EditableLabel label = new EditableLabel(component.titleProperty());
  label.getStyleClass().add("layout-label");
  ((Label) label.lookup(".label")).setTextOverrun(OverrunStyle.LEADING_ELLIPSIS);
  BorderPane.setAlignment(label, Pos.TOP_LEFT);
  pane.setBottom(label);

  panes.put(component, pane);
  return pane;
}
 
开发者ID:wpilibsuite,项目名称:shuffleboard,代码行数:18,代码来源:ListLayout.java

示例6: MainMenu

import javafx.scene.layout.BorderPane; //导入依赖的package包/类
public MainMenu(Stage primaryStage, UsersModel usersModel){	
	this.primaryStage = primaryStage;
	this.usersModel = usersModel;
	BorderPane root = new BorderPane();
	VBox buttons = new VBox();
	buttons.setId("vbox");
	buttons.setAlignment(Pos.CENTER);
	buttons.getChildren().addAll(
			backgroundImage(),
			playGame, 
			authorGame, 
			socialCenter);

	playGame.setId("main-button");
	authorGame.setId("main-button");
	socialCenter.setId("main-button");
	root.setCenter(buttons);		

	initHandlers();
	scene = new Scene(root, App.WIDTH, App.HEIGHT);
	scene.getStylesheets().setAll(CSS_LOCATION);
	primaryStage.setScene(scene);
}
 
开发者ID:LtubSalad,项目名称:voogasalad-ltub,代码行数:24,代码来源:MainMenu.java

示例7: initRootLayout

import javafx.scene.layout.BorderPane; //导入依赖的package包/类
/**
 * Initializes the root layout.
 */
public void initRootLayout() {
    try {
        FXMLLoader loader = new FXMLLoader();
        loader.setLocation(getURL(CommonConstants.ROOT_LAYOUT_PATH));
        rootLayout = (BorderPane) loader.load();

        // Show the scene containing the root layout.
        Scene scene = new Scene(rootLayout);
        primaryStage.setScene(scene);
        primaryStage.setMaximized(true);
        primaryStage.show();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
 
开发者ID:neal1991,项目名称:everywhere,代码行数:19,代码来源:ClientWindow.java

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

示例9: start

import javafx.scene.layout.BorderPane; //导入依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
    Platform.setImplicitExit(true);
    SearchTreePaneController paneBuilder = new SearchTreePaneController(conceptService, uiBundle);
    BorderPane node = paneBuilder.getRoot();
    FlowPane pane = new FlowPane();
    pane.setPrefSize(800, 250);
    DragPaneDecorator dragPaneDecorator = new DragPaneDecorator(conceptService, eventBus, uiBundle);
    dragPaneDecorator.decorate(pane);
    node.setBottom(pane);
    Scene scene = new Scene(node, 800, 800);
    scene.getStylesheets().add("/css/common.css");
    primaryStage.setScene(scene);
    primaryStage.show();
    primaryStage.setOnCloseRequest(e -> {
        Platform.exit();
        System.exit(0);
    });
}
 
开发者ID:mbari-media-management,项目名称:vars-annotation,代码行数:20,代码来源:DragAndDropDemo.java

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

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

示例12: autofit

import javafx.scene.layout.BorderPane; //导入依赖的package包/类
void autofit() {
    Platform.runLater( new Runnable() {
        @Override
        public void run() {
            if( container.getScene().getRoot() instanceof ScrollPane ) {
                BorderPane pane = new BorderPane();
                pane.setCenter( browser );
                container.getScene().setRoot( pane );
            }
            preferredWidth = -1;
            preferredHeight = -1;
            browser.setMaxWidth( Integer.MAX_VALUE );
            browser.setMaxHeight( Integer.MAX_VALUE );
            browser.setMinWidth( -1 );
            browser.setMinHeight( -1 );
            browser.autosize();
        }
    });
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:WebBrowserImpl.java

示例13: showPropertySheet

import javafx.scene.layout.BorderPane; //导入依赖的package包/类
/**
 * Creates the menu for editing the properties of a widget.
 *
 * @param tile the tile to pull properties from
 * @return     the edit property menu
 */
private void showPropertySheet(Tile<?> tile) {
  ExtendedPropertySheet propertySheet = new ExtendedPropertySheet();
  propertySheet.getItems().add(new ExtendedPropertySheet.PropertyItem<>(tile.getContent().titleProperty()));
  Dialog<ButtonType> dialog = new Dialog<>();
  if (tile.getContent() instanceof Widget) {
    ((Widget) tile.getContent()).getProperties().stream()
        .map(ExtendedPropertySheet.PropertyItem::new)
        .forEachOrdered(propertySheet.getItems()::add);
  }

  dialog.setTitle("Edit widget properties");
  dialog.getDialogPane().getStylesheets().setAll(AppPreferences.getInstance().getTheme().getStyleSheets());
  dialog.getDialogPane().setContent(new BorderPane(propertySheet));
  dialog.getDialogPane().getButtonTypes().addAll(ButtonType.CLOSE);

  dialog.showAndWait();
}
 
开发者ID:wpilibsuite,项目名称:shuffleboard,代码行数:24,代码来源:WidgetPaneController.java

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

示例15: TaskSkin

import javafx.scene.layout.BorderPane; //导入依赖的package包/类
public TaskSkin(TaskProgressView<T> monitor) {
	super(monitor);

	BorderPane borderPane = new BorderPane();
	borderPane.getStyleClass().add("box");

	// list view
	ListView<T> listView = new ListView<>();
	listView.setPrefSize(500, 400);
	listView.setPlaceholder(new Label("No Downloads Currently"));
	listView.setCellFactory(param -> new TaskCell());
	listView.setFocusTraversable(false);

	Bindings.bindContent(listView.getItems(), monitor.getTasks());
	borderPane.setCenter(listView);

	getChildren().add(listView);
}
 
开发者ID:HearthProject,项目名称:OneClient,代码行数:19,代码来源:TaskSkin.java


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