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

项目:CalendarFX    文件:AgendaView.java   
/**
 * Creates the node used for the body part of each cell.
 *
 * In this default implementation the body consists of a grid pane with
 * three columns. The middle column is used for showing the title of
 * calendar entries. This column will get whatever space is left after
 * the icon and the time column have used what they need. This means
 * that a very long title will automatically be truncated.
 *
 * @return the body node
 */
protected Node createBody() {
    // icon column
    ColumnConstraints iconColumn = new ColumnConstraints();

    // title column
    ColumnConstraints descriptionColumn = new ColumnConstraints();
    descriptionColumn.setFillWidth(true);
    descriptionColumn.setHgrow(Priority.SOMETIMES);
    descriptionColumn.setMinWidth(0);
    descriptionColumn.setPrefWidth(0);

    // time column
    ColumnConstraints timeColumn = new ColumnConstraints();
    timeColumn.setHalignment(HPos.RIGHT);

    gridPane = new GridPane();
    gridPane.setGridLinesVisible(true);
    gridPane.setMinWidth(0);
    gridPane.setPrefWidth(0);
    gridPane.getStyleClass().add(AGENDA_VIEW_BODY);
    gridPane.getColumnConstraints().addAll(iconColumn, descriptionColumn, timeColumn);

    return gridPane;
}
项目:Squid    文件:SquidUIController.java   
private void launchRatiosManager() {
    try {
        mainPane.getChildren().remove(ratiosManagerUI);
        // critical for puplating table
        squidProject.getTask().buildSquidSpeciesModelList();

        ratiosManagerUI = FXMLLoader.load(getClass().getResource("RatiosManager.fxml"));
        ratiosManagerUI.setId("RatiosManager");
        VBox.setVgrow(ratiosManagerUI, Priority.ALWAYS);
        HBox.setHgrow(ratiosManagerUI, Priority.ALWAYS);
        mainPane.getChildren().add(ratiosManagerUI);
        ratiosManagerUI.setVisible(false);

        showUI(ratiosManagerUI);

    } catch (IOException | RuntimeException iOException) {
        System.out.println("RatioManager >>>>   " + iOException.getMessage());
    }
}
项目:ExtremeGuiMakeover    文件:MovieApp.java   
@Override
public void start(Stage primaryStage) throws Exception {
    ImageView demo1Button = new ImageView();
    ImageView demo2Button = new ImageView();

    demo1Button.setFitWidth(200);
    demo2Button.setFitWidth(200);

    demo1Button.setPreserveRatio(true);
    demo2Button.setPreserveRatio(true);

    HBox.setHgrow(demo1Button, Priority.ALWAYS);
    HBox.setHgrow(demo2Button, Priority.ALWAYS);


    demo1Button.getStyleClass().add("demo1");
    demo2Button.getStyleClass().add("demo2");

    demo1Button.setOnMouseClicked(evt -> showDemo1());
    demo2Button.setOnMouseClicked(evt -> showDemo2());

    HBox container = new HBox(demo1Button, demo2Button);

    Scene scene = new Scene(container);
    scene.getStylesheets().add(MovieApp.class.getResource("/chooser.css").toExternalForm());
    scene.getStylesheets().add(MovieApp.class.getResource("/fonts.css").toExternalForm());

    primaryStage.setResizable(false);
    primaryStage.setTitle("Extreme GUI Makeover");
    primaryStage.setScene(scene);
    primaryStage.sizeToScene();
    primaryStage.setX(50);
    primaryStage.setY(100);
    primaryStage.show();
}
项目:marathonv5    文件:DisplayWindow.java   
private Node getMessageBar(VBox vbox) {
    HBox hb = new HBox(10);
    hb.setPrefHeight(32);
    hb.setStyle("-fx-padding: 0 5px 0 5px; -fx-background-color: " + _message_bg + ";");
    CheckBox cb = new CheckBox("Do Not Show Again");
    cb.setStyle("-fx-text-fill: " + _message_fg + ";-fx-fill: " + _message_fg + ";");
    Text b = FXUIUtils.getIconAsText("close");
    b.setOnMouseClicked((e) -> {
        JSONObject preferences = Preferences.instance().getSection("display");
        preferences.put("_doNotShowMessage", cb.isSelected());
        Preferences.instance().save("display");
        vbox.getChildren().remove(0);
    });
    Text t = new Text(_message);
    hb.setAlignment(Pos.CENTER_LEFT);
    HBox.setHgrow(t, Priority.ALWAYS);
    t.setStyle("-fx-fill: " + _message_fg + "; -fx-font-size: 14px; -fx-font-weight:bold; -fx-font-family: Tahoma;");
    b.setStyle("-fx-fill: " + _message_fg + "; -fx-font-size: 14px; -fx-font-weight:bold;");
    Region spacer = new Region();
    HBox.setHgrow(spacer, Priority.ALWAYS);
    hb.getChildren().addAll(t, spacer, b);
    return hb;
}
项目:CalendarFX    文件:MonthSheetViewSkin.java   
private void updateRowConstraints() {
    int rowCount = 32; // header + 31 days
    if (getSkinnable().getWeekDayLayout() == WeekDayLayoutStrategy.ALIGNED) {
        rowCount += 6; // 6 = max number of empty slots / cells at the top
    }

    List<RowConstraints> rowConstraints = new ArrayList<>();
    for (int i = 0; i <= rowCount; i++) {
        RowConstraints con = new RowConstraints();
        con.setFillHeight(true);
        con.setPrefHeight(Region.USE_COMPUTED_SIZE);
        con.setMinHeight(Region.USE_PREF_SIZE);
        con.setMaxHeight(Double.MAX_VALUE);
        con.setVgrow(i == 0 ? Priority.NEVER : Priority.ALWAYS);
        rowConstraints.add(con);
    }

    grid.getRowConstraints().setAll(rowConstraints);
}
项目:OneClient    文件:FileSelection.java   
public FileSelection(File parent) {
    DialogPane dialogPane = this.getDialogPane();
    dialogPane.setMaxWidth(1.7976931348623157E308D);
    this.directoryView = new CheckTreeView<>();
    this.directoryView.setMaxWidth(1.7976931348623157E308D);
    CheckBoxTreeItem<File> root = createTree(new CheckBoxTreeItem<>(parent));
    root.setExpanded(true);
    directoryView.setRoot(root);
    GridPane.setHgrow(this.directoryView, Priority.ALWAYS);
    GridPane.setFillWidth(this.directoryView, true);
    this.grid = new GridPane();
    this.grid.setHgap(10.0D);
    this.grid.setMaxWidth(1.7976931348623157E308D);
    this.grid.setAlignment(Pos.CENTER_LEFT);
    dialogPane.contentTextProperty().addListener((o) -> this.updateGrid());
    this.setTitle(ControlResources.getString("Dialog.confirm.title"));
    dialogPane.setHeaderText(ControlResources.getString("Dialog.confirm.header"));
    dialogPane.getStyleClass().add("text-input-dialog");
    dialogPane.getButtonTypes().addAll(new ButtonType[] { ButtonType.APPLY, ButtonType.CANCEL });
    this.updateGrid();
    this.setResultConverter((dialogButton) -> {
        ButtonBar.ButtonData data = dialogButton == null ? null : dialogButton.getButtonData();
        return data == ButtonData.APPLY ? this.getValues() : null;
    });
}
项目:WeatherWatch    文件:NotificationPane.java   
private void setupView() {
    ImageView weatherIcon = new ImageView();
    weatherIcon.setImage(weatherEvent.getForecast().getWeather().getIcon());
    weatherIcon.fitWidthProperty().bind(stage.widthProperty().divide(3));
    weatherIcon.fitHeightProperty().bind(stage.heightProperty().multiply(1));
    GridPane.setHgrow(weatherIcon, Priority.ALWAYS);
    GridPane.setVgrow(weatherIcon, Priority.ALWAYS);
    GridPane.setHalignment(weatherIcon, HPos.CENTER);
    GridPane.setValignment(weatherIcon, VPos.CENTER);
    add(weatherIcon, 0, 0);

    Text txt_weather_event = new Text();
    txt_weather_event.setText(controller.getWeatherEventText());
    GridPane.setHgrow(txt_weather_event, Priority.ALWAYS);
    GridPane.setVgrow(txt_weather_event, Priority.ALWAYS);
    GridPane.setValignment(txt_weather_event, VPos.CENTER);
    add(txt_weather_event, 1, 0);
}
项目:marathonv5    文件:SplitDockingContainer.java   
public SplitDockingContainer(DockingDesktop desktop, IDockingContainer parent, Node base, Dockable dockable, Split position,
        double proportion) {
    setMaxHeight(Double.MAX_VALUE);
    setMaxWidth(Double.MAX_VALUE);
    HBox.setHgrow(this, Priority.ALWAYS);
    VBox.setVgrow(this, Priority.ALWAYS);
    getProperties().put(DockingDesktop.DOCKING_CONTAINER, parent);
    base.getProperties().put(DockingDesktop.DOCKING_CONTAINER, this);
    setOrientation(position.getOrientation());
    ObservableList<Node> items = getItems();
    if (position == Split.LEFT || position == Split.TOP) {
        items.add(new TabDockingContainer(desktop, this, dockable));
        items.add(base);
    } else {
        items.add(base);
        items.add(new TabDockingContainer(desktop, this, dockable));
    }
    setDividerPositions(proportion);
}
项目:marathonv5    文件:TabDockingContainer.java   
public TabDockingContainer(DockingDesktop desktop, IDockingContainer parent, Dockable base, Dockable dockable, int order,
        boolean select) {
    this.desktop = desktop;
    dockables.add(dockable);
    dockables.add(base);
    setMaxHeight(Double.MAX_VALUE);
    setMaxWidth(Double.MAX_VALUE);
    HBox.setHgrow(this, Priority.ALWAYS);
    VBox.setVgrow(this, Priority.ALWAYS);
    getProperties().put(DockingDesktop.DOCKING_CONTAINER, parent);
    base.setContainer(this);
    dockable.setContainer(this);
    getTabs().add(newTab(base));
    getTabs().add(newTab(dockable));
    if (select) {
        getSelectionModel().select(1);
    }
    getSelectionModel().selectedItemProperty().addListener(listener);
    setTabClosingPolicy(TabClosingPolicy.ALL_TABS);
    setSide(base.getDockKey().getSide());
}
项目:javafx-dataviewer    文件:TopMenu.java   
private void createAndShowTableWindow(ComboBox<String> traceNameComboBox) {
    openedWindowsCtr++;
    List<String> traceNames = new ArrayList<>();
    for (int i = 0; i < plotData.getAllTraces().size(); i++) {
        traceNames.add(plotData.getAllTraces().get(i).getTraceName());
    }
    traceNameComboBox.setItems(FXCollections.observableList(traceNames));
    traceNameComboBox.getSelectionModel().select(0);

    HBox hbox = new HBox();

    traceNameComboBox.getSelectionModel().select(0);
    Region spacer = new Region();
    HBox.setHgrow(spacer, Priority.ALWAYS);
    hbox.getChildren().addAll(new Label("Please Select a trace :"), spacer, traceNameComboBox);

    updateTableValues(traceNameComboBox);

    Scene scene = new Scene(new Group());
    VBox vbox = new VBox();
    VBox.setVgrow(table, Priority.ALWAYS);
    vbox.setSpacing(5);
    vbox.setPadding(new Insets(10, 10, 10, 10));
    vbox.prefWidthProperty().bind(scene.widthProperty());
    vbox.prefHeightProperty().bind(scene.heightProperty());
    vbox.getChildren().addAll(hbox, table);

    ((Group) scene.getRoot()).getChildren().addAll(vbox);

    Stage stage = new Stage();
    stage.setOnCloseRequest(e -> closeTableWindow());
    stage.setWidth(300);
    stage.setHeight(400);
    stage.setScene(scene);
    stage.sizeToScene();
    stage.showAndWait();
}
项目:ServerBrowser    文件:FilesView.java   
/**
 * Initializes the whole view.
 */
