# ComponentTable (ARX GUI Documentation)

org.deidentifier.arx.gui.view.impl.common

## Class ComponentTable

- java.lang.Object
- - org.deidentifier.arx.gui.view.impl.common.ComponentTable

- All Implemented Interfaces:
    IComponent

      public class ComponentTable
      extends java.lang.Object
      implements IComponent

  A virtual table implemented with NatTable.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ComponentTable(org.eclipse.swt.widgets.Composite parent, int style)` Creates a new instance.
    `ComponentTable(org.eclipse.swt.widgets.Composite parent, int style, CTConfiguration config)` Creates a new instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addMouseListener(org.eclipse.swt.events.MouseListener arg0)` Adds a listener.
    `boolean` | `addSelectionListener(org.eclipse.swt.events.SelectionListener e)` Adds a selection listener.
    `void` | `clear()` Clears the table.
    `org.eclipse.swt.widgets.Control` | `getControl()` Returns the backing widget.
    `java.lang.Integer` | `getSelectedColumn()` Returns the selected column, or null.
    `java.lang.Integer` | `getSelectedRow()` Returns the selected row, or null.
    `void` | `refresh()` Redraws the table.
    `void` | `removeMouseListener(org.eclipse.swt.events.MouseListener arg0)` Removes a listener.
    `org.eclipse.swt.events.SelectionListener` | `removeSelectionListener(int index)` Removes a selection listener.
    `void` | `setData(org.eclipse.nebula.widgets.nattable.data.IDataProvider data)` Updates the underlying table.
    `void` | `setData(org.eclipse.nebula.widgets.nattable.data.IDataProvider data, org.eclipse.nebula.widgets.nattable.data.IDataProvider columns)` Updates the underlying table.
    `void` | `setData(org.eclipse.nebula.widgets.nattable.data.IDataProvider data, org.eclipse.nebula.widgets.nattable.data.IDataProvider rows, org.eclipse.nebula.widgets.nattable.data.IDataProvider columns)` Updates the underlying table.
    `void` | `setData(org.eclipse.nebula.widgets.nattable.data.IDataProvider data, java.lang.String[] columns)` Updates the underlying table.
    `void` | `setData(org.eclipse.nebula.widgets.nattable.data.IDataProvider data, java.lang.String[] rows, java.lang.String[] columns)` Updates the underlying table.
    `void` | `setData(java.lang.String[][] data)` Updates the underlying table.
    `void` | `setData(java.lang.String[][] data, java.lang.String[] columns)` Updates the underlying table.
    `void` | `setData(java.lang.String[][] data, java.lang.String[] rows, java.lang.String[] columns)` Updates the underlying table.
    `void` | `setSelection(int row, int column)` Updates the selection.
    `org.eclipse.swt.graphics.Point` | `toDisplay(int x, int y)` To display coordinates.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ComponentTable

          public ComponentTable(org.eclipse.swt.widgets.Composite parent,
                        int style)

      Creates a new instance.
      Parameters:
        `parent` -
        `style` -

    - #### ComponentTable

          public ComponentTable(org.eclipse.swt.widgets.Composite parent,
                        int style,
                        CTConfiguration config)

      Creates a new instance.
      Parameters:
        `parent` -
        `style` -
        `config` -

  - ### Method Detail

    - #### addMouseListener

          public void addMouseListener(org.eclipse.swt.events.MouseListener arg0)

      Adds a listener.
      Parameters:
        `arg0` -

    - #### addSelectionListener

          public boolean addSelectionListener(org.eclipse.swt.events.SelectionListener e)

      Adds a selection listener.
      Parameters:
        `e` -
      Returns:

    - #### clear

          public void clear()

      Clears the table.

    - #### getControl

          public org.eclipse.swt.widgets.Control getControl()

      Returns the backing widget.
      Returns:

    - #### getSelectedColumn

          public java.lang.Integer getSelectedColumn()

      Returns the selected column, or null.
      Returns:

    - #### getSelectedRow

          public java.lang.Integer getSelectedRow()

      Returns the selected row, or null.
      Returns:

    - #### refresh

          public void refresh()

      Redraws the table.

    - #### removeMouseListener

          public void removeMouseListener(org.eclipse.swt.events.MouseListener arg0)

      Removes a listener.
      Parameters:
        `arg0` -

    - #### removeSelectionListener

          public org.eclipse.swt.events.SelectionListener removeSelectionListener(int index)

      Removes a selection listener.
      Parameters:
        `index` -
      Returns:

    - #### setData

          public void setData(org.eclipse.nebula.widgets.nattable.data.IDataProvider data)

      Updates the underlying table.
      Parameters:
        `data` -

    - #### setData

          public void setData(org.eclipse.nebula.widgets.nattable.data.IDataProvider data,
                     org.eclipse.nebula.widgets.nattable.data.IDataProvider columns)

      Updates the underlying table.
      Parameters:
        `data` -
        `columns` -

    - #### setData

          public void setData(org.eclipse.nebula.widgets.nattable.data.IDataProvider data,
                     org.eclipse.nebula.widgets.nattable.data.IDataProvider rows,
                     org.eclipse.nebula.widgets.nattable.data.IDataProvider columns)

      Updates the underlying table.
      Parameters:
        `data` -
        `rows` -
        `columns` -

    - #### setData

          public void setData(org.eclipse.nebula.widgets.nattable.data.IDataProvider data,
                     java.lang.String[] columns)

      Updates the underlying table.
      Parameters:
        `data` -
        `columns` -

    - #### setData

          public void setData(org.eclipse.nebula.widgets.nattable.data.IDataProvider data,
                     java.lang.String[] rows,
                     java.lang.String[] columns)

      Updates the underlying table.
      Parameters:
        `data` -
        `rows` -
        `columns` -

    - #### setData

          public void setData(java.lang.String[][] data)

      Updates the underlying table.
      Parameters:
        `data` -

    - #### setData

          public void setData(java.lang.String[][] data,
                     java.lang.String[] columns)

      Updates the underlying table.
      Parameters:
        `data` -
        `columns` -

    - #### setData

          public void setData(java.lang.String[][] data,
                     java.lang.String[] rows,
                     java.lang.String[] columns)

      Updates the underlying table.
      Parameters:
        `data` -
        `rows` -
        `columns` -

    - #### setSelection

          public void setSelection(int row,
                          int column)

      Updates the selection.
      Parameters:
        `row` -
        `column` -

    - #### toDisplay

          public org.eclipse.swt.graphics.Point toDisplay(int x,
                                                 int y)

      To display coordinates.
      Parameters:
        `x` -
        `y` -
      Returns: