Class HierarchicalTreeColumnReorderDragMode
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.viewport.action.AutoScrollDragMode
-
- org.eclipse.nebula.widgets.nattable.reorder.action.ColumnReorderDragMode
-
- org.eclipse.nebula.widgets.nattable.hierarchical.action.HierarchicalTreeColumnReorderDragMode
-
- All Implemented Interfaces:
IDragMode
public class HierarchicalTreeColumnReorderDragMode extends ColumnReorderDragMode
Specialization of theColumnReorderDragMode
to be used with aHierarchicalTreeLayer
to respect hierarchical levels.- Since:
- 1.6
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.nebula.widgets.nattable.reorder.action.ColumnReorderDragMode
ColumnReorderDragMode.ColumnReorderOverlayPainter
-
Nested classes/interfaces inherited from class org.eclipse.nebula.widgets.nattable.viewport.action.AutoScrollDragMode
AutoScrollDragMode.AutoScrollRunnable
-
-
Field Summary
Fields Modifier and Type Field Description protected ColumnGroupModel
columnGroupModel
-
Fields inherited from class org.eclipse.nebula.widgets.nattable.reorder.action.ColumnReorderDragMode
currentEvent, dragFromGridColumnPosition, initialEvent, natTable, targetOverlayPainter
-
Fields inherited from class org.eclipse.nebula.widgets.nattable.viewport.action.AutoScrollDragMode
horizontalBorderOffset, verticalBorderOffset
-
-
Constructor Summary
Constructors Constructor Description HierarchicalTreeColumnReorderDragMode(HierarchicalTreeLayer treeLayer)
HierarchicalTreeColumnReorderDragMode(HierarchicalTreeLayer treeLayer, ColumnGroupModel model)
Creates a drag mode that validates the drag operation based on the given tree level structure and the given column group structure.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
fireMoveEndCommand(NatTable natTable, int dragToGridColumnPosition)
protected boolean
isValidTargetColumnPosition(ILayer natLayer, int dragFromGridColumnPosition, int dragToGridColumnPosition)
void
mouseUp(NatTable natTable, org.eclipse.swt.events.MouseEvent event)
-
Methods inherited from class org.eclipse.nebula.widgets.nattable.reorder.action.ColumnReorderDragMode
fireMoveStartCommand, getColumnCell, getDragFromGridColumnPosition, getDragToGridColumnPosition, getMoveDirection, mouseDown, mouseMove
-
Methods inherited from class org.eclipse.nebula.widgets.nattable.viewport.action.AutoScrollDragMode
performDragAction
-
-
-
-
Field Detail
-
columnGroupModel
protected ColumnGroupModel columnGroupModel
-
-
Constructor Detail
-
HierarchicalTreeColumnReorderDragMode
public HierarchicalTreeColumnReorderDragMode(HierarchicalTreeLayer treeLayer)
- Parameters:
treeLayer
- TheHierarchicalTreeLayer
needed to determine the level column boundaries.
-
HierarchicalTreeColumnReorderDragMode
public HierarchicalTreeColumnReorderDragMode(HierarchicalTreeLayer treeLayer, ColumnGroupModel model)
Creates a drag mode that validates the drag operation based on the given tree level structure and the given column group structure.- Parameters:
treeLayer
- TheHierarchicalTreeLayer
needed to determine the level column boundaries.model
- TheColumnGroupModel
to perform column group based drag validation. Can benull
.
-
-
Method Detail
-
mouseUp
public void mouseUp(NatTable natTable, org.eclipse.swt.events.MouseEvent event)
- Specified by:
mouseUp
in interfaceIDragMode
- Overrides:
mouseUp
in classColumnReorderDragMode
-
fireMoveEndCommand
protected void fireMoveEndCommand(NatTable natTable, int dragToGridColumnPosition)
- Overrides:
fireMoveEndCommand
in classColumnReorderDragMode
-
isValidTargetColumnPosition
protected boolean isValidTargetColumnPosition(ILayer natLayer, int dragFromGridColumnPosition, int dragToGridColumnPosition)
- Overrides:
isValidTargetColumnPosition
in classColumnReorderDragMode
-
-