public FilesView() {

    chatLogTextArea = new TextArea();
    chatLogTextArea.setEditable(false);

    clearLogsButton = new Button(Client.lang.getString("clear"));
    loadLogsButton = new Button(Client.lang.getString("reload"));

    final ButtonBar buttonBar = new ButtonBar();
    buttonBar.getButtons().addAll(loadLogsButton, clearLogsButton);

    final VBox chatLogsTabContent = new VBox(5.0, chatLogTextArea, buttonBar);
    VBox.setVgrow(chatLogTextArea, Priority.ALWAYS);

    chatLogsTab = new Tab(Client.lang.getString("chatlogs"), chatLogsTabContent);

    rootPane = new TabPane(chatLogsTab);
    rootPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
}
项目:marathonv5    文件:CheckListView.java   
private void initComponents(boolean selectable) {
    initVerticalButtonBar();
    pane = new ScrollPane();
    HBox.setHgrow(pane, Priority.ALWAYS);
    setCenter(pane);
    if (selectable) {
        setRight(verticalButtonBar);
        verticalButtonBar.setStyle("-fx-padding: 5px");
        verticalButtonBar.setDisable(true);
    }
    VBox titleBox = new VBox();
    Label titleLabel = new Label("Editing CheckList", FXUIUtils.getIcon("newCheckList"));
    titleLabel.getStyleClass().add("modaldialog-title");
    titleBox.getChildren().add(titleLabel);
    titleBox.getChildren().add(new Separator());
    setTop(titleBox);
}
项目:marathonv5    文件:CheckList.java   
private Node createTextArea(boolean selectable, boolean editable) {
    textArea = new TextArea();
    textArea.setPrefRowCount(4);
    textArea.setEditable(editable);
    textArea.textProperty().addListener((observable, oldValue, newValue) -> {
        text = textArea.getText();
    });
    textArea.setText(text);
    ScrollPane scrollPane = new ScrollPane(textArea);
    scrollPane.setFitToWidth(true);
    scrollPane.setFitToHeight(true);
    scrollPane.setHbarPolicy(ScrollBarPolicy.NEVER);
    scrollPane.setVbarPolicy(ScrollBarPolicy.ALWAYS);
    HBox.setHgrow(scrollPane, Priority.ALWAYS);
    return scrollPane;
}
项目:fx-animation-editor    文件:TitleBarComponent.java   
private void createUi() {
    getStyleClass().add(TITLE_BAR_STYLE_CLASS);
    setAlignment(Pos.CENTER_RIGHT);
    setMaxWidth(Double.MAX_VALUE);

    Region selectedBar = new Region();
    selectedBar.getStyleClass().add(HIGHLIGHT_STYLE_CLASS);
    selectedBar.setMinWidth(Region.USE_PREF_SIZE);
    selectedBar.setMaxHeight(Region.USE_PREF_SIZE);
    selectedBar.setMaxWidth(Double.MAX_VALUE);
    StackPane.setAlignment(selectedBar, Pos.BOTTOM_CENTER);

    StackPane labelPane = new StackPane(label, selectedBar);
    labelPane.setMaxHeight(Double.MAX_VALUE);
    labelPane.setMaxWidth(Region.USE_PREF_SIZE);

    Region filler = new Region();
    HBox.setHgrow(filler, Priority.ALWAYS);
    rightLabel.getStyleClass().setAll(RIGHT_LABEL_STYLE_CLASS);

    new FadeInAnimator().apply(expanded, selectedBar);
    new FadeInAnimator().apply(expanded, rightLabel);

    getChildren().addAll(labelPane, filler, rightLabel);
}
项目:file-transfer    文件:HtmlPage.java   
public HtmlPage(String link) {
    VBox root = new VBox();
    Scene scene = new Scene(root);
    setTitle("FileSend - Page");
    final WebView browser = new WebView();
    final WebEngine webEngine = browser.getEngine();
    try {
        httpsLoad(webEngine, link);
    } catch (NoSuchAlgorithmException | KeyManagementException e) {
        e.printStackTrace();
    }
    root.getChildren().add(browser);
    VBox.setVgrow(browser, Priority.ALWAYS);
    getIcons().add(new Image(getClass().getResourceAsStream(".." + File.separator + "images" + File.separator + "logo.png")));
    setScene(scene);
    setMaximized(true);
}
项目:fxutils    文件:FXDialog.java   
private static GridPane createExpandableContent(String content) {
    Label label = new Label("Exception stacktrace");

    TextArea textArea = new TextArea(content);
    textArea.setEditable(false);
    textArea.setWrapText(true);

    textArea.setMaxWidth(Double.MAX_VALUE);
    textArea.setMaxHeight(Double.MAX_VALUE);
    GridPane.setVgrow(textArea, Priority.ALWAYS);
    GridPane.setHgrow(textArea, Priority.ALWAYS);

    GridPane expContent = new GridPane();
    expContent.setMaxWidth(Double.MAX_VALUE);
    expContent.add(label, 0, 0);
    expContent.add(textArea, 0, 1);

    return expContent;
}
项目:atbash-octopus    文件:Footer.java   
@Override
public void initialize() {

    VersionReader versionReader = new VersionReader();
    versionReader.readInfo("jwk-util");
    Text version = new Text(String.format("Version %s (%s)", versionReader.getReleaseVersion(), versionReader.getBuildTime()));

    version.setFont(versionFont);

    HBox bottom = new HBox();
    Region spacer = new Region();
    HBox.setHgrow(spacer, Priority.ALWAYS);
    bottom.getChildren().addAll(spacer, version);
    bottom.setPadding(new Insets(10, 10, 5, 0));

    rootPane.setBottom(bottom);

}
项目:stvs    文件:SpecificationTableDemo.java   
private Pane createExtractedTableTextArea(ConstraintSpecification spec, ConstraintSpecificationValidator recognizer) {
  final TextArea textArea = new TextArea();
  textArea.getStyleClass().addAll("model-text-area");
  textArea.setEditable(false);

  updateText(textArea, spec);

  final Button updateButton = new Button("Refresh");
  updateButton.setOnAction(event -> updateText(textArea, spec));

  final TextArea problemsArea = new TextArea();
  problemsArea.getStyleClass().addAll("model-text-area");
  textArea.setEditable(false);

  updateProblemsText(problemsArea, recognizer);

  recognizer.problemsProperty().addListener((Observable o) -> updateProblemsText(problemsArea, recognizer));

  SplitPane splitPane = new SplitPane(textArea, problemsArea);
  splitPane.setOrientation(Orientation.VERTICAL);
  VBox.setVgrow(splitPane, Priority.ALWAYS);
  return new VBox(updateButton, splitPane);
}
项目:fx-dialogs    文件:FxDialog.java   
private GridPane createGrid() {
    //-------------------------------------------------------------------- Grid
    GRID.setHgap(GRID_GAP);
    GRID.setVgap(GRID_GAP);
    GRID.setPadding(new Insets(GRID_GAP));
    GRID.setGridLinesVisible(false);
    //-------------------------------------------------------------------- Constraints
    for (int i = 0; i < 2; i++) {
        final ColumnConstraints column = new ColumnConstraints();
        column.setFillWidth(true);
        column.setHgrow(Priority.NEVER);
        GRID.getColumnConstraints().add(column);
    }
    GRID.getColumnConstraints().get(1).setHgrow(Priority.SOMETIMES);
    //-------------------------------------------------------------------- End
    return GRID;
}
项目:dialog-tool    文件:JavaFXUtils.java   
public static void showExceptionDialog (String title, String headerText, String content, Throwable e) {
    //Source: http://code.makery.ch/blog/javafx-dialogs-official/

    Alert alert = new Alert(Alert.AlertType.ERROR);
    alert.setTitle(title);
    alert.setHeaderText(headerText);
    alert.setContentText(content);

    // Create expandable Exception.
    StringWriter sw = new StringWriter();
    PrintWriter pw = new PrintWriter(sw);
    e.printStackTrace(pw);
    String exceptionText = sw.toString();

    Label label = new Label("The exception stacktrace was:");

    TextArea textArea = new TextArea(exceptionText);
    textArea.setEditable(false);
    textArea.setWrapText(true);

    textArea.setMaxWidth(Double.MAX_VALUE);
    textArea.setMaxHeight(Double.MAX_VALUE);
    GridPane.setVgrow(textArea, Priority.ALWAYS);
    GridPane.setHgrow(textArea, Priority.ALWAYS);

    GridPane expContent = new GridPane();
    expContent.setMaxWidth(Double.MAX_VALUE);
    expContent.add(label, 0, 0);
    expContent.add(textArea, 0, 1);

    //set expandable Exception into the dialog pane.
    alert.getDialogPane().setExpandableContent(expContent);

    alert.showAndWait();
}
项目:ABC-List    文件:ApplicationPresenter.java   
private void initializeWelcomeView() {
    LoggerFacade.getDefault().info(this.getClass(), "Initialize [WelcomeView]"); // NOI18N

    final WelcomeView welcomeView = new WelcomeView();
    final Parent parent = welcomeView.getView();
    VBox.setVgrow(parent, Priority.ALWAYS);

    vbWorkingArea.getChildren().add(parent);
}
项目:Squid    文件:SquidUIController.java   
private void launchProjectManager() {

        try {
            removeAllManagers();

            projectManagerUI = FXMLLoader.load(getClass().getResource("ProjectManager.fxml"));
            projectManagerUI.setId("ProjectManager");
            VBox.setVgrow(projectManagerUI, Priority.ALWAYS);
            HBox.setHgrow(projectManagerUI, Priority.ALWAYS);
            mainPane.getChildren().add(projectManagerUI);
            projectManagerUI.setVisible(true);

            saveSquidProjectMenuItem.setDisable(squidProject.getTask().getRatioNames().isEmpty());
            saveAsSquidProjectMenuItem.setDisable(false);
            closeSquidProjectMenuItem.setDisable(false);
            projectManagerMenuItem.setDisable(false);

            managePrawnFileMenu.setDisable(false);
            buildTaskLibraryMenu();
            manageTasksMenu.setDisable(false);
            manageRatiosMenu.setDisable(squidProject.getTask().getRatioNames().isEmpty());
            manageExpressionsMenu.setDisable(squidProject.getTask().getRatioNames().isEmpty());
            manageReportsMenu.setDisable(squidProject.getTask().getRatioNames().isEmpty());

            // log prawnFileFolderMRU
            squidPersistentState.setMRUPrawnFileFolderPath(squidProject.getPrawnFileHandler().getCurrentPrawnFileLocationFolder());

        } catch (IOException | RuntimeException iOException) {
            System.out.println("ProjectManager >>>>   " + iOException.getMessage());
        }

    }
