Class MoveDownElementToolItemProperties<V>
java.lang.Object
com.amalgamasimulation.desktop.ui.editor.sections.descriptors.toolitems.ToolItemProperties<MoveDownElementToolItemProperties<V>>
com.amalgamasimulation.desktop.ui.editor.sections.descriptors.toolitems.MoveDownElementToolItemProperties<V>
- Type Parameters:
V- the type of elements that can be moved down
public class MoveDownElementToolItemProperties<V>
extends ToolItemProperties<MoveDownElementToolItemProperties<V>>
A builder class for configuring properties of a move down element tool item in table toolbars.
Provides methods to set move down actions, icons, text, and tooltips for moving elements downward in tables.
This class is designed to be used by end users to configure move down 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 -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new MoveDownElementToolItemProperties instance with default values. -
Method Summary
Modifier and TypeMethodDescriptioncustomMoveDownElementAction(BiConsumer<Table<V>, V> customMoveDownElementAction) Sets a custom move down element action using a BiConsumer that includes table context.Enables the default move down action for elements.BiConsumer<Table<V>, V> Returns the custom move down element action consumer.booleanReturns whether the default move down action is enabled.booleanChecks if a move down element action is configured for this tool item.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
-
Constructor Details
-
MoveDownElementToolItemProperties
public MoveDownElementToolItemProperties()Constructs a new MoveDownElementToolItemProperties instance with default values. Sets default down arrow icon, text, and tooltip from platform resources.
-
-
Method Details
-
isExistMoveDownElementToolItem
public boolean isExistMoveDownElementToolItem()Checks if a move down element action is configured for this tool item.- Returns:
- true if either a default or custom move down action is configured, false otherwise
-
isDefaultMoveDownAction
public boolean isDefaultMoveDownAction()Returns whether the default move down action is enabled.- Returns:
- true if the default move down action is enabled, false otherwise
-
defaultMoveDownAction
Enables the default move down action for elements. This method is mutually exclusive with customMoveDownElementAction().- Returns:
- this MoveDownElementToolItemProperties instance for method chaining
-
getCustomMoveDownElementAction
Returns the custom move down element action consumer.- Returns:
- a BiConsumer that moves an element down with table context
-
customMoveDownElementAction
public MoveDownElementToolItemProperties<V> customMoveDownElementAction(BiConsumer<Table<V>, V> customMoveDownElementAction) Sets a custom move down element action using a BiConsumer that includes table context. This method is mutually exclusive with defaultMoveDownAction().- Parameters:
customMoveDownElementAction- a BiConsumer that moves an element down with table context- Returns:
- this MoveDownElementToolItemProperties instance for method chaining
-