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 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

      protected final List<B extends javafx.scene.control.ToggleButton> searchableButtons
  • Constructor Details

  • 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 optional Pane that is located as a first Node.
      Returns:
      optional Pane that is located as a first Node or null
    • addSearchableButton

      public void addSearchableButton(B button, Runnable onClick)
      Adds a searchable button to the searchable view.
      Parameters:
      button - searchable button
      onClick - onclick event
    • clearSearchableButtons

      public void clearSearchableButtons()
      Clears all buttons of a ASearchableButtonPane and updates the view.
    • getPane

      public javafx.scene.layout.Pane getPane()
      Returns:
      ASearchableButtonPane Pane
    • getSearchableButtons

      public List<B> getSearchableButtons()
    • getFocusButton

      public javafx.scene.control.ToggleButton getFocusButton()
    • setVisible

      public void setVisible(boolean isVisible)
      Sets if view is visible.
      Parameters:
      isVisible - is visible