java.lang.Object
javax.swing.AbstractAction
org.autogui.swing.GuiSwingTaskRunner.ContextAction
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
- Direct Known Subclasses:
GuiSwingActionDefault.ExecutionAction
,GuiSwingJsonTransfer.JsonCopyAction
,GuiSwingJsonTransfer.JsonCopyCellsAction
,GuiSwingJsonTransfer.JsonCopyRowsAction
,GuiSwingJsonTransfer.JsonPasteAction
,GuiSwingJsonTransfer.JsonPasteCellsAction
,GuiSwingView.ToStringCopyAction
,ToStringCopyCell.ToStringCopyForCellsAction
- Enclosing class:
GuiSwingTaskRunner
a base class for actions
- See Also:
-
Field Summary
FieldsFields 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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
<RetType> GuiSwingTaskRunner.ContextTaskResult
<RetType> executeContextTask
(boolean useTaskRunner, Supplier<RetType> task, Consumer<GuiSwingTaskRunner.ContextTaskResult<RetType>> afterTask) <RetType> GuiSwingTaskRunner.ContextTaskResult
<RetType> executeContextTask
(Supplier<RetType> task, Consumer<GuiSwingTaskRunner.ContextTaskResult<RetType>> afterTask) Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
taskRunner
-
-
Constructor Details
-
ContextAction
-
-
Method Details
-
getContext
-
executeContextTask
public <RetType> GuiSwingTaskRunner.ContextTaskResult<RetType> executeContextTask(Supplier<RetType> task, Consumer<GuiSwingTaskRunner.ContextTaskResult<RetType>> afterTask) -
executeContextTask
public <RetType> GuiSwingTaskRunner.ContextTaskResult<RetType> executeContextTask(boolean useTaskRunner, Supplier<RetType> task, Consumer<GuiSwingTaskRunner.ContextTaskResult<RetType>> afterTask) - Type Parameters:
RetType
- the result type- Parameters:
useTaskRunner
- controls task submissiontask
- the executed taskafterTask
- after task. nullable.- Returns:
- the result of the task
- Since:
- 1.6
-
actionPerformed
-