# ViewStatistics (ARX GUI Documentation)

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

## Class ViewStatistics<T extends AnalysisContextVisualization>

- java.lang.Object
- - org.deidentifier.arx.gui.view.impl.utility.ViewStatistics<T>

- Type Parameters:
    `T` -
  All Implemented Interfaces:
    IView
  Direct Known Subclasses:
    ViewStatisticsContingencyHeatmap, ViewStatisticsContingencyTable, ViewStatisticsDistributionHistogram, ViewStatisticsDistributionTable, ViewStatisticsEquivalenceClassTable, ViewStatisticsLogisticRegression, ViewStatisticsSummaryTable

      public abstract class ViewStatistics<T extends AnalysisContextVisualization>
      extends java.lang.Object
      implements IView

  This is a base class for displaying utility data.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `MINIMAL_WORKING_TIME` Our users are patient.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ViewStatistics(org.eclipse.swt.widgets.Composite parent, Controller controller, ModelEvent.ModelPart target, ModelEvent.ModelPart reset, boolean dependsOnAttribute)` Creates a new instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract org.eclipse.swt.widgets.Control` | `createControl(org.eclipse.swt.widgets.Composite parent)` Implement this to create the widget.
    `protected abstract T` | `createViewConfig(AnalysisContext context)`
    `void` | `dispose()` Disposes the view.
    `protected abstract void` | `doReset()` Implement this to reset.
    `protected abstract void` | `doUpdate(T context)` Implement this to update.
    `protected Controller` | `getController()` Returns the controller
    `protected Model` | `getModel()` Returns the model
    `protected org.eclipse.swt.widgets.Composite` | `getParent()` Returns the parent composite
    `protected ComponentStatusLabelProgressProvider` | `getProgressProvider()` Overwrite this to return a progress provider
    `protected ModelEvent.ModelPart` | `getTarget()` Returns the target
    `abstract LayoutUtility.ViewUtilityType` | `getType()` Returns the type
    `protected boolean` | `isEnabled()` Is this view enabled
    `protected abstract boolean` | `isRunning()` Is a job running
    `void` | `reset()` Resets the view.
    `protected void` | `setStatusDone()` Status update.
    `protected void` | `setStatusEmpty()` Status empty.
    `protected void` | `setStatusWorking()` Status working.
    `protected void` | `triggerUpdate()` Triggers an update
    `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

    - #### MINIMAL_WORKING_TIME

          public static final int MINIMAL_WORKING_TIME

      Our users are patient.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ViewStatistics

          public ViewStatistics(org.eclipse.swt.widgets.Composite parent,
                        Controller controller,
                        ModelEvent.ModelPart target,
                        ModelEvent.ModelPart reset,
                        boolean dependsOnAttribute)

      Creates a new instance.
      Parameters:
        `parent` -
        `controller` -
        `target` -
        `reset` -
        `dependsOnAttribute` -

  - ### Method Detail

    - #### dispose

          public void dispose()

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

    - #### getType

          public abstract LayoutUtility.ViewUtilityType getType()

      Returns the type
      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`

    - #### createControl

          protected abstract org.eclipse.swt.widgets.Control createControl(org.eclipse.swt.widgets.Composite parent)

      Implement this to create the widget.
      Parameters:
        `parent` -
      Returns:

    - #### createViewConfig

          protected abstract T createViewConfig(AnalysisContext context)

      Parameters:
        `context` -
      Returns:

    - #### doReset

          protected abstract void doReset()

      Implement this to reset.

    - #### doUpdate

          protected abstract void doUpdate(T context)

      Implement this to update.
      Parameters:
        `context` -

    - #### getController

          protected Controller getController()

      Returns the controller
      Returns:

    - #### getModel

          protected Model getModel()

      Returns the model
      Returns:

    - #### getParent

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

      Returns the parent composite

    - #### getProgressProvider

          protected ComponentStatusLabelProgressProvider getProgressProvider()

      Overwrite this to return a progress provider
      Returns:

    - #### getTarget

          protected ModelEvent.ModelPart getTarget()

      Returns the target
      Returns:

    - #### isEnabled

          protected boolean isEnabled()

      Is this view enabled
      Returns:

    - #### isRunning

          protected abstract boolean isRunning()

      Is a job running
      Returns:

    - #### setStatusDone

          protected void setStatusDone()

      Status update.

    - #### setStatusEmpty

          protected void setStatusEmpty()

      Status empty.

    - #### setStatusWorking

          protected void setStatusWorking()

      Status working.

    - #### triggerUpdate

          protected void triggerUpdate()

      Triggers an update