javafx.scene.layout.VBox Java Examples

The following examples show how to use javafx.scene.layout.VBox. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ScreenShotFrameShowFrame.java    From oim-fx with MIT License 6 votes vote down vote up
private void init() {
	this.setCenter(rootPane);
	this.setTitle("组件测试");
	this.setWidth(380);
	this.setHeight(600);
	this.setRadius(10);

	VBox topBox = new VBox();
	topBox.setPrefHeight(50);
	rootPane.setTop(topBox);
	rootPane.setCenter(componentBox);

	Button b=new Button("截屏");
	componentBox.getChildren().add(b);
	
	b.setOnAction(a->{
		ss.setVisible(true);
	});
}
 
Example #2
Source File: IconButtonFrameTest.java    From oim-fx with MIT License 6 votes vote down vote up
@Override
  public void start(Stage primaryStage) {
  	stage.show();
  	
  	stage.setCenter(rootPane);
  	stage.setTitle("组件测试");
  	stage.setWidth(380);
  	stage.setHeight(600);
  	stage.setRadius(10);

VBox topBox = new VBox();
topBox.setPrefHeight(50);
rootPane.setTop(topBox);

rootPane.setCenter(componentBox);

Image image = ImageBox.getImageClassPath("/images/head/101_100.gif");
IconButton themeIconButton = new IconButton(image);
themeIconButton.setPrefSize(130, 130);
Platform.runLater(new Runnable() {
	@Override
	public void run() {
		componentBox.getChildren().add(themeIconButton);
	}
});
  }
 
Example #3
Source File: DialogsApp.java    From FXTutorials with MIT License 6 votes vote down vote up
private Parent createContent() {
    VBox box = new VBox();
    box.setPrefSize(800, 600);
    Button btn1 = new Button("Open JavaFX dialog");
    btn1.setOnAction(e -> {
        Alert alert = new Alert(Alert.AlertType.INFORMATION);
        alert.setHeaderText("Header");
        alert.setContentText("Content");
        alert.show();
    });

    Button btn2 = new Button("Open Custom dialog");
    btn2.setOnAction(e -> {
        CustomDialog dialog = new CustomDialog("Header", "Content");
        dialog.openDialog();
    });

    box.getChildren().addAll(btn1, btn2);

    return box;
}
 
Example #4
Source File: EventDetectionUI.java    From SONDY with GNU General Public License v3.0 6 votes vote down vote up
public final void availabeMethodsUI(){
    initializeAvailableMethodList();
    methodDescriptionLabel = new Label("Selected method description");
    methodDescriptionLabel.setId("smalltext");
    UIUtils.setSize(methodDescriptionLabel,Main.columnWidthLEFT,24);
    VBox methodsLEFT = new VBox();
    methodsLEFT.getChildren().addAll(methodList,new Rectangle(0,3),methodDescriptionLabel);
    // Right part
    applyButton = createApplyMethodButton();
    UIUtils.setSize(applyButton, Main.columnWidthRIGHT, 24);
    parameterTable = new TableView<>();
    UIUtils.setSize(parameterTable, Main.columnWidthRIGHT, 64);
    initializeParameterTable();
    VBox methodsRIGHT = new VBox();
    methodsRIGHT.getChildren().addAll(parameterTable,new Rectangle(0,3),applyButton);
    // Both parts
    HBox methodsBOTH = new HBox(5);
    methodsBOTH.getChildren().addAll(methodsLEFT,methodsRIGHT);
    grid.add(methodsBOTH,0,2);
}
 
