Example usage for javafx.scene.layout ColumnConstraints ColumnConstraints

List of usage examples for javafx.scene.layout ColumnConstraints ColumnConstraints

Introduction

In this page you can find the example usage for javafx.scene.layout ColumnConstraints ColumnConstraints.

Prototype

public ColumnConstraints() 

Source Link

Document

Create a column constraint object with no properties set.

Usage

From source file:Main.java

@Override
public void start(final Stage primaryStage) {
    primaryStage.setTitle("");
    Group root = new Group();
    Scene scene = new Scene(root, 400, 300, Color.WHITE);

    GridPane gridpane = new GridPane();
    ColumnConstraints col1 = new ColumnConstraints();
    col1.setPercentWidth(25);// w w w .  j  a va  2 s .c  om
    ColumnConstraints col2 = new ColumnConstraints();
    col2.setPercentWidth(50);
    ColumnConstraints col3 = new ColumnConstraints();
    col3.setPercentWidth(25);
    gridpane.getColumnConstraints().addAll(col1, col2, col3);

    gridpane.add(new Label("2"), 2, 0);
    gridpane.add(new Label("1"), 1, 0);
    gridpane.add(new Label("0"), 0, 0);

    root.getChildren().add(gridpane);
    primaryStage.setScene(scene);

    primaryStage.show();
}

From source file:dsfixgui.view.DSFSavesPane.java

private void initialize() {

    //Basic layout
    this.setFitToWidth(true);

    spacerColumn = new ColumnConstraints();
    spacerColumn.setFillWidth(true);//from ww w  .j  a v  a 2 s.c o  m
    spacerColumn.setPercentWidth(3.0);
    primaryColumn = new ColumnConstraints();
    primaryColumn.setFillWidth(true);
    primaryColumn.setPercentWidth(95.0);
    primaryPane = new GridPane();
    primaryPane.getColumnConstraints().addAll(spacerColumn, primaryColumn);
    primaryVBox = new VBox();
    primaryVBox.getStyleClass().add("spacing_15");
    primaryPane.add(primaryVBox, 1, 0);
    titleLabel = new Label(SAVE_BACKUP.toUpperCase() + " " + SETTINGS.toUpperCase());
    titleLabel.getStyleClass().add("settings_title");
    titleBar = new HBox();
    titleBar.setAlignment(Pos.CENTER);
    titleBar.getChildren().add(titleLabel);
    restoreDefaultsBar = new HBox();
    restoreDefaultsBar.setAlignment(Pos.CENTER);
    restoreDefaultsBar.setSpacing(5.0);
    applySettingsButton = new Button(APPLY_SETTINGS);
    restoreDefaultsButton = new Button(RESTORE_DEFAULTS);
    applySettingsButton.getStyleClass().add("translate_y_4");
    restoreDefaultsButton.getStyleClass().add("translate_y_4");
    restoreDefaultsBar.getChildren().addAll(applySettingsButton, restoreDefaultsButton);
    spacerHBox = new HBox();
    spacerHBox.setMinHeight(10.0);
    bottomSpacerHBox = new HBox();
    bottomSpacerHBox.setMinHeight(10.0);

    /////////////////////SETTINGS PANES/////////////////////
    //
    //
    //Toggle Save Backups
    saveBackupsPane = new FlowPane();
    saveBackupsPane.getStyleClass().add("settings_pane");
    saveBackupsLabel = new Label(SAVE_BACKUPS_LABEL + "  ");
    saveBackupsLabel.getStyleClass().addAll("bold_text", "font_12_pt");
    saveBackupsPicker = new ComboBox(FXCollections.observableArrayList(DISABLE_ENABLE));
    if (config.enableBackups.get() == 0) {
        saveBackupsPicker.setValue(saveBackupsPicker.getItems().get(0));
    } else {
        saveBackupsPicker.setValue(saveBackupsPicker.getItems().get(1));
    }
    saveBackupsPane.getChildren().addAll(saveBackupsLabel, saveBackupsPicker);
    //
    //Save Backup Interval
    saveIntervalPane = new FlowPane();
    saveIntervalPane.getStyleClass().add("settings_pane");
    saveIntervalLabel = new Label(SAVE_BACKUPS_INTERVAL_LABEL + " ");
    saveIntervalLabel.getStyleClass().addAll("bold_text", "font_12_pt");
    saveIntervalLabel.setTooltip(new Tooltip(SAVE_INTERVAL_TT));
    saveIntervalField = new TextField("" + config.backupInterval.get());
    saveIntervalField.getStyleClass().add("settings_text_field");
    saveIntervalPane.getChildren().addAll(saveIntervalLabel, saveIntervalField);
    //
    //Max Save Backups
    maxSavesPane = new FlowPane();
    maxSavesPane.getStyleClass().add("settings_pane");
    maxSavesLabel = new Label(MAX_BACKUPS_LABEL + " ");
    maxSavesLabel.getStyleClass().addAll("bold_text", "font_12_pt");
    maxSavesField = new TextField("" + config.maxBackups.get());
    maxSavesField.getStyleClass().add("settings_text_field");
    maxSavesPane.getChildren().addAll(maxSavesLabel, maxSavesField);

    if (config.enableBackups.get() == 0) {
        saveIntervalField.setDisable(true);
        maxSavesField.setDisable(true);
    }

    primaryVBox.getChildren().addAll(titleBar, restoreDefaultsBar, spacerHBox, saveBackupsPane,
            saveIntervalPane, maxSavesPane, bottomSpacerHBox);
    initializeEventHandlers();

    this.setContent(primaryPane);
}

