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


Java VBox.setVgrow方法代码示例

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


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

示例1: start

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
@Override
public void start(Stage stage) {
    VBox box = new VBox();
    Scene scene = new Scene(box, 200, 200);
    stage.setScene(scene);
    stage.setTitle("ListViewSample");
    box.getChildren().addAll(list, label);
    VBox.setVgrow(list, Priority.ALWAYS);

    label.setLayoutX(10);
    label.setLayoutY(115);
    label.setFont(Font.font("Verdana", 20));

    list.setItems(data);

    list.setCellFactory((ListView<String> l) -> new ColorRectCell());
 
    list.getSelectionModel().selectedItemProperty().addListener(
        (ObservableValue<? extends String> ov, String old_val, 
            String new_val) -> {
                label.setText(new_val);
                label.setTextFill(Color.web(new_val));
    });
    stage.show();
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:26,代码来源:ListViewSample.java

示例2: createAndShowTableWindow

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
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();
}
 
开发者ID:jasrodis,项目名称:javafx-dataviewer,代码行数:38,代码来源:TopMenu.java

示例3: buildConfigurationUI

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
private Node buildConfigurationUI() {
    VBox box = new VBox();
    box.setPadding(new Insets(10));

    CheckBox cb = new CheckBox(MessageBundle.getInstance().getString("homeTimelineCB"));
    cb.selectedProperty().addListener((ObservableValue<? extends Boolean> ov, Boolean oldVal, Boolean newVal) -> {
        showHomeTimeline = newVal;
    });

    Label label = new Label(MessageBundle.getInstance().getString("userListLabel") + ":");

    ListView<SelectableItem<UserList>> lv = new ListView<>();
    lv.setItems(itemList);
    lv.setCellFactory(CheckBoxListCell.forListView(item -> item.getSelected()));
    VBox.setVgrow(lv, Priority.ALWAYS);

    box.getChildren().addAll(cb, label, lv);
    showTwitterListSelection();

    return box;
}
 
开发者ID:PacktPublishing,项目名称:Java-9-Programming-Blueprints,代码行数:22,代码来源:TwitterPreferencesController.java

示例4: TabDockingContainer

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
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());
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:22,代码来源:TabDockingContainer.java

示例5: createTree

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
private Node createTree() {
    VBox treeContentBox = new VBox();
    tree.setRoot(functionInfo.getRoot(true));
    tree.setShowRoot(false);
    tree.getSelectionModel().selectedItemProperty().addListener(new TreeViewSelectionChangeListener());
    tree.setCellFactory(new Callback<TreeView<Object>, TreeCell<Object>>() {
        @Override public TreeCell<Object> call(TreeView<Object> param) {
            return new FunctionTreeCell();
        }
    });
    filterByName.setOnAction((e) -> {
        tree.setRoot(functionInfo.refreshNode(filterByName.isSelected()));
        expandAll();
    });
    filterByName.setSelected(true);
    expandAll();
    treeContentBox.getChildren().addAll(topButtonBar, tree, filterByName);
    VBox.setVgrow(tree, Priority.ALWAYS);
    return treeContentBox;
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:21,代码来源:FunctionStage.java

示例6: simpleScene

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
private Scene simpleScene() {
  try {
    VBox root = new VBox();
    Pane pane = new Pane();
    Rectangle rectangle = new Rectangle(100, 100, Color.AQUA);
    pane.getChildren().addAll(rectangle);
    VerticalResizeContainerController controller = new VerticalResizeContainerController(pane);
    root.getChildren().addAll(controller.getView());
    VBox.setVgrow(controller.getView(), Priority.ALWAYS);
    Scene scene = new Scene(root, 800, 600);
    return scene;
  } catch (Exception e) {
    e.printStackTrace();
    return null;
  }
}
 
开发者ID:VerifAPS,项目名称:stvs,代码行数:17,代码来源:VerticalResizeContainerControllerDemo.java

示例7: Sample

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
/**
 * Create a resizable sample
 */
public Sample() {
    isFixedSize = false;
    VBox.setVgrow(this, Priority.ALWAYS);
    setMaxWidth(Double.MAX_VALUE);
    setMaxHeight(Double.MAX_VALUE);
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:10,代码来源:Sample.java

示例8: launchProjectManager

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
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());
        }

    }
 
开发者ID:CIRDLES,项目名称:Squid,代码行数:33,代码来源:SquidUIController.java

