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.StateNested 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.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEventNested classes/interfaces inherited from interface io.jmix.ui.component.Pagination
Pagination.PageChangeEventNested classes/interfaces inherited from interface io.jmix.ui.component.PaginationComponent
PaginationComponent.AfterRefreshEvent, PaginationComponent.BeforeRefreshEvent -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected com.vaadin.shared.Registrationprotected com.vaadin.shared.Registrationprotected com.vaadin.shared.Registrationprotected com.vaadin.shared.Registrationprotected booleanFields inherited from class io.jmix.ui.component.impl.AbstractPagination
componentProperties, dataBinder, itemsPerPageDefaultValue, itemsPerPageOptions, itemsPerPageValueChangeRegistration, messages, processedOptions, themeConstantsManager, totalCountDelegate, uiPropertiesFields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parentFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZEFields inherited from interface io.jmix.ui.component.Pagination
NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds page change listener.voidprotected JmixPaginationprotected voidprotected voidcreatePageButtons(int totalCount, int itemsToDisplay) protected voidfirePageChangeEvent(Integer previousPageNumber, Integer pageNumber) protected AbstractPagination.Stateintprotected voidprotected voidprotected voidonCollectionChange(CollectionChangeType changeType) protected voidonFirstButtonClick(com.vaadin.ui.Button.ClickEvent event) protected voidonItemsPerPageValueChange(com.vaadin.data.HasValue.ValueChangeEvent<Integer> event) protected voidonLastButtonClick(com.vaadin.ui.Button.ClickEvent event) protected voidonNextButtonClick(com.vaadin.ui.Button.ClickEvent event) protected voidonPrevButtonClick(com.vaadin.ui.Button.ClickEvent event) protected booleanprotected voidvoidsetDataBinder(PaginationDataBinder dataBinder) Sets a data binder.voidsetMaxVisiblePages(int maxVisiblePages) Sets the maximum number of visible pages.protected voidprotected voidMethods 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, setupItemsPerPageValueChangeListenerMethods 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, withUnwrappedCompositionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContextMethods 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, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrameMethods 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:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
initComponent
protected void initComponent() -
setDataBinder
Description copied from interface:PaginationComponentSets a data binder. It is used for managing data loading and dividing data to pages.- Specified by:
setDataBinderin interfacePaginationComponent- Overrides:
setDataBinderin classAbstractPagination<JmixPagination>
-
removeListeners
protected void removeListeners() -
initListeners
protected void initListeners() -
getMaxVisiblePages
public int getMaxVisiblePages()- Specified by:
getMaxVisiblePagesin interfacePagination- Returns:
- maximum number of visible pages.
-
setMaxVisiblePages
public void setMaxVisiblePages(int maxVisiblePages) Description copied from interface:PaginationSets 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:
setMaxVisiblePagesin interfacePagination
-
addPageChangeListener
Description copied from interface:PaginationAdds page change listener. It will be invoked when the user selects another page or clicks on navigation buttons (next, previous, etc).- Specified by:
addPageChangeListenerin interfacePagination- Parameters:
listener- listener to add- Returns:
- a registration object for removing an event listener
-
firePageChangeEvent
-
onItemsPerPageValueChange
- Overrides:
onItemsPerPageValueChangein 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()
-