Class AbstractMoveRowAction
- 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
-
- All Implemented Interfaces:
Action
- Direct Known Subclasses:
MoveRowDownAction
,MoveRowUpAction
public abstract class AbstractMoveRowAction extends TableRendererAction
Abstract base type for actions which move rows inside a table.- Since:
- 1.18
- Author:
- Lucas Koehler
-
-
Constructor Summary
Constructors Constructor Description AbstractMoveRowAction(TableRendererViewerActionContext actionContext)
The constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canExecute()
Verify that this action can be executed given the current action context.protected java.util.List<?>
getContainments()
Returns the list containing all objects of the table viewer.static void
sortSelectionBasedOnIndex(java.util.List<?> selection, java.util.List<?> list)
Sorting helper for a table viewer selection.-
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
-
-
-
-
Constructor Detail
-
AbstractMoveRowAction
public AbstractMoveRowAction(TableRendererViewerActionContext actionContext)
The constructor.- Parameters:
actionContext
- theViewerActionContext
-
-
Method Detail
-
sortSelectionBasedOnIndex
public static void sortSelectionBasedOnIndex(java.util.List<?> selection, java.util.List<?> list)
Sorting helper for a table viewer selection.- Parameters:
selection
- the selection to sortlist
- the index list
-
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
-
getContainments
protected java.util.List<?> getContainments()
Returns the list containing all objects of the table viewer.- Returns:
- the containments list
-
-