Class SelectRegionCommandHandler

    • Constructor Detail

      • SelectRegionCommandHandler

        public SelectRegionCommandHandler​(SelectionLayer selectionLayer)
        Parameters:
        selectionLayer - The SelectionLayer on which this handler should operate.
    • Method Detail

      • selectRegion

        protected void selectRegion​(org.eclipse.swt.graphics.Rectangle region,
                                    boolean withShiftMask,
                                    boolean withControlMask,
                                    int anchorColumn,
                                    int anchorRow)
      • selectRegionWithShiftKey

        protected Range selectRegionWithShiftKey​(org.eclipse.swt.graphics.Rectangle region,
                                                 int anchorColumn,
                                                 int anchorRow)
        Selects a region with SHIFT modifier enabled. That means the selection range is calculated based on the current selection anchor and the corner of the given region that is most away from the anchor.
        Parameters:
        region - The region to be selected.
        anchorColumn - The column position to which the selection anchor should be moved to or -1 if the calculated anchor column position should be used.
        anchorRow - The row position to which the selection anchor should be moved to or -1 if the calculated anchor row position should be used.
        Returns:
        The row positions that have gained selection.
      • selectRegionWithCtrlKey

        protected Range selectRegionWithCtrlKey​(org.eclipse.swt.graphics.Rectangle region,
                                                int anchorColumn,
                                                int anchorRow)
        Selects a region with CTRL modifier enabled. That means the current selection is extended by the given region.
        Parameters:
        region - The region to be selected.
        anchorColumn - The column position to which the selection anchor should be moved to or -1 if the calculated anchor column position should be used.
        anchorRow - The row position to which the selection anchor should be moved to or -1 if the calculated anchor row position should be used.
        Returns:
        The row positions that have gained selection.