Class MoveRowUpAction
- 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.AbstractMoveRowAction
-
- org.eclipse.emf.ecp.view.spi.table.swt.action.MoveRowUpAction
-
- All Implemented Interfaces:
Action
public class MoveRowUpAction extends AbstractMoveRowAction
Action to move a row upwards in a table viewer (requires the containment reference to be ordered).- 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 MoveRowUpAction(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.AbstractMoveRowAction
getContainments, sortSelectionBasedOnIndex
-
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
-
MoveRowUpAction
public MoveRowUpAction(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.- Specified by:
canExecute
in interfaceAction
- Overrides:
canExecute
in classAbstractMoveRowAction
- Returns:
- true in case execute() can be called, false otherwise
-
-