From source file:Main.java

private GridPane createGridPane() {
    final GridPane gp = new GridPane();
    gp.setPadding(new Insets(10));
    gp.setHgap(20);/*from   w w  w .j a v  a  2  s.  c om*/
    //gp.add(albumCover, 0, 0, 1, GridPane.REMAINING);
    gp.add(title, 1, 0);
    gp.add(artist, 1, 1);
    gp.add(album, 1, 2);
    gp.add(year, 1, 3);

    final ColumnConstraints c0 = new ColumnConstraints();
    final ColumnConstraints c1 = new ColumnConstraints();
    c1.setHgrow(Priority.ALWAYS);
    gp.getColumnConstraints().addAll(c0, c1);

    final RowConstraints r0 = new RowConstraints();
    r0.setValignment(VPos.TOP);
    gp.getRowConstraints().addAll(r0, r0, r0, r0);

    return gp;
}

From source file:dsfixgui.view.DSFUnsafeSettingsPane.java

private void initialize() {

    //Basic layout
    this.setFitToWidth(true);

    spacerColumn = new ColumnConstraints();
    spacerColumn.setFillWidth(true);/*from   w ww  .j  av a2s . com*/
    spacerColumn.setPercentWidth(3.0);
    primaryColumn = new ColumnConstraints();
    primaryColumn.setFillWidth(true);
    primaryColumn.setPercentWidth(95.0);
    primaryPane = new GridPane();
    primaryPane.getColumnConstraints().addAll(spacerColumn, primaryColumn);
    primaryVBox = new VBox();
    primaryVBox.getStyleClass().add("spacing_15");
    primaryPane.add(primaryVBox, 1, 0);
    titleLabel = new Label(UNSAFE_OPS.toUpperCase() + " " + SETTINGS.toUpperCase());
    titleLabel.getStyleClass().addAll("settings_title", "red_text");
    titleLabel.setTooltip(new Tooltip(UNSAFE_TT));
    titleBar = new HBox();
    titleBar.setAlignment(Pos.CENTER);
    titleBar.getChildren().add(titleLabel);
    restoreDefaultsBar = new HBox();
    restoreDefaultsBar.setAlignment(Pos.CENTER);
    restoreDefaultsBar.setSpacing(5.0);
    applySettingsButton = new Button(APPLY_SETTINGS);
    restoreDefaultsButton = new Button(RESTORE_DEFAULTS);
    applySettingsButton.getStyleClass().add("translate_y_4");
    restoreDefaultsButton.getStyleClass().add("translate_y_4");
    restoreDefaultsBar.getChildren().addAll(applySettingsButton, restoreDefaultsButton);
    spacerHBox = new HBox();
    spacerHBox.setMinHeight(10.0);
    bottomSpacerHBox = new HBox();
    bottomSpacerHBox.setMinHeight(10.0);

    /////////////////////SETTINGS PANES/////////////////////
    //
    //
    //Force Window Modes
    windowModePane = new FlowPane();
    windowModePane.getStyleClass().add("settings_pane");
    windowModeLabel = new Label(FORCE_WINDOW_MODE_LABEL + "  ");
    windowModeLabel.getStyleClass().addAll("bold_text", "font_12_pt");
    windowModeChoice = new ToggleGroup();
    neitherWindowMode = new RadioButton(WINDOW_MODES[0] + "   ");
    neitherWindowMode.setToggleGroup(windowModeChoice);
    forceWindowed = new RadioButton(WINDOW_MODES[1]);
    forceWindowed.setToggleGroup(windowModeChoice);
    forceFullscreen = new RadioButton(WINDOW_MODES[2]);
    forceFullscreen.setToggleGroup(windowModeChoice);
    if (config.forceWindowed.get() == 0 && config.forceFullscreen.get() == 0) {
        neitherWindowMode.setSelected(true);
    } else if (config.forceWindowed.get() == 1) {
        forceWindowed.setSelected(true);
        config.forceFullscreen.set(0);
    } else {
        forceFullscreen.setSelected(true);
    }
    windowModePane.getChildren().addAll(windowModeLabel, neitherWindowMode, forceWindowed, forceFullscreen);
    //
    //Toggle Vsync
    vsyncPane = new FlowPane();
    vsyncPane.getStyleClass().add("settings_pane");
    vsyncLabel = new Label(VSYNC_LABEL + "  ");
    vsyncLabel.getStyleClass().addAll("bold_text", "font_12_pt");
    vsyncLabel.setTooltip(new Tooltip(VSYNC_TT));
    vsyncPicker = new ComboBox(FXCollections.observableArrayList(DISABLE_ENABLE));
    if (config.enableVsync.get() == 0) {
        vsyncPicker.setValue(vsyncPicker.getItems().get(0));
    } else {
        vsyncPicker.setValue(vsyncPicker.getItems().get(1));
    }
    vsyncPane.getChildren().addAll(vsyncLabel, vsyncPicker);
    //
    //Fullscreen Refresh Rate
    refreshRatePane = new FlowPane();
    refreshRatePane.getStyleClass().add("settings_pane");
    refreshRateLabel = new Label(REFRESH_RATE_LABEL + " ");
    refreshRateLabel.getStyleClass().addAll("bold_text", "font_12_pt");
    refreshRateLabel.setTooltip(new Tooltip(FULLSCREEN_HZ_TT));
    refreshRateField = new TextField("" + config.fullscreenHz.get());
    refreshRateField.getStyleClass().add("settings_text_field");
    refreshRatePane.getChildren().addAll(refreshRateLabel, refreshRateField);
    //

    primaryVBox.getChildren().addAll(titleBar, restoreDefaultsBar, spacerHBox, windowModePane, vsyncPane,
            refreshRatePane, bottomSpacerHBox);
    initializeEventHandlers();

    this.setContent(primaryPane);
}

