# ViewSolutionSpace (ARX GUI Documentation)

org.deidentifier.arx.gui.view.impl.explore

## Class ViewSolutionSpace

- java.lang.Object
- - org.deidentifier.arx.gui.view.impl.explore.ViewSolutionSpace

- All Implemented Interfaces:
    IView
  Direct Known Subclasses:
    ViewLattice, ViewList, ViewTiles

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

  This class provides an abstract base for views that display parts of the solution space

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ViewSolutionSpace(org.eclipse.swt.widgets.Composite parent, Controller controller)` Constructor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract void` | `actionRedraw()` gray.dispose(); Action to redraw
    `protected void` | `actionSelectNode(ARXLattice.ARXNode node)` Action: select node
    `protected void` | `actionShowMenu(int x, int y)` Action show menu
    `protected double` | `asRelativeValue(InformationLoss<?> infoLoss)` Converts an score into a relative value in percent.
    `protected double` | `asRelativeValue(int generalization, int max)` Converts a generalization to a relative value.
    `void` | `dispose()` Disposes the view.
    `protected abstract void` | `eventFilterChanged(ARXResult result, ModelNodeFilter filter)` Event: filter changed
    `protected abstract void` | `eventModelChanged()` Event: model changed
    `protected abstract void` | `eventNodeSelected()` Event: node selected
    `protected abstract void` | `eventResultChanged(ARXResult result)` Event: result changed
    `protected Controller` | `getController()` Returns the controller
    `protected org.eclipse.swt.graphics.Color` | `getInnerColor(ARXLattice.ARXNode node)` Returns the inner color.
    `protected Model` | `getModel()` Returns the model
    `protected org.eclipse.swt.graphics.Color` | `getOuterColor(ARXLattice.ARXNode node)` Returns the outer color.
    `protected int` | `getOuterStrokeWidth(ARXLattice.ARXNode node, int width)` Returns the outer stroke width.
    `protected org.eclipse.swt.widgets.Composite` | `getPrimaryComposite()` Returns the primary composite
    `protected ARXLattice.ARXNode` | `getSelectedNode()` Returns the selected node
    `protected de.linearbits.swt.tiles.DecoratorString<ARXLattice.ARXNode>` | `getTooltipDecorator()` Returns the tool tip decorator
    `protected org.eclipse.swt.graphics.Color` | `getUtilityColor(ARXLattice.ARXNode node)` Returns the color according to a nodes utility
    `void` | `reset()` Resets the view.
    `protected void` | `showPrimaryComposite()` Shows the primary composite
    `protected void` | `showSecondaryComposite(int num, int max)` Shows the secondary composite
    `protected java.lang.String` | `trimLabel(java.lang.String label)` Trims the label to a predefined length
    `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`

- - ### Constructor Detail

    - #### ViewSolutionSpace

          public ViewSolutionSpace(org.eclipse.swt.widgets.Composite parent,
                           Controller controller)

      Constructor
      Parameters:
        `parent` -
        `controller` -

  - ### Method Detail

    - #### dispose

          public void dispose()

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

    - #### reset

          public void reset()

      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`

    - #### actionRedraw

          protected abstract void actionRedraw()

      gray.dispose(); Action to redraw

    - #### actionSelectNode

          protected void actionSelectNode(ARXLattice.ARXNode node)

      Action: select node
      Parameters:
        `node` -

    - #### actionShowMenu

          protected void actionShowMenu(int x,
                            int y)

      Action show menu
      Parameters:
        `x` -
        `y` -

    - #### asRelativeValue

          protected double asRelativeValue(InformationLoss<?> infoLoss)

      Converts an score into a relative value in percent.
      Parameters:
        `infoLoss` -
      Returns:

    - #### asRelativeValue

          protected double asRelativeValue(int generalization,
                               int max)

      Converts a generalization to a relative value.
      Parameters:
        `generalization` -
        `max` -
      Returns:

    - #### eventFilterChanged

          protected abstract void eventFilterChanged(ARXResult result,
                                ModelNodeFilter filter)

      Event: filter changed
      Parameters:
        `result` -
        `filter` -

    - #### eventModelChanged

          protected abstract void eventModelChanged()

      Event: model changed

    - #### eventNodeSelected

          protected abstract void eventNodeSelected()

      Event: node selected

    - #### eventResultChanged

          protected abstract void eventResultChanged(ARXResult result)

      Event: result changed
      Parameters:
        `result` -

    - #### getController

          protected Controller getController()

      Returns the controller
      Returns:

    - #### getInnerColor

          protected org.eclipse.swt.graphics.Color getInnerColor(ARXLattice.ARXNode node)

      Returns the inner color.
      Parameters:
        `node` -
      Returns:

    - #### getModel

          protected Model getModel()

      Returns the model
      Returns:

    - #### getOuterColor

          protected org.eclipse.swt.graphics.Color getOuterColor(ARXLattice.ARXNode node)

      Returns the outer color.
      Parameters:
        `node` -
      Returns:

    - #### getOuterStrokeWidth

          protected int getOuterStrokeWidth(ARXLattice.ARXNode node,
                                int width)

      Returns the outer stroke width.
      Parameters:
        `node` -
        `width` -
      Returns:

    - #### getPrimaryComposite

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

      Returns the primary composite
      Returns:

    - #### getSelectedNode

          protected ARXLattice.ARXNode getSelectedNode()

      Returns the selected node
      Returns:

    - #### getTooltipDecorator

          protected de.linearbits.swt.tiles.DecoratorString<ARXLattice.ARXNode> getTooltipDecorator()

      Returns the tool tip decorator
      Returns:

    - #### getUtilityColor

          protected org.eclipse.swt.graphics.Color getUtilityColor(ARXLattice.ARXNode node)

      Returns the color according to a nodes utility
      Parameters:
        `node` - The node
      Returns:

    - #### showPrimaryComposite

          protected void showPrimaryComposite()

      Shows the primary composite

    - #### showSecondaryComposite

          protected void showSecondaryComposite(int num,
                                    int max)

      Shows the secondary composite

    - #### trimLabel

          protected java.lang.String trimLabel(java.lang.String label)

      Trims the label to a predefined length
      Parameters:
        `label` -
      Returns: