Class SelectElementsFromTableToolItemProperties<V>
java.lang.Object
com.amalgamasimulation.desktop.ui.editor.sections.descriptors.toolitems.ToolItemProperties<SelectElementsFromTableToolItemProperties<V>>
com.amalgamasimulation.desktop.ui.editor.sections.descriptors.toolitems.SelectElementsFromTableToolItemProperties<V>
- Type Parameters:
V- the type of elements that can be selected from the secondary table
public class SelectElementsFromTableToolItemProperties<V>
extends ToolItemProperties<SelectElementsFromTableToolItemProperties<V>>
A builder class for configuring properties of a select elements from table tool item in table toolbars.
Provides methods to set element sources, column configurations, dialog titles, icons, text, and tooltips
for selecting elements from dialog table and adding them to the table.
This class is designed to be used by end users to configure table-to-table selection functionality
in table toolbars within their applications.
- Author:
- Ionov Ivan
-
Field Summary
Fields inherited from class com.amalgamasimulation.desktop.ui.editor.sections.descriptors.toolitems.ToolItemProperties
icon, style, text, tooltip -
Method Summary
Modifier and TypeMethodDescriptionallElements(Supplier<List<? extends V>> allElements) Sets a dynamic supplier of all available elements for selection.allElements(List<? extends V> allElements) Sets a static list of all available elements for selection.Sets the column configuration for the selection dialog table.Returns the supplier of all available elements for selection.Returns the column configuration consumer for the selection dialog table.Returns the title for the selection dialog.booleanChecks if the required configuration for table selection is complete.static <V> SelectElementsFromTableToolItemProperties<V> Creates a new SelectElementsFromTableToolItemProperties instance.Sets the title for the selection dialog.Methods inherited from class com.amalgamasimulation.desktop.ui.editor.sections.descriptors.toolitems.ToolItemProperties
getIcon, getStyle, getText, getThis, getTooltip, icon, isEnable, isShowTextAndIcon, setEnable, setStyle, showTextAndIcon, text, tooltip
-
Method Details
-
newInstance
Creates a new SelectElementsFromTableToolItemProperties instance.- Type Parameters:
V- the type of elements to select- Returns:
- a new SelectElementsFromTableToolItemProperties instance
-
isExistSelectElementFromTableToolItem
public boolean isExistSelectElementFromTableToolItem()Checks if the required configuration for table selection is complete.- Returns:
- true if both column configuration and element source are configured, false otherwise
-
getAllElements
Returns the supplier of all available elements for selection.- Returns:
- a Supplier providing a List of all selectable elements
-
allElements
Sets a static list of all available elements for selection.- Parameters:
allElements- a List of all selectable elements- Returns:
- this SelectElementsFromTableToolItemProperties instance for method chaining
-
allElements
public SelectElementsFromTableToolItemProperties<V> allElements(Supplier<List<? extends V>> allElements) Sets a dynamic supplier of all available elements for selection.- Parameters:
allElements- a Supplier providing a List of all selectable elements- Returns:
- this SelectElementsFromTableToolItemProperties instance for method chaining
-
getColumnsForDialog
Returns the column configuration consumer for the selection dialog table.- Returns:
- a Consumer that configures columns for the selection dialog table
-
columns
Sets the column configuration for the selection dialog table.- Parameters:
columnsForDialog- a Consumer that configures columns for the selection dialog table- Returns:
- this SelectElementsFromTableToolItemProperties instance for method chaining
-
getTitleDialog
Returns the title for the selection dialog.- Returns:
- the dialog title, or null if not set
-
title
Sets the title for the selection dialog.- Parameters:
titleDialog- the title to display in the selection dialog- Returns:
- this SelectElementsFromTableToolItemProperties instance for method chaining
-