From source file:dsfixgui.view.DSFHudPane.java

private void initialize() {

    //Basic layout
    this.setFitToWidth(true);

    spacerColumn = new ColumnConstraints();
    spacerColumn.setFillWidth(true);/*from   w  w w .  ja  v  a2  s. c  o m*/
    spacerColumn.setPercentWidth(3.0);
    primaryColumn = new ColumnConstraints();
    primaryColumn.setFillWidth(true);
    primaryColumn.setPercentWidth(95.0);
    primaryPane = new GridPane();
    primaryPane.getColumnConstraints().addAll(spacerColumn, primaryColumn);
    primaryVBox = new VBox();
    primaryVBox.getStyleClass().add("spacing_15");
    primaryPane.add(primaryVBox, 1, 0);
    titleLabel = new Label(HUD.toUpperCase() + " " + SETTINGS.toUpperCase());
    titleLabel.getStyleClass().add("settings_title");
    titleBar = new HBox();
    titleBar.setAlignment(Pos.CENTER);
    titleBar.getChildren().add(titleLabel);
    restoreDefaultsBar = new HBox();
    restoreDefaultsBar.setAlignment(Pos.CENTER);
    restoreDefaultsBar.setSpacing(5.0);
    applySettingsButton = new Button(APPLY_SETTINGS);
    restoreDefaultsButton = new Button(RESTORE_DEFAULTS);
    applySettingsButton.getStyleClass().add("translate_y_4");
    restoreDefaultsButton.getStyleClass().add("translate_y_4");
    restoreDefaultsBar.getChildren().addAll(applySettingsButton, restoreDefaultsButton);
    spacerHBox = new HBox();
    spacerHBox.setMinHeight(10.0);
    bottomSpacerHBox = new HBox();
    bottomSpacerHBox.setMinHeight(10.0);

    /////////////////////SETTINGS PANES/////////////////////
    //
    //
    //Toggle HUD Modifications
    hudModsPane = new FlowPane();
    hudModsPane.getStyleClass().add("settings_pane");
    hudModsLabel = new Label(HUD_MODS_LABEL + "  ");
    hudModsLabel.getStyleClass().addAll("bold_text", "font_12_pt");
    hudModsLabel.setTooltip(new Tooltip(HUD_MODS_TT));
    hudModsPicker = new ComboBox(FXCollections.observableArrayList(DISABLE_ENABLE));
    if (config.enableHudMod.get() == 0) {
        hudModsPicker.setValue(hudModsPicker.getItems().get(0));
    } else {
        hudModsPicker.setValue(hudModsPicker.getItems().get(1));
    }
    hudModsPane.getChildren().addAll(hudModsLabel, hudModsPicker);
    //
    //Minimal HUD
    minimalHUDPane = new FlowPane();
    minimalHUDPane.getStyleClass().add("settings_pane");
    minimalHUDLabel = new Label(MINIMAL_HUD_LABEL + "  ");
    minimalHUDLabel.getStyleClass().addAll("bold_text", "font_12_pt");
    minimalHUDLabel.setTooltip(new Tooltip(MIN_HUD_TT));
    minimalHUDPicker = new ComboBox(FXCollections.observableArrayList(DISABLE_ENABLE));
    if (config.enableMinimalHud.get() == 0) {
        minimalHUDPicker.setValue(minimalHUDPicker.getItems().get(0));
    } else {
        minimalHUDPicker.setValue(minimalHUDPicker.getItems().get(1));
    }
    minimalHUDPane.getChildren().addAll(minimalHUDLabel, minimalHUDPicker);
    //
    //HUD Scale
    hudScalePane = new FlowPane();
    hudScalePane.getStyleClass().add("settings_pane");
    hudScaleLabel = new Label(HUD_SCALE_LABEL + "  ");
    hudScaleLabel.getStyleClass().addAll("bold_text", "font_12_pt");
    hudScaleLabel.setTooltip(new Tooltip(HUD_SCALE_TT));
    hudScaleField = new TextField(config.hudScaleFactor.toString());
    hudScaleField.getStyleClass().add("settings_med_text_field");
    hudScalePane.getChildren().addAll(hudScaleLabel, hudScaleField);
    //
    //HUD Opacities Parent Label
    hudOpacitiesPane = new FlowPane();
    hudOpacitiesPane.getStyleClass().add("settings_pane");
    hudOpacitiesLabel = new Label(HUD_OPACITIES_LABEL + "  ");
    hudOpacitiesLabel.getStyleClass().addAll("bold_text", "font_14_pt");
    hudOpacitiesLabel.setTooltip(new Tooltip(HUD_OPS_TT));
    hudOpacitiesPane.getChildren().addAll(hudOpacitiesLabel);
    //
    //Top Left HUD Opacity
    topLeftHUDOpPane = new FlowPane();
    topLeftHUDOpPane.getStyleClass().add("settings_pane");
    topLeftHUDOpLabel = new Label(TOP_LEFT_HUD_OP_LABEL + "  ");
    topLeftHUDOpLabel.getStyleClass().addAll("bold_text", "font_12_pt");
    topLeftHUDOpLabel.setTooltip(new Tooltip(TOP_LEFT_HUD_TT));
    topLeftHUDOpField = new TextField(
            config.hudTopLeftOpacity.toString().substring(0, config.hudTopLeftOpacity.length() - 1));
    topLeftHUDOpField.getStyleClass().add("settings_med_text_field");
    topLeftHUDOpPane.getChildren().addAll(topLeftHUDOpLabel, topLeftHUDOpField);
    //
    //Bottom Left HUD Opacity
    bottomLeftHUDOpPane = new FlowPane();
    bottomLeftHUDOpPane.getStyleClass().add("settings_pane");
    bottomLeftHUDOpLabel = new Label(BOTTOM_LEFT_HUD_OP_LABEL + "  ");
    bottomLeftHUDOpLabel.getStyleClass().addAll("bold_text", "font_12_pt");
    bottomLeftHUDOpLabel.setTooltip(new Tooltip(BOTTOM_LEFT_HUD_TT));
    bottomLeftHUDOpField = new TextField(
            config.hudBottomLeftOpacity.toString().substring(0, config.hudBottomLeftOpacity.length() - 1));
    bottomLeftHUDOpField.getStyleClass().add("settings_med_text_field");
    bottomLeftHUDOpPane.getChildren().addAll(bottomLeftHUDOpLabel, bottomLeftHUDOpField);
    //
    //Bottom Riht HUD Opacity
    bottomRightHUDOpPane = new FlowPane();
    bottomRightHUDOpPane.getStyleClass().add("settings_pane");
    bottomRightHUDOpLabel = new Label(BOTTOM_RIGHT_HUD_OP_LABEL + "  ");
    bottomRightHUDOpLabel.getStyleClass().addAll("bold_text", "font_12_pt");
    bottomRightHUDOpLabel.setTooltip(new Tooltip(BOTTOM_RIGHT_HUD_TT));
    bottomRightHUDOpField = new TextField(
            config.hudBottomRightOpacity.toString().substring(0, config.hudBottomRightOpacity.length() - 1));
    bottomRightHUDOpField.getStyleClass().add("settings_med_text_field");
    bottomRightHUDOpPane.getChildren().addAll(bottomRightHUDOpLabel, bottomRightHUDOpField);

    if (config.enableHudMod.get() == 0) {
        minimalHUDPicker.setDisable(true);
        hudScaleField.setDisable(true);
        topLeftHUDOpField.setDisable(true);
        bottomLeftHUDOpField.setDisable(true);
        bottomRightHUDOpField.setDisable(true);
    }

    primaryVBox.getChildren().addAll(titleBar, restoreDefaultsBar, spacerHBox, hudModsPane, minimalHUDPane,
            hudScalePane, hudOpacitiesPane, topLeftHUDOpPane, bottomLeftHUDOpPane, bottomRightHUDOpPane,
            bottomSpacerHBox);

    initializeEventHandlers();

    this.setContent(primaryPane);
}

