Java 类javafx.scene.layout.BorderPane 实例源码

项目:atbash-octopus    文件:JWKManagerUI.java   
@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();
}
项目:vars-annotation    文件:RowEditorController.java   
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);
    }
}
项目:shuffleboard    文件:ListLayout.java   
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;
}
项目:voogasalad-ltub    文件:MainMenu.java   
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);
}
项目:everywhere    文件:ClientWindow.java   
/**
 * 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();
    }
}
项目:uPMT    文件:Main.java   
/**
   * 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();
}
  }
项目:Lernkartei_2017    文件:RenameView.java   
@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;
}
项目:vars-annotation    文件:DragAndDropDemo.java   
@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);
    });
}
项目:Lernkartei_2017    文件:TestView.java   
@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;
}
项目:SemanticRelationsEditor    文件:InputPart.java   
@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();
      }
  }
项目:incubator-netbeans    文件:WebBrowserImpl.java   
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();
        }
    });
}
项目:shuffleboard    文件:WidgetPaneController.java   
/**
 * 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();
}
项目:marathonv5    文件:PreferencesStage.java   
@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;
}
项目:OneClient    文件:TaskSkin.java   
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);
}
项目:Cluster    文件:Cluster.java   
@Override
public void start(Stage primaryStage) {

    BorderPane buttonPane = getButtonPane();

    borderPane.setTop(buttonPane);

    controller = new DataController(x_bounds,y_bounds,initial_k,initial_data_points);
    KMeansGraph kmg = new KMeansGraph(x_bounds,y_bounds);
    ScatterChart sc = kmg.drawGraph(controller.getCentroidToDataPoint(), controller.getCentroids());
    borderPane.setCenter(sc);

    StackPane root = new StackPane();

    root.getChildren().add(borderPane);
    Scene scene = new Scene(root, SCREEN_WIDTH, SCREEN_HEIGHT);

    primaryStage.setTitle("K Means");
    primaryStage.setScene(scene);
    primaryStage.show();
}
项目:JavaFX-Web-Browser    文件:Main.java   
@Override
public void start(Stage primaryStage) {

    //Root
    BorderPane root = new BorderPane();
    root.setCenter(new WebBrowserController());

    //Scene
    Scene scene = new Scene(root, getVisualScreenWidth() / 1.2, getVisualScreenHeight() / 1.2);

    //Prepare the Stage
    primaryStage.setTitle("JavaFX Web Browser- Made by GOXR3PLUS Studio");
    primaryStage.getIcons().add(InfoTool.getImageFromResourcesFolder("logo.png"));
    primaryStage.setScene(scene);
    primaryStage.setOnCloseRequest(cl -> System.exit(0));
    primaryStage.show();

}
项目:uPMT    文件:TypePropertyRepresentation.java   
private void pickPropertyExtract() {
    Stage promptWindow = new Stage();
    promptWindow.setTitle("Selection de l'extrait");
    try {
        main.getCurrentMoment().setCurrentProperty(property);
        FXMLLoader loader = new FXMLLoader();
        loader.setLocation(getClass().getResource("/view/SelectDescriptemePart.fxml"));
        loader.setController(new SelectDescriptemePartController(main, promptWindow, new TextArea(),Enregistrement.PROPERTY));
        loader.setResources(main._langBundle);
        BorderPane layout = (BorderPane) loader.load();
        Scene launchingScene = new Scene(layout);
        promptWindow.setScene(launchingScene);
        promptWindow.show();

    } catch (IOException e) {
        // TODO Exit Program
        e.printStackTrace();
    }
}
项目:testing-video    文件:CalibrationBase.java   
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;
}
项目:MineIDE    文件:TabManagement.java   
public void addTab(final String name, final String id, final Node content)
{
    final Tab tab = TabHelper.createTabWithContextMenu(name, id, "/mineide/img/addIcon.png");
    final TabPane tabs = this.tabPanes.get(0);
    int index = tabs.getTabs().indexOf(tab);
    if (index == -1)
    {
        final BorderPane borderPane = new BorderPane();
        tab.setContent(borderPane);

        if (content != null)
            borderPane.setCenter(content);
        tabs.getTabs().add(tab);
        tabs.getSelectionModel().select(tab);
    }
    else
        tabs.getSelectionModel().select(index);
}
项目:jfree-fxdemos    文件:OrsonChartsFXDemo.java   
private SplitPane createChartPane() {
    CategoryDataset3D dataset = SampleData.createCompanyRevenueDataset();
    Chart3D chart = AreaChart3DFXDemo1.createChart(dataset);
    Chart3DViewer viewer = new Chart3DViewer(chart);

    this.splitter = new SplitPane();
    splitter.setOrientation(Orientation.VERTICAL);
    final BorderPane borderPane = new BorderPane();
    borderPane.setCenter(viewer);

   // Bind canvas size to stack pane size.
    viewer.prefWidthProperty().bind(borderPane.widthProperty());
    viewer.prefHeightProperty().bind(borderPane.heightProperty());

    final StackPane sp2 = new StackPane();

    this.chartDescription = new WebView();
    WebEngine webEngine = chartDescription.getEngine();
    webEngine.load(AreaChart3DFXDemo1.class.getResource("AreaChart3DFXDemo1.html").toString());

    sp2.getChildren().add(chartDescription);  
    splitter.getItems().addAll(borderPane, sp2);
    splitter.setDividerPositions(0.70f, 0.30f);
    return splitter;
}
项目:LIRE-Lab    文件:DialogHeaderAcceptanceTest.java   
@Override
public void start(Stage stage) throws Exception {
    dialogHeader = new DialogHeader();
    dialogHeader.setTitle("Dialog Title");
    dialogHeader.setHint("Some dialog hint here");


    BorderPane root = new BorderPane();
    root.setTop(dialogHeader);

    StackPane center = new StackPane(new Text("dialog content"));
    center.setPrefHeight(500);

    root.setCenter(center);
    Scene scene = new Scene(root, 500, 600);
    stage.setScene(scene);
    stage.show();
}
项目:FX-Test    文件:SampleDrag.java   
@Override
public void start(Stage primaryStage) throws Exception {
    Slider slider = new Slider();

    BorderPane root = new BorderPane(slider);
    Button b = new Button("Start");
    root.setBottom(b);

    Scene s = new Scene(root, 800, 600);
    primaryStage.setScene(s);
    primaryStage.show();

    RController rController = ServiceUtils.getService(RControllerFactory.class).get().create(s);
    b.setOnAction(e -> {
        RNode<Node> rNode = rController.cssFirst(".slider").get();
        rNode.click();
        rNode.dragBy(Duration.ofMillis(1000), 200, 0);
    });
}
项目:Asteroids-Laser-Controller    文件:Main.java   
@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();
}
项目:voogasalad-ltub    文件:GameAuthor.java   
/**
 * Creates a GameAUthor and sets up the basics
 */