项目:Squid    文件:SquidUIController.java   
private void launchSessionAudit() {
    try {
        sessionAuditUI = FXMLLoader.load(getClass().getResource("SessionAudit.fxml"));
        sessionAuditUI.setId("SessionAudit");
        VBox.setVgrow(sessionAuditUI, Priority.ALWAYS);
        HBox.setHgrow(sessionAuditUI, Priority.ALWAYS);
        mainPane.getChildren().add(sessionAuditUI);
        sessionAuditUI.setVisible(false);
    } catch (IOException | RuntimeException iOException) {
        System.out.println("SessionAudit >>>>   " + iOException.getMessage());
    }
}
项目:OneClient    文件:InstancePane.java   
public static void show(Instance instance) {
    InstancePane pane = ContentPanes.getPane(InstancePane.class);
    pane.setupPane(instance);
    AnchorPane node = (AnchorPane) pane.getNode();
    node.prefWidthProperty().bind(Main.mainController.contentBox.widthProperty());
    node.prefHeightProperty().bind(Main.mainController.contentBox.heightProperty());
    VBox.setVgrow(node, Priority.ALWAYS);
    HBox.setHgrow(node, Priority.ALWAYS);
    Main.mainController.currentContent.button.setSelected(false);
    Main.mainController.setContent(pane);
}
项目:fxexperience2    文件:SplineController.java   
private void createSpineEditor() {

        SplineEditor = new SplineEditor();

        GridPane.setConstraints(SplineEditor, 0, 0, 1, 10,
                HPos.CENTER, VPos.CENTER, Priority.ALWAYS, Priority.ALWAYS);
        gridPane.add(SplineEditor, 0, 0);

        codeTextField.textProperty().bind(new StringBinding() {
            {
                bind(SplineEditor.controlPoint1xProperty(),
                        SplineEditor.controlPoint1yProperty(),
                        SplineEditor.controlPoint2xProperty(),
                        SplineEditor.controlPoint2yProperty());
            }

            @Override
            protected String computeValue() {
                return String.format("Interpolator.SPLINE(%.4f, %.4f, %.4f, %.4f);",
                        SplineEditor.getControlPoint1x(),
                        SplineEditor.getControlPoint1y(),
                        SplineEditor.getControlPoint2x(),
                        SplineEditor.getControlPoint2y());
            }
        });

        // create animation updater
        ChangeListener<Number> animUpdater = (ObservableValue<? extends Number> ov, Number t, Number t1) -> updateAnimation();

        SplineEditor.controlPoint1xProperty().addListener(animUpdater);
        SplineEditor.controlPoint1yProperty().addListener(animUpdater);
        SplineEditor.controlPoint2xProperty().addListener(animUpdater);
        SplineEditor.controlPoint2yProperty().addListener(animUpdater);
    }
