Module org.autogui

Interface TableTargetCellAction

All Superinterfaces:
Action, ActionListener, EventListener, PopupCategorized.CategorizedMenuItem, PopupCategorized.CategorizedMenuItemAction, PopupCategorized.CategorizedMenuItemComponent
All Known Implementing Classes:
GuiSwingJsonTransfer.JsonCopyCellsAction, GuiSwingJsonTransfer.JsonCopyRowsAction, GuiSwingJsonTransfer.JsonLoadCellsAction, GuiSwingJsonTransfer.JsonPasteCellsAction, GuiSwingJsonTransfer.JsonSaveCellsAction, GuiSwingJsonTransfer.JsonSaveRowsAction, ToStringCopyCell.ToStringCopyForCellsAction, ToStringCopyCell.ToStringLoadForCellsAction, ToStringCopyCell.ToStringPasteForCellsAction, ToStringCopyCell.ToStringSaveForCellsAction

public interface TableTargetCellAction extends PopupCategorized.CategorizedMenuItemAction
action for processing selected cell values or selected rows with all cells in those rows processed by ObjectTableModel.TableTargetCellExecutionAction.

a collection table whose model is ObjectTableModel builds menu items including actions of the type. For selected cells values, it obtains selected columns (a list of ObjectTableColumns) and calls ObjectTableModel.getBuilderForRowsOrCells(JTable, List, boolean) with the columns and row=false. For selected rows, it obtains all columns and calls the same method with the columns and row=true.

In the building method, it calls ObjectTableColumn.getCompositesForCells() or ObjectTableColumn.getCompositesForRows(), and obtains a list of ObjectTableColumn.TableMenuComposite. The list means a list of all supported menu-items for each column. Each ObjectTableColumn.TableMenuComposite.getShared() return a shared "key" for those menus, indicating the menu identity, as ObjectTableColumn.TableMenuCompositeShared.

For each ObjectTableColumn.TableMenuCompositeShared with columns returned the same shared key, it calls ObjectTableColumn.TableMenuCompositeShared.composite(JTable, List, boolean) and obtains ObjectTableModel.PopupMenuBuilderForRowsOrCells for building an action summarizing those columns as TableTargetCellAction.

The ObjectTableModel.getBuilderForRowsOrCells(JTable, List, boolean) calls build method for each returned builder with ObjectTableModel.CollectionRowsAndCellsActionBuilder as the menu appender. It converts TableTargetCellAction to ObjectTableModel.TableTargetCellExecutionAction and add it to the menu.

Also, the returned builder will receive custom sender which becomes a subtype of PopupExtension for table processing, and the action can take custom table info including GuiMappingContext: for instance, GuiSwingCollectionTable provides PopupExtensionCollection.