Class MoveUpElementToolItemProperties<V>

java.lang.Object
com.amalgamasimulation.desktop.ui.editor.sections.descriptors.toolitems.ToolItemProperties<MoveUpElementToolItemProperties<V>>
com.amalgamasimulation.desktop.ui.editor.sections.descriptors.toolitems.MoveUpElementToolItemProperties<V>
Type Parameters:
V - the type of elements that can be moved up

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

    • MoveUpElementToolItemProperties

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

    • isExistMoveUpElementToolItem

      public boolean isExistMoveUpElementToolItem()
      Checks if a move up element action is configured for this tool item.
      Returns:
      true if either a default or custom move up action is configured, false otherwise
    • isDefaultMoveUpAction

      public boolean isDefaultMoveUpAction()
      Returns whether the default move up action is enabled.
      Returns:
      true if the default move up action is enabled, false otherwise
    • defaultMoveUpAction

      public MoveUpElementToolItemProperties<V> defaultMoveUpAction()
      Enables the default move up action for elements. This method is mutually exclusive with customMoveUpElementAction().
      Returns:
      this MoveUpElementToolItemProperties instance for method chaining
    • getCustomMoveUpElementAction

      public BiConsumer<Table<V>,V> getCustomMoveUpElementAction()
      Returns the custom move up element action consumer.
      Returns:
      a BiConsumer that moves an element up with table context
    • customMoveUpElementAction

      public MoveUpElementToolItemProperties<V> customMoveUpElementAction(BiConsumer<Table<V>,V> customMoveUpElementAction)
      Sets a custom move up element action using a BiConsumer that includes table context. This method is mutually exclusive with defaultMoveUpAction().
      Parameters:
      customMoveUpElementAction - a BiConsumer that moves an element up with table context
      Returns:
      this MoveUpElementToolItemProperties instance for method chaining