Example #5
Source File: MainController.java    From Library-Assistant with Apache License 2.0 6 votes vote down vote up
private void initDrawer() {
    try {
        FXMLLoader loader = new FXMLLoader(getClass().getResource("/library/assistant/ui/main/toolbar/toolbar.fxml"));
        VBox toolbar = loader.load();
        drawer.setSidePane(toolbar);
        ToolbarController controller = loader.getController();
        controller.setBookReturnCallback(this);
    } catch (IOException ex) {
        Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);
    }
    HamburgerSlideCloseTransition task = new HamburgerSlideCloseTransition(hamburger);
    task.setRate(-1);
    hamburger.addEventHandler(MouseEvent.MOUSE_CLICKED, (Event event) -> {
        drawer.toggle();
    });
    drawer.setOnDrawerOpening((event) -> {
        task.setRate(task.getRate() * -1);
        task.play();
        drawer.toFront();
    });
    drawer.setOnDrawerClosed((event) -> {
        drawer.toBack();
        task.setRate(task.getRate() * -1);
        task.play();
    });
}
 
Example #6
Source File: MarsNode.java    From mars-sim with GNU General Public License v3.0 6 votes vote down vote up
public void createGreenhouses(TitledPane tp, Settlement settlement) {
 	VBox v = new VBox();
    v.setSpacing(10);
    v.setPadding(new Insets(0, 20, 10, 20));

 	List<Building> buildings = settlement.getBuildingManager().getACopyOfBuildings();

	Iterator<Building> iter1 = buildings.iterator();
	while (iter1.hasNext()) {
		Building building = iter1.next();
    	if (building.hasFunction(FunctionType.FARMING)) {
//        	try {
        		Farming farm = (Farming) building.getFunction(FunctionType.FARMING);
            	Button b = createGreenhouseDialog(farm);
            	v.getChildren().add(b);
//        	}
//        	catch (BuildingException e) {}
        }
	}


    tp.setContent(v);//"1 2 3 4 5..."));
    tp.setExpanded(true);

 }
 
Example #7
Source File: ResourceView.java    From sis with Apache License 2.0 6 votes vote down vote up
private void addFeaturePanel(String filePath) {
    try {
        DataStore ds = DataStores.open(filePath);
        setContent(new FeatureTable(ds, 18));
        root.getChildren().addAll(temp);
        temp.clear();
    } catch (DataStoreException e) {
        final Alert alert = new Alert(Alert.AlertType.ERROR);
        alert.setTitle("An error has occurred");
        Label lab = new Label(e.getMessage());
        lab.setWrapText(true);
        lab.setMaxWidth(650);
        VBox vb = new VBox();
        vb.getChildren().add(lab);
        alert.getDialogPane().setContent(vb);
        alert.show();
    }
}
 
Example #8
Source File: DataSetMeasurementsTests.java    From chart-fx with Apache License 2.0 6 votes vote down vote up
@Start
public void start(Stage stage) {
    final XYChart chart = new XYChart();
    chart.getDatasets().add(new SineFunction("sine1", 1000));
    chart.getDatasets().add(new SineFunction("sine2", 1000));

    plugin = new ParameterMeasurements();

    for (MeasurementType type : MeasurementType.values()) {
        assertThrows(IllegalArgumentException.class, () -> new DataSetMeasurements(null, type).initialize());
        assertDoesNotThrow(() -> new DataSetMeasurements(plugin, type));
    }

    field = new DataSetMeasurements(plugin, MeasurementType.FFT_DB_RANGED);
    field.setDataSet(chart.getAllDatasets().get(0));
    assertTrue(field.getMeasType().isVerticalMeasurement());

    chart.getPlugins().add(plugin);
    final VBox root = new VBox(chart);

    stage.setScene(new Scene(root, 100, 100));
    stage.show();
}
 
Example #9
Source File: ADCProjectInitWindow.java    From arma-dialog-creator with MIT License 6 votes vote down vote up
public NewProjectTab() {
	tfProjectName.setPrefWidth(200d);
	tfProjectName.setPromptText("untitled");
	tfProjectDescription.setPrefRowCount(6);

	final VBox root = getTabVbox(10);

	final Label lblCreateNewProject = new Label(bundle.getString("new_project_title"));
	VBox.setMargin(lblCreateNewProject, new Insets(0, 0, 10, 0));
	final Label lblProjectName = new Label(bundle.getString("project_name"), tfProjectName);
	lblProjectName.setContentDisplay(ContentDisplay.RIGHT);
	final HBox hboxProjectDescription = new HBox(5, new Label(bundle.getString("new_project_description")), tfProjectDescription);

	root.getChildren().addAll(lblCreateNewProject, lblProjectName, hboxProjectDescription);

	tabNew.setContent(root);
}
 
