Class ClientAreaAdapter

java.lang.Object
org.eclipse.nebula.widgets.nattable.util.ClientAreaAdapter
All Implemented Interfaces:
IClientAreaProvider

public class ClientAreaAdapter extends Object implements IClientAreaProvider
Adapter class to support multiple viewports in one NatTable instance. It needs to be created with the IClientAreaProvider that is set to the ViewportLayer before applying this one as base IClientAreaProvider.
  • Constructor Details

    • ClientAreaAdapter

      public ClientAreaAdapter(IClientAreaProvider baseProvider)
      Parameters:
      baseProvider - The base IClientAreaProvider. It should be the IClientAreaProvider that was applied before to the ViewportLayer to which this ClientAreaAdapter will be set to.
    • ClientAreaAdapter

      public ClientAreaAdapter(IClientAreaProvider baseProvider, int width, int height)
      Parameters:
      baseProvider - The base IClientAreaProvider. It should be the IClientAreaProvider that was applied before to the ViewportLayer to which this ClientAreaAdapter will be set to.
      width - The width that should be used by this ClientAreaAdapter. Setting the value to a positive number will cause a vertical split viewport within a NatTable.
      height - The height that should be used by this ClientAreaAdapter. Setting the value to a positive number will cause a horizontal split viewport within a NatTable.
  • Method Details

    • getWidth

      public int getWidth()
      Returns:
      The width that should be used by this ClientAreaAdapter. If a negative number is returned, the width of the base IClientAreaProvider will be used internally.
    • setWidth

      public void setWidth(int width)
      Parameters:
      width - The width that should be used by this ClientAreaAdapter. If a negative number is set, the width of the base IClientAreaProvider will be used internally.
    • getHeight

      public int getHeight()
      Returns:
      The height that should be used by this ClientAreaAdapter. If a negative number is returned, the height of the base IClientAreaProvider will be used internally.
    • setHeight

      public void setHeight(int height)
      Parameters:
      height - The height that should be used by this ClientAreaAdapter. If a negative number is set, the height of the base IClientAreaProvider will be used internally.
    • getClientArea

      public org.eclipse.swt.graphics.Rectangle getClientArea()
      Specified by:
      getClientArea in interface IClientAreaProvider