Top Inners Fields Constructors Methods
com.dlsc.gemsfx.paging

public abstract Class PagingControlBase

extends Control
Class Inheritance
Known Direct Subclasses
com.dlsc.gemsfx.paging.PagingControls, com.dlsc.gemsfx.paging.ItemPagingControlBase
Imports
javafx.beans.binding.Bindings, javafx.beans.property.BooleanProperty, .IntegerProperty, .ListProperty, .ObjectProperty, .ReadOnlyIntegerProperty, .ReadOnlyIntegerWrapper, .SimpleBooleanProperty, .SimpleIntegerProperty, .SimpleListProperty, .SimpleObjectProperty, .SimpleStringProperty, .StringProperty, javafx.collections.FXCollections, .ObservableList, javafx.geometry.HPos, javafx.scene.Node, javafx.scene.control.Control, javafx.scene.input.KeyCode, .KeyEvent, javafx.scene.layout.Region, javafx.util.Callback, java.text.MessageFormat, java.util.Objects

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
PagingControlBase.FirstLastPageDisplayMode

An enum listing the different ways the control will display or not display controls to quickly go to the first or the last page.

public static enum
PagingControlBase.MessageLabelStrategy

A list of possible strategies for showing / hiding the message label.

Field Summary

Modifier and TypeField and Description
private final ObjectProperty<HPos>
private final ListProperty<Integer>
private final ObjectProperty<PagingControlBase.FirstLastPageDisplayMode>
private final ObjectProperty<Node>
private final StringProperty
private final ObjectProperty<Node>
private final StringProperty
private final IntegerProperty
private final ObjectProperty<Callback<PagingControls, String>>
private final ObjectProperty<PagingControlBase.MessageLabelStrategy>
private final StringProperty
private final IntegerProperty
pack-priv final ReadOnlyIntegerWrapper
private final IntegerProperty
private final StringProperty
private final StringProperty
private final BooleanProperty
private final BooleanProperty
private final BooleanProperty
private final IntegerProperty

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final ObjectProperty<HPos>

Returns:

the alignment / the position of the paging buttons
alignmentProperty
()

The alignment property controls where in the view the paging buttons will appear: left, center, middle.

public final ListProperty<Integer>

Returns:

a list of available page sizes
availablePageSizesProperty
()

A list of available page sizes that will be shown by the page size selector.

public final ObjectProperty<PagingControlBase.FirstLastPageDisplayMode>
public void
firstPage()

Sets the page index to zero.

public final ObjectProperty<Node>

Returns:

a node for separating the "first page" button, usually a label showing "..."
firstPageDividerProperty
()

Stores the node that will be placed between the regular page buttons and the page button that represents the "first" page.

public final StringProperty

Returns:

the text of the "first page" button
firstPageTextProperty
()

The text that will be shown by the "first page" button.

public final HPos
public final ObservableList<Integer>
public final PagingControlBase.FirstLastPageDisplayMode
public final Node
public final String
public final Node
public final String
public final int
public final Callback<PagingControls, String>
public final PagingControlBase.MessageLabelStrategy
public final String
public final int
public final int
public final int
public final String
public final String
public final int
public final boolean
public final boolean
public final boolean
public void
lastPage()

Sets the page index to the page count minus one.

public final ObjectProperty<Node>

Returns:

a node for separating the "last page" button, usually a label showing "..."
lastPageDividerProperty
()

Stores the node that will be placed between the regular page buttons and the page button that represents the "last" page.

public final StringProperty

Returns:

the text of the "last page" button
lastPageTextProperty
()

The text that will be shown by the "last page" button.

public final IntegerProperty

Returns:

the number of page buttons shown by the control
maxPageIndicatorsCountProperty
()

The maximum number of page indicators / buttons that will be shown at any time by this control.

public final ObjectProperty<Callback<PagingControls, String>>

Returns:

the message label provider
messageLabelProviderProperty
()

A message label provider is used to customize the messages shown by the message label of this control, for example, "Showing items 11 to 20 of a total of 1000 items".

public final ObjectProperty<PagingControlBase.MessageLabelStrategy>

Returns:

the strategy used to show or hide the message label
messageLabelStrategyProperty
()

The message label strategy controls whether the message label will appear in certain situations, for example, when there are no items currently in the view that is being controlled by these pagination controls.

public void
nextPage()

Increments the page index.

public final StringProperty

