Class ASearchableButtonPane<B extends javafx.scene.control.ToggleButton>
java.lang.Object
cz.zcu.fav.kiv.mjakubas.saf.gui.view.ASearchableButtonPane<B>
- Type Parameters:
B
- button
- Direct Known Subclasses:
CategorySearchableButtonPane
,EntitiesSearchableButtonPane
public abstract class ASearchableButtonPane<B extends javafx.scene.control.ToggleButton>
extends Object
Represents a view with search field and list of searchable buttons.
Each button can be assigned a procedure on a click.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final javafx.scene.layout.VBox
protected final javafx.scene.layout.VBox
protected final javafx.scene.control.TextField
protected final javafx.scene.layout.VBox
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSearchableButton
(B button, Runnable onClick) Adds a searchable button to the searchable view.void
Clears all buttons of aASearchableButtonPane
and updates the view.protected abstract javafx.scene.layout.Pane
Gets optionalPane
that is located as a firstNode
.protected abstract javafx.beans.binding.StringBinding
Gets empty button label.javafx.scene.control.ToggleButton
javafx.scene.layout.Pane
getPane()
GetsASearchableButtonPane
Pane
.protected abstract javafx.beans.binding.StringBinding
Gets search field prompt text.void
setVisible
(boolean isVisible) Sets if view is visible.
-
Field Details
-
rootPane
protected final javafx.scene.layout.VBox rootPane -
searchPane
protected final javafx.scene.layout.VBox searchPane -
optionalPane
protected final javafx.scene.layout.VBox optionalPane -
searchField
protected final javafx.scene.control.TextField searchField -
searchableButtons
-
-
Constructor Details
-
ASearchableButtonPane
public ASearchableButtonPane()Instantiates newASearchableButtonPane
.
-
-
Method Details
-
getSearchFieldPrompt
protected abstract javafx.beans.binding.StringBinding getSearchFieldPrompt()Gets search field prompt text.- Returns:
- search field prompt text
-
getEmptyButtonLabel
protected abstract javafx.beans.binding.StringBinding getEmptyButtonLabel()Gets empty button label. Empty button is a button that is shown if filter returns no matched buttons.- Returns:
- empty button label
-
fillOptionalPane
protected abstract javafx.scene.layout.Pane fillOptionalPane()Gets optionalPane
that is located as a firstNode
.- Returns:
- optional
Pane
that is located as a firstNode
or null
-
addSearchableButton
Adds a searchable button to the searchable view.- Parameters:
button
- searchable buttononClick
- onclick event
-
clearSearchableButtons
public void clearSearchableButtons()Clears all buttons of aASearchableButtonPane
and updates the view. -
getPane
public javafx.scene.layout.Pane getPane()GetsASearchableButtonPane
Pane
.- Returns:
ASearchableButtonPane
Pane
-
getSearchableButtons
-
getFocusButton
public javafx.scene.control.ToggleButton getFocusButton() -
setVisible
public void setVisible(boolean isVisible) Sets if view is visible.- Parameters:
isVisible
- is visible
-