示例9: launchSpotManager

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
private void launchSpotManager() {
    try {
        spotManagerUI = FXMLLoader.load(getClass().getResource("SpotManager.fxml"));
        spotManagerUI.setId("SpotManager");
        VBox.setVgrow(spotManagerUI, Priority.ALWAYS);
        HBox.setHgrow(spotManagerUI, Priority.ALWAYS);
        mainPane.getChildren().add(spotManagerUI);
        spotManagerUI.setVisible(false);
    } catch (IOException | RuntimeException iOException) {
        System.out.println("SpotManager >>>>   " + iOException.getMessage());
    }
}
 
开发者ID:CIRDLES,项目名称:Squid,代码行数:13,代码来源:SquidUIController.java

示例10: createListView

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
private VBox createListView() {
    listViewBox = new VBox(5);
    classPathListView = new ListView<ClassPathElement>(classPathListItems);
    classPathListView.setPrefHeight(Node.BASELINE_OFFSET_SAME_AS_HEIGHT);
    classPathListView.setId("ClassPathList");
    classPathListView.setCellFactory((e) -> {
        ClassPathCell classPathCell = new ClassPathCell();
        classPathCell.setId("ClassPathCell");
        return classPathCell;
    });

    if (!isSingleSelection()) {
        classPathListView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
    }
    classPathListView.getSelectionModel().selectedItemProperty().addListener((observableValue, oldValue, newValue) -> {
        MultipleSelectionModel<ClassPathElement> selectionModel = classPathListView.getSelectionModel();
        int itemCount = classPathListItems.size();
        int selectedIndex = selectionModel.getSelectedIndex();
        setButtonState(deleteButton, selectedIndex != -1);
        boolean enable = selectedIndex != 0 && selectedIndex != -1 && itemCount > 1;
        setButtonState(upButton, enable);
        enable = selectedIndex != itemCount - 1 && selectedIndex != -1 && itemCount > 1;
        setButtonState(downButton, enable);
    });
    listViewBox.getChildren().add(classPathListView);
    HBox.setHgrow(listViewBox, Priority.ALWAYS);
    VBox.setVgrow(classPathListView, Priority.ALWAYS);
    return listViewBox;
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:30,代码来源:ListLayout.java

示例11: onActionOpenLink

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
private void onActionOpenLink(final Link link) {
    LoggerFacade.getDefault().debug(this.getClass(), "On action show [Link]"); // NOI18N

    final LinkView view = new LinkView();
    final LinkPresenter presenter = view.getRealPresenter();
    presenter.configure(link);
    
    final Parent parent = view.getView();
    VBox.setVgrow(parent, Priority.ALWAYS);
    
    vbWorkingArea.getChildren().clear();
    vbWorkingArea.getChildren().add(parent);
}
 
开发者ID:Naoghuman,项目名称:ABC-List,代码行数:14,代码来源:ApplicationPresenter.java

示例12: launchExpressionBuilder

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
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());
        }
    }
 
开发者ID:CIRDLES,项目名称:Squid,代码行数:15,代码来源:SquidUIController.java

示例13: initializeWelcomeView

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
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);
}
 
开发者ID:Naoghuman,项目名称:ABC-List,代码行数:10,代码来源:ApplicationPresenter.java

示例14: launchReductionManager

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
private void launchReductionManager() {
    try {
        reductionManagerUI = FXMLLoader.load(getClass().getResource("dataReduction/ReductionManager.fxml"));
        reductionManagerUI.setId("ReductionManager");
        VBox.setVgrow(reductionManagerUI, Priority.ALWAYS);
        HBox.setHgrow(reductionManagerUI, Priority.ALWAYS);
        mainPane.getChildren().add(reductionManagerUI);
        reductionManagerUI.setVisible(false);

    } catch (IOException | RuntimeException iOException) {
        System.out.println("ReductionManager >>>>   " + iOException.getMessage());
    }
}
 
开发者ID:CIRDLES,项目名称:Squid,代码行数:14,代码来源:SquidUIController.java

示例15: onActionOpenTopic

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
private void onActionOpenTopic(final Topic topic) {
    LoggerFacade.getDefault().debug(this.getClass(), "On action open [Topic]"); // NOI18N

    final TopicView view = new TopicView();
    final TopicPresenter presenter = view.getRealPresenter();
    presenter.configure(topic);
    
    final Parent parent = view.getView();
    VBox.setVgrow(parent, Priority.ALWAYS);
    
    vbWorkingArea.getChildren().clear();
    vbWorkingArea.getChildren().add(parent);
}
 
开发者ID:Naoghuman,项目名称:ABC-List,代码行数:14,代码来源:ApplicationPresenter.java


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