When you pin a column to the left, all columns to the left of the pinned column will also be pinned to the left. Similarly, pinning a column to the right will cause all columns to the right to be pinned to the right.
To pin a column to the left, use left when configuring the column:
tableConfig.addColumn(ColumnConfig.create("name", "Label").applyMeta(PinColumnMeta.left()));
To pin a column to the right, use right :
tableConfig.addColumn(ColumnConfig.create("name", "Label").applyMeta(PinColumnMeta.right()));
This plugin provides the ability to configure the pinning behavior, including enabling/disabling pinning icons and menus, and customizing the icon visuals.
Customization: You can customize the pin icons using Icon objects. By default, pin icons are taken from the Icons class.
Pin Menu: This plugin provides an optional pinning menu that can be shown when a column's header is right-clicked. The menu allows users to easily pin/unpin columns.
This plugin listens to various DataTable events such as column resizing and updates to ensure that pinned columns stay in the correct position.
Notes: - Pinning a column to the left will also pin all columns to the left of that column. - Pinning a column to the right will also pin all columns to the right of that column. - Pinned columns do not scroll horizontally with the table.
T
The type of data in the DataTable.
See also :
public void PinColumnsConfig()
public void PinColumnsConfig(boolean showPinIcon, boolean showPinMenu)
showPinIcon
True to show pin icons, false otherwise.
showPinMenu
True to show the pin menu, false otherwise.
public static PinColumnsConfig of()
A new PinColumnsConfig instance.
public static PinColumnsConfig of(boolean showPinIcon, boolean showPinMenu)
showPinIcon
True to show pin icons, false otherwise.
showPinMenu
True to show the pin menu, false otherwise.
A new PinColumnsConfig instance with the specified settings.
public boolean isShowPinIcon()
True if pin icons are shown, false otherwise.
public PinColumnsConfig setShowPinIcon(boolean showPinIcon)
showPinIcon
True to show pin icons, false otherwise.
The PinColumnsConfig instance for method chaining.
public boolean isShowPinMenu()
True if the pin menu is shown, false otherwise.
public PinColumnsConfig setShowPinMenu(boolean showPinMenu)
showPinMenu
True to show the pin menu, false otherwise.
The PinColumnsConfig instance for method chaining.
public String getPinLeftText()
The text label for "Pin Left."
public void setPinLeftText(String pinLeftText)
pinLeftText
The text label for "Pin Left."
public String getPinRightText()
The text label for "Pin Right."
public void setPinRightText(String pinRightText)
pinRightText
The text label for "Pin Right."
public String getUnpinText()
The text label for "Unpin."
public void setUnpinText(String unpinText)
unpinText
The text label for "Unpin."
public Icon<?> getPinLeftIcon()
The pin left icon.
public PinColumnsConfig setPinLeftIcon(Icon<?> pinLeftIcon)
pinLeftIcon
The pin left icon.
The PinColumnsConfig instance for method chaining.
public Icon<?> getPinRightIcon()
The pin right icon.
public PinColumnsConfig setPinRightIcon(Icon<?> pinRightIcon)
pinRightIcon
The pin right icon.
The PinColumnsConfig instance for method chaining.