Java Code Examples for javafx.scene.layout.VBox#setId()

The following examples show how to use javafx.scene.layout.VBox#setId() . 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: TopBar.java    From Maus with GNU General Public License v3.0 6 votes vote down vote up
public VBox getTopBar(Stage stage) {
    Image image = new Image(getClass().getResourceAsStream("/Images/logo.png"));
    ImageView imageView = new ImageView(image);

    VBox vBox = new VBox();
    vBox.setAlignment(Pos.CENTER);
    Label label = (Label) Styler.styleAdd(new Label("Dashboard"), "label-light");
    vBox.getChildren().addAll(new ImageView(new Image(getClass().getResourceAsStream("/Images/Icons/icon.png"))), label);
    vBox.setPadding(new Insets(5, 10, 0, 5));
    vBox.setId("homeButton");


    VBox vBox1 = new VBox();
    vBox1.setAlignment(Pos.CENTER);
    vBox1.getChildren().add(new ImageView(new Image(getClass().getResourceAsStream("/Images/logo.png"))));
    vBox1.setPadding(new Insets(5, 10, 5, 5));

    HBox hBox = Styler.hContainer(new HBox(), vBox, vBox1);
    vBox.setOnMouseClicked(event -> Controller.changePrimaryStage(new MainView().getMainView()));
    imageView.setFitWidth(100);
    imageView.setFitHeight(50);
    return Styler.vContainer(new VBox(), new TitleBar().getMenuBar(stage), hBox);
}
 
Example 2
Source File: StepRepresentationPresentation.java    From phoenicis with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
protected void drawStepContent() {
    final String title = this.getParentWizardTitle();

    VBox contentPane = new VBox();
    contentPane.setId("presentationBackground");

    Label titleWidget = new Label(title + "\n\n");
    titleWidget.setId("presentationTextTitle");

    Text textWidget = new Text(textToShow);
    textWidget.setId("presentationText");

    TextFlow flow = new TextFlow();
    flow.getChildren().add(textWidget);

    ScrollPane scrollPane = new ScrollPane();
    scrollPane.setId("presentationScrollPane");
    scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    scrollPane.setFitToWidth(true);
    scrollPane.setContent(flow);
    VBox.setVgrow(scrollPane, Priority.ALWAYS);

    contentPane.getChildren().add(scrollPane);
    getParent().getRoot().setCenter(contentPane);
}
 
Example 3
Source File: StepRepresentationHtmlPresentation.java    From phoenicis with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
protected void drawStepContent() {
    final String title = this.getParentWizardTitle();

    VBox contentPane = new VBox();
    contentPane.setId("presentationBackground");

    Label titleWidget = new Label(title + "\n\n");
    titleWidget.setId("presentationTextTitle");

    WebView webView = new WebView();
    VBox.setVgrow(webView, Priority.ALWAYS);

    webView.getEngine().loadContent(htmlToShow);
    final URL style = getClass().getResource(String.format("/org/phoenicis/javafx/themes/%s/description.css",
            getParent().getThemeManager().getCurrentTheme().getShortName()));
    webView.getEngine().setUserStyleSheetLocation(style.toString());

    contentPane.getChildren().addAll(webView);

    getParent().getRoot().setCenter(contentPane);
}
 
Example 4
Source File: LogsView.java    From trex-stateless-gui with Apache License 2.0 6 votes vote down vote up
private void buildUI() {
    contentWrapper = new ScrollPane();
    contentWrapper.setHbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED);

    getChildren().add(contentWrapper);

    setTopAnchor(contentWrapper, 0d);
    setLeftAnchor(contentWrapper, 0d);
    setBottomAnchor(contentWrapper, 0d);
    setRightAnchor(contentWrapper, 0d);

    logsContent = new VBox();
    logsContent.setId("logs_view");
    logsContent.heightProperty().addListener((observable, oldValue, newValue) -> contentWrapper.setVvalue((Double) newValue));

    logsContent.setSpacing(5);

    contentWrapper.setContent(logsContent);
}
 
