public class ContextMenuManager extends Object implements Serializable
| Constructor and Description |
|---|
ContextMenuManager(Spreadsheet spreadsheet)
Constructs a new ContextMenuManager and ties it to the given Spreadsheet.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActionHandler(com.vaadin.event.Action.Handler actionHandler)
Adds the given context menu action handler to the target spreadsheet.
|
protected ArrayList<SpreadsheetActionDetails> |
createActionsListForColumn(int columnIndex)
Gets a list of available actions for the column at the given index.
|
protected ArrayList<SpreadsheetActionDetails> |
createActionsListForRow(int rowIndex)
Gets a list of available actions for the row at the given index.
|
protected ArrayList<SpreadsheetActionDetails> |
createActionsListForSelection()
Gets a list of available actions for the current selection.
|
boolean |
hasActionHandlers()
Determines if there are currently any action handlers attached to the
target Spreadsheet.
|
void |
onActionOnColumnHeader(String actionKey)
This method is called when an action has been selected on top of a column
header.
|
void |
onActionOnCurrentSelection(String actionKey)
This method is called when an action has been selected on top of the
currently selected cell(s).
|
void |
onActionOnRowHeader(String actionKey)
This method is called when an action has been selected on top of a row
header.
|
void |
onColumnHeaderContextMenuOpen(int columnIndex)
This method is called when a context menu event has happened on top of a
column header.
|
void |
onContextMenuOpenOnSelection(int row,
int column)
This method is called when a context menu event has happened on any cell
of the target Spreadsheet.
|
void |
onRowHeaderContextMenuOpen(int rowIndex)
This method is called when a context menu event has happened on top of a
row header.
|
void |
removeActionHandler(com.vaadin.event.Action.Handler actionHandler)
Removes the given context menu action handler from the target
spreadsheet.
|
public ContextMenuManager(Spreadsheet spreadsheet)
spreadsheet - Target Spreadsheetpublic void addActionHandler(com.vaadin.event.Action.Handler actionHandler)
actionHandler - Handler to addpublic void removeActionHandler(com.vaadin.event.Action.Handler actionHandler)
actionHandler - Handler to removepublic boolean hasActionHandlers()
public void onContextMenuOpenOnSelection(int row,
int column)
row - Row index at context menu target, 1-basedcolumn - Column index at context menu target, 1-basedpublic void onRowHeaderContextMenuOpen(int rowIndex)
rowIndex - Index of the target row, 1-basedpublic void onColumnHeaderContextMenuOpen(int columnIndex)
columnIndex - Index of the target column, 1-basedpublic void onActionOnCurrentSelection(String actionKey)
actionKey - Key of the selected actionpublic void onActionOnRowHeader(String actionKey)
actionKey - Key of the selected actionpublic void onActionOnColumnHeader(String actionKey)
actionKey - Key of the selected actionprotected ArrayList<SpreadsheetActionDetails> createActionsListForSelection()
protected ArrayList<SpreadsheetActionDetails> createActionsListForColumn(int columnIndex)
columnIndex - Index of the target column, 1-basedprotected ArrayList<SpreadsheetActionDetails> createActionsListForRow(int rowIndex)
rowIndex - Index of the target row, 1-basedCopyright © 2013–2026 Vaadin Ltd. All rights reserved.