# ViewProperties (ARX GUI Documentation)

org.deidentifier.arx.gui.view.impl.utility

## Class ViewProperties

- java.lang.Object
- - org.deidentifier.arx.gui.view.impl.utility.ViewProperties

- All Implemented Interfaces:
    IView, ViewStatisticsBasic
  Direct Known Subclasses:
    ViewPropertiesInput, ViewPropertiesOutput

      public abstract class ViewProperties
      extends java.lang.Object
      implements IView, ViewStatisticsBasic

  This view displays basic properties about input or output data.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected class` | `ViewProperties.Property` A class for properties displayed in the tree view.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Controller` | `controller` Internal stuff.
    `protected Model` | `model` Internal stuff.
    `protected org.eclipse.swt.widgets.Composite` | `root` Internal stuff.
    `protected java.util.List<ViewProperties.Property>` | `roots` Internal stuff.
    `protected org.eclipse.jface.viewers.TreeViewer` | `treeViewer` Internal stuff.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ViewProperties(org.eclipse.swt.widgets.Composite parent, Controller controller, ModelEvent.ModelPart target, ModelEvent.ModelPart reset)` Constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected double` | `asRelativeValue(InformationLoss<?> infoLoss, ARXResult result)` Converts an information loss into a relative value in percent TODO: Code duplicate from NodePropertiesView.
    `void` | `dispose()` Disposes the view.
    `protected abstract void` | `doUpdate(ModelEvent.ModelPart part)` Implement this to update the view.
    `protected AnalysisContext` | `getContext()` Returns the context.
    `org.eclipse.swt.widgets.Composite` | `getParent()` Returns the parent composite
    `protected void` | `refresh()` Refreshes the tree
    `void` | `reset()` Resets the view.
    `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`

    - ### Methods inherited from interface org.deidentifier.arx.gui.view.impl.utility.ViewStatisticsBasic

      `getType`

- - ### Field Detail

    - #### roots

          protected final java.util.List<ViewProperties.Property> roots

      Internal stuff.

    - #### root

          protected final org.eclipse.swt.widgets.Composite root

      Internal stuff.

    - #### model

          protected Model model

      Internal stuff.

    - #### controller

          protected final Controller controller

      Internal stuff.

    - #### treeViewer

          protected org.eclipse.jface.viewers.TreeViewer treeViewer

      Internal stuff.

  - ### Constructor Detail

    - #### ViewProperties

          protected ViewProperties(org.eclipse.swt.widgets.Composite parent,
                        Controller controller,
                        ModelEvent.ModelPart target,
                        ModelEvent.ModelPart reset)

      Constructor.
      Parameters:
        `parent` -
        `controller` -
        `target` -
        `reset` -

  - ### Method Detail

    - #### dispose

          public void dispose()

      Description copied from interface: `IView`
      Disposes the view.
      Specified by:
        `dispose` in interface `IView`

    - #### getParent

          public org.eclipse.swt.widgets.Composite getParent()

      Description copied from interface: `ViewStatisticsBasic`
      Returns the parent composite
      Specified by:
        `getParent` in interface `ViewStatisticsBasic`
      Returns:

    - #### reset

          public void reset()

      Description copied from interface: `IView`
      Resets the view.
      Specified by:
        `reset` in interface `IView`

    - #### update

          public void update(ModelEvent event)

      Description copied from interface: `IView`
      Updates the view.
      Specified by:
        `update` in interface `IView`

    - #### asRelativeValue

          protected double asRelativeValue(InformationLoss<?> infoLoss,
                               ARXResult result)

      Converts an information loss into a relative value in percent TODO: Code duplicate from NodePropertiesView.
      Parameters:
        `infoLoss` -
        `result` -
      Returns:

    - #### getContext

          protected AnalysisContext getContext()

      Returns the context.
      Returns:

    - #### refresh

          protected void refresh()

      Refreshes the tree

    - #### doUpdate

          protected abstract void doUpdate(ModelEvent.ModelPart part)

      Implement this to update the view.
      Parameters:
        `part` -