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


Java HBox.setHgrow方法代码示例

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


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

示例1: setAlignment

import javafx.scene.layout.HBox; //导入方法依赖的package包/类
private void setAlignment() {
	label.setPrefWidth(200);
	changeButton.setMinWidth(71);
	unbindButton.setMinWidth(71);
	hbox = new HBox(label, textField, changeButton, unbindButton);
	hbox.setAlignment(Pos.CENTER_LEFT);
	hbox.setPrefHeight(31);
	label.setText(getPrettyName());
	label.setAlignment(Pos.CENTER_LEFT);
	Insets labelInset = new Insets(0, 0, 0, 10);
	Insets buttonInset = new Insets(0, 10, 0, 0);
	unbindButton.setMinHeight(31);
	hbox.setMargin(label, labelInset);
	hbox.setMargin(unbindButton, buttonInset);
	textField.setEditable(false);
	hbox.setHgrow(textField, Priority.ALWAYS);
}
 
开发者ID:ForJ-Latech,项目名称:fwm,代码行数:18,代码来源:HotkeyController.java

示例2: TabDockingContainer

import javafx.scene.layout.HBox; //导入方法依赖的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

示例3: setupInfoLabel

import javafx.scene.layout.HBox; //导入方法依赖的package包/类
private static void setupInfoLabel(final Label label) {
	label.setMaxHeight(Double.MAX_VALUE);
	label.setMaxWidth(Double.MAX_VALUE);
	label.setTextAlignment(TextAlignment.CENTER);

	HBox.setHgrow(label, Priority.ALWAYS);
}
 
开发者ID:Bios-Marcel,项目名称:ServerBrowser,代码行数:8,代码来源:ServerListController.java

示例4: launchSessionAudit

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

示例5: setupArchitectureManagementVisuals

import javafx.scene.layout.HBox; //导入方法依赖的package包/类
/**
 * Create the different buttons for the architecture management and add the desired actions to them
 */
private void setupArchitectureManagementVisuals() {
    HBox buttons = new HBox();

    Button configButton = new Button("Config");
    Button startButton = new Button("Start");
    Button pauseButton = new Button("Pause");
    Button resumeButton = new Button("Resume");
    Button stopButton = new Button("Stop");

    buttons.getChildren().addAll(configButton, startButton, pauseButton, resumeButton, stopButton);

    BorderPane borderPane = new BorderPane();
    borderPane.setPrefHeight(canvas.getScene().getHeight());
    borderPane.setPrefWidth(canvas.getScene().getWidth());

    Pane space = new Pane();
    space.setMinSize(1, 1);
    HBox.setHgrow(space, Priority.ALWAYS);

    HBox container = new HBox();
    container.setPrefWidth(canvas.getScene().getWidth());

    container.getChildren().addAll(space, buttons);
    borderPane.setBottom(container);
    root.getChildren().add(borderPane);

    configButton.setOnMouseClicked(new ArchitectureButtonEventHandler(SimulationAction.CONFIG, publisher));
    startButton.setOnMouseClicked(new ArchitectureButtonEventHandler(SimulationAction.START, publisher));
    stopButton.setOnMouseClicked(new ArchitectureButtonEventHandler(SimulationAction.STOP, publisher));
    pauseButton.setOnMouseClicked(new ArchitectureButtonEventHandler(SimulationAction.PAUSE, publisher));
    resumeButton.setOnMouseClicked(new ArchitectureButtonEventHandler(SimulationAction.RESUME, publisher));
}
 
开发者ID:INAETICS,项目名称:Drones-Simulator,代码行数:36,代码来源:Game.java

示例6: createDemoPane

import javafx.scene.layout.HBox; //导入方法依赖的package包/类
private Node createDemoPane() {
    HBox hbox = new HBox(6);
    Node filteredTree = createFilteredTree();
    HBox.setHgrow(filteredTree, Priority.ALWAYS);
    hbox.getChildren().add(filteredTree);
    return hbox;
}
 
开发者ID:mbari-media-management,项目名称:vars-annotation,代码行数:8,代码来源:FilterableTreeItemDemo.java

示例7: addSeparator