Example #10
Source File: RPGApp.java    From FXTutorials with MIT License 6 votes vote down vote up
private Parent createContent() {
    VBox root = new VBox(10);
    root.setPrefSize(800, 600);
    root.setPadding(new Insets(15));

    Button btnAttack = new Button("ATTACK");
    btnAttack.setOnAction(e -> makeMove(Action.ATTACK));

    Button btnCharge = new Button("CHARGE");
    btnCharge.setOnAction(e -> makeMove(Action.CHARGE));

    Button btnBlock = new Button("BLOCK");
    btnBlock.setOnAction(e -> makeMove(Action.BLOCK));

    output.setPrefHeight(450);
    output.setFont(Font.font(26));

    updateInfo();

    root.getChildren().addAll(btnAttack, btnCharge, btnBlock, output);

    return root;
}
 
Example #11
Source File: AboutWindow.java    From PDF4Teachers with Apache License 2.0 6 votes vote down vote up
public AboutWindow(){

        VBox root = new VBox();
        Scene scene = new Scene(root, 400, 640);

        initOwner(Main.window);
        initModality(Modality.WINDOW_MODAL);
        getIcons().add(new Image(getClass().getResource("/logo.png")+""));
        setTitle(TR.tr("PDF4Teachers - À Propos"));
        setResizable(false);
        setScene(scene);
        setOnCloseRequest(e -> close());
        StyleManager.putStyle(root, Style.DEFAULT);

        setupUi(root);

        show();
    }
 
Example #12
Source File: ErrLogInstance.java    From phoebus with Eclipse Public License 1.0 6 votes vote down vote up
public ErrLogInstance(final AppDescriptor app) throws Exception
{
    this.app = app;

    line_view = new LineView();

    errlog = new ErrLog(out -> line_view.addLine(out,  false),
                        err -> line_view.addLine(err, true));

    final VBox layout = new VBox(line_view.getControl());
    VBox.setVgrow(line_view.getControl(), Priority.ALWAYS);
    layout.setPadding(new Insets(5.0));
    tab = new DockItem(this, layout);
    tab.addCloseCheck(() ->
    {
        errlog.close();
        INSTANCE = null;
        return true;
    });
    DockPane.getActiveDockPane().addTab(tab);
}
 
Example #13
Source File: ContainerEngineToolsPanelSkin.java    From phoenicis with GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void initialise() {
    final Text title = new Text(tr("Engine tools"));
    title.getStyleClass().add("title");

    final FlowPane toolButtonContainer = createToolButtonContainer();

    final VBox toolsPane = new VBox(title, toolButtonContainer);
    toolsPane.getStyleClass().addAll("containerConfigurationPane");

    final ScrollPane scrollPane = new ScrollPane(toolsPane);
    scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    scrollPane.setFitToWidth(true);

    getChildren().addAll(scrollPane);
}
 
Example #14
Source File: InfluenceAnalysisUI.java    From SONDY with GNU General Public License v3.0 6 votes vote down vote up
public final void availabeMethodsUI(){
    initializeAvailableMethodList();
    methodDescriptionLabel = new Label("Selected method description");
    methodDescriptionLabel.setId("smalltext");
    UIUtils.setSize(methodDescriptionLabel,Main.columnWidthLEFT,24);
    VBox methodsLEFT = new VBox();
    methodsLEFT.getChildren().addAll(methodList,new Rectangle(0,3),methodDescriptionLabel);
    // Right part
    applyButton = createApplyMethodButton();
    UIUtils.setSize(applyButton, Main.columnWidthRIGHT, 24);
    parameterTable = new TableView<>();
    UIUtils.setSize(parameterTable, Main.columnWidthRIGHT, 64);
    initializeParameterTable();
    VBox methodsRIGHT = new VBox();
    methodsRIGHT.getChildren().addAll(parameterTable,new Rectangle(0,3),applyButton);
    // Both parts
    HBox methodsBOTH = new HBox(5);
    methodsBOTH.getChildren().addAll(methodsLEFT,methodsRIGHT);
    grid.add(methodsBOTH,0,2);
}
 
