Class FillHandleDragMode

    • Field Detail

      • startEvent

        protected org.eclipse.swt.events.MouseEvent startEvent
      • startPosition

        protected org.eclipse.swt.graphics.Point startPosition
        Since:
        1.6
      • selectionCell

        protected ILayerCell selectionCell
      • menu

        protected org.eclipse.swt.widgets.Menu menu
    • Constructor Detail

      • FillHandleDragMode

        public FillHandleDragMode​(SelectionLayer selectionLayer,
                                  InternalCellClipboard clipboard)
        Parameters:
        selectionLayer - The SelectionLayer needed to determine the fill handle region and perform the update command.
        clipboard - The internal clipboard that carries the cells for the copy & paste operation triggered by using the fill handle.
    • Method Detail

      • mouseDown

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

        protected void performDragAction​(NatTable natTable,
                                         int x,
                                         int y,
                                         SelectionLayer.MoveDirectionEnum horizontal,
                                         SelectionLayer.MoveDirectionEnum vertical)
        Overrides:
        performDragAction in class AutoScrollDragMode
        Parameters:
        natTable - The NatTable instance the drag operation is currently performed on.
        x - The x coordinate of the mouse pointer on mouse move. Corrected to be inside the NatTable client area.
        y - The y coordinate of the mouse pointer on mouse move. Corrected to be inside the NatTable client area.
        horizontal - The horizontal direction where the auto-scroll should be performed to.
        vertical - The vertical direction where the auto-scroll should be performed to.
      • calculateIncreasedPositiveDiff

        protected int calculateIncreasedPositiveDiff​(int selectedIndex,
                                                     int relativeIndex)
        Calculates the difference between the two given values and increases the value by one.
        Parameters:
        selectedIndex - The first value
        relativeIndex - The second value
        Returns:
        The difference between the two given values increased by one.
      • showMenu

        protected boolean showMenu​(NatTable natTable)
        Check if the menu should be shown for selecting copy or series fill operation.
        Parameters:
        natTable - The NatTable instance on which the operation is performed.
        Returns:
        true if the menu should be shown, false if not.
      • openMenu

        protected void openMenu​(NatTable natTable)
        Opens a menu that enables a user to select whether values should simply be copied or if a series should be filled.
        Parameters:
        natTable - The NatTable instance on which the operation is performed.
      • reset

        protected void reset​(NatTable natTable)
        Reset the FillHandleDragMode states, the fill handle region in the SelectionLayer and redraw the given NatTable.
        Parameters:
        natTable - The NatTable instance on which the operation is performed.