org.deidentifier.arx.gui.view.impl.risk

## Class LayoutRisksAbstract

- java.lang.Object
- - org.deidentifier.arx.gui.view.impl.risk.LayoutRisksAbstract

All Implemented Interfaces:
  ILayout, IView

Direct Known Subclasses:
  LayoutRisksBottom, LayoutRisksTop

    public class LayoutRisksAbstract
    extends java.lang.Object
    implements ILayout, IView

Base class for layouts in this perspective

Author:
  Fabian Prasser

### Constructor Summary

Constructors
Constructor and Description
`LayoutRisksAbstract(org.eclipse.swt.widgets.Composite parent, Controller controller, boolean input, boolean top)` Creates a new instance

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addSelectionListener(org.eclipse.swt.events.SelectionListener listener)` Adds a selection listener.
`void` `dispose()` Disposes the view.
`ModelRisk.ViewRiskType` `getSelectedViewType()` Returns the selected type of view
`int` `getSelectionIndex()` Returns the selection index.
`ViewRisks<?>` `getViewForSelectionIndex(int index)` Returns the according view type
`<U> U` `getViewForType(java.lang.Class<U> clazz)` Returns the according view type
`void` `reset()` Resets the view.
`void` `setSelectionIdex(int index)` Sets the selection index.
`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

#### LayoutRisksAbstract

    public LayoutRisksAbstract(org.eclipse.swt.widgets.Composite parent,
                               Controller controller,
                               boolean input,
                               boolean top)

Creates a new instance

Parameters:
  `parent` -
  `controller` -
  `input` -
  `top` -

### Method Detail

#### addSelectionListener

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

Adds a selection listener.

Parameters:
  `listener` -

#### dispose

    public void dispose()

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

Specified by:
  `dispose` in interface `IView`

#### getSelectedViewType

    public ModelRisk.ViewRiskType getSelectedViewType()

Returns the selected type of view

#### getSelectionIndex

    public int getSelectionIndex()

Returns the selection index.

Returns:

#### getViewForSelectionIndex

    public ViewRisks<?> getViewForSelectionIndex(int index)

Returns the according view type

Parameters:
  `index` -
Returns:

#### getViewForType

    public <U> U getViewForType(java.lang.Class<U> clazz)

Returns the according view type

Parameters:
  `clazz` -
Returns:

#### reset

    public void reset()

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

Specified by:
  `reset` in interface `IView`

#### setSelectionIdex

    public void setSelectionIdex(int index)

Sets the selection index.

Parameters:
  `index` -

#### update

    public void update(ModelEvent event)

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

Specified by:
  `update` in interface `IView`