Class JmixItemsPerPage

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.html.Div>
io.jmix.flowui.kit.component.pagination.JmixItemsPerPage
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasStyle, Serializable
Direct Known Subclasses:
ItemsPerPage

public class JmixItemsPerPage extends com.vaadin.flow.component.Composite<com.vaadin.flow.component.html.Div>
A component for managing the number of items displayed per page in a paginated interface. It provides a label and a dropdown selection for users to specify or adjust the number of items per page.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final String
     
    protected static final String
     
    protected Integer
     
    protected List<Integer>
     
    protected com.vaadin.flow.component.select.Select<Integer>
     
    protected static final String
     
    protected com.vaadin.flow.component.html.Span
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.vaadin.flow.component.select.Select<Integer>
     
    protected com.vaadin.flow.component.html.Span
     
    Returns the default value for the number of items displayed per page.
    Returns the collection of items that represent the available options for the number of items displayed per page.
    Returns the text of the associated label.
    protected com.vaadin.flow.component.html.Div
     
    boolean
    Determines whether the "unlimited" item is visible in the items-per-page selection.
    void
    setItemsPerPageDefaultValue(Integer itemsPerPageDefaultValue)
    Sets the default value for the number of items displayed per page.
    void
    setItemsPerPageItems(List<Integer> itemsPerPageItems)
    Sets the collection of items that represent the available options for the number of items displayed per page.
    void
    setItemsPerPageUnlimitedItemVisible(boolean unlimitedItemVisible)
    Sets whether the "unlimited" option for items-per-page selection is visible.
    void
    Sets the text of the label.

    Methods inherited from class com.vaadin.flow.component.Composite

    getChildren, getContent, getElement

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
  • Field Details

    • BASE_CLASS_NAME

      protected static final String BASE_CLASS_NAME
      See Also:
    • ITEMS_PER_PAGE_SELECT_CLASS_NAME

      protected static final String ITEMS_PER_PAGE_SELECT_CLASS_NAME
      See Also:
    • LABEL_CLASS_NAME

      protected static final String LABEL_CLASS_NAME
      See Also:
    • labelSpan

      protected com.vaadin.flow.component.html.Span labelSpan
    • itemsPerPageSelect

      protected com.vaadin.flow.component.select.Select<Integer> itemsPerPageSelect
    • itemsPerPageDefaultValue

      protected Integer itemsPerPageDefaultValue
    • itemsPerPageItems

      protected List<Integer> itemsPerPageItems
  • Constructor Details

    • JmixItemsPerPage

      public JmixItemsPerPage()
  • Method Details

    • initContent

      protected com.vaadin.flow.component.html.Div initContent()
      Overrides:
      initContent in class com.vaadin.flow.component.Composite<com.vaadin.flow.component.html.Div>
    • getItemsPerPageDefaultValue

      @Nullable public Integer getItemsPerPageDefaultValue()
      Returns the default value for the number of items displayed per page.
      Returns:
      the default value for the number of items per page, or null if no default value is set
    • setItemsPerPageDefaultValue

      public void setItemsPerPageDefaultValue(@Nullable Integer itemsPerPageDefaultValue)
      Sets the default value for the number of items displayed per page.
      Parameters:
      itemsPerPageDefaultValue - the default number of items to be displayed per page, or null if no default value is set
    • getItemsPerPageItems

      public Collection<Integer> getItemsPerPageItems()
      Returns the collection of items that represent the available options for the number of items displayed per page.
      Returns:
      a collection of integers representing the available options for the items-per-page selection
    • setItemsPerPageItems

      public void setItemsPerPageItems(List<Integer> itemsPerPageItems)
      Sets the collection of items that represent the available options for the number of items displayed per page. Items less than or equal to 0 are ignored, and options greater than the entity's maximum fetch size will be replaced by the maximum fetch size.
      Parameters:
      itemsPerPageItems - a list of integers representing the available options for items-per-page selection
    • isItemsPerPageUnlimitedItemVisible

      public boolean isItemsPerPageUnlimitedItemVisible()
      Determines whether the "unlimited" item is visible in the items-per-page selection.
      Returns:
      true if the "unlimited" item is visible, false otherwise
    • setItemsPerPageUnlimitedItemVisible

      public void setItemsPerPageUnlimitedItemVisible(boolean unlimitedItemVisible)
      Sets whether the "unlimited" option for items-per-page selection is visible. If true, the "unlimited" option is displayed. If false, the "unlimited" option is not displayed.
      Parameters:
      unlimitedItemVisible - a boolean indicating whether the "unlimited" option should be visible in the items-per-page selection
    • getLabelText

      public String getLabelText()
      Returns the text of the associated label.
      Returns:
      the text content of the label as a String
    • setLabelText

      public void setLabelText(String text)
      Sets the text of the label.
      Parameters:
      text - the text to set for the label
    • createLabelSpan

      protected com.vaadin.flow.component.html.Span createLabelSpan()
    • createItemsPerPageSelect

      protected com.vaadin.flow.component.select.Select<Integer> createItemsPerPageSelect()