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

public class RefreshToolItemProperties<V> extends ToolItemProperties<RefreshToolItemProperties<V>>
A builder class for configuring properties of a refresh tool item in table toolbars. Provides methods to set refresh actions, icons, text, and tooltips for refreshing table content. This class is designed to be used by end users to configure refresh functionality in table toolbars within their applications.
Author:
Ionov Ivan
  • Constructor Details

    • RefreshToolItemProperties

      public RefreshToolItemProperties()
      Constructs a new RefreshToolItemProperties instance with default values. Sets default refresh icon, text, and tooltip from platform resources.
  • Method Details

    • isExistRefreshToolItem

      public boolean isExistRefreshToolItem()
      Checks if a refresh action is configured for this tool item.
      Returns:
      true if either a default or custom refresh action is configured, false otherwise
    • isDefaultRefreshAction

      public boolean isDefaultRefreshAction()
      Returns whether the default refresh action is enabled.
      Returns:
      true if the default refresh action is enabled, false otherwise
    • defaultRefreshAction

      public RefreshToolItemProperties<V> defaultRefreshAction()
      Enables the default refresh action for the table. This method is mutually exclusive with customRefreshAction().
      Returns:
      this RefreshToolItemProperties instance for method chaining
    • getCustomRefreshAction

      public Consumer<Table<V>> getCustomRefreshAction()
      Returns the custom refresh action consumer.
      Returns:
      a Consumer that refreshes the table content
    • customRefreshAction

      public RefreshToolItemProperties<V> customRefreshAction(Consumer<Table<V>> customRefreshAction)
      Sets a custom refresh action using a Consumer that includes table context. This method is mutually exclusive with defaultRefreshAction().
      Parameters:
      customRefreshAction - a Consumer that refreshes the table content
      Returns:
      this RefreshToolItemProperties instance for method chaining