Top Inners Fields Constructors Methods
org.jabref.gui.search

public Class GlobalSearchBar

extends HBox
Class Inheritance
Imports
java.lang.reflect.Field, java.time.Duration, java.util.List, .Objects, java.util.regex.Pattern, .PatternSyntaxException, javax.swing.undo.UndoManager, javafx.application.Platform, javafx.beans.binding.Bindings, .BooleanBinding, javafx.beans.property.BooleanProperty, .SimpleBooleanProperty, javafx.collections.ListChangeListener, .ObservableList, javafx.css.PseudoClass, javafx.event.Event, javafx.geometry.Insets, .Pos, javafx.scene.Cursor, .Node, javafx.scene.control.Button, .ButtonBase, .ContentDisplay, .Label, .ListView, .Skin, .ToggleButton, .Tooltip, javafx.scene.control.cell.TextFieldListCell, javafx.scene.input.KeyEvent, .MouseButton, javafx.scene.layout.BorderPane, .HBox, .Priority, .StackPane, javafx.scene.text.Text, .TextFlow, org.jabref.gui.ClipBoardManager, .DialogService, .LibraryTabContainer, .StateManager, org.jabref.gui.autocompleter.AppendPersonNamesStrategy, .AutoCompleteFirstNameMode, .AutoCompletionTextInputBinding, .PersonNameStringConverter, .SuggestionProvider, org.jabref.gui.icon.IconTheme, org.jabref.gui.keyboard.KeyBinding, .KeyBindingRepository, org.jabref.gui.search.rules.describer.SearchDescribers, org.jabref.gui.util.BindingsHelper, .IconValidationDecorator, .OptionalObjectProperty, .TooltipTextUtil, .UiTaskExecutor, org.jabref.logic.l10n.Localization, org.jabref.logic.search.SearchQuery, org.jabref.model.entry.Author, org.jabref.model.search.rules.SearchRules, org.jabref.preferences.PreferencesService, .SearchPreferences, de.saxsys.mvvmfx.utils.validation.FunctionBasedValidator, de.saxsys.mvvmfx.utils.validation.ValidationMessage, de.saxsys.mvvmfx.utils.validation.Validator, de.saxsys.mvvmfx.utils.validation.visualization.ControlsFxVisualizer, impl.org.controlsfx.skin.AutoCompletePopup, org.controlsfx.control.textfield.AutoCompletionBinding, org.controlsfx.control.textfield.CustomTextField, org.reactfx.util.FxTimer, org.reactfx.util.Timer, org.slf4j.Logger, .LoggerFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final ToggleButton
private static final PseudoClass
private static final PseudoClass
private final Label
private final DialogService
private final ToggleButton
private final BooleanProperty
private GlobalSearchResultDialog
private final ToggleButton
private static final Logger
private final Button
private final PreferencesService
private final de.saxsys.mvvmfx.utils.validation.Validator
private final ToggleButton
private static final int
private final org.controlsfx.control.textfield.CustomTextField
private final Tooltip
private final SearchPreferences
private final OptionalObjectProperty<SearchQuery>
private final StateManager
private final LibraryTabContainer
private final UndoManager

Constructor Summary

AccessConstructor and Description
public
GlobalSearchBar(LibraryTabContainer tabContainer, StateManager stateManager, PreferencesService preferencesService, UndoManager undoManager, DialogService dialogService, SearchType searchType)

Method Summary

Modifier and TypeMethod and Description
public void
focus()

Focuses the search field if it is not focused.

private <T> impl.org.controlsfx.skin.AutoCompletePopup<T>
getPopup(org.controlsfx.control.textfield.AutoCompletionBinding<T> autoCompletionBinding)

The popup has private access in AutoCompletionBinding, so we use reflection to access it.

private void
private void
private void
public void
private void
public void
setSearchTerm(String searchTerm)

public void
private void
updateResults(int matched, TextFlow description, boolean grammarBasedSearch)

public void
private void
private boolean
Inherited from javafx.scene.layout.HBox:
alignmentPropertyclearConstraintscomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthfillHeightPropertygetAlignmentgetBaselineOffsetgetClassCssMetaDatagetContentBiasgetCssMetaDatagetHgrowgetMargingetSpacingisFillHeightlayoutChildrenrequestLayoutsetAlignmentsetFillHeightsetHgrowsetMarginsetSpacingspacingProperty

Field Detail

caseSensitiveButtonback to summary
private final ToggleButton caseSensitiveButton
CLASS_NO_RESULTSback to summary
private static final PseudoClass CLASS_NO_RESULTS
CLASS_RESULTS_FOUNDback to summary
private static final PseudoClass CLASS_RESULTS_FOUND
currentResultsback to summary
private final Label currentResults
dialogServiceback to summary
private final DialogService dialogService
fulltextButtonback to summary
private final ToggleButton fulltextButton
globalSearchActiveback to summary
private final BooleanProperty globalSearchActive
globalSearchResultDialogback to summary
private GlobalSearchResultDialog globalSearchResultDialog
keepSearchStringback to summary
private final ToggleButton keepSearchString
LOGGERback to summary
private static final Logger LOGGER
openGlobalSearchButtonback to summary
private final Button openGlobalSearchButton
preferencesServiceback to summary
private final PreferencesService preferencesService
regexValidatorback to summary
private final de.saxsys.mvvmfx.utils.validation.Validator regexValidator
regularExpressionButtonback to summary
private final ToggleButton regularExpressionButton
SEARCH_DELAYback to summary
private static final int SEARCH_DELAY
searchFieldback to summary
private final org.controlsfx.control.textfield.CustomTextField searchField
searchFieldTooltipback to summary
private final Tooltip searchFieldTooltip
searchPreferencesback to summary
private final SearchPreferences searchPreferences
searchQueryPropertyback to summary
private final OptionalObjectProperty<SearchQuery> searchQueryProperty
stateManagerback to summary
private final StateManager stateManager
tabContainerback to summary
private final LibraryTabContainer tabContainer
undoManagerback to summary
private final UndoManager undoManager