From source file:net.thirdy.blackmarket.controls.ModSelectionPane.java

private void setupGridPaneColumns() {
    ColumnConstraints column1 = new ColumnConstraints();
    column1.setPercentWidth(50);/*from  w  ww .  j av a 2 s  . co  m*/
    ColumnConstraints column2 = new ColumnConstraints();
    column2.setPercentWidth(50);
    getColumnConstraints().addAll(column1, column2);
}

From source file:at.ac.tuwien.qse.sepm.gui.controller.impl.HighlightsViewControllerImpl.java

@FXML
private void initialize() {
    tagImageTiles.addAll(Arrays.asList(tag1, tag2, tag3, tag4, tag5));

    wikipediaInfoPane = new WikipediaInfoPane(wikipediaService);
    HBox.setHgrow(wikipediaInfoPane, Priority.ALWAYS);
    wikipediaInfoPaneContainer.getChildren().addAll(wikipediaInfoPane, wikipediaPlaceholder);

    wikipediaPlaceholder.setGlyphSize(80);
    wikipediaInfoPaneContainer.setAlignment(Pos.CENTER);
    wikipediaPlaceholder.getStyleClass().addAll("wikipedia-placeholder");
    wikipediaInfoPane.managedProperty().bind(wikipediaInfoPane.visibleProperty());
    wikipediaPlaceholder.visibleProperty().bind(wikipediaInfoPane.visibleProperty().not());
    wikipediaInfoPane.setVisible(false);

    journeyPlaceList.setOnJourneySelected(this::handleJourneySelected);
    journeyPlaceList.setOnPlaceSelected(this::handlePlaceSelected);
    journeyPlaceList.setOnAllPlacesSelected(this::handleAllPlacesSelected);

    // give each row and each column in the grid the same size
    ColumnConstraints column1 = new ColumnConstraints();
    column1.setPercentWidth(25);/*www.j  a  va2 s.c o m*/
    ColumnConstraints column2 = new ColumnConstraints();
    column2.setPercentWidth(25);
    ColumnConstraints column3 = new ColumnConstraints();
    column3.setPercentWidth(25);
    ColumnConstraints column4 = new ColumnConstraints();
    column4.setPercentWidth(25);
    gridPane.getColumnConstraints().addAll(column1, column2, column3, column4);

    RowConstraints row1 = new RowConstraints();
    row1.setPercentHeight(33);
    RowConstraints row2 = new RowConstraints();
    row2.setPercentHeight(33);
    RowConstraints row3 = new RowConstraints();
    row3.setPercentHeight(33);
    gridPane.getRowConstraints().addAll(row1, row2, row3);

    clusterService.subscribeJourneyChanged((journey) -> scheduler
            .schedule(() -> Platform.runLater(this::reloadJourneys), 2, TimeUnit.SECONDS));

    clusterService.subscribePlaceChanged(
            (place) -> scheduler.schedule(() -> Platform.runLater(this::reloadJourneys), 2, TimeUnit.SECONDS));

    photoService.subscribeCreate(addBuffer::add);

    reloadJourneys();
}