Example #15
Source File: ExternalFileEditorDialog.java    From jmonkeybuilder with Apache License 2.0 6 votes vote down vote up
@Override
@FxThread
protected void createContent(@NotNull final VBox root) {

    resourceTree = new ResourceTree(this::processOpen, false);
    resourceTree.prefHeightProperty().bind(heightProperty());
    resourceTree.prefWidthProperty().bind(widthProperty());
    resourceTree.setActionTester(type -> false);
    resourceTree.setLazyMode(true);
    resourceTree.setShowRoot(false);
    resourceTree.getSelectionModel()
            .selectedItemProperty()
            .addListener((observable, oldValue, newValue) -> processSelected(newValue));

    FXUtils.addToPane(resourceTree, root);
    FXUtils.addClassTo(root, CssClasses.OPEN_EXTERNAL_FOLDER_EDITOR_DIALOG);
}
 
Example #16
Source File: BasicView.java    From gluon-samples with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
public BasicView() {
    
    Label label = new Label("Gluon - AWS Mobile Hub");

    Label signIn = new Label("Accesing signed view...");
    signIn.setGraphic(new Icon(MaterialDesignIcon.VPN_LOCK));
    
    VBox controls = new VBox(15.0, label, signIn);
    controls.setAlignment(Pos.CENTER);
    
    setCenter(controls);
    
    setOnShowing(e -> {
        if (! AWSService.getInstance().isSignedIn()) {
            getApplication().switchView(AwsMobileHub.SIGNED_OUT_VIEW);
        }
    });
}
 
Example #17
Source File: EditAxis.java    From chart-fx with Apache License 2.0 6 votes vote down vote up
private Pane getAutoRangeCheckBoxes(final Axis axis) {
    final Pane boxMax = new VBox();
    VBox.setVgrow(boxMax, Priority.ALWAYS);

    final CheckBox autoRanging = new CheckBox("auto ranging");
    HBox.setHgrow(autoRanging, Priority.ALWAYS);
    VBox.setVgrow(autoRanging, Priority.ALWAYS);
    autoRanging.setMaxWidth(Double.MAX_VALUE);
    autoRanging.setSelected(axis.isAutoRanging());
    autoRanging.selectedProperty().bindBidirectional(axis.autoRangingProperty());
    boxMax.getChildren().add(autoRanging);

    final CheckBox autoGrow = new CheckBox("auto grow");
    HBox.setHgrow(autoGrow, Priority.ALWAYS);
    VBox.setVgrow(autoGrow, Priority.ALWAYS);
    autoGrow.setMaxWidth(Double.MAX_VALUE);
    autoGrow.setSelected(axis.isAutoGrowRanging());
    autoGrow.selectedProperty().bindBidirectional(axis.autoGrowRangingProperty());
    boxMax.getChildren().add(autoGrow);

    return boxMax;
}
 
Example #18
Source File: ControlIntensity.java    From helloiot with GNU General Public License v3.0 6 votes vote down vote up
@Override
public Node constructContent() {
    VBox vboxroot = new VBox();
    vboxroot.setSpacing(10.0);
    
    action = new Button();
    action.setContentDisplay(ContentDisplay.TOP);
    action.setFocusTraversable(false);
    action.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
    action.setMnemonicParsing(false);
    action.getStyleClass().add("buttonbase");
    VBox.setVgrow(action, Priority.SOMETIMES);
    action.setOnAction(this::onAction);
    
    slider = new Slider();
    slider.setFocusTraversable(false);
    slider.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
    slider.setPrefWidth(20.0);
    
    vboxroot.getChildren().addAll(action, slider);
    
    initialize();
    return vboxroot;
}
 
