java.lang.Object
javax.swing.AbstractAction
org.autogui.swing.GuiSwingTaskRunner.ContextAction
org.autogui.swing.GuiSwingJsonTransfer.JsonCopyCellsAction
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
,TableTargetCellAction
,PopupCategorized.CategorizedMenuItem
,PopupCategorized.CategorizedMenuItemAction
,PopupCategorized.CategorizedMenuItemComponent
- Direct Known Subclasses:
GuiSwingJsonTransfer.JsonSaveCellsAction
- Enclosing class:
GuiSwingJsonTransfer
public static class GuiSwingJsonTransfer.JsonCopyCellsAction
extends GuiSwingTaskRunner.ContextAction
implements TableTargetCellAction
an action for copying JSON values of target table-cells:
each JSON values are converted from each table-column contained as a list of
GuiSwingJsonTransfer.TableMenuCompositeJsonCopy
and selected based on the column-index- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from class org.autogui.swing.GuiSwingTaskRunner.ContextAction
taskRunner
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields 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
Fields inherited from interface org.autogui.swing.table.TableTargetCellAction
MENU_CATEGORY_CELL, MENU_CATEGORY_ROW
-
Constructor Summary
ConstructorsConstructorDescriptionJsonCopyCellsAction
(GuiMappingContext contextOptional, List<GuiSwingJsonTransfer.TableMenuCompositeJsonCopy> activatedColumns) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Methods inherited from class org.autogui.swing.GuiSwingTaskRunner.ContextAction
actionPerformed, executeContextTask, executeContextTask, getContext
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.Action
accept, addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
Methods inherited from interface org.autogui.swing.util.PopupCategorized.CategorizedMenuItem
getKeyStroke
Methods inherited from interface org.autogui.swing.util.PopupCategorized.CategorizedMenuItemAction
getMenuItem, getMenuItemWithAction, remap
Methods inherited from interface org.autogui.swing.util.PopupCategorized.CategorizedMenuItemComponent
getIcon, getName
-
Field Details
-
activatedColumns
-
-
Constructor Details
-
JsonCopyCellsAction
public JsonCopyCellsAction(GuiMappingContext contextOptional, List<GuiSwingJsonTransfer.TableMenuCompositeJsonCopy> activatedColumns)
-
-
Method Details
-
actionPerformedOnTableCell
public void actionPerformedOnTableCell(ActionEvent e, GuiReprCollectionTable.TableTargetCell target) - Specified by:
actionPerformedOnTableCell
in interfaceTableTargetCellAction
-
getJson
- Parameters:
cells
- the selected cells : the method suppose the cells are sorted by row-index- Returns:
- a JSON list
-
getMenuCompositeForCell
public GuiSwingJsonTransfer.TableMenuCompositeJsonCopy getMenuCompositeForCell(GuiReprCollectionTable.CellValue cell) -
getCategory
- Specified by:
getCategory
in interfacePopupCategorized.CategorizedMenuItem
- Specified by:
getCategory
in interfacePopupCategorized.CategorizedMenuItemComponent
- Specified by:
getCategory
in interfaceTableTargetCellAction
- Returns:
- a category name, typically PopupExtension.MENU_CATEGORY_... or PopupCategorized.CATEGORY_...
-
getSubCategory
- Specified by:
getSubCategory
in interfacePopupCategorized.CategorizedMenuItem
- Returns:
- a sub-category name, typically PopupExtension.MENU_SUB_CATEGORY_... PopupCategorized.SUB_CATEGORY_...
-