Class RAPInitializer

java.lang.Object
org.eclipse.nebula.widgets.nattable.RAPInitializer

public class RAPInitializer extends Object
Initializer that is called by the NatTable Activator to initialize the RAP environment for NatTable.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    class 
    Advice implementation that is used to redefine the getAdapter() method of the Canvas class.
    class 
     
    static class 
    DisposeListener that is used to stop the ServerPushSession when the NatTable is disposed.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addMouseUpListener(org.eclipse.nebula.widgets.nattable.NatTable natTable)
    Adds a mouse up listener to the NatTable instance that triggers a column resize operation on the given NatTable.
    static void
    addMouseWheelListener(org.eclipse.nebula.widgets.nattable.NatTable natTable, org.eclipse.nebula.widgets.nattable.viewport.IScroller<?> scroller)
    Adds a mouse wheel listener to the NatTable instance that triggers a scrolling operation on the given NatTable.
    static void
    addScrollbars(org.eclipse.nebula.widgets.nattable.NatTable natTable, org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer viewportLayer)
    Adds custom scrollbars to the NatTable instance.
    static int
    findColumnHeaderBottomRow(org.eclipse.nebula.widgets.nattable.layer.ILayer layer)
    Find the bottom row position of the column header in the given layer.
    static int[]
    findColumnHeaderDimensions(org.eclipse.nebula.widgets.nattable.layer.ILayer layer)
     
    static <T extends org.eclipse.nebula.widgets.nattable.layer.ILayer>
    T
    findLayer(org.eclipse.nebula.widgets.nattable.layer.ILayer layer, int columnPosition, Class<T> layerClass)
    Find the ILayer of the requested type in the layer stack for the given column position.
    static int[]
    findRowHeaderDimensions(org.eclipse.nebula.widgets.nattable.layer.ILayer layer)
     
    static int
    findRowHeaderRightmostColumn(org.eclipse.nebula.widgets.nattable.layer.ILayer layer)
    Find the rightmost column position of the row header in the given layer.
    protected static org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell
    getColumnCell(org.eclipse.nebula.widgets.nattable.NatTable natTable, int x)
     
    protected static int
    getDragToGridColumnPosition(org.eclipse.nebula.widgets.nattable.NatTable natTable, int x)
     
    protected static int
    getDragToGridRowPosition(org.eclipse.nebula.widgets.nattable.NatTable natTable, int y)
     
    protected static org.eclipse.nebula.widgets.nattable.ui.util.CellEdgeEnum
    getHorizontalMoveDirection(org.eclipse.nebula.widgets.nattable.NatTable natTable, int x)
     
    protected static org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell
    getRowCell(org.eclipse.nebula.widgets.nattable.NatTable natTable, int y)
     
    protected static org.eclipse.nebula.widgets.nattable.ui.util.CellEdgeEnum
    getVerticalMoveDirection(org.eclipse.nebula.widgets.nattable.NatTable natTable, int y)
     
    static void
    Initializes the RAP environment for NatTable.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RAPInitializer

      public RAPInitializer()
  • Method Details

    • initialize

      public static void initialize()
      Initializes the RAP environment for NatTable. Installs an agent on the currently running Java virtual machine and adds an advice to override the getAdapter() method of the Canvas class to return the NatTableLCA instance if getAdapter() of NatTable is called.
    • findLayer

      public static <T extends org.eclipse.nebula.widgets.nattable.layer.ILayer> T findLayer(org.eclipse.nebula.widgets.nattable.layer.ILayer layer, int columnPosition, Class<T> layerClass)
      Find the ILayer of the requested type in the layer stack for the given column position.
      Parameters:
      layer - The layer to start searching from.
      columnPosition - The column position to start the search.
      layerClass - The type of the layer to search for.
      Returns:
      The ILayer if found, otherwise null.
    • findColumnHeaderBottomRow

      public static int findColumnHeaderBottomRow(org.eclipse.nebula.widgets.nattable.layer.ILayer layer)
      Find the bottom row position of the column header in the given layer.
      Parameters:
      layer - The layer to search in.
      Returns:
      The bottom row position of the column header, or -1 if not found.
    • findColumnHeaderDimensions

      public static int[] findColumnHeaderDimensions(org.eclipse.nebula.widgets.nattable.layer.ILayer layer)
    • findRowHeaderRightmostColumn

      public static int findRowHeaderRightmostColumn(org.eclipse.nebula.widgets.nattable.layer.ILayer layer)
      Find the rightmost column position of the row header in the given layer.
      Parameters:
      layer - The layer to search in.
      Returns:
      The rightmost column position of the row header, or -1 if not found.
    • findRowHeaderDimensions

      public static int[] findRowHeaderDimensions(org.eclipse.nebula.widgets.nattable.layer.ILayer layer)
    • addScrollbars

      public static void addScrollbars(org.eclipse.nebula.widgets.nattable.NatTable natTable, org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer viewportLayer)
      Adds custom scrollbars to the NatTable instance. The scrollbars are created using the SWT Slider widget.
      Parameters:
      natTable - The NatTable instance to which the scrollbars should be added.
      viewportLayer - The ViewportLayer instance that is used to scroll the NatTable.
    • addMouseWheelListener

      public static void addMouseWheelListener(org.eclipse.nebula.widgets.nattable.NatTable natTable, org.eclipse.nebula.widgets.nattable.viewport.IScroller<?> scroller)
      Adds a mouse wheel listener to the NatTable instance that triggers a scrolling operation on the given NatTable.
      Parameters:
      natTable - The NatTable instance to which the mouse wheel listener should be added.
      scroller - The IScroller that is used to scroll the NatTable.
    • addMouseUpListener

      public static void addMouseUpListener(org.eclipse.nebula.widgets.nattable.NatTable natTable)
      Adds a mouse up listener to the NatTable instance that triggers a column resize operation on the given NatTable.
      Parameters:
      natTable - The NatTable instance to which the mouse up listener should be added.
    • getDragToGridColumnPosition

      protected static int getDragToGridColumnPosition(org.eclipse.nebula.widgets.nattable.NatTable natTable, int x)
    • getHorizontalMoveDirection

      protected static org.eclipse.nebula.widgets.nattable.ui.util.CellEdgeEnum getHorizontalMoveDirection(org.eclipse.nebula.widgets.nattable.NatTable natTable, int x)
    • getColumnCell

      protected static org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell getColumnCell(org.eclipse.nebula.widgets.nattable.NatTable natTable, int x)
    • getDragToGridRowPosition

      protected static int getDragToGridRowPosition(org.eclipse.nebula.widgets.nattable.NatTable natTable, int y)
    • getVerticalMoveDirection

      protected static org.eclipse.nebula.widgets.nattable.ui.util.CellEdgeEnum getVerticalMoveDirection(org.eclipse.nebula.widgets.nattable.NatTable natTable, int y)
    • getRowCell

      protected static org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell getRowCell(org.eclipse.nebula.widgets.nattable.NatTable natTable, int y)