Example 5
Source File: AddPreferenceStage.java    From marathonv5 with Apache License 2.0 6 votes vote down vote up
@Override
public Parent getContentPane() {
    VBox content = new VBox();
    content.getStyleClass().add("add-preference-stage");
    content.setId("addPreferenceStage");
    FormPane form = new FormPane("add-preference-stage-form", 3);
    integerValueField.textProperty().addListener(new ChangeListener<String>() {
        @Override
        public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
            if (!newValue.matches("\\d*")) {
                integerValueField.setText(newValue.replaceAll("[^\\d]", ""));
            }
        }
    });
    StackPane pane = new StackPane(stringValueField, integerValueField, booleanValueField);
    pane.setAlignment(Pos.CENTER_LEFT);
    //@formatter:off
    form.addFormField("Property name:", nameField)
        .addFormField("Method:", typeComboBox, new Region())
        .addFormField("Value:", pane);
    //@formatter:on
    GridPane.setHgrow(typeComboBox, Priority.NEVER);
    VBox.setVgrow(form, Priority.ALWAYS);
    content.getChildren().addAll(form, buttonBar);
    return content;
}
 
Example 6
Source File: AboutStage.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
@Override
public Parent getContentPane() {
    VBox root = new VBox();
    root.setStyle("-fx-background-color:black");
    root.getStyleClass().add("about-stage");
    root.setId("aboutStage");
    root.getChildren().addAll(FXUIUtils.getImage("marathon-splash"), infoBox, buttonBar);
    return root;
}
 
Example 7
Source File: FixtureSelection.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
@Override
public Parent getContentPane() {
    VBox root = new VBox();
    root.getStyleClass().add("fixture-selection");
    root.setId("fixtureSelection");
    root.getChildren().addAll(fixtureList, buttonBar);
    return root;
}
 
Example 8
Source File: FixtureStage.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
@Override
public Parent getContentPane() {
    VBox content = new VBox();
    content.setId("FixtureStage");
    content.getStyleClass().add("fixture");
    FormPane form = new FormPane("fixture-form", 2);
    //@formatter:off
    form.addFormField("Name: ", nameField)
        .addFormField("Description: ", descriptionArea)
        .addFormField("Resuse Fixture: ", reuseField);
    //@formatter:on
    content.getChildren().addAll(form, applicationLayout.getContent(), buttonBar);
    fixtureStageInfo.setProperties();
    return content;
}
 
Example 9
Source File: FileSelectionStage.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
@Override
public Parent getContentPane() {
    VBox root = new VBox();
    root.setId("FileSelectionStage");
    root.getStyleClass().add("file-selection");
    root.getChildren().addAll(createBrowserField(), createButtonBar());
    return root;
}
 
Example 10
Source File: ProjectSelection.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
@Override
public Parent getContentPane() {
    VBox content = new VBox();
    content.setId("ProjectSelectionParent");
    content.getStyleClass().add("project-selection");
    content.getChildren().addAll(projectInfotable, buttonBar);
    return content;
}
 
Example 11
Source File: MPFConfigurationStage.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
@Override
public Parent getContentPane() {
    VBox root = new VBox();
    root.setId("MPFConfigurationParent");
    root.getStyleClass().add("mpf-configuration");
    root.getChildren().addAll(createTabPane(), createButtonBar());
    setProperties(mpfConfigurationInfo.getUserProperties());
    return root;
}
 
Example 12
Source File: RepositoryPickerDialog.java    From HubTurbo with GNU Lesser General Public License v3.0 5 votes vote down vote up
private void createSuggestedRepositoriesList() {
    suggestedRepositoryList = new VBox();
    suggestedRepositoryList.setPadding(DEFAULT_PADDING);
    suggestedRepositoryList.setId(IdGenerator.getRepositoryPickerSuggestedRepoListId());
    suggestedRepositoryList.setStyle("-fx-background-color: white; -fx-border-color:black;");
    suggestedRepositoryList.setPrefHeight(DEFAULT_SUGGESTED_REPO_LIST_HEIGHT);
    suggestedRepositoryList.setPrefWidth(DEFAULT_SUGGESTED_REPO_LIST_WIDTH);
}
 
Example 13
Source File: Blurb.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
@Override
public Parent getContentPane() {
    VBox content = new VBox();
    content.getStyleClass().add("blurb-stage");
    content.setId("blurbStage");
    content.getChildren().addAll(webView, buttonBar);
    return content;
}
 
