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

## Class ViewData

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

All Implemented Interfaces:
  IView

Direct Known Subclasses:
  ViewDataInput, ViewDataOutput

    public abstract class ViewData
    extends java.lang.Object
    implements IView

A view on a `Data` object.

Author:
  Fabian Prasser, Johanna Eicher

### Constructor Summary

Constructors
Constructor and Description
`ViewData(org.eclipse.swt.widgets.Composite parent, Controller controller, java.lang.String helpid, java.lang.String title)` Creates a new data view.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addScrollBarListener(org.eclipse.swt.widgets.Listener listener)` Add a scrollbar listener to this view.
`void` `addSelectionListener(org.eclipse.swt.events.SelectionListener listener)` Adds a listener to the folder
`org.eclipse.swt.widgets.Composite` `createAdditionalItem(java.lang.String title, java.lang.String helpid)` Adds an additional item to the folder
`void` `dispose()` Disposes the view.
`int` `getSelectionIndex()` Returns the selection index of the folder
`org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer` `getViewportLayer()` Returns the NatTable viewport layer.
`void` `reset()` Resets the view.
`void` `setSelectedItem(int index)` Sets the selection
`void` `setSelectionIndex(int index)` Sets the selection index of the folder
`void` `update(ModelEvent event)` Updates the view.

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

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

### Constructor Detail

#### ViewData

    public ViewData(org.eclipse.swt.widgets.Composite parent,
                    Controller controller,
                    java.lang.String helpid,
                    java.lang.String title)

Creates a new data view.

Parameters:
  `parent` -
  `controller` -
  `title` -
  `helpid` -

### Method Detail

#### addScrollBarListener

    public void addScrollBarListener(org.eclipse.swt.widgets.Listener listener)

Add a scrollbar listener to this view.

Parameters:
  `listener` -

#### addSelectionListener

    public void addSelectionListener(org.eclipse.swt.events.SelectionListener listener)

Adds a listener to the folder

Parameters:
  `listener` -

#### createAdditionalItem

    public org.eclipse.swt.widgets.Composite createAdditionalItem(java.lang.String title,
                                                                  java.lang.String helpid)

Adds an additional item to the folder

Parameters:
  `title` -
  `helpid` -
Returns:

#### dispose

    public void dispose()

Description copied from interface: `IView`
Disposes the view.

Specified by:
  `dispose` in interface `IView`

#### getSelectionIndex

    public int getSelectionIndex()

Returns the selection index of the folder

Returns:

#### getViewportLayer

    public org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer getViewportLayer()

Returns the NatTable viewport layer.

Returns:

#### reset

    public void reset()

Description copied from interface: `IView`
Resets the view.

Specified by:
  `reset` in interface `IView`

#### setSelectedItem

    public void setSelectedItem(int index)

Sets the selection

Parameters:
  `index` -

#### setSelectionIndex

    public void setSelectionIndex(int index)

Sets the selection index of the folder

Parameters:
  `index` -

#### update

    public void update(ModelEvent event)

Description copied from interface: `IView`
Updates the view.

Specified by:
  `update` in interface `IView`