Returns:

the text of the "next page" button
nextPageTextProperty
()

The text that will be shown by the "next page" button.

public final ReadOnlyIntegerProperty

Returns:

a read-only integer property storing the number of required pages
pageCountProperty
()

A read-only property that stores the number of pages that are required for the given number of items and the given page size.

public final IntegerProperty

Returns:

the number of the currently showing page
pageProperty
()

The index of the currently showing page.

public final IntegerProperty

Returns:

the number of items per page
pageSizeProperty
()

The number of items shown per page of the control that is being controlled by the pagination control.

public final StringProperty

Returns:

the label property for the page size selector
pageSizeSelectorLabelProperty
()

The text / label shown in front of the page size selector control.

public void
previousPage()

Decrements the page index.

public final StringProperty

Returns:

the text of the "previous page" button
previousPageTextProperty
()

The text that will be shown by the "previous page" button.

public final BooleanProperty

Returns:

a flag to control the width of the page buttons
sameWidthPageButtonsProperty
()

A flag used to signal whether the individual page buttons will all have the same width or if their width can be different based on the page number that they are showing (e.g. the button for page "1" would be substantially less wide than the button for page "999").

public final void
setAlignment(HPos alignment)

public final void
public final void
public final void
setFirstPageDivider(Node firstPageDivider)

public final void
setFirstPageText(String firstPageText)

public final void
setLastPageDivider(Node lastPageDivider)

public final void
setLastPageText(String lastPageText)

public final void
setMaxPageIndicatorsCount(int maxPageIndicatorsCount)

public final void
public final void
public final void
setNextPageText(String nextPageText)

public final void
setPage(int page)

public final void
setPageSize(int pageSize)

public final void
setPageSizeSelectorLabel(String pageSizeSelectorLabel)

public final void
setPreviousPageText(String previousPageText)

public final void
setSameWidthPageButtons(boolean sameWidthPageButtons)

public final void
setShowPageSizeSelector(boolean showPageSizeSelector)

public final void
setShowPreviousNextPageButton(boolean showPreviousNextPageButton)

public final void
setTotalItemCount(int totalItemCount)

public final BooleanProperty

Returns:

a flag used to determine if the page size selector should be shown or not
showPageSizeSelectorProperty
()

Determines if the control will show a selector UI for choosing different page sizes.

public final BooleanProperty

Returns:

a boolean property to control the visibility of the previous / next buttons
showPreviousNextPageButtonProperty
()

A flag used to determine whether the control will display arrow buttons to go to the next or the previous page.

public final IntegerProperty

Returns:

the total number of items in the view
totalItemCountProperty
()

The total number of items (rows) displayed by the control that utilizes this pagination control for paging.

Inherited from javafx.scene.control.Control:
computeMaxHeightcomputeMaxWidthcomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthcontextMenuPropertycreateDefaultSkinexecuteAccessibleActiongetBaselineOffsetgetClassCssMetaDatagetContextMenugetControlCssMetaDatagetCssMetaDatagetInitialFocusTraversablegetSkingetTooltipisResizablelayoutChildrenqueryAccessibleAttributesetContextMenusetSkinsetTooltipskinPropertytooltipProperty

Field Detail

alignmentback to summary
private final ObjectProperty<HPos> alignment
availablePageSizesback to summary
private final ListProperty<Integer> availablePageSizes
firstLastPageDisplayModeback to summary
private final ObjectProperty<PagingControlBase.FirstLastPageDisplayMode> firstLastPageDisplayMode
firstPageDividerback to summary
private final ObjectProperty<Node> firstPageDivider
firstPageTextback to summary
private final StringProperty firstPageText
lastPageDividerback to summary
private final ObjectProperty<Node> lastPageDivider
lastPageTextback to summary
private final StringProperty lastPageText
maxPageIndicatorsCountback to summary
private final IntegerProperty maxPageIndicatorsCount
messageLabelProviderback to summary
private final ObjectProperty<Callback<PagingControls, String>> messageLabelProvider
messageLabelStrategyback to summary
private final ObjectProperty<PagingControlBase.MessageLabelStrategy> messageLabelStrategy
nextPageTextback to summary
private final StringProperty nextPageText
pageback to summary
private final IntegerProperty page
pageCountback to summary
pack-priv final ReadOnlyIntegerWrapper pageCount
pageSizeback to summary
private final IntegerProperty pageSize
pageSizeSelectorLabelback to summary
private final StringProperty pageSizeSelectorLabel
previousPageTextback to summary
private final StringProperty previousPageText
sameWidthPageButtonsback to summary
private final BooleanProperty sameWidthPageButtons
showPageSizeSelectorback to summary
private final BooleanProperty showPageSizeSelector
showPreviousNextPageButtonback to summary
private final BooleanProperty showPreviousNextPageButton
totalItemCountback to summary
private final IntegerProperty totalItemCount

