Class ColumnReorderDragMode

    • Field Detail

      • initialEvent

        protected org.eclipse.swt.events.MouseEvent initialEvent
      • currentEvent

        protected org.eclipse.swt.events.MouseEvent currentEvent
      • dragFromGridColumnPosition

        protected int dragFromGridColumnPosition
    • Constructor Detail

      • ColumnReorderDragMode

        public ColumnReorderDragMode()
    • Method Detail

      • mouseDown

        public void mouseDown​(NatTable natTable,
                              org.eclipse.swt.events.MouseEvent event)
      • getDragFromGridColumnPosition

        protected int getDragFromGridColumnPosition()
      • getDragToGridColumnPosition

        protected int getDragToGridColumnPosition​(CellEdgeEnum moveDirection,
                                                  int gridColumnPosition)
      • getMoveDirection

        protected CellEdgeEnum getMoveDirection​(int x)
      • getColumnCell

        protected ILayerCell getColumnCell​(int x)
        Parameters:
        x - The x coordinate to determine the column of the NatTable.
        Returns:
        The cell at the given x coordinate and the y coordinate of the initial event.
        Since:
        1.6
      • isValidTargetColumnPosition

        protected boolean isValidTargetColumnPosition​(ILayer natLayer,
                                                      int dragFromGridColumnPosition,
                                                      int dragToGridColumnPosition)
      • fireMoveStartCommand

        protected void fireMoveStartCommand​(NatTable natTable,
                                            int dragFromGridColumnPosition)
      • fireMoveEndCommand

        protected void fireMoveEndCommand​(NatTable natTable,
                                          int dragToGridColumnPosition)