Class DuplicateRowAction
- java.lang.Object
-
- org.eclipse.emfforms.spi.swt.table.action.AbstractTableAction<org.eclipse.jface.viewers.AbstractTableViewer>
-
- org.eclipse.emf.ecp.view.spi.table.swt.action.TableRendererAction
-
- org.eclipse.emf.ecp.view.spi.table.swt.action.DuplicateRowAction
-
- All Implemented Interfaces:
Action
public class DuplicateRowAction extends TableRendererAction
Action to duplicate a row within a table viewer.- Since:
- 1.18
- Author:
- Mat Hansen
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ACTION_ID
The ID of this action.static java.lang.String
DEFAULT_KEYBINDING
The default key binding of this action.
-
Constructor Summary
Constructors Constructor Description DuplicateRowAction(TableRendererViewerActionContext actionContext)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canExecute()
Verify that this action can be executed given the current action context.void
execute()
Execute the action.java.lang.String
getId()
Return the ID for this action.-
Methods inherited from class org.eclipse.emf.ecp.view.spi.table.swt.action.TableRendererAction
getActionContext, getVTableControl, isTableDisabled
-
Methods inherited from class org.eclipse.emfforms.spi.swt.table.action.AbstractTableAction
getEditingDomainForContainment, getNumberOfVisibleRows, getTableViewer, isLowerBoundReached, isOrdered, isUpperBoundReached, isViewerSelectionInvalid
-
-
-
-
Field Detail
-
ACTION_ID
public static final java.lang.String ACTION_ID
The ID of this action.- See Also:
- Constant Field Values
-
DEFAULT_KEYBINDING
public static final java.lang.String DEFAULT_KEYBINDING
The default key binding of this action.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DuplicateRowAction
public DuplicateRowAction(TableRendererViewerActionContext actionContext)
The constructor.- Parameters:
actionContext
- theViewerActionContext
-
-
Method Detail
-
getId
public java.lang.String getId()
Description copied from interface:Action
Return the ID for this action. Must be unique.- Returns:
- the action ID
-
execute
public void execute()
Description copied from interface:Action
Execute the action.
-
canExecute
public boolean canExecute()
Description copied from interface:Action
Verify that this action can be executed given the current action context.- Returns:
- true in case execute() can be called, false otherwise
-
-