From source file:de.pixida.logtest.designer.logreader.LogReaderEditor.java

private void createDialogItems() {
    Validate.notNull(this.logReader); // Will be used to initialize input field values

    // CHECKSTYLE:OFF Yes, we are using lots of constants here. It does not make sense to name them using final variables.
    final GridPane gp = new GridPane();
    gp.setAlignment(Pos.BASELINE_LEFT);//from w ww.ja  v a  2  s.  com
    gp.setHgap(10d);
    gp.setVgap(15d);
    gp.setPadding(new Insets(5d));
    final ColumnConstraints column1 = new ColumnConstraints();
    final ColumnConstraints column2 = new ColumnConstraints();
    column1.setHgrow(Priority.NEVER);
    column2.setHgrow(Priority.SOMETIMES);
    gp.getColumnConstraints().addAll(column1, column2);
    this.insertConfigItemsIntoGrid(gp, this.createConfigurationForm());
    final TitledPane configPane = new TitledPane("Edit Configuration", gp);
    configPane.setGraphic(Icons.getIconGraphics("pencil"));
    configPane.setCollapsible(false);

    final VBox lines = this.createRunForm();
    final TitledPane testPane = new TitledPane("Test Configuration", lines);
    testPane.setGraphic(Icons.getIconGraphics("script_go"));
    testPane.setCollapsible(false);

    final VBox panes = new VBox(configPane, testPane);
    panes.setSpacing(10d);
    final ScrollPane sp = new ScrollPane(panes);
    sp.setPadding(new Insets(10d));
    sp.setFitToWidth(true);
    this.setCenter(sp);
    // CHECKSTYLE:ON
}