Constructor Detail

PagingControlBaseback to summary
public PagingControlBase()

Method Detail

alignmentPropertyback to summary
public final ObjectProperty<HPos> alignmentProperty()

The alignment property controls where in the view the paging buttons will appear: left, center, middle.

Returns:ObjectProperty<HPos>

the alignment / the position of the paging buttons

availablePageSizesPropertyback to summary
public final ListProperty<Integer> availablePageSizesProperty()

A list of available page sizes that will be shown by the page size selector.

Returns:ListProperty<Integer>

a list of available page sizes

See Also
showPageSizeSelectorProperty(), pageSizeSelectorLabelProperty()
firstLastPageDisplayModePropertyback to summary
public final ObjectProperty<PagingControlBase.FirstLastPageDisplayMode> firstLastPageDisplayModeProperty()
firstPageback to summary
public void firstPage()

Sets the page index to zero.

firstPageDividerPropertyback to summary
public final ObjectProperty<Node> firstPageDividerProperty()

Stores the node that will be placed between the regular page buttons and the page button that represents the "first" page. This is usually a label showing "...".

Returns:ObjectProperty<Node>

a node for separating the "first page" button, usually a label showing "..."

firstPageTextPropertyback to summary
public final StringProperty firstPageTextProperty()

The text that will be shown by the "first page" button.

Returns:StringProperty

the text of the "first page" button

getAlignmentback to summary
public final HPos getAlignment()
getAvailablePageSizesback to summary
public final ObservableList<Integer> getAvailablePageSizes()
getFirstLastPageDisplayModeback to summary
public final PagingControlBase.FirstLastPageDisplayMode getFirstLastPageDisplayMode()
getFirstPageDividerback to summary
public final Node getFirstPageDivider()
getFirstPageTextback to summary
public final String getFirstPageText()
getLastPageDividerback to summary
public final Node getLastPageDivider()
getLastPageTextback to summary
public final String getLastPageText()
getMaxPageIndicatorsCountback to summary
public final int getMaxPageIndicatorsCount()
getMessageLabelProviderback to summary
public final Callback<PagingControls, String> getMessageLabelProvider()
getMessageLabelStrategyback to summary
public final PagingControlBase.MessageLabelStrategy getMessageLabelStrategy()
getNextPageTextback to summary
public final String getNextPageText()
getPageback to summary
public final int getPage()
getPageCountback to summary
public final int getPageCount()
getPageSizeback to summary
public final int getPageSize()
getPageSizeSelectorLabelback to summary
public final String getPageSizeSelectorLabel()
getPreviousPageTextback to summary
public final String getPreviousPageText()
getTotalItemCountback to summary
public final int getTotalItemCount()
isSameWidthPageButtonsback to summary
public final boolean isSameWidthPageButtons()
isShowPageSizeSelectorback to summary
public final boolean isShowPageSizeSelector()
isShowPreviousNextPageButtonback to summary
public final boolean isShowPreviousNextPageButton()
lastPageback to summary
public void lastPage()

Sets the page index to the page count minus one.

See Also
pageProperty(), pageCountProperty()
lastPageDividerPropertyback to summary
public final ObjectProperty<Node> lastPageDividerProperty()

Stores the node that will be placed between the regular page buttons and the page button that represents the "last" page. This is usually a label showing "...".

Returns:ObjectProperty<Node>

a node for separating the "last page" button, usually a label showing "..."

lastPageTextPropertyback to summary
public final StringProperty lastPageTextProperty()

The text that will be shown by the "last page" button.

Returns:StringProperty

the text of the "last page" button

maxPageIndicatorsCountPropertyback to summary
public final IntegerProperty maxPageIndicatorsCountProperty()

The maximum number of page indicators / buttons that will be shown at any time by this control.

Returns:IntegerProperty

the number of page buttons shown by the control