Constructor Detail

GlobalSearchBarback to summary
public GlobalSearchBar(LibraryTabContainer tabContainer, StateManager stateManager, PreferencesService preferencesService, UndoManager undoManager, DialogService dialogService, SearchType searchType)

Method Detail

focusback to summary
public void focus()

Focuses the search field if it is not focused.

getPopupback to summary
private <T> impl.org.controlsfx.skin.AutoCompletePopup<T> getPopup(org.controlsfx.control.textfield.AutoCompletionBinding<T> autoCompletionBinding)

The popup has private access in AutoCompletionBinding, so we use reflection to access it.

Annotations
@SuppressWarnings:unchecked
informUserAboutInvalidSearchQueryback to summary
private void informUserAboutInvalidSearchQuery()
initSearchModifierButtonback to summary
private void initSearchModifierButton(ButtonBase searchButton)
initSearchModifierButtonsback to summary
private void initSearchModifierButtons()
setAutoCompleterback to summary
public void setAutoCompleter(SuggestionProvider<Author> searchCompleter)
setSearchFieldHintTooltipback to summary
private void setSearchFieldHintTooltip(TextFlow description)
setSearchTermback to summary
public void setSearchTerm(String searchTerm)
updateHintVisibilityback to summary
public void updateHintVisibility()
updateResultsback to summary
private void updateResults(int matched, TextFlow description, boolean grammarBasedSearch)
updateSearchQueryback to summary
public void updateSearchQuery()
updateSearchResultsForQueryback to summary
private void updateSearchResultsForQuery(SearchQuery query)
validRegexback to summary
private boolean validRegex()
org.jabref.gui.search back to summary

private Class GlobalSearchBar.SearchPopupSkin<T>

extends Object
implements javafx.scene.control.Skin<impl.org.controlsfx.skin.AutoCompletePopup<T>>
Class Inheritance
All Implemented Interfaces
javafx.scene.control.Skin

Field Summary

Modifier and TypeField and Description
private final BorderPane
private final impl.org.controlsfx.skin.AutoCompletePopup<T>
private final ListView<T>

Constructor Summary

AccessConstructor and Description
public
SearchPopupSkin(impl.org.controlsfx.skin.AutoCompletePopup<T> control)

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Implements javafx.scene.control.Skin.dispose.

Called when a previously installed skin is about to be removed from its associated control.

public Node
getNode()

Implements javafx.scene.control.Skin.getNode.

Gets the Node which represents this Skin.

public impl.org.controlsfx.skin.AutoCompletePopup<T>
getSkinnable()

Implements javafx.scene.control.Skin.getSkinnable.

Gets the Skinnable to which this Skin is assigned.

private void
onSuggestionChosen(T suggestion)

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

containerback to summary
private final BorderPane container
controlback to summary
private final impl.org.controlsfx.skin.AutoCompletePopup<T> control
suggestionListback to summary
private final ListView<T> suggestionList

Constructor Detail

SearchPopupSkinback to summary
public SearchPopupSkin(impl.org.controlsfx.skin.AutoCompletePopup<T> control)

Method Detail

disposeback to summary
public void dispose()

Implements javafx.scene.control.Skin.dispose.

Doc from javafx.scene.control.Skin.dispose.

Called when a previously installed skin is about to be removed from its associated control. This allows the skin to do clean up, like removing listeners and bindings, and undo any changes to the control's properties. After this method completes, getSkinnable() and getNode() should return null.

Calling dispose() more than once has no effect.

Annotations
@Override
getNodeback to summary
public Node getNode()

Implements javafx.scene.control.Skin.getNode.

Doc from javafx.scene.control.Skin.getNode.

Gets the Node which represents this Skin. This must never be null, except after a call to dispose(), and must never change except when changing to null.

Returns:Node

A non-null Node, except when the Skin has been disposed.

Annotations
@Override
getSkinnableback to summary
public impl.org.controlsfx.skin.AutoCompletePopup<T> getSkinnable()

Implements javafx.scene.control.Skin.getSkinnable.

Doc from javafx.scene.control.Skin.getSkinnable.

Gets the Skinnable to which this Skin is assigned. A Skin must be created for one and only one Skinnable. This value will only ever go from a non-null to null value when the Skin is removed from the Skinnable, and only as a consequence of a call to dispose().

The caller who constructs a Skinnable must also construct a Skin and properly establish the relationship between the Control and its Skin.

Returns:impl.org.controlsfx.skin.AutoCompletePopup<T>

A non-null Skinnable, or null value if disposed.

Annotations
@Override
onSuggestionChosenback to summary
private void onSuggestionChosen(T suggestion)
registerEventListenerback to summary
private void registerEventListener()