Package io.jmix.ui.component.impl
Class PaginationImpl
java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<T>
io.jmix.ui.component.impl.AbstractPagination<JmixPagination>
io.jmix.ui.component.impl.PaginationImpl
- All Implemented Interfaces:
AttachNotifier
,Component
,Component.BelongToFrame
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,Component.HasXmlDescriptor
,Component.Wrapper
,HasContextHelp
,HasDebugId
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,Pagination
,PaginationComponent
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
public class PaginationImpl
extends AbstractPagination<JmixPagination>
implements Pagination, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.ui.component.impl.AbstractPagination
AbstractPagination.State
Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.Pagination
Pagination.PageChangeEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.PaginationComponent
PaginationComponent.AfterRefreshEvent, PaginationComponent.BeforeRefreshEvent
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final int
protected com.vaadin.shared.Registration
protected com.vaadin.shared.Registration
protected com.vaadin.shared.Registration
protected com.vaadin.shared.Registration
protected boolean
Fields inherited from class io.jmix.ui.component.impl.AbstractPagination
componentProperties, dataBinder, itemsPerPageDefaultValue, itemsPerPageOptions, itemsPerPageValueChangeRegistration, messages, processedOptions, themeConstantsManager, totalCountDelegate, uiProperties
Fields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Fields inherited from interface io.jmix.ui.component.Pagination
NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds page change listener.void
protected JmixPagination
protected void
protected void
createPageButtons
(int totalCount, int itemsToDisplay) protected void
firePageChangeEvent
(Integer previousPageNumber, Integer pageNumber) protected AbstractPagination.State
int
protected void
protected void
protected void
onCollectionChange
(CollectionChangeType changeType) protected void
onFirstButtonClick
(com.vaadin.ui.Button.ClickEvent event) protected void
onItemsPerPageValueChange
(com.vaadin.data.HasValue.ValueChangeEvent<Integer> event) protected void
onLastButtonClick
(com.vaadin.ui.Button.ClickEvent event) protected void
onNextButtonClick
(com.vaadin.ui.Button.ClickEvent event) protected void
onPrevButtonClick
(com.vaadin.ui.Button.ClickEvent event) protected boolean
protected void
void
setDataBinder
(PaginationDataBinder dataBinder) Sets a data binder.void
setMaxVisiblePages
(int maxVisiblePages) Sets the maximum number of visible pages.protected void
protected void
Methods inherited from class io.jmix.ui.component.impl.AbstractPagination
addAfterRefreshListener, addBeforeRefreshListener, canSetUnlimitedValue, checkDataBound, dataBinderContainsItems, findClosestValue, fireAfterRefreshEvent, fireBeforeRefreshEvent, getDataBinder, getDefaultOptionValue, getEntityMaxFetchSize, getEntityPageSize, getFirstButton, getItemsCountToDisplay, getItemsPerPageComboBox, getItemsPerPageDefaultValue, getItemsPerPageOptions, getItemsPerPageValue, getLastButton, getNextButton, getPrevButton, getTotalCount, getTotalCountDelegate, initItemsPerPageLayout, initItemsPerPageOptions, initMaxResultValue, isEmptyOrNullDataBinder, isItemsPerPageUnlimitedOptionVisible, isItemsPerPageVisible, processOptions, removeItemsPerPageValueChangeSubscription, setItemsPerPageDefaultValue, setItemsPerPageOptions, setItemsPerPageUnlimitedOptionVisible, setItemsPerPageValue, setItemsPerPageVisible, setMessages, setSilentlyItemsPerPageValue, setThemeConstantsManager, setTotalCountDelegate, setUiComponentProperties, setUiProperties, setupItemsPerPageValueChangeListener
Methods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescription, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setParent, setResponsive, setStyleName, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
Methods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.PaginationComponent
addAfterRefreshListener, addBeforeRefreshListener, getDataBinder, getItemsPerPageDefaultValue, getItemsPerPageOptions, getTotalCountDelegate, isItemsPerPageUnlimitedOptionVisible, isItemsPerPageVisible, setItemsPerPageDefaultValue, setItemsPerPageOptions, setItemsPerPageUnlimitedOptionVisible, setItemsPerPageVisible, setTotalCountDelegate
-
Field Details
-
FIRST_PAGE
protected static final int FIRST_PAGE- See Also:
-
firstButtonClickRegistration
protected com.vaadin.shared.Registration firstButtonClickRegistration -
prevButtonClickRegistration
protected com.vaadin.shared.Registration prevButtonClickRegistration -
nextButtonClickRegistration
protected com.vaadin.shared.Registration nextButtonClickRegistration -
lastButtonClickRegistration
protected com.vaadin.shared.Registration lastButtonClickRegistration -
refreshing
protected boolean refreshing
-
-
Constructor Details
-
PaginationImpl
public PaginationImpl()
-
-
Method Details
-
createComponent
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
initComponent
protected void initComponent() -
setDataBinder
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 interfacePaginationComponent
- Overrides:
setDataBinder
in classAbstractPagination<JmixPagination>
-
removeListeners
protected void removeListeners() -
initListeners
protected void initListeners() -
getMaxVisiblePages
public int getMaxVisiblePages()- Specified by:
getMaxVisiblePages
in interfacePagination
- Returns:
- maximum number of visible pages.
-
setMaxVisiblePages
public void setMaxVisiblePages(int maxVisiblePages) Description copied from interface:Pagination
Sets the maximum number of visible pages. The component can have a lot of pages, but users will see a number of pages at once that corresponds to the maximum number of visible pages. For instance, the component has 10 pages and the maximum number of visible pages is 3, so users will see only 3 pages at once. The default value is 5.- Specified by:
setMaxVisiblePages
in interfacePagination
-
addPageChangeListener
Description copied from interface:Pagination
Adds page change listener. It will be invoked when the user selects another page or clicks on navigation buttons (next, previous, etc).- Specified by:
addPageChangeListener
in interfacePagination
- Parameters:
listener
- listener to add- Returns:
- a registration object for removing an event listener
-
firePageChangeEvent
-
onItemsPerPageValueChange
- Overrides:
onItemsPerPageValueChange
in classAbstractPagination<JmixPagination>
-
onFirstButtonClick
protected void onFirstButtonClick(com.vaadin.ui.Button.ClickEvent event) -
onPrevButtonClick
protected void onPrevButtonClick(com.vaadin.ui.Button.ClickEvent event) -
onNextButtonClick
protected void onNextButtonClick(com.vaadin.ui.Button.ClickEvent event) -
onLastButtonClick
protected void onLastButtonClick(com.vaadin.ui.Button.ClickEvent event) -
onCollectionChange
-
refreshData
protected boolean refreshData() -
createPageButtons
protected void createPageButtons() -
createPageButtons
protected void createPageButtons(int totalCount, int itemsToDisplay) -
updateState
protected void updateState() -
getCurrentState
-
updateItemsPerPageAvailability
protected void updateItemsPerPageAvailability()
-