Example #19
Source File: TextFileEditor.java    From jmonkeybuilder with Apache License 2.0 5 votes vote down vote up
@Override
@FxThread
protected void createContent(@NotNull final VBox root) {

    textArea = new TextArea();
    textArea.textProperty().addListener((observable, oldValue, newValue) -> updateDirty(newValue));
    textArea.prefHeightProperty().bind(root.heightProperty());
    textArea.prefWidthProperty().bind(root.widthProperty());

    FXUtils.addToPane(textArea, root);
    FXUtils.addClassesTo(textArea, CssClasses.TRANSPARENT_TEXT_AREA);
}
 
Example #20
Source File: AssigneePickerDialog.java    From HubTurbo with GNU Lesser General Public License v3.0 5 votes vote down vote up
private void populateMatchingUsers(List<PickerAssignee> matchingUsers, VBox matchingUsersBox) {
    matchingUsersBox.getChildren().clear();

    if (matchingUsers.isEmpty()) {
        Label noMatchingUsersLabel = createNoMatchingUsersLabel();
        matchingUsersBox.getChildren().add(noMatchingUsersLabel);
        return; 
    }

    matchingUsers.stream()
            .sorted()
            .forEach(user -> matchingUsersBox.getChildren().add(setMouseClickForNode(
                    user.getMatchingNode(), user.getLoginName())));
}
 
Example #21
Source File: GenericBackendDialogN5.java    From paintera with GNU General Public License v2.0 5 votes vote down vote up
public IdService idService() throws IOException
{
	try {
		LOG.warn("Getting id service for {} -- {}", this.n5.get(), this.dataset.get());
		return N5Helpers.idService(this.n5.get(), this.dataset.get());
	} catch (final N5Helpers.MaxIDNotSpecified e) {
		final Alert alert = PainteraAlerts.alert(Alert.AlertType.CONFIRMATION);
		alert.setHeaderText("maxId not specified in dataset.");
		final TextArea ta = new TextArea("Could not read maxId attribute from data set. " +
				"You can specify the max id manually, or read it from the data set (this can take a long time if your data is big).\n" +
				"Alternatively, press cancel to load the data set without an id service. " +
				"Fragment-segment-assignments and selecting new (wrt to the data) labels require an id service " +
				"and will not be available if you press cancel.");
		ta.setEditable(false);
		ta.setWrapText(true);
		final NumberField<LongProperty> nextIdField = NumberField.longField(0, v -> true, ObjectField.SubmitOn.ENTER_PRESSED, ObjectField.SubmitOn.FOCUS_LOST);
		final Button scanButton = new Button("Scan Data");
		scanButton.setOnAction(event -> {
			event.consume();
			try {
				findMaxId(this.n5.get(), this.dataset.getValue(), nextIdField.valueProperty()::set);
			} catch (final IOException e1) {
				throw new RuntimeException(e1);
			}
		});
		final HBox maxIdBox = new HBox(new Label("Max Id:"), nextIdField.textField(), scanButton);
		HBox.setHgrow(nextIdField.textField(), Priority.ALWAYS);
		alert.getDialogPane().setContent(new VBox(ta, maxIdBox));
		final Optional<ButtonType> bt = alert.showAndWait();
		if (bt.isPresent() && ButtonType.OK.equals(bt.get())) {
			final long maxId = nextIdField.valueProperty().get() + 1;
			this.n5.get().setAttribute(dataset.get(), "maxId", maxId);
			return new N5IdService(this.n5.get(), this.dataset.get(), maxId);
		}
		else
			return new IdService.IdServiceNotProvided();
	}
}
 
