# LayoutRisksAbstract (ARX GUI Documentation)

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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Model` | `model` Model

  - ### 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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addSelectionListener(org.eclipse.swt.events.SelectionListener listener)` Adds a selection listener.
    `protected org.eclipse.swt.widgets.Composite` | `createTab(java.lang.String title, java.lang.String helpid)` Creates a new tab
    `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
    `protected void` | `registerView(int index, ViewRisks<?> view)` Registers a new view
    `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

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

- - ### Field Detail

    - #### model

          protected Model model

      Model

  - ### 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:

    - #### 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`

    - #### createTab

          protected org.eclipse.swt.widgets.Composite createTab(java.lang.String title,
                                                    java.lang.String helpid)

      Creates a new tab
      Parameters:
        `title` -
      Returns:

    - #### registerView

          protected void registerView(int index,
                          ViewRisks<?> view)

      Registers a new view
      Parameters:
        `index` -
        `view` -