public GameAuthor() {   
    currentStep = new Group();
    view = new BorderPane();
    developerScene = new Scene(view, SCENE_WIDTH, SCENE_HEIGHT);
    stepOrganizer = new StepOrganizer(this);
    instantiate();
}
项目:Lernkartei_2017    文件:EditorView.java   
@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;
}
项目:OneClient    文件:TaskSkin.java   
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);
}
项目:RainLauncher    文件:App.java   
@Override
    public void start(Stage primaryStage) throws Exception {
//        System.out.println(getClass().getResource("."));
        primaryStage.initStyle(StageStyle.UNDECORATED); // Remove window decoration
        BorderPane root = (BorderPane) FXMLLoader.load(getClass().getResource("view/MainPane.fxml"));
        Scene scene = new Scene(root, 800, 600);
        scene.getStylesheets().add(getClass().getResource("css/style.css").toString());
        primaryStage.setScene(scene);
        primaryStage.show();
        System.out.println("[APP] Application startup...");
    }
项目:Lernkartei_2017    文件:SimpleEditorView.java   
@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;
}
项目:Lernkartei_2017    文件:HoverButton.java   
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);
    }
项目:Lernkartei_2017    文件:SampleFXView.java   
@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;
}
项目:jfree-fxdemos    文件:ScatterPlot3DFXDemo2.java   
public static Node createDemoNode() {
    XYZDataset dataset = createDataset();
    Chart3D chart = createChart(dataset);
    Chart3DViewer viewer = new Chart3DViewer(chart);
    BorderPane node = new BorderPane();
    node.setCenter(viewer);
    HBox container = new HBox();
    CheckBox checkBox = new CheckBox("Logarithmic Axis?");
    checkBox.setSelected(true);
    checkBox.setOnAction((e) -> {
        XYZPlot plot = (XYZPlot) chart.getPlot();
        if (checkBox.isSelected()) {
            LogAxis3D logAxis = new LogAxis3D("Y (log scale)");
            logAxis.setTickLabelOrientation(LabelOrientation.PERPENDICULAR);
            logAxis.receive(new ChartStyler(chart.getStyle()));
            plot.setYAxis(logAxis);
        } else {
            NumberAxis3D yAxis = new NumberAxis3D("Y");
            yAxis.setTickLabelOrientation(LabelOrientation.PERPENDICULAR);
            yAxis.receive(new ChartStyler(chart.getStyle()));
            plot.setYAxis(yAxis);
        }
    });
    container.setAlignment(Pos.CENTER);
    container.setPadding(new Insets(4.0, 4.0, 4.0, 4.0));
    container.getChildren().add(checkBox);
    node.setBottom(container);
    return node;
}
项目:WebPLP    文件:WatcherWindow.java   
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;
}
项目:Conan    文件:InstructionsView.java   
private BorderPane configureImage(String url) {
    Image image = new Image(url);
    ImageView imageView = new ImageView();
    imageView.setImage(image);
    BorderPane pane = new BorderPane();
    pane.setCenter(imageView);
    return pane;
}
项目:lttng-scope    文件:UiModelApp2.java   
@Override
public void start(Stage primaryStage) throws Exception {
    if (primaryStage == null) {
        return;
    }

    /* Layers */
    Group backgroundLayer = new Group();
    Group statesLayer = new Group();
    Group selectionLayer = new Group();

    Pane paintingPane = new Pane(backgroundLayer, statesLayer, selectionLayer);
    paintingPane.setStyle(BACKGROUND_STYLE);

    /* Top-level */
    Pane contentPane = new Pane(paintingPane);
    contentPane.minWidthProperty().bind(contentPane.prefWidthProperty());
    contentPane.maxWidthProperty().bind(contentPane.prefWidthProperty());

    ScrollPane scrollPane = new ScrollPane(contentPane);
    scrollPane.setVbarPolicy(ScrollBarPolicy.ALWAYS);
    scrollPane.setHbarPolicy(ScrollBarPolicy.ALWAYS);
    scrollPane.setFitToHeight(true);
    scrollPane.setFitToWidth(true);
    scrollPane.setPannable(true);

    BorderPane borderPane = new BorderPane(scrollPane);

    primaryStage.setScene(new Scene(borderPane));
    primaryStage.show();
    primaryStage.setHeight(500);
    primaryStage.setWidth(500);

    contentPane.setPrefHeight(200);
    contentPane.setPrefWidth(PANE_WIDTH);

    /* Bind painting pane's height to the content pane */
    paintingPane.minHeightProperty().bind(contentPane.minHeightProperty());
    paintingPane.prefHeightProperty().bind(contentPane.prefHeightProperty());
    paintingPane.maxHeightProperty().bind(contentPane.maxHeightProperty());

    /* We set painting's pane width programmatically */
    paintingPane.minWidthProperty().bind(paintingPane.prefWidthProperty());
    paintingPane.maxWidthProperty().bind(paintingPane.prefWidthProperty());

    paintingPane.setPrefWidth(2000);
    double x = PANE_WIDTH - 2000;
    System.out.println(x);
    paintingPane.relocate(x, 0);

    drawBackground(backgroundLayer, paintingPane);
    drawRectangles(statesLayer);
    drawSelection(selectionLayer, paintingPane);
}
项目:lttng-scope    文件:UiModelApp.java   
@Override
public void start(Stage primaryStage) throws Exception {
    if (primaryStage == null) {
        return;
    }

    /* Layers */
    Group backgroundLayer = new Group();
    Group statesLayer = new Group();
    Group selectionLayer = new Group();

    /* Top-level */
    Pane contentPane = new Pane(backgroundLayer, statesLayer, selectionLayer);
    contentPane.minWidthProperty().bind(contentPane.prefWidthProperty());
    contentPane.maxWidthProperty().bind(contentPane.prefWidthProperty());
    contentPane.setStyle(BACKGROUND_STYLE);

    ScrollPane scrollPane = new ScrollPane(contentPane);
    scrollPane.setVbarPolicy(ScrollBarPolicy.ALWAYS);
    scrollPane.setHbarPolicy(ScrollBarPolicy.ALWAYS);
    scrollPane.setFitToHeight(true);
    scrollPane.setFitToWidth(true);
    scrollPane.setPannable(true);

    BorderPane borderPane = new BorderPane(scrollPane);

    primaryStage.setScene(new Scene(borderPane));
    primaryStage.show();
    primaryStage.setHeight(500);
    primaryStage.setWidth(500);

    contentPane.setPrefHeight(200);
    contentPane.setPrefWidth(PANE_WIDTH);

    drawBackground(backgroundLayer, contentPane);
    drawRectangles(statesLayer);
    drawSelection(selectionLayer, contentPane);
}
项目:TechnicalAnalysisTool    文件:TatMessageBox.java   
/**
    * Make a Warning Dialog
    * @return BorderPane
    */
   public void makeWaningGUI() {
       root = new Group();
       Scene scene = new Scene(root, 360, 185, Color.WHITE);
       ImagePattern pattern = new ImagePattern(new Image("icon/bk2.jpg"));
       scene.setFill(pattern);
       setTitle("Warning");
       setScene(scene);
       Image appIcon = new Image("icon/ERROR.png");
       getIcons().add(appIcon);
       BorderPane bp = new BorderPane();

       textArea = new TextArea(message);
       textArea.setEditable(false);
       textArea.setWrapText(true);
       textArea.setMaxWidth(320);
       textArea.setMaxHeight(130);
       HBox hBox = new HBox();
       hBox.setSpacing(5);
       hBox.setPadding(new Insets(5,0,0,0));
       hBox.setAlignment(Pos.BOTTOM_RIGHT);
       hBox.getChildren().addAll(okButton);
       bp.setCenter(textArea);
       bp.setBottom(hBox);
       root.getChildren().add(bp);
       sizeToScene();
       setX(owner.getX() + Math.abs(owner.getWidth() - scene.getWidth()) / 2.0);
setY(owner.getY() + Math.abs(owner.getHeight() - scene.getHeight()) / 2.0);
   }