Example 14
Source File: MarathonSplashScreen.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
@Override
public Parent getContentPane() {
    VBox root = new VBox();
    root.setStyle("-fx-background-color:black");
    root.setId("marathonITESplashScreen");
    root.getStyleClass().add("marathonite-splash-screen");
    root.getChildren().addAll(FXUIUtils.getImage("marathon-splash"), createInfo());
    Timeline timeline = new Timeline(new KeyFrame(SPLASH_DISPLAY_TIME, (e) -> {
        dispose();
    }));
    timeline.play();
    return root;
}
 
Example 15
Source File: ListLayout.java    From marathonv5 with Apache License 2.0 4 votes vote down vote up
private VBox createVerticalButtonBar() {
    VBox vBox = new VBox();
    vBox.setId("VerticalButtonBar");
    if (isTraversalNeeded()) {
        upButton = FXUIUtils.createButton("up", "Move selection up", true, "Up");
        setButtonState(upButton, false);
        upButton.setOnAction(new UpDownHandler(classPathListView, true));
        upButton.setMaxWidth(Double.MAX_VALUE);
        downButton = FXUIUtils.createButton("down", "Move selection down", true, "Down");
        setButtonState(downButton, false);
        downButton.setOnAction(new UpDownHandler(classPathListView, false));
        downButton.setMaxWidth(Double.MAX_VALUE);
        vBox.getChildren().addAll(upButton, downButton);
    }

    if (isAddArchivesNeeded()) {
        addJarsButton = FXUIUtils.createButton("addjar", "Add JAR/ZIP files to class path", true, "Add Archives...");
        addJarsButton.setOnAction(new BrowseActionHandler(
                new FileSelectionInfo("Select Zip/Jar files", "Java Archives", new String[] { "*.jar", "*.zip" },
                        "Add Zip/Jar files to the application classpath", FXUIUtils.getIcon("addjar"))));
        vBox.getChildren().add(addJarsButton);
    }

    if (isAddFoldersNeeded()) {
        addFoldersButton = FXUIUtils.createButton("addfolder", "Add folders to class path", true, "Add Folders...");
        addFoldersButton.setOnAction(new BrowseActionHandler(new FileSelectionInfo("Select Folders", null, null,
                "Add class files from folders to classpath", FXUIUtils.getIcon("addfolder"))));
        addFoldersButton.setMaxWidth(Double.MAX_VALUE);
        vBox.getChildren().add(addFoldersButton);
    }

    deleteButton = FXUIUtils.createButton("remove", "Delete selection", true, "Remove");
    setButtonState(deleteButton, false);
    deleteButton.setOnAction((e) -> {
        ObservableList<ClassPathElement> selectedItems = classPathListView.getSelectionModel().getSelectedItems();
        if (selectedItems != null) {
            classPathListItems.removeAll(selectedItems);
            boolean enable = classPathListItems.size() != 0;
            setButtonState(deleteButton, enable);
            setButtonState(upButton, enable);
            setButtonState(downButton, enable);
            classPathListView.getSelectionModel().select(-1);
        }
    });
    deleteButton.setMaxWidth(Double.MAX_VALUE);
    vBox.getChildren().addAll(deleteButton);
    return vBox;
}
 
