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 booleanFields inherited from class org.autogui.swing.GuiSwingTaskRunner.ContextAction
taskRunnerFields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields 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_ICONFields 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 TypeMethodDescriptionvoidit 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, getContextMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
getKeyStrokeMethods 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
-
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:
actionPerformedOnTableCellin interfaceTableTargetCellAction- Parameters:
e- an action eventtarget- the selection targert
-
getCellsForRow
-
find
-
getCategory
- Specified by:
getCategoryin interfacePopupCategorized.CategorizedMenuItem- Specified by:
getCategoryin interfacePopupCategorized.CategorizedMenuItemComponent- Specified by:
getCategoryin interfaceTableTargetCellAction- Returns:
- a category name, typically PopupExtension.MENU_CATEGORY_... or PopupCategorized.CATEGORY_...
-
getSubCategory
- Specified by:
getSubCategoryin interfacePopupCategorized.CategorizedMenuItem- Returns:
- a sub-category name, typically PopupExtension.MENU_SUB_CATEGORY_... PopupCategorized.SUB_CATEGORY_...
-