Class TableCustomToolItemProperties<V>

java.lang.Object
com.amalgamasimulation.desktop.ui.editor.sections.descriptors.toolitems.ToolItemProperties<TableCustomToolItemProperties<V>>
com.amalgamasimulation.desktop.ui.editor.sections.descriptors.toolitems.TableCustomToolItemProperties<V>
Type Parameters:
V - the type of elements managed by the table

public class TableCustomToolItemProperties<V> extends ToolItemProperties<TableCustomToolItemProperties<V>>
A builder class for configuring properties of a custom tool item in table toolbars. Provides methods to set custom handlers, icons, text, and tooltips for implementing application-specific functionality in table toolbars. This class is designed to be used by end users to create custom functionality in table toolbars within their applications.
Author:
Ionov Ivan
  • Method Details

    • newInstance

      public static <V> TableCustomToolItemProperties<V> newInstance()
      Creates a new TableCustomToolItemProperties instance.
      Type Parameters:
      V - the type of elements in the table
      Returns:
      a new TableCustomToolItemProperties instance
    • getHandler

      public BiConsumer<Table<V>,List<V>> getHandler()
      Returns the custom handler function for this tool item.
      Returns:
      a BiConsumer that handles the custom action with table context and selected elements
    • handler

      public TableCustomToolItemProperties<V> handler(BiConsumer<Table<V>,List<V>> handler)
      Sets the custom handler function for this tool item. The handler receives the table instance and currently selected elements for processing.
      Parameters:
      handler - a BiConsumer that implements the custom functionality
      Returns:
      this TableCustomToolItemProperties instance for method chaining