messageLabelProviderPropertyback to summary
public final ObjectProperty<Callback<PagingControls, String>> messageLabelProviderProperty()

A message label provider is used to customize the messages shown by the message label of this control, for example, "Showing items 11 to 20 of a total of 1000 items".

Returns:ObjectProperty<Callback<PagingControls, String>>

the message label provider

messageLabelStrategyPropertyback to summary
public final ObjectProperty<PagingControlBase.MessageLabelStrategy> messageLabelStrategyProperty()

The message label strategy controls whether the message label will appear in certain situations, for example, when there are no items currently in the view that is being controlled by these pagination controls.

Returns:ObjectProperty<PagingControlBase.MessageLabelStrategy>

the strategy used to show or hide the message label

nextPageback to summary
public void nextPage()

Increments the page index.

See Also
pageProperty()
nextPageTextPropertyback to summary
public final StringProperty nextPageTextProperty()

The text that will be shown by the "next page" button.

Returns:StringProperty

the text of the "next page" button

pageCountPropertyback to summary
public final ReadOnlyIntegerProperty pageCountProperty()

A read-only property that stores the number of pages that are required for the given number of items and the given page size.

Returns:ReadOnlyIntegerProperty

a read-only integer property storing the number of required pages

See Also
totalItemCountProperty(), pageSizeProperty()
pagePropertyback to summary
public final IntegerProperty pageProperty()

The index of the currently showing page.

Returns:IntegerProperty

the number of the currently showing page

pageSizePropertyback to summary
public final IntegerProperty pageSizeProperty()

The number of items shown per page of the control that is being controlled by the pagination control.

Returns:IntegerProperty

the number of items per page

pageSizeSelectorLabelPropertyback to summary
public final StringProperty pageSizeSelectorLabelProperty()

The text / label shown in front of the page size selector control.

Returns:StringProperty

the label property for the page size selector

See Also
showPageSizeSelectorProperty(), availablePageSizesProperty()
previousPageback to summary
public void previousPage()

Decrements the page index.

See Also
pageProperty()
previousPageTextPropertyback to summary
public final StringProperty previousPageTextProperty()

The text that will be shown by the "previous page" button.

Returns:StringProperty

the text of the "previous page" button

sameWidthPageButtonsPropertyback to summary
public final BooleanProperty sameWidthPageButtonsProperty()

A flag used to signal whether the individual page buttons will all have the same width or if their width can be different based on the page number that they are showing (e.g. the button for page "1" would be substantially less wide than the button for page "999").

Returns:BooleanProperty

a flag to control the width of the page buttons

setAlignmentback to summary
public final void setAlignment(HPos alignment)
setAvailablePageSizesback to summary
public final void setAvailablePageSizes(ObservableList<Integer> availablePageSizes)
setFirstLastPageDisplayModeback to summary
public final void setFirstLastPageDisplayMode(PagingControlBase.FirstLastPageDisplayMode firstLastPageDisplayMode)
setFirstPageDividerback to summary
public final void setFirstPageDivider(Node firstPageDivider)
setFirstPageTextback to summary
public final void setFirstPageText(String firstPageText)
setLastPageDividerback to summary
public final void setLastPageDivider(Node lastPageDivider)
setLastPageTextback to summary
public final void setLastPageText(String lastPageText)
setMaxPageIndicatorsCountback to summary
public final void setMaxPageIndicatorsCount(int maxPageIndicatorsCount)
setMessageLabelProviderback to summary
public final void setMessageLabelProvider(Callback<PagingControls, String> messageLabelProvider)
setMessageLabelStrategyback to summary
public final void setMessageLabelStrategy(PagingControlBase.MessageLabelStrategy messageLabelStrategy)
setNextPageTextback to summary
public final void setNextPageText(String nextPageText)
setPageback to summary
public final void setPage(int page)
setPageSizeback to summary
public final void setPageSize(int pageSize)
setPageSizeSelectorLabelback to summary
public final void setPageSizeSelectorLabel(String pageSizeSelectorLabel)
setPreviousPageTextback to summary
public final void setPreviousPageText(String previousPageText)
setSameWidthPageButtonsback to summary
public final void setSameWidthPageButtons(boolean sameWidthPageButtons)
setShowPageSizeSelectorback to summary
public final void setShowPageSizeSelector(boolean showPageSizeSelector)
setShowPreviousNextPageButtonback to summary
public final void setShowPreviousNextPageButton(boolean showPreviousNextPageButton)
setTotalItemCountback to summary
public final void setTotalItemCount(int totalItemCount)
showPageSizeSelectorPropertyback to summary
public final BooleanProperty showPageSizeSelectorProperty()