Example 16
Source File: Hamburger.java    From JFX-Browser with MIT License 4 votes vote down vote up
public JFXHamburger getHamburger(JFXHamburger hamburger , BorderPane borderpane , TabPane settingTabPane) {
	
	history.setMinSize(48, 48);
	history.setGraphic(new ImageView(new Image(Main.IMAGES + "history.png")));
	history.setTooltip(new Tooltip("History"));
	
	downloads.setMinSize(48, 48);
	downloads.setGraphic(new ImageView(new Image(Main.IMAGES + "downloads.png")));
	downloads.setTooltip(new Tooltip("Downloads"));
	
	bookmarks.setMinSize(48, 48);
	bookmarks.setGraphic(new ImageView(new Image(Main.IMAGES + "bookmarks.png")));
	bookmarks.setTooltip(new Tooltip("Bookmarks"));
	
	//saveAsPdf.setMinSize(48, 48);
	//saveAsPdf.setGraphic(new ImageView(new Image(Main.IMAGES+"img/pdf.png")));
	//saveAsPdf.setTooltip(new Tooltip("Save As PDF"));
	
	setting.setMinSize(48, 48);
	setting.setGraphic(new ImageView(new Image(Main.IMAGES + "setting.png")));
	setting.setTooltip(new Tooltip("Setting"));
	
	// ---------Drawer-Menus---------
	/*
	 * Below is the menu view list that will appear from right side when
	 * clicked the hamburger.
	 */
	
	VBox vbox = new VBox();
	vbox.getChildren().addAll(history, downloads, bookmarks, setting);
	vbox.setSpacing(25);
	vbox.setId("righDrawerVbox");
	
	// ---------Right----DrawerStack----Add Drawer pane-------
	/*
	 * Drawerstack is container for drawer. We set the place of drawer is
	 * right whenever user clicked the hamburger it will appear from right
	 * side.Its defulte size 40 and we placed the --Draw-Menus-- in this
	 * drawer.
	 */
	
	rightDrawer.setDirection(DrawerDirection.RIGHT);
	rightDrawer.setDefaultDrawerSize(80);
	rightDrawer.setSidePane(vbox);
	rightDrawer.setOpacity(0.5);
	
	// -----------Hamburger-----------------
	
	borderpane.setRight(drawersStack);
	hamburger.addEventHandler(MouseEvent.MOUSE_CLICKED, (e) -> {
		showHamburgerPane();
	});
	
	// ---------Menview-Class method ----menuView--------------
	/*
	 * We are just sending all listener to another class as in this way can
	 * easily manager the listener Menu view. The purpose whenever one menu
	 * is clicked then this menView method send action event to MenuView
	 * Class method menuView.
	 */
	menuView.setMenuViewListener(history, downloads, bookmarks, setting, settingTabPane, drawersStack, rightDrawer);
	// setting.getStyleClass().addAll("animated-option-button","animated-option-sub-button2");
	setHistoryBtn(history);
	return hamburger;
}
 
Example 17
Source File: CreateNewAccount.java    From ChatRoomFX with MIT License 4 votes vote down vote up
private void showConfirmation(){
        Stage stage=new Stage();
        VBox box=new VBox();

        box.setId("root");
        box.setSpacing(10);
        box.setPadding(new Insets(8));

        HBox titleBox=new HBox();
        titleBox.setPadding(new Insets(8));
        titleBox.setPrefWidth(box.getPrefWidth());
        titleBox.setAlignment(Pos.CENTER);
        Label title=new Label("Set Password");
        title.setId("title");
        titleBox.getChildren().add(title);

        box.getChildren().add(titleBox);

        HBox containerBox=new HBox();
        containerBox.setPrefWidth(box.getPrefWidth());

        VBox lblBox=new VBox();
        lblBox.setSpacing(8);
        lblBox.setAlignment(Pos.CENTER_LEFT);
//        lblBox.setPrefWidth(box.getPrefWidth()/3);

        Label lblPass=new Label("Password");
        lblPass.getStyleClass().add("label-info");
        Label lblConPass=new Label("Confirm Password");
        lblConPass.getStyleClass().add("label-info");

        lblBox.getChildren().addAll(lblPass,lblConPass);

        containerBox.getChildren().add(lblBox);

        VBox txtBox=new VBox();
        txtBox.setSpacing(8);

        PasswordField txtPass=new PasswordField();
        txtPass.setPrefWidth(100);

        PasswordField txtConPass=new PasswordField();
        txtPass.setPrefWidth(100);

        txtBox.setPadding(new Insets(8));

        txtBox.getChildren().addAll(txtPass,txtConPass);

        containerBox.getChildren().add(txtBox);

        box.getChildren().add(containerBox);

        Button button=new Button("Confirm");
        button.setId("btnCreate");

        button.setOnAction(e->{
            if(!txtPass.getText().equals(txtConPass.getText())){
                System.out.println("Password mismatch!");
            }else{
                password=txtPass.getText();
                System.out.println("Success!");
                ((Stage)txtPass.getScene().getWindow()).close();
            }
        });

        HBox buttonBox=new HBox();
        buttonBox.setPadding(new Insets(10));
        buttonBox.setPrefWidth(box.getPrefWidth());
        buttonBox.setAlignment(Pos.CENTER_RIGHT);
        buttonBox.getChildren().add(button);

        box.getChildren().add(buttonBox);

        Scene scene=new Scene(box);
        scene.getStylesheets().add(getClass().getResource("/lk/ijse/gdse41/publicChatClient/ui/util/css/Login.css").toExternalForm());
        stage.setScene(scene);
        stage.showAndWait();
    }
 
