Class CellSelectionEvent

java.lang.Object
org.eclipse.nebula.widgets.nattable.layer.event.CellVisualChangeEvent
org.eclipse.nebula.widgets.nattable.selection.event.CellSelectionEvent
All Implemented Interfaces:
ILayerEvent, IVisualChangeEvent, ISelectionEvent

public class CellSelectionEvent extends CellVisualChangeEvent implements ISelectionEvent
  • Constructor Details

    • CellSelectionEvent

      public CellSelectionEvent(SelectionLayer selectionLayer, int columnPosition, int rowPosition, boolean withShiftMask, boolean withControlMask)
      Creates a CellSelectionEvent that will move a selected cell into the viewport if it is currently not visible.
      Parameters:
      selectionLayer - The SelectionLayer.
      columnPosition - The column position of the selected cell.
      rowPosition - The row position of the selected cell.
      withShiftMask - true if the SHIFT key was pressed.
      withControlMask - true if the CTRL key was pressed.
    • CellSelectionEvent

      public CellSelectionEvent(SelectionLayer selectionLayer, int columnPosition, int rowPosition, boolean withShiftMask, boolean withControlMask, boolean forcingEntireCellIntoViewport)
      Parameters:
      selectionLayer - The SelectionLayer.
      columnPosition - The column position of the selected cell.
      rowPosition - The row position of the selected cell.
      withShiftMask - true if the SHIFT key was pressed.
      withControlMask - true if the CTRL key was pressed.
      forcingEntireCellIntoViewport - true if the selected cell should be moved into the viewport, false if not.
      Since:
      2.1
    • CellSelectionEvent

      protected CellSelectionEvent(CellSelectionEvent event)
  • Method Details

    • getSelectionLayer

      public SelectionLayer getSelectionLayer()
      Specified by:
      getSelectionLayer in interface ISelectionEvent
    • cloneEvent

      public CellSelectionEvent cloneEvent()
      Specified by:
      cloneEvent in interface ILayerEvent
      Overrides:
      cloneEvent in class CellVisualChangeEvent
      Returns:
      A cloned copy of the event. This cloned copy is provided to each listener.
    • isWithShiftMask

      public boolean isWithShiftMask()
      Returns:
      true if the SHIFT key was pressed.
    • isWithControlMask

      public boolean isWithControlMask()
      Returns:
      true if the CTRL key was pressed.
    • isForcingEntireCellIntoViewport

      public boolean isForcingEntireCellIntoViewport()
      Returns:
      true if the selected cell should be moved into the viewport, false if not.
      Since:
      2.1
    • convertToLocal

      public boolean convertToLocal(ILayer localLayer)
      Description copied from interface: ILayerEvent
      Convert the column/row positions carried by the event to the layer about to handle the event.
      Specified by:
      convertToLocal in interface ILayerEvent
      Overrides:
      convertToLocal in class CellVisualChangeEvent
      Parameters:
      localLayer - layer about to receive the event
      Returns:
      TRUE if successfully converted, FALSE otherwise