Package io.jmix.ui.component.impl
Class SimplePaginationImpl
java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<T>
io.jmix.ui.component.impl.AbstractPagination<JmixSimplePagination>
io.jmix.ui.component.impl.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
-
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.PaginationComponent
PaginationComponent.AfterRefreshEvent, PaginationComponent.BeforeRefreshEventNested classes/interfaces inherited from interface io.jmix.ui.component.VisibilityChangeNotifier
VisibilityChangeNotifier.VisibilityChangeEvent -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected BackgroundWorkerprotected Datatypeprotected CurrentAuthenticationprotected BackgroundTaskHandler<Integer>protected booleanprotected AbstractPagination.Stateprotected com.vaadin.shared.Registrationprotected com.vaadin.shared.Registrationprotected com.vaadin.shared.Registrationprotected com.vaadin.shared.Registrationprotected com.vaadin.shared.Registrationprotected booleanprotected booleanprotected intprotected intprotected AbstractPagination.StateFields 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.SimplePagination
NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected JmixSimplePaginationprotected com.vaadin.ui.Buttonprotected com.vaadin.ui.LabelgetLabel()protected Stringprotected Stringprotected BackgroundTask<Long,Integer> protected voidprotected voidbooleanprotected voidprotected voidprotected voidonFirstClick(com.vaadin.ui.Button.ClickEvent event) protected voidonItemsPerPageValueChange(com.vaadin.data.HasValue.ValueChangeEvent<Integer> event) protected voidonLastClick(com.vaadin.ui.Button.ClickEvent event) protected voidonLinkClick(com.vaadin.ui.Button.ClickEvent event) protected voidonNextClick(com.vaadin.ui.Button.ClickEvent event) protected voidonPrevClick(com.vaadin.ui.Button.ClickEvent event) protected voidonRefreshItems(CollectionChangeType changeType) protected booleanprotected voidvoidsetAutoLoad(boolean autoLoad) Sets whether items count should be loaded automatically.voidsetBackgroundWorker(BackgroundWorker backgroundWorker) voidsetCurrentAuthentication(CurrentAuthentication currentAuthentication) voidsetDataBinder(PaginationDataBinder dataBinder) Sets a data binder.voidsetDatatypeRegistry(DatatypeRegistry datatypeRegistry) voidsetVisible(boolean visible) Sets visibility value for the component.protected voidshowItemsCountValue(int count) protected voidprotected 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, 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 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, 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
-
backgroundWorker
-
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
-
lastPage
protected boolean lastPage -
samePage
protected boolean samePage -
refreshing
protected boolean refreshing -
state
-
lastState
-
start
protected int start -
size
protected int size -
itemsCountTaskHandler
-
-
Constructor Details
-
SimplePaginationImpl
public SimplePaginationImpl()
-
-
Method Details
-
createComponent
-
setBackgroundWorker
-
setCurrentAuthentication
-
setDatatypeRegistry
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
initComponent
protected void initComponent() -
updateItemsPerPageAvailability
protected void updateItemsPerPageAvailability() -
isAutoLoad
public boolean isAutoLoad()- Specified by:
isAutoLoadin interfaceSimplePagination- Returns:
- whether items count should be loaded automatically
-
setAutoLoad
public void setAutoLoad(boolean autoLoad) Description copied from interface:SimplePaginationSets 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 isfalse.- Specified by:
setAutoLoadin interfaceSimplePagination- Parameters:
autoLoad- pass true to enable auto load, or false otherwise
-
addVisibilityChangeListener
public Subscription addVisibilityChangeListener(Consumer<VisibilityChangeNotifier.VisibilityChangeEvent> listener) - Specified by:
addVisibilityChangeListenerin interfaceVisibilityChangeNotifier
-
setVisible
public void setVisible(boolean visible) Description copied from interface:ComponentSets 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:
setVisiblein interfaceComponent- Overrides:
setVisiblein classAbstractComponent<JmixSimplePagination>- Parameters:
visible- visible flag
-
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<JmixSimplePagination>
-
initListeners
protected void initListeners() -
removeListeners
protected void removeListeners() -
onRefreshItems
-
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
- Overrides:
onItemsPerPageValueChangein classAbstractPagination<JmixSimplePagination>
-
refreshData
protected boolean refreshData() -
onCollectionChanged
protected void onCollectionChanged() -
updateTotalCountButton
protected void updateTotalCountButton() -
getLabelMessageKey
-
getLabelCountValue
-
loadItemsCount
protected void loadItemsCount() -
getLoadCountTask
-
showItemsCountValue
protected void showItemsCountValue(int count) -
getCountButton
protected com.vaadin.ui.Button getCountButton() -
getLabel
protected com.vaadin.ui.Label getLabel()
-