# EditorCriterion (ARX GUI Documentation)

org.deidentifier.arx.gui.view.impl.menu

## Class EditorCriterion<T extends ModelCriterion>

- java.lang.Object
- - org.deidentifier.arx.gui.view.impl.menu.EditorCriterion<T>

- Direct Known Subclasses:
    EditorCriterionBLikeness, EditorCriterionDDisclosurePrivacy, EditorCriterionDifferentialPrivacy, EditorCriterionDPresence, EditorCriterionKAnonymity, EditorCriterionKMap, EditorCriterionLDiversity, EditorCriterionProfitability, EditorCriterionRiskBased, EditorCriterionTCloseness

      public abstract class EditorCriterion<T extends ModelCriterion>
      extends java.lang.Object

  Base class for editors

- - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EditorCriterion(org.eclipse.swt.widgets.Composite parent, T model)` Creates a new instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract org.eclipse.swt.widgets.Composite` | `build(org.eclipse.swt.widgets.Composite parent)` Build the composite
    `protected de.linearbits.swt.widgets.Knob<java.lang.Double>` | `createKnobDouble(org.eclipse.swt.widgets.Composite parent, double min, double max)` Creates a double knob
    `protected de.linearbits.swt.widgets.Knob<java.lang.Integer>` | `createKnobInteger(org.eclipse.swt.widgets.Composite parent, int min, int max)` Creates a double knob
    `protected org.eclipse.swt.widgets.Text` | `createLabel(org.eclipse.swt.widgets.Composite parent)` Creates a label
    `void` | `dispose()` Disposes the editor
    `T` | `getModel()` Returns the altered model
    `protected abstract java.util.List<ModelCriterion>` | `getTypicalParameters()` Returns a set of typical parameters
    `protected void` | `parse(T model)` Parse non-default parameters
    `protected abstract void` | `parse(T model, boolean defaultParameters)` Parse
    `void` | `parseDefault(ModelCriterion model)` Parse method
    `protected void` | `updateLabel(org.eclipse.swt.widgets.Label label, int value)` Updates the label and tool tip text.
    `protected void` | `updateLabel(org.eclipse.swt.widgets.Text label, double value)` Updates the label and tool tip text.
    `protected void` | `updateLabel(org.eclipse.swt.widgets.Text label, int value)` Updates the label and tool tip text.

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### model

          protected final T extends ModelCriterion model

      Model

  - ### Constructor Detail

    - #### EditorCriterion

          public EditorCriterion(org.eclipse.swt.widgets.Composite parent,
                         T model)

      Creates a new instance.
      Parameters:
        `parent` -
        `model` -

  - ### Method Detail

    - #### dispose

          public void dispose()

      Disposes the editor

    - #### getModel

          public T getModel()

      Returns the altered model
      Returns:

    - #### parseDefault

          public void parseDefault(ModelCriterion model)

      Parse method
      Parameters:
        `model` -

    - #### build

          protected abstract org.eclipse.swt.widgets.Composite build(org.eclipse.swt.widgets.Composite parent)

      Build the composite
      Parameters:
        `parent` -

    - #### createKnobDouble

          protected de.linearbits.swt.widgets.Knob<java.lang.Double> createKnobDouble(org.eclipse.swt.widgets.Composite parent,
                                                                          double min,
                                                                          double max)

      Creates a double knob
      Parameters:
        `parent` -
        `min` -
        `max` -
      Returns:

    - #### createKnobInteger

          protected de.linearbits.swt.widgets.Knob<java.lang.Integer> createKnobInteger(org.eclipse.swt.widgets.Composite parent,
                                                                            int min,
                                                                            int max)

      Creates a double knob
      Parameters:
        `parent` -
        `min` -
        `max` -
      Returns:

    - #### createLabel

          protected org.eclipse.swt.widgets.Text createLabel(org.eclipse.swt.widgets.Composite parent)

      Creates a label
      Returns:

    - #### getTypicalParameters

          protected abstract java.util.List<ModelCriterion> getTypicalParameters()

      Returns a set of typical parameters
      Returns:

    - #### parse

          protected void parse(T model)

      Parse non-default parameters
      Parameters:
        `model` -

    - #### parse

          protected abstract void parse(T model,
                   boolean defaultParameters)

      Parse
      Parameters:
        `model` -
        `default` -

    - #### updateLabel

          protected void updateLabel(org.eclipse.swt.widgets.Label label,
                         int value)

      Updates the label and tool tip text.
      Parameters:
        `label` -
        `value` -

    - #### updateLabel

          protected void updateLabel(org.eclipse.swt.widgets.Text label,
                         double value)

      Updates the label and tool tip text.
      Parameters:
        `label` -
        `value` -

    - #### updateLabel

          protected void updateLabel(org.eclipse.swt.widgets.Text label,
                         int value)

      Updates the label and tool tip text.
      Parameters:
        `label` -
        `value` -