From source file:AudioPlayer3.java

@Override
protected Node initView() {
    final Label title = createLabel("title");
    final Label artist = createLabel("artist");
    final Label album = createLabel("album");
    final Label year = createLabel("year");
    final ImageView albumCover = createAlbumCover();

    title.textProperty().bind(songModel.titleProperty());
    artist.textProperty().bind(songModel.artistProperty());
    album.textProperty().bind(songModel.albumProperty());
    year.textProperty().bind(songModel.yearProperty());
    albumCover.imageProperty().bind(songModel.albumCoverProperty());

    final GridPane gp = new GridPane();
    gp.setPadding(new Insets(10));
    gp.setHgap(20);/*from www.  j a va 2  s  .  c om*/
    gp.add(albumCover, 0, 0, 1, GridPane.REMAINING);
    gp.add(title, 1, 0);
    gp.add(artist, 1, 1);
    gp.add(album, 1, 2);
    gp.add(year, 1, 3);

    final ColumnConstraints c0 = new ColumnConstraints();
    final ColumnConstraints c1 = new ColumnConstraints();
    c1.setHgrow(Priority.ALWAYS);
    gp.getColumnConstraints().addAll(c0, c1);

    final RowConstraints r0 = new RowConstraints();
    r0.setValignment(VPos.TOP);
    gp.getRowConstraints().addAll(r0, r0, r0, r0);

    return gp;
}

