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
  • Method Details

    • newInstance

      public static <V> SelectElementsFromTableToolItemProperties<V> 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

      public Supplier<List<? extends V>> getAllElements()
      Returns the supplier of all available elements for selection.
      Returns:
      a Supplier providing a List of all selectable elements
    • allElements

      public SelectElementsFromTableToolItemProperties<V> allElements(List<? extends V> 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

      public Consumer<Table<V>> getColumnsForDialog()
      Returns the column configuration consumer for the selection dialog table.
      Returns:
      a Consumer that configures columns for the selection dialog table
    • columns

      public SelectElementsFromTableToolItemProperties<V> columns(Consumer<Table<V>> columnsForDialog)
      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

      public String getTitleDialog()
      Returns the title for the selection dialog.
      Returns:
      the dialog title, or null if not set
    • title

      public SelectElementsFromTableToolItemProperties<V> title(String titleDialog)
      Sets the title for the selection dialog.
      Parameters:
      titleDialog - the title to display in the selection dialog
      Returns:
      this SelectElementsFromTableToolItemProperties instance for method chaining