import javafx.scene.layout.HBox; //导入方法依赖的package包/类
private Node addSeparator(String name) {
    Separator separator = new Separator();
    separator.setPadding(new Insets(8, 0, 0, 0));
    HBox.setHgrow(separator, Priority.ALWAYS);
    Text text = new Text(name);
    text.setTextAlignment(TextAlignment.CENTER);
    HBox hBox = new HBox(text, separator);
    HBox.setHgrow(hBox, Priority.ALWAYS);
    return hBox;
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:11,代码来源:CheckListFormNode.java

示例8: launchIsotopesManager

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

示例9: launchReductionManager

import javafx.scene.layout.HBox; //导入方法依赖的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

示例10: GoogleEntryReminderItem

import javafx.scene.layout.HBox; //导入方法依赖的package包/类
private GoogleEntryReminderItem(GoogleEntryReminder reminder) {
    this.reminder = requireNonNull(reminder);

    methodCombo = new ComboBox<>();
    methodCombo.getItems().setAll(RemindMethod.values());
    methodCombo.disableProperty().bind(entry.getCalendar().readOnlyProperty());
    methodCombo.valueProperty().bindBidirectional(reminder.methodProperty());
    methodCombo.setConverter(new StringConverter<RemindMethod>() {
        @Override
        public String toString(RemindMethod object) {
            return object.getName();
        }

        @Override
        public RemindMethod fromString(String string) {
            for (RemindMethod method : RemindMethod.values()) {
                if (method.getName().equals(string)) {
                    return method;
                }
            }
            return null;
        }
    });

    Integer minutes = reminder.getMinutes();
    TimeUnit unit = TimeUnit.MINUTES;
    if (minutes != null) {
        if (minutes % 1440 == 0) {
            unit = TimeUnit.DAYS;
            minutes = minutes / 1400;
        } else if (minutes % 60 == 0) {
            unit = TimeUnit.HOURS;
            minutes = minutes / 60;
        }
    }

    valueTxt = new TextField();
    valueTxt.disableProperty().bind(entry.getCalendar().readOnlyProperty());
    valueTxt.setPrefColumnCount(5);
    valueTxt.setText(minutes == null ? "" : minutes.toString());
    valueTxt.textProperty().addListener(obs -> updateMinutes());

    unitCombo = new ComboBox<>();
    unitCombo.getItems().setAll(TimeUnit.MINUTES, TimeUnit.HOURS, TimeUnit.DAYS);
    unitCombo.disableProperty().bind(entry.getCalendar().readOnlyProperty());
    unitCombo.setValue(unit);
    unitCombo.valueProperty().addListener(obs -> updateMinutes());

    removeIcon = new Label();
    removeIcon.getStyleClass().add("button-icon");
    removeIcon.setGraphic(new FontAwesome().create(FontAwesome.Glyph.TRASH_ALT));
    removeIcon.setOnMouseClicked(evt -> removeReminder(reminder));
    removeIcon.disableProperty().bind(entry.getCalendar().readOnlyProperty());

    HBox.setHgrow(removeIcon, Priority.NEVER);
    setAlignment(Pos.CENTER_LEFT);
    getChildren().addAll(methodCombo, valueTxt, unitCombo, removeIcon);
    getStyleClass().add("notification-item");
}
 
开发者ID:dlemmermann,项目名称:CalendarFX,代码行数:60,代码来源:GoogleEntryDetailsView.java

示例11: PasswordDialog

import javafx.scene.layout.HBox; //导入方法依赖的package包/类
public PasswordDialog(String whatFor) {
  setTitle(whatFor+" Password");
  setHeaderText("Please enter your "+whatFor+" password: ");

  ButtonType passwordButtonType = new ButtonType("Login", ButtonData.OK_DONE);
  getDialogPane().getButtonTypes().addAll(passwordButtonType, ButtonType.CANCEL);

  passwordField = new PasswordField();
  passwordField.setPromptText(whatFor+" password");

  HBox hBox = new HBox();
  hBox.getChildren().add(passwordField);
  hBox.setPadding(new Insets(20));

  HBox.setHgrow(passwordField, Priority.ALWAYS);

  getDialogPane().setContent(hBox);

  Platform.runLater(() -> passwordField.requestFocus());

  setResultConverter(dialogButton -> {
    if (dialogButton == passwordButtonType) {
      return passwordField.getText();
    }
    return "";
  });
}
 
开发者ID:billwi,项目名称:CyberTigerScoreboard,代码行数:28,代码来源:PasswordDialog.java

示例12: config

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

示例13: createNameField

import javafx.scene.layout.HBox; //导入方法依赖的package包/类
private VBox createNameField() {
    VBox nameFieldBox = new VBox();
    TextField nameField = new TextField();
    nameField.textProperty().addListener((observable, oldValue, newValue) -> {
        fireContentChanged();
        checkList.setName(nameField.getText());
    });
    nameField.setEditable(mode.isSelectable());
    nameFieldBox.getChildren().addAll(new Label("Name"), nameField);
    HBox.setHgrow(nameField, Priority.ALWAYS);
    VBox.setMargin(nameFieldBox, new Insets(5, 10, 0, 5));
    nameField.setText(checkList.getName());
    HBox.setHgrow(nameFieldBox, Priority.ALWAYS);
    return nameFieldBox;
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:16,代码来源:CheckListFormNode.java

示例14: initialize

import javafx.scene.layout.HBox; //导入方法依赖的package包/类
private void initialize() {
	hbox = new HBox();
	
	addChild = createButton("+");
	deleteSelf = createButton("x");
	debugButton = createButton("D");
	
	FXUtils.setTooltip(addChild, "Add a new sub-task");
	FXUtils.setTooltip(deleteSelf, "Delete this task");
	
	setOnMouseEntered(event -> {
		if(item == null)
			return;
		deleteSelf.setVisible(true);
		debugButton.setVisible(true);
		if(item.getTask().getLevel() <= 2)
			addChild.setVisible(true);
		
	});
	
	setOnMouseExited(event -> {
		addChild.setVisible(false);
		deleteSelf.setVisible(false);
		debugButton.setVisible(false);
	});

	spacer = new Pane();
	
	hbox.getChildren().addAll(addChild, deleteSelf, debugButton, spacer);
	hbox.setSpacing(SPACING);
	hbox.setVisible(true);
	addChild.setVisible(false);
	deleteSelf.setVisible(false);
	debugButton.setVisible(false);
	HBox.setHgrow(spacer, Priority.ALWAYS);
}
 
开发者ID:vibridi,项目名称:qgu,代码行数:37,代码来源:TaskToolbarCell.java

示例15: createSpacer

import javafx.scene.layout.HBox; //导入方法依赖的package包/类
private Node createSpacer() 
{
    Region spacer = new Region();
    HBox.setHgrow(spacer, Priority.ALWAYS);
    return spacer;
}
 
开发者ID:ksg14,项目名称:duncan,代码行数:7,代码来源:WatchYoutube.java


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