项目:Squid    文件:SquidUIController.java   
private void launchExpressionBuilder() {

        try {
            expressionBuilderUI = FXMLLoader.load(getClass().getResource("expressions/ExpressionBuilder.fxml"));
            expressionBuilderUI.setId("ExpressionBuilder");
            VBox.setVgrow(expressionBuilderUI, Priority.ALWAYS);
            HBox.setHgrow(expressionBuilderUI, Priority.ALWAYS);
            mainPane.getChildren().add(expressionBuilderUI);
            expressionBuilderUI.setVisible(false);

        } catch (IOException | RuntimeException iOException) {
            System.out.println("ExpressionBuilder >>>>   " + iOException.getMessage());
        }
    }
项目:cassandra-client    文件:EventLogger.java   
public EventLogger() {
    setVisible(false);
    setPrefHeight(30);
    setPrefWidth(612);

    ColumnConstraints column1 = new ColumnConstraints();
    column1.setPercentWidth(85);
    column1.setHgrow(Priority.SOMETIMES);

    ColumnConstraints column2 = new ColumnConstraints();
    column2.setPercentWidth(15);
    column2.setHgrow(Priority.SOMETIMES);

    getColumnConstraints().clear();
    getColumnConstraints().addAll(column1, column2);

    RowConstraints row = new RowConstraints(10, 40, 40);
    row.setVgrow(Priority.SOMETIMES);

    getRowConstraints().clear();
    getRowConstraints().add(row);

    eventLabel = buildEventLabel();
    setConstraints(eventLabel, 0, 0);
    GridPane.setMargin(eventLabel, new Insets(0, 10, 0, 10));

    serverLabel = new Label();
    setConstraints(serverLabel, 1, 0);
    GridPane.setMargin(serverLabel, new Insets(0, 10, 0, 10));
    getChildren().addAll(eventLabel, serverLabel);
}
项目:legendary-guide    文件:NotificationBarPane.java   
private void config() {
    if (items.isEmpty()) return;
    Item item = items.get(0);

    bar.getChildren().clear();
    label.textProperty().bind(item.label);
    label.setMaxWidth(Double.MAX_VALUE);
    HBox.setHgrow(label, Priority.ALWAYS);
    bar.getChildren().add(label);
    if (item.progress != null) {
        progressBar.setMinWidth(200);
        progressBar.progressProperty().bind(item.progress);
        bar.getChildren().add(progressBar);
    }
}
项目:Squid    文件:SquidUIController.java   
private void launchReducedDataReportManager() {
    try {
        reducedDataReportManagerUI = FXMLLoader.load(getClass().getResource("dataReduction/reducedDataReportManager.fxml"));
        reducedDataReportManagerUI.setId("reducedDataReportManagerUI");
        VBox.setVgrow(reducedDataReportManagerUI, Priority.ALWAYS);
        HBox.setHgrow(reducedDataReportManagerUI, Priority.ALWAYS);
        mainPane.getChildren().add(reducedDataReportManagerUI);
        reducedDataReportManagerUI.setVisible(false);

        showUI(reducedDataReportManagerUI);

    } catch (IOException | RuntimeException iOException) {
        System.out.println("reducedDataReportManagerUI >>>>   " + iOException.getMessage());
    }
}
项目:Squid    文件:SquidUIController.java   
@FXML
private void topsoilAction(ActionEvent event) {
    mainPane.getChildren().remove(topsoilPlotUI);

    AbstractTopsoilPlot topsoilPlot = new TopsoilPlotWetherill("Example Wetherill using CM2 data");

    topsoilPlotUI = topsoilPlot.initializePlotPane();
    topsoilPlotUI.setId("topsoilPlotUI");
    VBox.setVgrow(topsoilPlotUI, Priority.ALWAYS);
    HBox.setHgrow(topsoilPlotUI, Priority.ALWAYS);
    mainPane.getChildren().add(topsoilPlotUI);
    topsoilPlotUI.setVisible(false);
    showUI(topsoilPlotUI);
}
项目:Matcher    文件:Gui.java   
@Override
public void start(Stage stage) {
    Matcher.init();

    env = new ClassEnvironment();
    matcher = new Matcher(env);

    GridPane border = new GridPane();

    ColumnConstraints colConstraint = new ColumnConstraints();
    colConstraint.setPercentWidth(50);
    border.getColumnConstraints().addAll(colConstraint, colConstraint);

    RowConstraints defaultRowConstraints = new RowConstraints();
    RowConstraints contentRowConstraints = new RowConstraints();
    contentRowConstraints.setVgrow(Priority.ALWAYS);
    border.getRowConstraints().addAll(defaultRowConstraints, contentRowConstraints, defaultRowConstraints);

    MainMenuBar menu = new MainMenuBar(this);
    components.add(menu);
    border.add(menu, 0, 0, 2, 1);

    MatchPaneSrc srcPane = new MatchPaneSrc(this);
    components.add(srcPane);
    border.add(srcPane, 0, 1);

    MatchPaneDst dstPane = new MatchPaneDst(this, srcPane);
    components.add(dstPane);
    border.add(dstPane, 1, 1);

    BottomPane bottomPane = new BottomPane(this, srcPane, dstPane);
    components.add(bottomPane);
    border.add(bottomPane, 0, 2, 2, 1);

    scene = new Scene(border);
    stage.setScene(scene);
    stage.setTitle("Matcher");
    stage.show();
}
项目:vars-annotation    文件:FilterableTreeItemDemo.java   
private Parent createContents() {
    VBox vbox = new VBox(6);
    vbox.getChildren().add(createFilterPane());
    vbox.getChildren().add(createAddItemPane());
    Node demoPane = createDemoPane();
    VBox.setVgrow(demoPane, Priority.ALWAYS);
    vbox.getChildren().add(demoPane);
    return new BorderPane(vbox);
}
项目:EpiStats    文件:UserInterface.java   
public UserInterface(EpiStats epi, Path saveFile, ObjectList list, PlayerCache cache) {
    this.epi = epi;
    this.saveFile = saveFile;

    this.objectListPanel = new ObjectListPanel(this, list);
    this.dataCollectionPanel = new DataCollectionPanel(this, cache);
    this.generationPanel = new GenerationPanel(this);
    this.rankingListPanel = new RankingListPanel(this);
    this.rankingView = new RankingView(this);

    loadUI();

    this.dataCollectionPanel.getCacheAge().addListener((v, oldV, newV) -> saveUI());
    this.generationPanel.getEditor().addListener((v, oldV, newV) -> saveUI());

    setVgap(10);
    setHgap(10);
    setPadding(new Insets(10));

    add(this.objectListPanel, 0, 0);
    add(this.dataCollectionPanel, 0, 1);
    add(this.generationPanel, 0, 2);
    add(this.rankingListPanel, 0, 3);

    add(this.rankingView, 1, 0, 1, 4);

    getColumnConstraints().addAll(GridUtil.createColumn(60), GridUtil.createColumn(40));
    getRowConstraints().addAll(GridUtil.createRow(), GridUtil.createRow(), GridUtil.createRow(Priority.ALWAYS), GridUtil.createRow(30));
}
项目:Conan    文件:PremisesAndConclusion.java   
private void setPrefs() {
    this.setHgrow(premises, Priority.ALWAYS);
    this.setHgrow(turnstile, Priority.NEVER);
    this.setHgrow(conclusion, Priority.ALWAYS);
    this.setMinWidth(0.0);
    this.setPrefWidth(800.0);
    this.setMaxWidth(800.0);
    this.setMinHeight(30.0);
    this.setPrefHeight(30.0);
    this.setMaxHeight(30.0);
}
项目:textmd    文件:ExceptionAlertDialog.java   
@Override
public AlertDialog build() {
    StringWriter sw = new StringWriter();
    PrintWriter pw = new PrintWriter(sw);
    TextArea textArea = new TextArea();
    GridPane expContent = new GridPane();
    Label label = new Label("Stacktrace:");
    label.setTextFill(Utils.getDefaultTextColor());
    initOwner(ownerStage);
    setTitle(title);
    setHeaderText(header);
    setContentText(message);

    exception.printStackTrace(pw);
    String exceptionText = sw.toString();
    textArea.setText(exceptionText);
    textArea.setEditable(false);
    textArea.setWrapText(true);
    textArea.setMaxWidth(Double.MAX_VALUE);
    textArea.setMaxHeight(Double.MAX_VALUE);
    GridPane.setVgrow(textArea, Priority.ALWAYS);
    GridPane.setHgrow(textArea, Priority.ALWAYS);
    expContent.setMaxWidth(Double.MAX_VALUE);
    expContent.add(label, 0, 0);
    expContent.add(textArea, 0, 1);

    getDialogPane().setExpandableContent(expContent);
    return this;
}
项目:marathonv5    文件:Sample.java   
/**
 * Create a resizable sample
 */