Example #22
Source File: ADCProjectInitWindow.java    From arma-dialog-creator with MIT License 5 votes vote down vote up
public WorkspaceSelectionStep(@NotNull ADCProjectInitWindow adcProjectInitWindow) {
	super(new VBox(20));
	this.adcProjectInitWindow = adcProjectInitWindow;
	workspaceDirectory = ApplicationProperty.LAST_WORKSPACE.getValue();
	if (workspaceDirectory == null) {
		workspaceDirectory = Workspace.DEFAULT_WORKSPACE_DIRECTORY;
	}

	content.setAlignment(Pos.CENTER);
	content.setMaxWidth(STAGE_WIDTH / 4 * 3);
	final Label lblChooseWorkspace = new Label(bundle.getString("choose_workspace"));
	lblChooseWorkspace.setFont(Font.font(20));
	content.getChildren().add(new VBox(5, lblChooseWorkspace, new Label(bundle.getString("workspace_about"))));

	final FileChooserPane chooserPane = new FileChooserPane(
			ArmaDialogCreator.getPrimaryStage(), FileChooserPane.ChooserType.DIRECTORY,
			lblChooseWorkspace.getText(),
			workspaceDirectory
	);
	chooserPane.setChosenFile(workspaceDirectory);
	chooserPane.getChosenFileObserver().addListener(new ValueListener<File>() {
		@Override
		public void valueUpdated(@NotNull ValueObserver<File> observer, File oldValue, File newValue) {
			if (newValue != null) {
				workspaceDirectory = newValue;
			}
		}
	});
	content.getChildren().add(chooserPane);

}
 
Example #23
Source File: ConfirmBox.java    From SmartCity-ParkingManagement with Apache License 2.0 5 votes vote down vote up
public boolean display(final String title, final String message) {
	final Stage window = new Stage();
	window.initModality(Modality.APPLICATION_MODAL);
	window.setTitle(title);
	window.setMinWidth(250);
	window.setMinHeight(150);
	window.getIcons().add(new Image(getClass().getResourceAsStream("Smart_parking_icon.png")));

	final Label label = new Label();
	label.setText(message);

	yesButton = new Button("Yes");
	yesButton.setOnAction(λ -> {

		answer = true;
		window.close();
	});

	noButton = new Button("No");
	noButton.setOnAction(λ -> {
		answer = false;
		window.close();
	});

	final VBox layout = new VBox();
	layout.getChildren().addAll(label, noButton, yesButton);
	layout.setAlignment(Pos.CENTER);
	final Scene scene = new Scene(layout);
	scene.getStylesheets().add(getClass().getResource("mainStyle.css").toExternalForm());
	window.setScene(scene);
	window.showAndWait();

	return answer;
}
 
Example #24
Source File: FileListView.java    From PDF4Teachers with Apache License 2.0 5 votes vote down vote up
public FileListView(){

        VBox.setVgrow(this, Priority.SOMETIMES);
        setOnMouseClicked((MouseEvent event) -> {
            refresh();
        });

        setCellFactory(param -> new FileListItem());
    }
 
Example #25
Source File: BasicView.java    From gluon-samples with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public BasicView() {
    
    Label label = new Label("CloudLink Media displayed below");
    VBox controls = new VBox(15.0, label);
    controls.setAlignment(Pos.CENTER);
    
    setCenter(controls);
}
 
Example #26
Source File: CollisionShapePropertyBuilder.java    From jmonkeybuilder with Apache License 2.0 5 votes vote down vote up
@FxThread
private void build(@NotNull final BoxCollisionShape shape, @NotNull final VBox container,
                   @NotNull final ModelChangeConsumer changeConsumer) {

    final Vector3f halfExtents = shape.getHalfExtents();

    final DefaultSinglePropertyControl<ModelChangeConsumer, BoxCollisionShape, Vector3f> halfExtentsControl =
            new DefaultSinglePropertyControl<>(halfExtents, Messages.MODEL_PROPERTY_HALF_EXTENTS, changeConsumer);

    halfExtentsControl.setSyncHandler(BoxCollisionShape::getHalfExtents);
    halfExtentsControl.setToStringFunction(Vector3f::toString);
    halfExtentsControl.setEditObject(shape);

    FXUtils.addToPane(halfExtentsControl, container);
}
 
