Class SimplePaginationImpl

All Implemented Interfaces:
AttachNotifier, Component, Component.BelongToFrame, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper, HasContextHelp, HasDebugId, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer, PaginationComponent, SimplePagination, VisibilityChangeNotifier, org.springframework.beans.factory.InitializingBean

public class SimplePaginationImpl extends AbstractPagination<JmixSimplePagination> implements SimplePagination, VisibilityChangeNotifier, org.springframework.beans.factory.InitializingBean
  • Field Details

    • backgroundWorker

      protected BackgroundWorker backgroundWorker
    • currentAuthentication

      protected CurrentAuthentication currentAuthentication
    • autoLoad

      protected boolean autoLoad
    • onLinkClickRegistration

      protected com.vaadin.shared.Registration onLinkClickRegistration
    • onPrevClickRegistration

      protected com.vaadin.shared.Registration onPrevClickRegistration
    • onNextClickRegistration

      protected com.vaadin.shared.Registration onNextClickRegistration
    • onFirstClickRegistration

      protected com.vaadin.shared.Registration onFirstClickRegistration
    • onLastClickRegistration

      protected com.vaadin.shared.Registration onLastClickRegistration
    • countDatatype

      protected Datatype countDatatype
    • lastPage

      protected boolean lastPage
    • samePage

      protected boolean samePage
    • refreshing

      protected boolean refreshing
    • state

      protected AbstractPagination.State state
    • lastState

      protected AbstractPagination.State lastState
    • start

      protected int start
    • size

      protected int size
    • itemsCountTaskHandler

      protected BackgroundTaskHandler<Integer> itemsCountTaskHandler
  • Constructor Details

    • SimplePaginationImpl

      public SimplePaginationImpl()
  • Method Details

    • createComponent

      protected JmixSimplePagination createComponent()
    • setBackgroundWorker

      @Autowired public void setBackgroundWorker(BackgroundWorker backgroundWorker)
    • setCurrentAuthentication

      @Autowired public void setCurrentAuthentication(CurrentAuthentication currentAuthentication)
    • setDatatypeRegistry

      @Autowired public void setDatatypeRegistry(DatatypeRegistry datatypeRegistry)
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • initComponent

      protected void initComponent()
    • updateItemsPerPageAvailability

      protected void updateItemsPerPageAvailability()
    • isAutoLoad

      public boolean isAutoLoad()
      Specified by:
      isAutoLoad in interface SimplePagination
      Returns:
      whether items count should be loaded automatically
    • setAutoLoad

      public void setAutoLoad(boolean autoLoad)
      Description copied from interface: SimplePagination
      Sets whether items count should be loaded automatically. When the autoload is disabled the component doesn't know the total count of items and shows a button with [?]. When it's enabled the component makes a query to get the total count of items and shows it. The default value is false.
      Specified by:
      setAutoLoad in interface SimplePagination
      Parameters:
      autoLoad - pass true to enable auto load, or false otherwise
    • addVisibilityChangeListener

      public Subscription addVisibilityChangeListener(Consumer<VisibilityChangeNotifier.VisibilityChangeEvent> listener)
      Specified by:
      addVisibilityChangeListener in interface VisibilityChangeNotifier
    • setVisible

      public void setVisible(boolean visible)
      Description copied from interface: Component
      Sets visibility value for the component.
      Visible components are drawn in the user interface, while invisible ones are not. The effect is not a cosmetic CSS change - no information about an invisible component will be sent to the client. The effect is thus the same as removing the component from its parent.
      Specified by:
      setVisible in interface Component
      Overrides:
      setVisible in class AbstractComponent<JmixSimplePagination>
      Parameters:
      visible - visible flag
    • setDataBinder

      public void setDataBinder(PaginationDataBinder dataBinder)
      Description copied from interface: PaginationComponent
      Sets a data binder. It is used for managing data loading and dividing data to pages.
      Specified by:
      setDataBinder in interface PaginationComponent
      Overrides:
      setDataBinder in class AbstractPagination<JmixSimplePagination>
    • initListeners

      protected void initListeners()
    • removeListeners

      protected void removeListeners()
    • onRefreshItems

      protected void onRefreshItems(CollectionChangeType changeType)
    • onFirstClick

      protected void onFirstClick(com.vaadin.ui.Button.ClickEvent event)
    • onPrevClick

      protected void onPrevClick(com.vaadin.ui.Button.ClickEvent event)
    • onNextClick

      protected void onNextClick(com.vaadin.ui.Button.ClickEvent event)
    • onLastClick

      protected void onLastClick(com.vaadin.ui.Button.ClickEvent event)
    • onLinkClick

      protected void onLinkClick(com.vaadin.ui.Button.ClickEvent event)
    • onItemsPerPageValueChange

      protected void onItemsPerPageValueChange(com.vaadin.data.HasValue.ValueChangeEvent<Integer> event)
      Overrides:
      onItemsPerPageValueChange in class AbstractPagination<JmixSimplePagination>
    • refreshData

      protected boolean refreshData()
    • onCollectionChanged

      protected void onCollectionChanged()
    • updateTotalCountButton

      protected void updateTotalCountButton()
    • getLabelMessageKey

      protected String getLabelMessageKey()
    • getLabelCountValue

      protected String getLabelCountValue()
    • updateNavigationButtonsAvailability

      protected void updateNavigationButtonsAvailability()
    • loadItemsCount

      protected void loadItemsCount()
    • getLoadCountTask

      protected BackgroundTask<Long,Integer> getLoadCountTask()
    • showItemsCountValue

      protected void showItemsCountValue(int count)
    • getCountButton

      protected com.vaadin.ui.Button getCountButton()
    • getLabel

      protected com.vaadin.ui.Label getLabel()