项目:marathonv5    文件:BorderPaneSample.java   
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);
}
项目:marathonv5    文件:DisplayWindow.java   
/**
 * Initialize the UI for the Main window.
 */
private void initUI() {
    setName("DisplayWindow");

    setWindowState();
    setTheme();
    String projectName = System.getProperty(Constants.PROP_PROJECT_NAME, "");
    if (projectName.equals("")) {
        projectName = "Marathon";
    }
    setTitle(projectName);
    getIcons().add(FXUIUtils.getImageURL("logo16"));
    getIcons().add(FXUIUtils.getImageURL("logo32"));
    getIcons().add(FXUIUtils.getImageURL("logo64"));
    getIcons().add(FXUIUtils.getImageURL("logo128"));
    getIcons().add(FXUIUtils.getImageURL("logo256"));
    workspace = new DockingDesktop("Marathon");
    workspace.addDockableSelectionListener(dockingListener);
    workspace.addDockableStateWillChangeListener(dockingListener);
    workspace.addDockableStateChangeListener(dockingListener);
    ToolBarContainer container = ToolBarContainer.createDefaultContainer(Orientation.LEFT);
    createToolBar(container);
    container.setContent(workspace);
    BorderPane fxBorderPane = new BorderPane(container);
    fxBorderPane.setTop(createMenuBar());
    fxBorderPane.setBottom(statusPanel);
    Scene scene = new Scene(fxBorderPane);
    scene.getStylesheets().add(ModalDialog.class.getClassLoader()
            .getResource("net/sourceforge/marathon/fx/api/css/marathon.css").toExternalForm());
    setScene(scene);
    initStatusBar();
    initDesktop();
    addEventFilter(KeyEvent.KEY_PRESSED, (event) -> {
        if (event.getCode() == KeyCode.F10)
            setFullScreen(true);
    });
    setExitHook();
}
项目:marathonv5    文件:MarathonFileChooser.java   
@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;
}
项目:marathonv5    文件:GroupInputStage.java   
@Override protected Parent getContentPane() {
    BorderPane borderPane = new BorderPane();

    FormPane formPane = new FormPane("group-editor-input-stage", 2);
    formPane.addFormField(type.fileType() + ": ", name);
    borderPane.setCenter(formPane);
    borderPane.setBottom(createButtonBar());
    return borderPane;
}