Example 18
Source File: SearchBox.java    From marathonv5 with Apache License 2.0 4 votes vote down vote up
public SearchBox() {
    setId("SearchBox");
    setMinHeight(24);
    setPrefSize(150, 24);
    setMaxHeight(24);
    textBox = new TextField();
    textBox.setPromptText("Search");
    clearButton = new Button();
    clearButton.setVisible(false);
    getChildren().addAll(textBox, clearButton);
    clearButton.setOnAction(new EventHandler<ActionEvent>() {
        @Override public void handle(ActionEvent actionEvent) {
            textBox.setText("");
            textBox.requestFocus();
        }
    });
    textBox.setOnKeyReleased(new EventHandler<KeyEvent>() {
        @Override public void handle(KeyEvent keyEvent) {
            if (keyEvent.getCode() == KeyCode.DOWN) {
                ///System.out.println("SearchBox.handle DOWN");
                contextMenu.setFocused(true);
            }
        }
    });
    textBox.textProperty().addListener(new ChangeListener<String>() {
        @Override public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
            clearButton.setVisible(textBox.getText().length() != 0);
            if (textBox.getText().length() == 0) {
                if (contextMenu != null) contextMenu.hide();
                showError(null);
            } else {
                boolean haveResults = false;
                Map<DocumentType, List<SearchResult>> results = null;
                try {
                    if (indexSearcher == null) indexSearcher = new IndexSearcher();
                    results = indexSearcher.search(
                            textBox.getText() + (textBox.getText().matches("\\w+") ? "*" : "")
                    );
                    // check if we have any results
                    for (List<SearchResult> categoryResults: results.values()) {
                        if (categoryResults.size() > 0) {
                            haveResults = true;
                            break;
                        }
                    }
                } catch (ParseException e) {
                    showError(e.getMessage().substring("Cannot parse ".length()));
                }
                if (haveResults) {
                    showError(null);
                    populateMenu(results);
                    if (!contextMenu.isShowing()) contextMenu.show(SearchBox.this, Side.BOTTOM, 10,-5);
                } else {
                    if (searchErrorTooltip.getText() == null) showError("No matches");
                    contextMenu.hide();
                }
                contextMenu.setFocused(true);
            }
        }
    });
    // create info popup
    infoBox = new VBox();
    infoBox.setId("search-info-box");
    infoBox.setFillWidth(true);
    infoBox.setMinWidth(USE_PREF_SIZE);
    infoBox.setPrefWidth(350);
    infoName = new Label();
    infoName.setId("search-info-name");
    infoName.setMinHeight(USE_PREF_SIZE);
    infoName.setPrefHeight(28);
    infoDescription = new Label();
    infoDescription.setId("search-info-description");
    infoDescription.setWrapText(true);
    infoDescription.setPrefWidth(infoBox.getPrefWidth()-24);
    infoBox.getChildren().addAll(infoName,infoDescription);
    extraInfoPopup.getContent().add(infoBox);
    // hide info popup when context menu is hidden
    contextMenu.setOnHidden(new EventHandler<WindowEvent>() {
        @Override public void handle(WindowEvent windowEvent) {
            extraInfoPopup.hide();
        }
    });
}
 
