Klasse UiPagingNavigation

java.lang.Object
org.obrel.core.RelatedObject
Alle implementierten Schnittstellen:
org.obrel.core.Relatable

public class UiPagingNavigation extends UiComposite<UiPagingNavigation>
A composites that contains the components needed for the navigation through pages of data.
  • Felddetails

    • DEFAULT_PAGE_SIZES

      public static final int[] DEFAULT_PAGE_SIZES
      A constant array of default page sizes that can be used for setPageSizes(int...).
  • Konstruktordetails

    • UiPagingNavigation

      public UiPagingNavigation(UiContainer<?> parent, de.esoco.lib.property.Updatable navigationListener, int pageSize)
      Creates a new instance.
      Parameter:
      parent - The parent container
      navigationListener - A listener for navigation events
      pageSize - The initial page size
  • Methodendetails

    • getPageSize

      public final int getPageSize()
      Returns the currently selected page size.
      Gibt zurück:
      The current page size
    • getPageSizes

      public final int[] getPageSizes()
      Returns the page sizes that can be selected by the user.
      Gibt zurück:
      The array list sizes or NULL for none
    • getPageStart

      public final int getPageStart()
      Returns the index of the first element on the current page.
      Gibt zurück:
      The starting index of the current page
    • setEmptyPageLabel

      public final void setEmptyPageLabel(String emptyPageLabel)
      Sets the label to be displayed if the current page is empty.
      Parameter:
      emptyPageLabel - The new empty page label
    • setPageSize

      public final void setPageSize(int pageSize)
      Sets the current page size and updates the display. This will not fire an event to the page size change handler.
      Parameter:
      pageSize - The new page size
    • setPageSizes

      public final void setPageSizes(int... pageSizes)
      Sets the page sizes that can be selected by the user. If set to NULL no page size selection will be available.
      Parameter:
      pageSizes - The selectable page sizes or NULL to hide the page size selection
    • setPageStart

      public final void setPageStart(int pageStart)
      Sets the index of the first element to display and updates the navigation display. This will not fire an event to the page change handler.
      Parameter:
      pageStart - The new starting index of the current page
    • setTotalSize

      public final void setTotalSize(int size)
      Sets the total size of data available and updates the navigation display.
      Parameter:
      size - The new total data size
    • update

      public void update()
      Updates the navigation display according to the current navigation position.
      Setzt außer Kraft:
      update in Klasse UiComponent<List<org.obrel.core.RelationType<?>>,UiPagingNavigation>
    • handleNavigation

      protected void handleNavigation(UiIconSupplier action)
      Performs navigation and notifies the navigation listener.
      Parameter:
      action - The navigation action icon