- 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
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.
-
Field Summary
FieldsFields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON -
Method Summary
Methods inherited from interface javax.swing.Action
accept, addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledMethods inherited from interface java.awt.event.ActionListener
actionPerformedMethods inherited from interface org.autogui.swing.util.PopupCategorized.CategorizedMenuItem
getKeyStroke, getSubCategoryMethods inherited from interface org.autogui.swing.util.PopupCategorized.CategorizedMenuItemAction
getMenuItem, getMenuItemWithAction, remapMethods inherited from interface org.autogui.swing.util.PopupCategorized.CategorizedMenuItemComponent
getIcon, getName
-
Field Details
-
MENU_CATEGORY_ROW
- See Also:
-
MENU_CATEGORY_CELL
- See Also:
-
-
Method Details
-
actionPerformedOnTableCell
-
getCategory
- Specified by:
getCategoryin interfacePopupCategorized.CategorizedMenuItem- Specified by:
getCategoryin interfacePopupCategorized.CategorizedMenuItemComponent- Returns:
- a category name, typically PopupExtension.MENU_CATEGORY_... or PopupCategorized.CATEGORY_...
-