From source file:se.trixon.filebydate.ui.ProfilePanel.java

private void createUI() {
    //setGridLinesVisible(true);

    Label nameLabel = new Label(Dict.NAME.toString());
    Label descLabel = new Label(Dict.DESCRIPTION.toString());
    Label filePatternLabel = new Label(Dict.FILE_PATTERN.toString());
    Label dateSourceLabel = new Label(Dict.DATE_SOURCE.toString());
    mDatePatternLabel = new Label(Dict.DATE_PATTERN.toString());
    Label operationLabel = new Label(Dict.OPERATION.toString());
    Label caseBaseLabel = new Label(Dict.BASENAME.toString());
    Label caseExtLabel = new Label(Dict.EXTENSION.toString());

    mLinksCheckBox = new CheckBox(Dict.FOLLOW_LINKS.toString());
    mRecursiveCheckBox = new CheckBox(Dict.RECURSIVE.toString());
    mReplaceCheckBox = new CheckBox(Dict.REPLACE.toString());

    mCaseBaseComboBox = new ComboBox<>();
    mDatePatternComboBox = new ComboBox<>();
    mDateSourceComboBox = new ComboBox<>();
    mFilePatternComboBox = new ComboBox<>();
    mOperationComboBox = new ComboBox<>();
    mCaseExtComboBox = new ComboBox<>();

    mNameTextField = new TextField();
    mDescTextField = new TextField();

    mSourceChooserPane = new FileChooserPane(Dict.OPEN.toString(), Dict.SOURCE.toString(), ObjectMode.DIRECTORY,
            SelectionMode.SINGLE);//from   w w w.  j  a  v  a  2 s  .c  om
    mDestChooserPane = new FileChooserPane(Dict.OPEN.toString(), Dict.DESTINATION.toString(),
            ObjectMode.DIRECTORY, SelectionMode.SINGLE);

    mFilePatternComboBox.setEditable(true);
    mDatePatternComboBox.setEditable(true);
    //mDatePatternLabel.setPrefWidth(300);

    int col = 0;
    int row = 0;

    add(nameLabel, col, row, REMAINING, 1);
    add(mNameTextField, col, ++row, REMAINING, 1);
    add(descLabel, col, ++row, REMAINING, 1);
    add(mDescTextField, col, ++row, REMAINING, 1);
    add(mSourceChooserPane, col, ++row, REMAINING, 1);
    add(mDestChooserPane, col, ++row, REMAINING, 1);

    GridPane patternPane = new GridPane();
    patternPane.addRow(0, filePatternLabel, dateSourceLabel, mDatePatternLabel);
    patternPane.addRow(1, mFilePatternComboBox, mDateSourceComboBox, mDatePatternComboBox);
    patternPane.setHgap(8);
    addRow(++row, patternPane);

    GridPane.setHgrow(mFilePatternComboBox, Priority.ALWAYS);
    GridPane.setHgrow(mDateSourceComboBox, Priority.ALWAYS);
    GridPane.setHgrow(mDatePatternComboBox, Priority.ALWAYS);

    GridPane.setFillWidth(mFilePatternComboBox, true);
    GridPane.setFillWidth(mDateSourceComboBox, true);
    GridPane.setFillWidth(mDatePatternComboBox, true);

    double width = 100.0 / 3.0;
    ColumnConstraints col1 = new ColumnConstraints();
    col1.setPercentWidth(width);
    ColumnConstraints col2 = new ColumnConstraints();
    col2.setPercentWidth(width);
    ColumnConstraints col3 = new ColumnConstraints();
    col3.setPercentWidth(width);
    patternPane.getColumnConstraints().addAll(col1, col2, col3);

    mFilePatternComboBox.setMaxWidth(Double.MAX_VALUE);
    mDateSourceComboBox.setMaxWidth(Double.MAX_VALUE);
    mDatePatternComboBox.setMaxWidth(Double.MAX_VALUE);
    GridPane subPane = new GridPane();
    //subPane.setGridLinesVisible(true);
    subPane.addRow(0, operationLabel, new Label(), new Label(), new Label(), caseBaseLabel, caseExtLabel);
    subPane.addRow(1, mOperationComboBox, mLinksCheckBox, mRecursiveCheckBox, mReplaceCheckBox,
            mCaseBaseComboBox, mCaseExtComboBox);
    subPane.setHgap(8);
    add(subPane, col, ++row, REMAINING, 1);

    final Insets rowInsets = new Insets(0, 0, 8, 0);

    GridPane.setMargin(mNameTextField, rowInsets);
    GridPane.setMargin(mDescTextField, rowInsets);
    GridPane.setMargin(mSourceChooserPane, rowInsets);
    GridPane.setMargin(mDestChooserPane, rowInsets);
    GridPane.setMargin(patternPane, rowInsets);

    mFilePatternComboBox.setItems(FXCollections.observableArrayList("*", "{*.jpg,*.JPG}", "{*.mp4,*.MP4}"));

    mDatePatternComboBox.setItems(FXCollections.observableArrayList("yyyy/MM/yyyy-MM-dd",
            "yyyy/MM/yyyy-MM-dd/HH", "yyyy/MM/dd", "yyyy/ww", "yyyy/ww/u"));

    mCaseBaseComboBox.setItems(FXCollections.observableArrayList(Arrays.asList(NameCase.values())));
    mCaseExtComboBox.setItems(FXCollections.observableArrayList(Arrays.asList(NameCase.values())));
    mDateSourceComboBox.setItems(FXCollections.observableArrayList(Arrays.asList(DateSource.values())));
    mOperationComboBox.setItems(FXCollections.observableArrayList(Arrays.asList(Command.COPY, Command.MOVE)));
}