Determines if the control will show a selector UI for choosing different page sizes.

Returns:BooleanProperty

a flag used to determine if the page size selector should be shown or not

See Also
availablePageSizesProperty(), pageSizeSelectorLabelProperty()
showPreviousNextPageButtonPropertyback to summary
public final BooleanProperty showPreviousNextPageButtonProperty()

A flag used to determine whether the control will display arrow buttons to go to the next or the previous page.

Returns:BooleanProperty

a boolean property to control the visibility of the previous / next buttons

totalItemCountPropertyback to summary
public final IntegerProperty totalItemCountProperty()

The total number of items (rows) displayed by the control that utilizes this pagination control for paging.

Returns:IntegerProperty

the total number of items in the view

com.dlsc.gemsfx.paging back to summary

public final Enum PagingControlBase.FirstLastPageDisplayMode

extends Enum<PagingControlBase.FirstLastPageDisplayMode>
Class Inheritance

An enum listing the different ways the control will display or not display controls to quickly go to the first or the last page.

Field Summary

Modifier and TypeField and Description
public static final PagingControlBase.FirstLastPageDisplayMode
HIDE

Do not show controls for jumping to the first or last page.

public static final PagingControlBase.FirstLastPageDisplayMode
SHOW_ARROW_BUTTONS

Show separate controls in front and after the page buttons to perform the jump.

public static final PagingControlBase.FirstLastPageDisplayMode
SHOW_PAGE_BUTTONS

Show extra page buttons to perform the jump (1 ...

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static PagingControlBase.FirstLastPageDisplayMode
public static PagingControlBase.FirstLastPageDisplayMode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

HIDEback to summary
public static final PagingControlBase.FirstLastPageDisplayMode HIDE

Do not show controls for jumping to the first or last page.

SHOW_ARROW_BUTTONSback to summary
public static final PagingControlBase.FirstLastPageDisplayMode SHOW_ARROW_BUTTONS

Show separate controls in front and after the page buttons to perform the jump.

SHOW_PAGE_BUTTONSback to summary
public static final PagingControlBase.FirstLastPageDisplayMode SHOW_PAGE_BUTTONS

Show extra page buttons to perform the jump (1 ... 5 6 7 8 ... 20).

Constructor Detail

FirstLastPageDisplayModeback to summary
private FirstLastPageDisplayMode()

Method Detail

valueOfback to summary
public static PagingControlBase.FirstLastPageDisplayMode valueOf(String name)
valuesback to summary
public static PagingControlBase.FirstLastPageDisplayMode[] values()
com.dlsc.gemsfx.paging back to summary

public final Enum PagingControlBase.MessageLabelStrategy

extends Enum<PagingControlBase.MessageLabelStrategy>
Class Inheritance

A list of possible strategies for showing / hiding the message label.
See Also
messageLabelStrategyProperty()

Field Summary

Modifier and TypeField and Description
public static final PagingControlBase.MessageLabelStrategy
ALWAYS_SHOW

Always show the message label, even when there are no items in the controlled view.

public static final PagingControlBase.MessageLabelStrategy
HIDE

Always hide the message label.

public static final PagingControlBase.MessageLabelStrategy
SHOW_WHEN_NEEDED

Show the message label when needed, usually when the total item count is larger than zero.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static PagingControlBase.MessageLabelStrategy
public static PagingControlBase.MessageLabelStrategy[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ALWAYS_SHOWback to summary
public static final PagingControlBase.MessageLabelStrategy ALWAYS_SHOW

Always show the message label, even when there are no items in the controlled view.

HIDEback to summary
public static final PagingControlBase.MessageLabelStrategy HIDE

Always hide the message label.

SHOW_WHEN_NEEDEDback to summary
public static final PagingControlBase.MessageLabelStrategy SHOW_WHEN_NEEDED

Show the message label when needed, usually when the total item count is larger than zero.

Constructor Detail

MessageLabelStrategyback to summary
private MessageLabelStrategy()

Method Detail

valueOfback to summary
public static PagingControlBase.MessageLabelStrategy valueOf(String name)
valuesback to summary
public static PagingControlBase.MessageLabelStrategy[] values()