public class RowReorderDragMode extends Object implements IDragMode
IDragMode
invoked for 'left click + drag' on the row header.
It does the following when invoked:
Modifier and Type | Field and Description |
---|---|
protected org.eclipse.swt.events.MouseEvent |
currentEvent |
protected int |
dragFromGridRowPosition |
protected org.eclipse.swt.events.MouseEvent |
initialEvent |
protected NatTable |
natTable |
protected org.eclipse.nebula.widgets.nattable.reorder.action.RowReorderDragMode.RowReorderOverlayPainter |
targetOverlayPainter |
Constructor and Description |
---|
RowReorderDragMode() |
Modifier and Type | Method and Description |
---|---|
protected void |
fireMoveEndCommand(NatTable natTable,
int dragToGridRowPosition)
Executes the command to indicate row reorder ending.
|
protected void |
fireMoveStartCommand(NatTable natTable,
int dragFromGridRowPosition)
Executes the command to indicate row reorder starting.
|
protected boolean |
isValidTargetRowPosition(ILayer natLayer,
int dragFromGridRowPosition,
int dragToGridRowPosition) |
void |
mouseDown(NatTable natTable,
org.eclipse.swt.events.MouseEvent event) |
void |
mouseMove(NatTable natTable,
org.eclipse.swt.events.MouseEvent event) |
void |
mouseUp(NatTable natTable,
org.eclipse.swt.events.MouseEvent event) |
protected NatTable natTable
protected org.eclipse.swt.events.MouseEvent initialEvent
protected org.eclipse.swt.events.MouseEvent currentEvent
protected int dragFromGridRowPosition
protected org.eclipse.nebula.widgets.nattable.reorder.action.RowReorderDragMode.RowReorderOverlayPainter targetOverlayPainter
public void mouseDown(NatTable natTable, org.eclipse.swt.events.MouseEvent event)
public void mouseMove(NatTable natTable, org.eclipse.swt.events.MouseEvent event)
public void mouseUp(NatTable natTable, org.eclipse.swt.events.MouseEvent event)
protected boolean isValidTargetRowPosition(ILayer natLayer, int dragFromGridRowPosition, int dragToGridRowPosition)
natLayer
- The layer the positions are related todragFromGridRowPosition
- The row position of the row that is draggeddragToGridRowPosition
- The row position where the row is droppedtrue
if the drop position is valid, false
if notprotected void fireMoveStartCommand(NatTable natTable, int dragFromGridRowPosition)
natTable
- The NatTable instance on which the command should be executeddragFromGridRowPosition
- The row position of the row that is draggedprotected void fireMoveEndCommand(NatTable natTable, int dragToGridRowPosition)
natTable
- The NatTable instance on which the command should be executeddragToGridRowPosition
- The position of the row to which the dragged row should be droppedCopyright © 2013. All Rights Reserved.