Class RAPInitializer
java.lang.Object
org.eclipse.nebula.widgets.nattable.RAPInitializer
Initializer that is called by the NatTable Activator to initialize the RAP environment for NatTable.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassAdvice implementation that is used to redefine the getAdapter() method of the Canvas class.classstatic classDisposeListener that is used to stop theServerPushSessionwhen the NatTable is disposed. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddMouseUpListener(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 voidaddMouseWheelListener(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 voidaddScrollbars(org.eclipse.nebula.widgets.nattable.NatTable natTable, org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer viewportLayer) Adds custom scrollbars to the NatTable instance.static intfindColumnHeaderBottomRow(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>
TfindLayer(org.eclipse.nebula.widgets.nattable.layer.ILayer layer, int columnPosition, Class<T> layerClass) Find theILayerof the requested type in the layer stack for the given column position.static int[]findRowHeaderDimensions(org.eclipse.nebula.widgets.nattable.layer.ILayer layer) static intfindRowHeaderRightmostColumn(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.ILayerCellgetColumnCell(org.eclipse.nebula.widgets.nattable.NatTable natTable, int x) protected static intgetDragToGridColumnPosition(org.eclipse.nebula.widgets.nattable.NatTable natTable, int x) protected static intgetDragToGridRowPosition(org.eclipse.nebula.widgets.nattable.NatTable natTable, int y) protected static org.eclipse.nebula.widgets.nattable.ui.util.CellEdgeEnumgetHorizontalMoveDirection(org.eclipse.nebula.widgets.nattable.NatTable natTable, int x) protected static org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCellgetRowCell(org.eclipse.nebula.widgets.nattable.NatTable natTable, int y) protected static org.eclipse.nebula.widgets.nattable.ui.util.CellEdgeEnumgetVerticalMoveDirection(org.eclipse.nebula.widgets.nattable.NatTable natTable, int y) static voidInitializes the RAP environment for NatTable.
-
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 theILayerof 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
ILayerif found, otherwisenull.
-
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- TheIScrollerthat 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)
-