Top Description Fields Constructors Methods
com.dlsc.preferencesfx.view

public Class NavigationPresenter

extends Object
implements Presenter
Class Inheritance
All Implemented Interfaces
com.dlsc.preferencesfx.view.Presenter
Imports
com.dlsc.preferencesfx.model.Category, .PreferencesFxModel, com.dlsc.preferencesfx.util.SearchHandler, java.util.stream.Collectors, javafx.beans.property.StringProperty, javafx.collections.ObservableList, javafx.scene.control.TreeCell, .TreeItem, org.slf4j.Logger, .LoggerFactory, java.util.HashMap, .List

Contains presenter logic of the NavigationView.
Authors
François Martin, Marco Sanfratello

Field Summary

Modifier and TypeField and Description
private HashMap<Category, FilterableTreeItem<Category>>
private static final Logger
private PreferencesFxModel
private SearchHandler

Constructor Summary

AccessConstructor and Description

Method Summary

Modifier and TypeMethod and Description
private void
addRecursive(FilterableTreeItem<Category> parentTreeItem, List<Category> categories)

public Category

Returns:

the currently selected category
getSelectedCategory
()

Retrieves the currently selected category in the TreeSearchView.

private void
public void
initializeViewParts()

Overrides default com.dlsc.preferencesfx.view.Presenter.initializeViewParts.

Initializes parts of the view which require more logic.

public void
setSelectedCategory(Category
to be selected
category
)

Selects the given category in the NavigationView.

public void
setupBindings()

Overrides default com.dlsc.preferencesfx.view.Presenter.setupBindings.

Sets up bindings of the view.

public void
setupCellValueFactory()

Makes the TreeItems' text update when the description of a Category changes (due to i18n).

public void
setupEventHandlers()

Overrides default com.dlsc.preferencesfx.view.Presenter.setupEventHandlers.

Sets up event handlers of the view.

public void
setupValueChangedListeners()

Overrides default com.dlsc.preferencesfx.view.Presenter.setupValueChangedListeners.

Adds all listeners to view elements and model properties.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

categoryTreeItemMapback to summary
private HashMap<Category, FilterableTreeItem<Category>> categoryTreeItemMap
LOGGERback to summary
private static final Logger LOGGER
modelback to summary
private PreferencesFxModel model
searchHandlerback to summary
private SearchHandler searchHandler

Constructor Detail

Method Detail

addRecursiveback to summary
private void addRecursive(FilterableTreeItem<Category> parentTreeItem, List<Category> categories)
getSelectedCategoryback to summary
public Category getSelectedCategory()

Retrieves the currently selected category in the TreeSearchView.

Returns:Category

the currently selected category

initializeTreeItemsback to summary
private void initializeTreeItems()
initializeViewPartsback to summary
public void initializeViewParts()

Overrides default com.dlsc.preferencesfx.view.Presenter.initializeViewParts.

Doc from com.dlsc.preferencesfx.view.Presenter.initializeViewParts.

Initializes parts of the view which require more logic.

Annotations
@Override
setSelectedCategoryback to summary
public void setSelectedCategory(Category category)

Selects the given category in the NavigationView.

Parameters
category:Category

to be selected

setupBindingsback to summary
public void setupBindings()

Overrides default com.dlsc.preferencesfx.view.Presenter.setupBindings.

Doc from com.dlsc.preferencesfx.view.Presenter.setupBindings.

Sets up bindings of the view.

Annotations
@Override
setupCellValueFactoryback to summary
public void setupCellValueFactory()

Makes the TreeItems' text update when the description of a Category changes (due to i18n).

setupEventHandlersback to summary
public void setupEventHandlers()

Overrides default com.dlsc.preferencesfx.view.Presenter.setupEventHandlers.

Doc from com.dlsc.preferencesfx.view.Presenter.setupEventHandlers.

Sets up event handlers of the view.

Annotations
@Override
setupValueChangedListenersback to summary
public void setupValueChangedListeners()

Overrides default com.dlsc.preferencesfx.view.Presenter.setupValueChangedListeners.

Doc from com.dlsc.preferencesfx.view.Presenter.setupValueChangedListeners.

Adds all listeners to view elements and model properties.

Annotations
@Override