java.lang.Object
javax.swing.AbstractAction
org.autogui.swing.GuiSwingTaskRunner.ContextAction
org.autogui.swing.GuiSwingJsonTransfer.JsonPasteCellsAction
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
,TableTargetCellAction
,PopupCategorized.CategorizedMenuItem
,PopupCategorized.CategorizedMenuItemAction
,PopupCategorized.CategorizedMenuItemComponent
- Direct Known Subclasses:
GuiSwingJsonTransfer.JsonLoadCellsAction
- Enclosing class:
GuiSwingJsonTransfer
public static class GuiSwingJsonTransfer.JsonPasteCellsAction
extends GuiSwingTaskRunner.ContextAction
implements TableTargetCellAction
an action for pasting JSON values of target table-rows or cells
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
Fields 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
ConstructorsConstructorDescriptionJsonPasteCellsAction
(GuiMappingContext contextOptional, List<GuiSwingJsonTransfer.TableMenuCompositeJsonPaste> activeComposite, boolean allCells) -
Method Summary
Modifier and TypeMethodDescriptionvoid
it separates entries to 2 types: free-rows and specified-rowsgetCellsForRow
(int rowIndex, Object rowJson) getJson()
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
-
activeComposite
-
rows
protected boolean rows
-
-
Constructor Details
-
JsonPasteCellsAction
public JsonPasteCellsAction(GuiMappingContext contextOptional, List<GuiSwingJsonTransfer.TableMenuCompositeJsonPaste> activeComposite, boolean allCells)
-
-
Method Details
-
getJson
-
actionPerformedOnTableCell
public void actionPerformedOnTableCell(ActionEvent e, GuiReprCollectionTable.TableTargetCell target) it separates entries to 2 types: free-rows and specified-rows[{ "#":0, "value":"a" }, { "#":1, "value":"b" }, { "#":3, "value":"c"} ] // specifiedRows [{ "value":"d" }, { "value":"e"}, {"value":"f"} ] // freeRows selected cells: //suppose the user selects row0 and row2-6 row0 <- specifiedRows[0] //omit row1: specifiedRows[1] is discarded row2 <- freeRows[0] row3 <- specifiedRows[2] row4 <- freeRows[1] row5 <- freeRows[2] row6 <- freeRows[0] //loop ...
- Specified by:
actionPerformedOnTableCell
in interfaceTableTargetCellAction
- Parameters:
e
- an action eventtarget
- the selection targert
-
getCellsForRow
-
find
-
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_...
-