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.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.PaginationComponent
PaginationComponent.AfterRefreshEvent, PaginationComponent.BeforeRefreshEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.VisibilityChangeNotifier
VisibilityChangeNotifier.VisibilityChangeEvent
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected BackgroundWorker
protected Datatype
protected CurrentAuthentication
protected BackgroundTaskHandler<Integer>
protected boolean
protected AbstractPagination.State
protected com.vaadin.shared.Registration
protected com.vaadin.shared.Registration
protected com.vaadin.shared.Registration
protected com.vaadin.shared.Registration
protected com.vaadin.shared.Registration
protected boolean
protected boolean
protected int
protected int
protected AbstractPagination.State
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.SimplePagination
NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
protected JmixSimplePagination
protected com.vaadin.ui.Button
protected com.vaadin.ui.Label
getLabel()
protected String
protected String
protected BackgroundTask<Long,
Integer> protected void
protected void
boolean
protected boolean
protected void
protected void
protected void
onFirstClick
(com.vaadin.ui.Button.ClickEvent event) protected void
onItemsPerPageValueChange
(com.vaadin.data.HasValue.ValueChangeEvent<Integer> event) protected void
onLastClick
(com.vaadin.ui.Button.ClickEvent event) protected void
onLinkClick
(com.vaadin.ui.Button.ClickEvent event) protected void
onNextClick
(com.vaadin.ui.Button.ClickEvent event) protected void
onPrevClick
(com.vaadin.ui.Button.ClickEvent event) protected void
onRefreshItems
(CollectionChangeType changeType) protected boolean
protected void
void
setAutoLoad
(boolean autoLoad) Sets whether items count should be loaded automatically.void
setBackgroundWorker
(BackgroundWorker backgroundWorker) void
setCurrentAuthentication
(CurrentAuthentication currentAuthentication) void
setDataBinder
(PaginationDataBinder dataBinder) Sets a data binder.void
setDatatypeRegistry
(DatatypeRegistry datatypeRegistry) void
setVisible
(boolean visible) Sets visibility value for the component.protected void
showItemsCountValue
(int count) protected void
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, 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 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, 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
-
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:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
initComponent
protected void initComponent() -
updateItemsPerPageAvailability
protected void updateItemsPerPageAvailability() -
isAutoLoad
public boolean isAutoLoad()- Specified by:
isAutoLoad
in interfaceSimplePagination
- 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 isfalse
.- Specified by:
setAutoLoad
in interfaceSimplePagination
- Parameters:
autoLoad
- pass true to enable auto load, or false otherwise
-
addVisibilityChangeListener
public Subscription addVisibilityChangeListener(Consumer<VisibilityChangeNotifier.VisibilityChangeEvent> listener) - Specified by:
addVisibilityChangeListener
in interfaceVisibilityChangeNotifier
-
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 interfaceComponent
- Overrides:
setVisible
in classAbstractComponent<JmixSimplePagination>
- Parameters:
visible
- visible flag
-
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<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:
onItemsPerPageValueChange
in 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() -
isKeyValueEntity
protected boolean isKeyValueEntity()
-