Example #27
Source File: DemoView.java    From PreferencesFX with Apache License 2.0 5 votes vote down vote up
private void layoutParts() {
  // MenuBar
  menu.getItems().add(preferencesMenuItem);
  menuBar.getMenus().add(menu);

  // VBox with values
  VBox valueBox = new VBox(
      welcomeLbl,
      brightnessLbl,
      nightModeLbl,
      scalingLbl
  );
  valueBox.setSpacing(20);
  valueBox.setPadding(new Insets(20, 0, 0, 20));

  // VBox with descriptions
  VBox descriptionBox = new VBox(
      new Label("Welcome Text:"),
      new Label("Brightness:"),
      new Label("Night mode:"),
      new Label("Scaling:")
  );
  descriptionBox.setSpacing(20);
  descriptionBox.setPadding(new Insets(20, 0, 0, 20));

  // Put everything together
  getChildren().addAll(
      menuBar,
      new HBox(
          descriptionBox,
          valueBox
      )
  );

  // Styling
  getStyleClass().add("demo-view");
  if (rootPane.nightMode.get()) {
    getStylesheets().add(AppStarter.class.getResource("darkTheme.css").toExternalForm());
  }
}
 
Example #28
Source File: MainView.java    From Schillsaver with MIT License 5 votes vote down vote up
/**
 * Creates the menu bar panel.
 *
 * @return
 *         The menu bar panel.
 */
private Pane createMenuBar() {
    final HBox pane = new HBox(button_createJob, button_editJob, button_deleteSelectedJobs, button_processJobs, button_programSettings);

    HBox.setHgrow(pane, Priority.ALWAYS);
    VBox.setVgrow(pane, Priority.NEVER);

    HBox.setHgrow(button_createJob, Priority.ALWAYS);
    HBox.setHgrow(button_editJob, Priority.ALWAYS);
    HBox.setHgrow(button_deleteSelectedJobs, Priority.ALWAYS);
    HBox.setHgrow(button_processJobs, Priority.ALWAYS);
    HBox.setHgrow(button_programSettings, Priority.ALWAYS);

    return pane;
}
 
Example #29
Source File: CompositeLayout.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
@Override
public Node getContent() {
    VBox content = new VBox();
    content.setId("CompositeLayout");
    content.getStyleClass().add("composite-layout");

    FormPane form = new FormPane("composite-layout-form", 2);
    form.addFormField(getOptionFieldName(), optionBox);

    content.getChildren().addAll(form, optionTabpane);
    return content;
}
 
Example #30
Source File: EditAxis.java    From chart-fx with Apache License 2.0 5 votes vote down vote up
AxisEditor(final Axis axis, final boolean isHorizontal) {
    super();

    setTop(getLabelEditor(axis, isHorizontal));
    final Pane box = isHorizontal ? new HBox() : new VBox();
    setCenter(box);
    if (isHorizontal) {
        box.setPrefWidth(EditAxis.DEFAULT_PREFERRED_WIDTH);
    } else {
        box.setPrefHeight(EditAxis.DEFAULT_PREFERRED_HEIGHT);
    }

    box.getChildren().add(getMinMaxButtons(axis, isHorizontal, true));
    // add lower-bound text field
    box.getChildren().add(getBoundField(axis, isHorizontal));

    box.getChildren().add(createSpacer());

    box.getChildren().add(getLogCheckBoxes(axis));
    box.getChildren().add(getRangeChangeButtons(axis, isHorizontal));
    box.getChildren().add(getAutoRangeCheckBoxes(axis));

    box.getChildren().add(createSpacer());

    // add upper-bound text field
    box.getChildren().add(getBoundField(axis, !isHorizontal));

    box.getChildren().add(getMinMaxButtons(axis, isHorizontal, false));
}