Example 19
Source File: InfoBox.java    From scenic-view with GNU General Public License v3.0 4 votes vote down vote up
public InfoBox(final Window owner, final String title, final String labelText, 
        final String textAreaText, final boolean editable, final int width, final int height) {
    final VBox pane = new VBox(20);
    pane.setId(StageController.FX_CONNECTOR_BASE_ID + "InfoBox");
    final Scene scene = new Scene(pane, width, height); 

    final Stage stage = new Stage(StageStyle.UTILITY);
    stage.setTitle(title);
    stage.initModality(Modality.WINDOW_MODAL);
    stage.initOwner(owner);
    stage.setScene(scene);
    stage.getIcons().add(ScenicViewGui.APP_ICON);

    final Label label = new Label(labelText);
    stage.setWidth(width);
    stage.setHeight(height);
    textArea = new TextArea();
    if (textAreaText != null) {
        textArea.setEditable(editable);
        textArea.setText(textAreaText);
        VBox.setMargin(textArea, new Insets(5, 5, 0, 5));
        VBox.setVgrow(textArea, Priority.ALWAYS);
    }
    final Button close = new Button("Close");
    VBox.setMargin(label, new Insets(5, 5, 0, 5));

    VBox.setMargin(close, new Insets(5, 5, 5, 5));

    pane.setAlignment(Pos.CENTER);

    close.setDefaultButton(true);
    close.setOnAction(new EventHandler<ActionEvent>() {
        @Override public void handle(final ActionEvent arg0) {
            stage.close();
        }
    });
    if (textArea != null) {
        pane.getChildren().addAll(label, textArea, close);
    } else {
        pane.getChildren().addAll(label, close);
    }

    stage.show();
}
 
Example 20
Source File: SearchBox.java    From marathonv5 with Apache License 2.0 4 votes vote down vote up
public SearchBox() {
    setId("SearchBox");
    setMinHeight(24);
    setPrefSize(150, 24);
    setMaxHeight(24);
    textBox = new TextField();
    textBox.setPromptText("Search");
    clearButton = new Button();
    clearButton.setVisible(false);
    getChildren().addAll(textBox, clearButton);
    clearButton.setOnAction(new EventHandler<ActionEvent>() {
        @Override public void handle(ActionEvent actionEvent) {
            textBox.setText("");
            textBox.requestFocus();
        }
    });
    textBox.setOnKeyReleased(new EventHandler<KeyEvent>() {
        @Override public void handle(KeyEvent keyEvent) {
            if (keyEvent.getCode() == KeyCode.DOWN) {
                ///System.out.println("SearchBox.handle DOWN");
                contextMenu.setFocused(true);
            }
        }
    });
    textBox.textProperty().addListener(new ChangeListener<String>() {
        @Override public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
            clearButton.setVisible(textBox.getText().length() != 0);
            if (textBox.getText().length() == 0) {
                if (contextMenu != null) contextMenu.hide();
                showError(null);
            } else {
                boolean haveResults = false;
                Map<DocumentType, List<SearchResult>> results = null;
                try {
                    if (indexSearcher == null) indexSearcher = new IndexSearcher();
                    results = indexSearcher.search(
                            textBox.getText() + (textBox.getText().matches("\\w+") ? "*" : "")
                    );
                    // check if we have any results
                    for (List<SearchResult> categoryResults: results.values()) {
                        if (categoryResults.size() > 0) {
                            haveResults = true;
                            break;
                        }
                    }
                } catch (ParseException e) {
                    showError(e.getMessage().substring("Cannot parse ".length()));
                }
                if (haveResults) {
                    showError(null);
                    populateMenu(results);
                    if (!contextMenu.isShowing()) contextMenu.show(SearchBox.this, Side.BOTTOM, 10,-5);
                } else {
                    if (searchErrorTooltip.getText() == null) showError("No matches");
                    contextMenu.hide();
                }
                contextMenu.setFocused(true);
            }
        }
    });
    // create info popup
    infoBox = new VBox();
    infoBox.setId("search-info-box");
    infoBox.setFillWidth(true);
    infoBox.setMinWidth(USE_PREF_SIZE);
    infoBox.setPrefWidth(350);
    infoName = new Label();
    infoName.setId("search-info-name");
    infoName.setMinHeight(USE_PREF_SIZE);
    infoName.setPrefHeight(28);
    infoDescription = new Label();
    infoDescription.setId("search-info-description");
    infoDescription.setWrapText(true);
    infoDescription.setPrefWidth(infoBox.getPrefWidth()-24);
    infoBox.getChildren().addAll(infoName,infoDescription);
    extraInfoPopup.getContent().add(infoBox);
    // hide info popup when context menu is hidden
    contextMenu.setOnHidden(new EventHandler<WindowEvent>() {
        @Override public void handle(WindowEvent windowEvent) {
            extraInfoPopup.hide();
        }
    });
}