Class SpreadsheetDefaultActionHandler
- java.lang.Object
-
- com.vaadin.flow.component.spreadsheet.action.SpreadsheetDefaultActionHandler
-
- All Implemented Interfaces:
Action.Handler,Serializable
public class SpreadsheetDefaultActionHandler extends Object implements Action.Handler
Default action handler for Spreadsheet actions. By default this handler adds all available actions to the Spreadsheet.- Since:
- 1.0
- Author:
- Vaadin Ltd.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SpreadsheetDefaultActionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSpreadsheetAction(SpreadsheetAction action)Adds the given SpreadsheetAction to this handler.Action[]getActions(Object target, Object sender)Gets the list of actions applicable to this handler.voidhandleAction(Action action, Object sender, Object target)Handles an action for the given target.booleanremoveSpreadsheetAction(SpreadsheetAction action)Removes the given SpreadsheetAction from this handler.
-
-
-
Method Detail
-
addSpreadsheetAction
public void addSpreadsheetAction(SpreadsheetAction action)
Adds the given SpreadsheetAction to this handler.- Parameters:
action- SpreadsheetAction to add
-
removeSpreadsheetAction
public boolean removeSpreadsheetAction(SpreadsheetAction action)
Removes the given SpreadsheetAction from this handler.- Parameters:
action- SpreadsheetAction to remove- Returns:
- true if the action was present in this handler, false otherwise
-
getActions
public Action[] getActions(Object target, Object sender)
Description copied from interface:Action.HandlerGets the list of actions applicable to this handler.- Specified by:
getActionsin interfaceAction.Handler- Parameters:
target- the target handler to list actions for. For item containers this is the item id.sender- the party that would be sending the actions. Most of this is the action container.- Returns:
- the list of Action
-
handleAction
public void handleAction(Action action, Object sender, Object target)
Description copied from interface:Action.HandlerHandles an action for the given target. The handler method may just discard the action if it's not suitable.- Specified by:
handleActionin interfaceAction.Handler- Parameters:
action- the action to be handled.sender- the sender of the action. This is most often the action container.target- the target of the action. For item containers this is the item id.
-
-