public Sample() {
    isFixedSize = false;
    VBox.setVgrow(this, Priority.ALWAYS);
    setMaxWidth(Double.MAX_VALUE);
    setMaxHeight(Double.MAX_VALUE);
}
项目:CalendarFX    文件:SettingsViewSkin.java   
public SectionTitle(String name) {
    getStyleClass().add("section-title");

    Label titleLabel = new Label(name);
    Separator separator = new Separator();
    separator.setPadding(new Insets(5, 0, 0, 0));

    HBox.setHgrow(separator, Priority.ALWAYS);
    HBox.setHgrow(titleLabel, Priority.NEVER);

    setSpacing(10);
    setAlignment(Pos.CENTER);

    getChildren().addAll(titleLabel, separator);
}
项目:marathonv5    文件:RubyPathLayout.java   
private HBox createRubyHomeField() {
    HBox rubyHomeBox = new HBox(5);
    rubyHomeField = new TextField();
    rubyHomeField.setId("RubyHomeField");
    rubyHomeField.setPromptText("(Bundled JRuby)");
    Label label = createLabel("Ruby Home: ");
    label.setId("RubyLabel");
    label.setMinWidth(Region.USE_PREF_SIZE);
    rubyHomeBox.getChildren().addAll(label, rubyHomeField);
    HBox.setHgrow(rubyHomeField, Priority.ALWAYS);
    return rubyHomeBox;
}
项目:stvs    文件:StvsMainScene.java   
private VBox createVBox() {
  VBox vbox = new VBox();
  vbox.getChildren().addAll(menuBarController.getView(), rootController.getView());
  VBox.setVgrow(rootController.getView(), Priority.ALWAYS);

  return vbox;
}
项目:marathonv5    文件:StatusBar.java   
public StatusBar() {
    setId("status-bar");
    msgLabel = createLabel("");
    extraLabel = createLabel("               ");
    extraLabel.setFont(Font.font("System", FontPosture.ITALIC, 12.0));
    fixtureLabel = createLabel("       ");
    fixtureLabel.setFont(Font.font("System", FontWeight.BOLD, 12.0));
    rowLabel = createLabel("       ");
    columnLabel = createLabel("       ");
    insertLabel = createLabel("               ");
    Region region = new Region();
    getChildren().addAll(msgLabel, region, createSeparator(), extraLabel, createSeparator(), fixtureLabel, createSeparator(),
            rowLabel, createSeparator(), columnLabel, createSeparator(), insertLabel, createSeparator());
    HBox.setHgrow(region, Priority.ALWAYS);
    getStylesheets().add(ModalDialog.class.getClassLoader().getResource("net/sourceforge/marathon/fx/api/css/marathon.css")
            .toExternalForm());
}